azure_mgmt_sql 0.16.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2014-04-01/generated/azure_mgmt_sql.rb +62 -61
- data/lib/2014-04-01/generated/azure_mgmt_sql/models/database.rb +8 -8
- data/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool.rb +8 -8
- data/lib/2014-04-01/generated/azure_mgmt_sql/models/server.rb +8 -8
- data/lib/2014-04-01/generated/azure_mgmt_sql/models/tracked_resource.rb +11 -11
- data/lib/2014-04-01/generated/azure_mgmt_sql/server_advisors.rb +454 -0
- data/lib/2014-04-01/generated/azure_mgmt_sql/sql_management_client.rb +22 -17
- data/lib/2015-05-01-preview/generated/azure_mgmt_sql.rb +43 -25
- data/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_automatic_tuning_operations.rb +246 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_blob_auditing_policies.rb +6 -12
- data/lib/2015-05-01-preview/generated/azure_mgmt_sql/firewall_rules.rb +666 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_sql/managed_instances.rb +986 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_disabled_reason.rb +21 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_mode.rb +18 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_option_mode_actual.rb +16 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_option_mode_desired.rb +17 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_options.rb +91 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/database_automatic_tuning.rb +110 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/database_blob_auditing_policy.rb +72 -2
- data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/firewall_rule.rb +86 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/firewall_rule_list.rb +55 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/firewall_rule_list_result.rb +100 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/managed_instance.rb +206 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/managed_instance_list_result.rb +100 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/managed_instance_update.rb +161 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/proxy_resource_with_writable_name.rb +61 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/resource_with_writable_name.rb +70 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sku.rb +97 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_sql/sql_management_client.rb +20 -6
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql.rb +88 -11
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/backup_long_term_retention_policies.rb +402 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/data_warehouse_user_activities_operations.rb +134 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_blob_auditing_policies.rb +258 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_operations.rb +4 -4
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessment_rule_baselines.rb +400 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessments.rb +356 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/databases.rb +4 -4
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/extended_database_blob_auditing_policies.rb +258 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/extended_server_blob_auditing_policies.rb +290 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_agents.rb +816 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_credentials.rb +571 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_executions.rb +1101 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_step_executions.rb +415 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_steps.rb +927 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_target_executions.rb +697 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_target_groups.rb +571 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_versions.rb +358 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/jobs.rb +570 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/long_term_retention_backups.rb +925 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/managed_databases.rb +963 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/backup_long_term_retention_policy.rb +110 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/blob_auditing_policy_state.rb +16 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/complete_database_restore_definition.rb +47 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/create_mode.rb +1 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/data_warehouse_user_activities.rb +74 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database.rb +9 -9
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_blob_auditing_policy.rb +238 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_operation.rb +36 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/{status.rb → database_status.rb} +2 -2
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_update.rb +9 -9
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment.rb +100 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment_rule_baseline.rb +84 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment_rule_baseline_item.rb +56 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/extended_database_blob_auditing_policy.rb +238 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/extended_server_blob_auditing_policy.rb +238 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job.rb +99 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent.rb +122 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_list_result.rb +100 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_state.rb +19 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_update.rb +54 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_credential.rb +85 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_credential_list_result.rb +100 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution.rb +224 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_lifecycle.rb +24 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_list_result.rb +100 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_target.rb +73 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_list_result.rb +100 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_schedule.rb +98 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_schedule_type.rb +16 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step.rb +135 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action.rb +73 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action_source.rb +15 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action_type.rb +15 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_execution_options.rb +100 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_list_result.rb +100 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_output.rb +127 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_output_type.rb +15 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target.rb +121 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group.rb +82 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group_list_result.rb +100 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group_membership_type.rb +16 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_type.rb +19 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_version.rb +62 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_version_list_result.rb +100 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/long_term_retention_backup.rb +134 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/{database_restore_point_list_result.rb → long_term_retention_backup_list_result.rb} +9 -9
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/long_term_retention_database_state.rb +17 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database.rb +242 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_create_mode.rb +17 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_list_result.rb +100 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_status.rb +19 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_update.rb +210 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/provisioning_state.rb +19 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/{database_restore_point.rb → restore_point.rb} +6 -5
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/restore_point_list_result.rb +68 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/security_alert_policy_state.rb +17 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/sensitivity_label.rb +84 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/sensitivity_label_list_result.rb +100 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/sensitivity_label_source.rb +16 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_blob_auditing_policy.rb +226 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_security_alert_policy.rb +166 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/{arm_sku.rb → sku.rb} +16 -11
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_policy_baseline_name.rb +16 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_recurring_scans_properties.rb +80 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/{database_restore_points.rb → restore_points.rb} +93 -111
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/sensitivity_labels.rb +612 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_automatic_tuning_operations.rb +4 -4
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_blob_auditing_policies.rb +290 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_dns_aliases.rb +4 -4
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_security_alert_policies.rb +290 -0
- data/lib/2017-03-01-preview/generated/azure_mgmt_sql/sql_management_client.rb +100 -9
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql.rb +104 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/backup_short_term_retention_policies.rb +684 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/capabilities.rb +128 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/database_operations.rb +338 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessment_scans.rb +621 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/databases.rb +1566 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/elastic_pool_operations.rb +338 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/elastic_pools.rb +815 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/instance_failover_groups.rb +983 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/managed_instance_tde_certificates.rb +175 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/backup_short_term_retention_policy.rb +74 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/backup_short_term_retention_policy_list_result.rb +101 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/capability_group.rb +17 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/capability_status.rb +18 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/catalog_collation_type.rb +16 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/create_mode.rb +24 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database.rb +482 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_license_type.rb +16 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_list_result.rb +100 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_operation.rb +233 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_operation_list_result.rb +100 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_read_scale.rb +16 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_status.rb +32 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_update.rb +425 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment.rb +100 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment_scans_export.rb +76 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/edition_capability.rb +107 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool.rb +187 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_edition_capability.rb +107 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_license_type.rb +16 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_list_result.rb +100 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_operation.rb +231 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_operation_list_result.rb +100 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_per_database_max_performance_level_capability.rb +108 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_per_database_min_performance_level_capability.rb +86 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_per_database_settings.rb +57 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_performance_level_capability.rb +200 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_state.rb +17 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_update.rb +116 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/instance_failover_group.rb +156 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/instance_failover_group_list_result.rb +100 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/instance_failover_group_read_only_endpoint.rb +48 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/instance_failover_group_read_write_endpoint.rb +62 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/instance_failover_group_replication_role.rb +16 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/license_type_capability.rb +72 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/location_capabilities.rb +116 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/log_size_capability.rb +61 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/log_size_unit.rb +19 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/managed_instance_edition_capability.rb +94 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/managed_instance_family_capability.rb +161 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/managed_instance_pair_info.rb +57 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/managed_instance_vcores_capability.rb +84 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/managed_instance_version_capability.rb +94 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/management_operation_state.rb +20 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/max_size_capability.rb +61 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/max_size_range_capability.rb +113 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/max_size_unit.rb +18 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/partner_region_info.rb +60 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/performance_level_capability.rb +60 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/performance_level_unit.rb +16 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/proxy_resource.rb +62 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/read_only_endpoint_failover_policy.rb +16 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/read_write_endpoint_failover_policy.rb +16 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/resource.rb +71 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/resource_move_definition.rb +46 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/sample_name.rb +17 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/server_version_capability.rb +116 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/service_objective_capability.rb +166 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/sku.rb +97 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/tde_certificate.rb +84 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/tracked_resource.rb +92 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_recurring_scans_properties.rb +80 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_scan_error.rb +59 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_scan_record.rb +169 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_scan_record_list_result.rb +102 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_scan_state.rb +18 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_scan_trigger_type.rb +16 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/module_definition.rb +9 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/sql_management_client.rb +171 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_sql/tde_certificates.rb +175 -0
- data/lib/azure_mgmt_sql.rb +2 -1
- data/lib/profiles/latest/modules/sql_profile_module.rb +855 -411
- data/lib/version.rb +1 -1
- metadata +186 -10
@@ -24,25 +24,92 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
|
|
24
24
|
# @return [String] The API version to use for the request.
|
25
25
|
attr_reader :api_version
|
26
26
|
|
27
|
-
# @return [String]
|
27
|
+
# @return [String] The preferred language for the response.
|
28
28
|
attr_accessor :accept_language
|
29
29
|
|
30
|
-
# @return [Integer]
|
31
|
-
#
|
30
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
31
|
+
# Operations. Default value is 30.
|
32
32
|
attr_accessor :long_running_operation_retry_timeout
|
33
33
|
|
34
|
-
# @return [Boolean]
|
35
|
-
#
|
34
|
+
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
35
|
+
# generated. When set to true a unique x-ms-client-request-id value is
|
36
|
+
# generated and included in each request. Default is true.
|
36
37
|
attr_accessor :generate_client_request_id
|
37
38
|
|
39
|
+
# @return [ExtendedDatabaseBlobAuditingPolicies]
|
40
|
+
# extended_database_blob_auditing_policies
|
41
|
+
attr_reader :extended_database_blob_auditing_policies
|
42
|
+
|
43
|
+
# @return [ExtendedServerBlobAuditingPolicies]
|
44
|
+
# extended_server_blob_auditing_policies
|
45
|
+
attr_reader :extended_server_blob_auditing_policies
|
46
|
+
|
47
|
+
# @return [ServerBlobAuditingPolicies] server_blob_auditing_policies
|
48
|
+
attr_reader :server_blob_auditing_policies
|
49
|
+
|
50
|
+
# @return [DatabaseBlobAuditingPolicies] database_blob_auditing_policies
|
51
|
+
attr_reader :database_blob_auditing_policies
|
52
|
+
|
38
53
|
# @return [DatabaseOperations] database_operations
|
39
54
|
attr_reader :database_operations
|
40
55
|
|
41
56
|
# @return [Databases] databases
|
42
57
|
attr_reader :databases
|
43
58
|
|
44
|
-
# @return [
|
45
|
-
|
59
|
+
# @return [DatabaseVulnerabilityAssessmentRuleBaselines]
|
60
|
+
# database_vulnerability_assessment_rule_baselines
|
61
|
+
attr_reader :database_vulnerability_assessment_rule_baselines
|
62
|
+
|
63
|
+
# @return [DatabaseVulnerabilityAssessments]
|
64
|
+
# database_vulnerability_assessments
|
65
|
+
attr_reader :database_vulnerability_assessments
|
66
|
+
|
67
|
+
# @return [DataWarehouseUserActivitiesOperations]
|
68
|
+
# data_warehouse_user_activities_operations
|
69
|
+
attr_reader :data_warehouse_user_activities_operations
|
70
|
+
|
71
|
+
# @return [JobAgents] job_agents
|
72
|
+
attr_reader :job_agents
|
73
|
+
|
74
|
+
# @return [JobCredentials] job_credentials
|
75
|
+
attr_reader :job_credentials
|
76
|
+
|
77
|
+
# @return [JobExecutions] job_executions
|
78
|
+
attr_reader :job_executions
|
79
|
+
|
80
|
+
# @return [Jobs] jobs
|
81
|
+
attr_reader :jobs
|
82
|
+
|
83
|
+
# @return [JobStepExecutions] job_step_executions
|
84
|
+
attr_reader :job_step_executions
|
85
|
+
|
86
|
+
# @return [JobSteps] job_steps
|
87
|
+
attr_reader :job_steps
|
88
|
+
|
89
|
+
# @return [JobTargetExecutions] job_target_executions
|
90
|
+
attr_reader :job_target_executions
|
91
|
+
|
92
|
+
# @return [JobTargetGroups] job_target_groups
|
93
|
+
attr_reader :job_target_groups
|
94
|
+
|
95
|
+
# @return [JobVersions] job_versions
|
96
|
+
attr_reader :job_versions
|
97
|
+
|
98
|
+
# @return [LongTermRetentionBackups] long_term_retention_backups
|
99
|
+
attr_reader :long_term_retention_backups
|
100
|
+
|
101
|
+
# @return [BackupLongTermRetentionPolicies]
|
102
|
+
# backup_long_term_retention_policies
|
103
|
+
attr_reader :backup_long_term_retention_policies
|
104
|
+
|
105
|
+
# @return [ManagedDatabases] managed_databases
|
106
|
+
attr_reader :managed_databases
|
107
|
+
|
108
|
+
# @return [RestorePoints] restore_points
|
109
|
+
attr_reader :restore_points
|
110
|
+
|
111
|
+
# @return [SensitivityLabels] sensitivity_labels
|
112
|
+
attr_reader :sensitivity_labels
|
46
113
|
|
47
114
|
# @return [ServerAutomaticTuningOperations]
|
48
115
|
# server_automatic_tuning_operations
|
@@ -51,6 +118,9 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
|
|
51
118
|
# @return [ServerDnsAliases] server_dns_aliases
|
52
119
|
attr_reader :server_dns_aliases
|
53
120
|
|
121
|
+
# @return [ServerSecurityAlertPolicies] server_security_alert_policies
|
122
|
+
attr_reader :server_security_alert_policies
|
123
|
+
|
54
124
|
#
|
55
125
|
# Creates initializes a new instance of the SqlManagementClient class.
|
56
126
|
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
@@ -64,11 +134,32 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
|
|
64
134
|
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
65
135
|
@credentials = credentials
|
66
136
|
|
137
|
+
@extended_database_blob_auditing_policies = ExtendedDatabaseBlobAuditingPolicies.new(self)
|
138
|
+
@extended_server_blob_auditing_policies = ExtendedServerBlobAuditingPolicies.new(self)
|
139
|
+
@server_blob_auditing_policies = ServerBlobAuditingPolicies.new(self)
|
140
|
+
@database_blob_auditing_policies = DatabaseBlobAuditingPolicies.new(self)
|
67
141
|
@database_operations = DatabaseOperations.new(self)
|
68
142
|
@databases = Databases.new(self)
|
69
|
-
@
|
143
|
+
@database_vulnerability_assessment_rule_baselines = DatabaseVulnerabilityAssessmentRuleBaselines.new(self)
|
144
|
+
@database_vulnerability_assessments = DatabaseVulnerabilityAssessments.new(self)
|
145
|
+
@data_warehouse_user_activities_operations = DataWarehouseUserActivitiesOperations.new(self)
|
146
|
+
@job_agents = JobAgents.new(self)
|
147
|
+
@job_credentials = JobCredentials.new(self)
|
148
|
+
@job_executions = JobExecutions.new(self)
|
149
|
+
@jobs = Jobs.new(self)
|
150
|
+
@job_step_executions = JobStepExecutions.new(self)
|
151
|
+
@job_steps = JobSteps.new(self)
|
152
|
+
@job_target_executions = JobTargetExecutions.new(self)
|
153
|
+
@job_target_groups = JobTargetGroups.new(self)
|
154
|
+
@job_versions = JobVersions.new(self)
|
155
|
+
@long_term_retention_backups = LongTermRetentionBackups.new(self)
|
156
|
+
@backup_long_term_retention_policies = BackupLongTermRetentionPolicies.new(self)
|
157
|
+
@managed_databases = ManagedDatabases.new(self)
|
158
|
+
@restore_points = RestorePoints.new(self)
|
159
|
+
@sensitivity_labels = SensitivityLabels.new(self)
|
70
160
|
@server_automatic_tuning_operations = ServerAutomaticTuningOperations.new(self)
|
71
161
|
@server_dns_aliases = ServerDnsAliases.new(self)
|
162
|
+
@server_security_alert_policies = ServerSecurityAlertPolicies.new(self)
|
72
163
|
@api_version = '2017-03-01-preview'
|
73
164
|
@accept_language = 'en-US'
|
74
165
|
@long_running_operation_retry_timeout = 30
|
@@ -141,7 +232,7 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
|
|
141
232
|
#
|
142
233
|
def add_telemetry
|
143
234
|
sdk_information = 'azure_mgmt_sql'
|
144
|
-
sdk_information = "#{sdk_information}/0.
|
235
|
+
sdk_information = "#{sdk_information}/0.17.0"
|
145
236
|
add_user_agent_information(sdk_information)
|
146
237
|
end
|
147
238
|
end
|
@@ -0,0 +1,104 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
require 'uri'
|
7
|
+
require 'cgi'
|
8
|
+
require 'date'
|
9
|
+
require 'json'
|
10
|
+
require 'base64'
|
11
|
+
require 'erb'
|
12
|
+
require 'securerandom'
|
13
|
+
require 'time'
|
14
|
+
require 'timeliness'
|
15
|
+
require 'faraday'
|
16
|
+
require 'faraday-cookie_jar'
|
17
|
+
require 'concurrent'
|
18
|
+
require 'ms_rest'
|
19
|
+
require '2017-10-01-preview/generated/azure_mgmt_sql/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::SQL::Mgmt::V2017_10_01_preview
|
23
|
+
autoload :DatabaseOperations, '2017-10-01-preview/generated/azure_mgmt_sql/database_operations.rb'
|
24
|
+
autoload :ElasticPoolOperations, '2017-10-01-preview/generated/azure_mgmt_sql/elastic_pool_operations.rb'
|
25
|
+
autoload :DatabaseVulnerabilityAssessmentScans, '2017-10-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessment_scans.rb'
|
26
|
+
autoload :Capabilities, '2017-10-01-preview/generated/azure_mgmt_sql/capabilities.rb'
|
27
|
+
autoload :Databases, '2017-10-01-preview/generated/azure_mgmt_sql/databases.rb'
|
28
|
+
autoload :ElasticPools, '2017-10-01-preview/generated/azure_mgmt_sql/elastic_pools.rb'
|
29
|
+
autoload :InstanceFailoverGroups, '2017-10-01-preview/generated/azure_mgmt_sql/instance_failover_groups.rb'
|
30
|
+
autoload :BackupShortTermRetentionPolicies, '2017-10-01-preview/generated/azure_mgmt_sql/backup_short_term_retention_policies.rb'
|
31
|
+
autoload :TdeCertificates, '2017-10-01-preview/generated/azure_mgmt_sql/tde_certificates.rb'
|
32
|
+
autoload :ManagedInstanceTdeCertificates, '2017-10-01-preview/generated/azure_mgmt_sql/managed_instance_tde_certificates.rb'
|
33
|
+
autoload :SqlManagementClient, '2017-10-01-preview/generated/azure_mgmt_sql/sql_management_client.rb'
|
34
|
+
|
35
|
+
module Models
|
36
|
+
autoload :ElasticPoolEditionCapability, '2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_edition_capability.rb'
|
37
|
+
autoload :ServiceObjectiveCapability, '2017-10-01-preview/generated/azure_mgmt_sql/models/service_objective_capability.rb'
|
38
|
+
autoload :DatabaseOperationListResult, '2017-10-01-preview/generated/azure_mgmt_sql/models/database_operation_list_result.rb'
|
39
|
+
autoload :EditionCapability, '2017-10-01-preview/generated/azure_mgmt_sql/models/edition_capability.rb'
|
40
|
+
autoload :Resource, '2017-10-01-preview/generated/azure_mgmt_sql/models/resource.rb'
|
41
|
+
autoload :ElasticPoolPerDatabaseMinPerformanceLevelCapability, '2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_per_database_min_performance_level_capability.rb'
|
42
|
+
autoload :BackupShortTermRetentionPolicyListResult, '2017-10-01-preview/generated/azure_mgmt_sql/models/backup_short_term_retention_policy_list_result.rb'
|
43
|
+
autoload :ElasticPoolPerDatabaseMaxPerformanceLevelCapability, '2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_per_database_max_performance_level_capability.rb'
|
44
|
+
autoload :VulnerabilityAssessmentRecurringScansProperties, '2017-10-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_recurring_scans_properties.rb'
|
45
|
+
autoload :ElasticPoolPerformanceLevelCapability, '2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_performance_level_capability.rb'
|
46
|
+
autoload :VulnerabilityAssessmentScanError, '2017-10-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_scan_error.rb'
|
47
|
+
autoload :InstanceFailoverGroupReadOnlyEndpoint, '2017-10-01-preview/generated/azure_mgmt_sql/models/instance_failover_group_read_only_endpoint.rb'
|
48
|
+
autoload :VulnerabilityAssessmentScanRecordListResult, '2017-10-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_scan_record_list_result.rb'
|
49
|
+
autoload :ServerVersionCapability, '2017-10-01-preview/generated/azure_mgmt_sql/models/server_version_capability.rb'
|
50
|
+
autoload :MaxSizeCapability, '2017-10-01-preview/generated/azure_mgmt_sql/models/max_size_capability.rb'
|
51
|
+
autoload :ManagedInstanceVcoresCapability, '2017-10-01-preview/generated/azure_mgmt_sql/models/managed_instance_vcores_capability.rb'
|
52
|
+
autoload :MaxSizeRangeCapability, '2017-10-01-preview/generated/azure_mgmt_sql/models/max_size_range_capability.rb'
|
53
|
+
autoload :ManagedInstanceFamilyCapability, '2017-10-01-preview/generated/azure_mgmt_sql/models/managed_instance_family_capability.rb'
|
54
|
+
autoload :Sku, '2017-10-01-preview/generated/azure_mgmt_sql/models/sku.rb'
|
55
|
+
autoload :ManagedInstanceEditionCapability, '2017-10-01-preview/generated/azure_mgmt_sql/models/managed_instance_edition_capability.rb'
|
56
|
+
autoload :ManagedInstanceVersionCapability, '2017-10-01-preview/generated/azure_mgmt_sql/models/managed_instance_version_capability.rb'
|
57
|
+
autoload :ElasticPoolOperationListResult, '2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_operation_list_result.rb'
|
58
|
+
autoload :LocationCapabilities, '2017-10-01-preview/generated/azure_mgmt_sql/models/location_capabilities.rb'
|
59
|
+
autoload :ManagedInstancePairInfo, '2017-10-01-preview/generated/azure_mgmt_sql/models/managed_instance_pair_info.rb'
|
60
|
+
autoload :InstanceFailoverGroupReadWriteEndpoint, '2017-10-01-preview/generated/azure_mgmt_sql/models/instance_failover_group_read_write_endpoint.rb'
|
61
|
+
autoload :LogSizeCapability, '2017-10-01-preview/generated/azure_mgmt_sql/models/log_size_capability.rb'
|
62
|
+
autoload :DatabaseListResult, '2017-10-01-preview/generated/azure_mgmt_sql/models/database_list_result.rb'
|
63
|
+
autoload :LicenseTypeCapability, '2017-10-01-preview/generated/azure_mgmt_sql/models/license_type_capability.rb'
|
64
|
+
autoload :DatabaseUpdate, '2017-10-01-preview/generated/azure_mgmt_sql/models/database_update.rb'
|
65
|
+
autoload :InstanceFailoverGroupListResult, '2017-10-01-preview/generated/azure_mgmt_sql/models/instance_failover_group_list_result.rb'
|
66
|
+
autoload :ResourceMoveDefinition, '2017-10-01-preview/generated/azure_mgmt_sql/models/resource_move_definition.rb'
|
67
|
+
autoload :PerformanceLevelCapability, '2017-10-01-preview/generated/azure_mgmt_sql/models/performance_level_capability.rb'
|
68
|
+
autoload :ElasticPoolPerDatabaseSettings, '2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_per_database_settings.rb'
|
69
|
+
autoload :PartnerRegionInfo, '2017-10-01-preview/generated/azure_mgmt_sql/models/partner_region_info.rb'
|
70
|
+
autoload :ElasticPoolUpdate, '2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_update.rb'
|
71
|
+
autoload :ElasticPoolListResult, '2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_list_result.rb'
|
72
|
+
autoload :ProxyResource, '2017-10-01-preview/generated/azure_mgmt_sql/models/proxy_resource.rb'
|
73
|
+
autoload :DatabaseOperation, '2017-10-01-preview/generated/azure_mgmt_sql/models/database_operation.rb'
|
74
|
+
autoload :TrackedResource, '2017-10-01-preview/generated/azure_mgmt_sql/models/tracked_resource.rb'
|
75
|
+
autoload :ElasticPoolOperation, '2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_operation.rb'
|
76
|
+
autoload :DatabaseVulnerabilityAssessment, '2017-10-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment.rb'
|
77
|
+
autoload :VulnerabilityAssessmentScanRecord, '2017-10-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_scan_record.rb'
|
78
|
+
autoload :DatabaseVulnerabilityAssessmentScansExport, '2017-10-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment_scans_export.rb'
|
79
|
+
autoload :Database, '2017-10-01-preview/generated/azure_mgmt_sql/models/database.rb'
|
80
|
+
autoload :ElasticPool, '2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool.rb'
|
81
|
+
autoload :InstanceFailoverGroup, '2017-10-01-preview/generated/azure_mgmt_sql/models/instance_failover_group.rb'
|
82
|
+
autoload :BackupShortTermRetentionPolicy, '2017-10-01-preview/generated/azure_mgmt_sql/models/backup_short_term_retention_policy.rb'
|
83
|
+
autoload :TdeCertificate, '2017-10-01-preview/generated/azure_mgmt_sql/models/tde_certificate.rb'
|
84
|
+
autoload :ManagementOperationState, '2017-10-01-preview/generated/azure_mgmt_sql/models/management_operation_state.rb'
|
85
|
+
autoload :VulnerabilityAssessmentScanTriggerType, '2017-10-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_scan_trigger_type.rb'
|
86
|
+
autoload :VulnerabilityAssessmentScanState, '2017-10-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_scan_state.rb'
|
87
|
+
autoload :MaxSizeUnit, '2017-10-01-preview/generated/azure_mgmt_sql/models/max_size_unit.rb'
|
88
|
+
autoload :LogSizeUnit, '2017-10-01-preview/generated/azure_mgmt_sql/models/log_size_unit.rb'
|
89
|
+
autoload :CapabilityStatus, '2017-10-01-preview/generated/azure_mgmt_sql/models/capability_status.rb'
|
90
|
+
autoload :PerformanceLevelUnit, '2017-10-01-preview/generated/azure_mgmt_sql/models/performance_level_unit.rb'
|
91
|
+
autoload :CreateMode, '2017-10-01-preview/generated/azure_mgmt_sql/models/create_mode.rb'
|
92
|
+
autoload :SampleName, '2017-10-01-preview/generated/azure_mgmt_sql/models/sample_name.rb'
|
93
|
+
autoload :DatabaseStatus, '2017-10-01-preview/generated/azure_mgmt_sql/models/database_status.rb'
|
94
|
+
autoload :CatalogCollationType, '2017-10-01-preview/generated/azure_mgmt_sql/models/catalog_collation_type.rb'
|
95
|
+
autoload :DatabaseLicenseType, '2017-10-01-preview/generated/azure_mgmt_sql/models/database_license_type.rb'
|
96
|
+
autoload :DatabaseReadScale, '2017-10-01-preview/generated/azure_mgmt_sql/models/database_read_scale.rb'
|
97
|
+
autoload :ElasticPoolState, '2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_state.rb'
|
98
|
+
autoload :ElasticPoolLicenseType, '2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_license_type.rb'
|
99
|
+
autoload :ReadWriteEndpointFailoverPolicy, '2017-10-01-preview/generated/azure_mgmt_sql/models/read_write_endpoint_failover_policy.rb'
|
100
|
+
autoload :ReadOnlyEndpointFailoverPolicy, '2017-10-01-preview/generated/azure_mgmt_sql/models/read_only_endpoint_failover_policy.rb'
|
101
|
+
autoload :InstanceFailoverGroupReplicationRole, '2017-10-01-preview/generated/azure_mgmt_sql/models/instance_failover_group_replication_role.rb'
|
102
|
+
autoload :CapabilityGroup, '2017-10-01-preview/generated/azure_mgmt_sql/models/capability_group.rb'
|
103
|
+
end
|
104
|
+
end
|
@@ -0,0 +1,684 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::SQL::Mgmt::V2017_10_01_preview
|
7
|
+
#
|
8
|
+
# The Azure SQL Database management API provides a RESTful set of web
|
9
|
+
# services that interact with Azure SQL Database services to manage your
|
10
|
+
# databases. The API enables you to create, retrieve, update, and delete
|
11
|
+
# databases.
|
12
|
+
#
|
13
|
+
class BackupShortTermRetentionPolicies
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
#
|
17
|
+
# Creates and initializes a new instance of the BackupShortTermRetentionPolicies class.
|
18
|
+
# @param client service class for accessing basic functionality.
|
19
|
+
#
|
20
|
+
def initialize(client)
|
21
|
+
@client = client
|
22
|
+
end
|
23
|
+
|
24
|
+
# @return [SqlManagementClient] reference to the SqlManagementClient
|
25
|
+
attr_reader :client
|
26
|
+
|
27
|
+
#
|
28
|
+
# Gets a database's short term retention policy.
|
29
|
+
#
|
30
|
+
# @param resource_group_name [String] The name of the resource group that
|
31
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
32
|
+
# Manager API or the portal.
|
33
|
+
# @param server_name [String] The name of the server.
|
34
|
+
# @param database_name [String] The name of the database.
|
35
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
36
|
+
# will be added to the HTTP request.
|
37
|
+
#
|
38
|
+
# @return [BackupShortTermRetentionPolicy] operation results.
|
39
|
+
#
|
40
|
+
def get(resource_group_name, server_name, database_name, custom_headers:nil)
|
41
|
+
response = get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value!
|
42
|
+
response.body unless response.nil?
|
43
|
+
end
|
44
|
+
|
45
|
+
#
|
46
|
+
# Gets a database's short term retention policy.
|
47
|
+
#
|
48
|
+
# @param resource_group_name [String] The name of the resource group that
|
49
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
50
|
+
# Manager API or the portal.
|
51
|
+
# @param server_name [String] The name of the server.
|
52
|
+
# @param database_name [String] The name of the database.
|
53
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
54
|
+
# will be added to the HTTP request.
|
55
|
+
#
|
56
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
57
|
+
#
|
58
|
+
def get_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil)
|
59
|
+
get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value!
|
60
|
+
end
|
61
|
+
|
62
|
+
#
|
63
|
+
# Gets a database's short term retention policy.
|
64
|
+
#
|
65
|
+
# @param resource_group_name [String] The name of the resource group that
|
66
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
67
|
+
# Manager API or the portal.
|
68
|
+
# @param server_name [String] The name of the server.
|
69
|
+
# @param database_name [String] The name of the database.
|
70
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
71
|
+
# to the HTTP request.
|
72
|
+
#
|
73
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
74
|
+
#
|
75
|
+
def get_async(resource_group_name, server_name, database_name, custom_headers:nil)
|
76
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
77
|
+
fail ArgumentError, 'server_name is nil' if server_name.nil?
|
78
|
+
fail ArgumentError, 'database_name is nil' if database_name.nil?
|
79
|
+
policy_name = 'default'
|
80
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
81
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
82
|
+
|
83
|
+
|
84
|
+
request_headers = {}
|
85
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
86
|
+
|
87
|
+
# Set Headers
|
88
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
89
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
90
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}'
|
91
|
+
|
92
|
+
request_url = @base_url || @client.base_url
|
93
|
+
|
94
|
+
options = {
|
95
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
96
|
+
path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'policyName' => policy_name,'subscriptionId' => @client.subscription_id},
|
97
|
+
query_params: {'api-version' => @client.api_version},
|
98
|
+
headers: request_headers.merge(custom_headers || {}),
|
99
|
+
base_url: request_url
|
100
|
+
}
|
101
|
+
promise = @client.make_request_async(:get, path_template, options)
|
102
|
+
|
103
|
+
promise = promise.then do |result|
|
104
|
+
http_response = result.response
|
105
|
+
status_code = http_response.status
|
106
|
+
response_content = http_response.body
|
107
|
+
unless status_code == 200
|
108
|
+
error_model = JSON.load(response_content)
|
109
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
110
|
+
end
|
111
|
+
|
112
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
113
|
+
# Deserialize Response
|
114
|
+
if status_code == 200
|
115
|
+
begin
|
116
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
117
|
+
result_mapper = Azure::SQL::Mgmt::V2017_10_01_preview::Models::BackupShortTermRetentionPolicy.mapper()
|
118
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
119
|
+
rescue Exception => e
|
120
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
result
|
125
|
+
end
|
126
|
+
|
127
|
+
promise.execute
|
128
|
+
end
|
129
|
+
|
130
|
+
#
|
131
|
+
# Updates a database's short term retention policy.
|
132
|
+
#
|
133
|
+
# @param resource_group_name [String] The name of the resource group that
|
134
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
135
|
+
# Manager API or the portal.
|
136
|
+
# @param server_name [String] The name of the server.
|
137
|
+
# @param database_name [String] The name of the database.
|
138
|
+
# @param parameters [BackupShortTermRetentionPolicy] The short term retention
|
139
|
+
# policy info.
|
140
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
141
|
+
# will be added to the HTTP request.
|
142
|
+
#
|
143
|
+
# @return [BackupShortTermRetentionPolicy] operation results.
|
144
|
+
#
|
145
|
+
def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers:nil)
|
146
|
+
response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value!
|
147
|
+
response.body unless response.nil?
|
148
|
+
end
|
149
|
+
|
150
|
+
#
|
151
|
+
# @param resource_group_name [String] The name of the resource group that
|
152
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
153
|
+
# Manager API or the portal.
|
154
|
+
# @param server_name [String] The name of the server.
|
155
|
+
# @param database_name [String] The name of the database.
|
156
|
+
# @param parameters [BackupShortTermRetentionPolicy] The short term retention
|
157
|
+
# policy info.
|
158
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
159
|
+
# will be added to the HTTP request.
|
160
|
+
#
|
161
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
162
|
+
# response.
|
163
|
+
#
|
164
|
+
def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil)
|
165
|
+
# Send request
|
166
|
+
promise = begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers)
|
167
|
+
|
168
|
+
promise = promise.then do |response|
|
169
|
+
# Defining deserialization method.
|
170
|
+
deserialize_method = lambda do |parsed_response|
|
171
|
+
result_mapper = Azure::SQL::Mgmt::V2017_10_01_preview::Models::BackupShortTermRetentionPolicy.mapper()
|
172
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
173
|
+
end
|
174
|
+
|
175
|
+
# Waiting for response.
|
176
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
177
|
+
end
|
178
|
+
|
179
|
+
promise
|
180
|
+
end
|
181
|
+
|
182
|
+
#
|
183
|
+
# Updates a database's short term retention policy.
|
184
|
+
#
|
185
|
+
# @param resource_group_name [String] The name of the resource group that
|
186
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
187
|
+
# Manager API or the portal.
|
188
|
+
# @param server_name [String] The name of the server.
|
189
|
+
# @param database_name [String] The name of the database.
|
190
|
+
# @param parameters [BackupShortTermRetentionPolicy] The short term retention
|
191
|
+
# policy info.
|
192
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
193
|
+
# will be added to the HTTP request.
|
194
|
+
#
|
195
|
+
# @return [BackupShortTermRetentionPolicy] operation results.
|
196
|
+
#
|
197
|
+
def update(resource_group_name, server_name, database_name, parameters, custom_headers:nil)
|
198
|
+
response = update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value!
|
199
|
+
response.body unless response.nil?
|
200
|
+
end
|
201
|
+
|
202
|
+
#
|
203
|
+
# @param resource_group_name [String] The name of the resource group that
|
204
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
205
|
+
# Manager API or the portal.
|
206
|
+
# @param server_name [String] The name of the server.
|
207
|
+
# @param database_name [String] The name of the database.
|
208
|
+
# @param parameters [BackupShortTermRetentionPolicy] The short term retention
|
209
|
+
# policy info.
|
210
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
211
|
+
# will be added to the HTTP request.
|
212
|
+
#
|
213
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
214
|
+
# response.
|
215
|
+
#
|
216
|
+
def update_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil)
|
217
|
+
# Send request
|
218
|
+
promise = begin_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers)
|
219
|
+
|
220
|
+
promise = promise.then do |response|
|
221
|
+
# Defining deserialization method.
|
222
|
+
deserialize_method = lambda do |parsed_response|
|
223
|
+
result_mapper = Azure::SQL::Mgmt::V2017_10_01_preview::Models::BackupShortTermRetentionPolicy.mapper()
|
224
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
225
|
+
end
|
226
|
+
|
227
|
+
# Waiting for response.
|
228
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
229
|
+
end
|
230
|
+
|
231
|
+
promise
|
232
|
+
end
|
233
|
+
|
234
|
+
#
|
235
|
+
# Gets a database's short term retention policy.
|
236
|
+
#
|
237
|
+
# @param resource_group_name [String] The name of the resource group that
|
238
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
239
|
+
# Manager API or the portal.
|
240
|
+
# @param server_name [String] The name of the server.
|
241
|
+
# @param database_name [String] The name of the database.
|
242
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
243
|
+
# will be added to the HTTP request.
|
244
|
+
#
|
245
|
+
# @return [Array<BackupShortTermRetentionPolicy>] operation results.
|
246
|
+
#
|
247
|
+
def list_by_database(resource_group_name, server_name, database_name, custom_headers:nil)
|
248
|
+
first_page = list_by_database_as_lazy(resource_group_name, server_name, database_name, custom_headers:custom_headers)
|
249
|
+
first_page.get_all_items
|
250
|
+
end
|
251
|
+
|
252
|
+
#
|
253
|
+
# Gets a database's short term retention policy.
|
254
|
+
#
|
255
|
+
# @param resource_group_name [String] The name of the resource group that
|
256
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
257
|
+
# Manager API or the portal.
|
258
|
+
# @param server_name [String] The name of the server.
|
259
|
+
# @param database_name [String] The name of the database.
|
260
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
261
|
+
# will be added to the HTTP request.
|
262
|
+
#
|
263
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
264
|
+
#
|
265
|
+
def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil)
|
266
|
+
list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value!
|
267
|
+
end
|
268
|
+
|
269
|
+
#
|
270
|
+
# Gets a database's short term retention policy.
|
271
|
+
#
|
272
|
+
# @param resource_group_name [String] The name of the resource group that
|
273
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
274
|
+
# Manager API or the portal.
|
275
|
+
# @param server_name [String] The name of the server.
|
276
|
+
# @param database_name [String] The name of the database.
|
277
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
278
|
+
# to the HTTP request.
|
279
|
+
#
|
280
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
281
|
+
#
|
282
|
+
def list_by_database_async(resource_group_name, server_name, database_name, custom_headers:nil)
|
283
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
284
|
+
fail ArgumentError, 'server_name is nil' if server_name.nil?
|
285
|
+
fail ArgumentError, 'database_name is nil' if database_name.nil?
|
286
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
287
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
288
|
+
|
289
|
+
|
290
|
+
request_headers = {}
|
291
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
292
|
+
|
293
|
+
# Set Headers
|
294
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
295
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
296
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies'
|
297
|
+
|
298
|
+
request_url = @base_url || @client.base_url
|
299
|
+
|
300
|
+
options = {
|
301
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
302
|
+
path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'subscriptionId' => @client.subscription_id},
|
303
|
+
query_params: {'api-version' => @client.api_version},
|
304
|
+
headers: request_headers.merge(custom_headers || {}),
|
305
|
+
base_url: request_url
|
306
|
+
}
|
307
|
+
promise = @client.make_request_async(:get, path_template, options)
|
308
|
+
|
309
|
+
promise = promise.then do |result|
|
310
|
+
http_response = result.response
|
311
|
+
status_code = http_response.status
|
312
|
+
response_content = http_response.body
|
313
|
+
unless status_code == 200
|
314
|
+
error_model = JSON.load(response_content)
|
315
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
316
|
+
end
|
317
|
+
|
318
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
319
|
+
# Deserialize Response
|
320
|
+
if status_code == 200
|
321
|
+
begin
|
322
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
323
|
+
result_mapper = Azure::SQL::Mgmt::V2017_10_01_preview::Models::BackupShortTermRetentionPolicyListResult.mapper()
|
324
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
325
|
+
rescue Exception => e
|
326
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
327
|
+
end
|
328
|
+
end
|
329
|
+
|
330
|
+
result
|
331
|
+
end
|
332
|
+
|
333
|
+
promise.execute
|
334
|
+
end
|
335
|
+
|
336
|
+
#
|
337
|
+
# Updates a database's short term retention policy.
|
338
|
+
#
|
339
|
+
# @param resource_group_name [String] The name of the resource group that
|
340
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
341
|
+
# Manager API or the portal.
|
342
|
+
# @param server_name [String] The name of the server.
|
343
|
+
# @param database_name [String] The name of the database.
|
344
|
+
# @param parameters [BackupShortTermRetentionPolicy] The short term retention
|
345
|
+
# policy info.
|
346
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
347
|
+
# will be added to the HTTP request.
|
348
|
+
#
|
349
|
+
# @return [BackupShortTermRetentionPolicy] operation results.
|
350
|
+
#
|
351
|
+
def begin_create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers:nil)
|
352
|
+
response = begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value!
|
353
|
+
response.body unless response.nil?
|
354
|
+
end
|
355
|
+
|
356
|
+
#
|
357
|
+
# Updates a database's short term retention policy.
|
358
|
+
#
|
359
|
+
# @param resource_group_name [String] The name of the resource group that
|
360
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
361
|
+
# Manager API or the portal.
|
362
|
+
# @param server_name [String] The name of the server.
|
363
|
+
# @param database_name [String] The name of the database.
|
364
|
+
# @param parameters [BackupShortTermRetentionPolicy] The short term retention
|
365
|
+
# policy info.
|
366
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
367
|
+
# will be added to the HTTP request.
|
368
|
+
#
|
369
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
370
|
+
#
|
371
|
+
def begin_create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers:nil)
|
372
|
+
begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value!
|
373
|
+
end
|
374
|
+
|
375
|
+
#
|
376
|
+
# Updates a database's short term retention policy.
|
377
|
+
#
|
378
|
+
# @param resource_group_name [String] The name of the resource group that
|
379
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
380
|
+
# Manager API or the portal.
|
381
|
+
# @param server_name [String] The name of the server.
|
382
|
+
# @param database_name [String] The name of the database.
|
383
|
+
# @param parameters [BackupShortTermRetentionPolicy] The short term retention
|
384
|
+
# policy info.
|
385
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
386
|
+
# to the HTTP request.
|
387
|
+
#
|
388
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
389
|
+
#
|
390
|
+
def begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil)
|
391
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
392
|
+
fail ArgumentError, 'server_name is nil' if server_name.nil?
|
393
|
+
fail ArgumentError, 'database_name is nil' if database_name.nil?
|
394
|
+
policy_name = 'default'
|
395
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
396
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
397
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
398
|
+
|
399
|
+
|
400
|
+
request_headers = {}
|
401
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
402
|
+
|
403
|
+
# Set Headers
|
404
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
405
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
406
|
+
|
407
|
+
# Serialize Request
|
408
|
+
request_mapper = Azure::SQL::Mgmt::V2017_10_01_preview::Models::BackupShortTermRetentionPolicy.mapper()
|
409
|
+
request_content = @client.serialize(request_mapper, parameters)
|
410
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
411
|
+
|
412
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}'
|
413
|
+
|
414
|
+
request_url = @base_url || @client.base_url
|
415
|
+
|
416
|
+
options = {
|
417
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
418
|
+
path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'policyName' => policy_name,'subscriptionId' => @client.subscription_id},
|
419
|
+
query_params: {'api-version' => @client.api_version},
|
420
|
+
body: request_content,
|
421
|
+
headers: request_headers.merge(custom_headers || {}),
|
422
|
+
base_url: request_url
|
423
|
+
}
|
424
|
+
promise = @client.make_request_async(:put, path_template, options)
|
425
|
+
|
426
|
+
promise = promise.then do |result|
|
427
|
+
http_response = result.response
|
428
|
+
status_code = http_response.status
|
429
|
+
response_content = http_response.body
|
430
|
+
unless status_code == 200 || status_code == 202
|
431
|
+
error_model = JSON.load(response_content)
|
432
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
433
|
+
end
|
434
|
+
|
435
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
436
|
+
# Deserialize Response
|
437
|
+
if status_code == 200
|
438
|
+
begin
|
439
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
440
|
+
result_mapper = Azure::SQL::Mgmt::V2017_10_01_preview::Models::BackupShortTermRetentionPolicy.mapper()
|
441
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
442
|
+
rescue Exception => e
|
443
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
444
|
+
end
|
445
|
+
end
|
446
|
+
|
447
|
+
result
|
448
|
+
end
|
449
|
+
|
450
|
+
promise.execute
|
451
|
+
end
|
452
|
+
|
453
|
+
#
|
454
|
+
# Updates a database's short term retention policy.
|
455
|
+
#
|
456
|
+
# @param resource_group_name [String] The name of the resource group that
|
457
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
458
|
+
# Manager API or the portal.
|
459
|
+
# @param server_name [String] The name of the server.
|
460
|
+
# @param database_name [String] The name of the database.
|
461
|
+
# @param parameters [BackupShortTermRetentionPolicy] The short term retention
|
462
|
+
# policy info.
|
463
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
464
|
+
# will be added to the HTTP request.
|
465
|
+
#
|
466
|
+
# @return [BackupShortTermRetentionPolicy] operation results.
|
467
|
+
#
|
468
|
+
def begin_update(resource_group_name, server_name, database_name, parameters, custom_headers:nil)
|
469
|
+
response = begin_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value!
|
470
|
+
response.body unless response.nil?
|
471
|
+
end
|
472
|
+
|
473
|
+
#
|
474
|
+
# Updates a database's short term retention policy.
|
475
|
+
#
|
476
|
+
# @param resource_group_name [String] The name of the resource group that
|
477
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
478
|
+
# Manager API or the portal.
|
479
|
+
# @param server_name [String] The name of the server.
|
480
|
+
# @param database_name [String] The name of the database.
|
481
|
+
# @param parameters [BackupShortTermRetentionPolicy] The short term retention
|
482
|
+
# policy info.
|
483
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
484
|
+
# will be added to the HTTP request.
|
485
|
+
#
|
486
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
487
|
+
#
|
488
|
+
def begin_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers:nil)
|
489
|
+
begin_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value!
|
490
|
+
end
|
491
|
+
|
492
|
+
#
|
493
|
+
# Updates a database's short term retention policy.
|
494
|
+
#
|
495
|
+
# @param resource_group_name [String] The name of the resource group that
|
496
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
497
|
+
# Manager API or the portal.
|
498
|
+
# @param server_name [String] The name of the server.
|
499
|
+
# @param database_name [String] The name of the database.
|
500
|
+
# @param parameters [BackupShortTermRetentionPolicy] The short term retention
|
501
|
+
# policy info.
|
502
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
503
|
+
# to the HTTP request.
|
504
|
+
#
|
505
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
506
|
+
#
|
507
|
+
def begin_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil)
|
508
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
509
|
+
fail ArgumentError, 'server_name is nil' if server_name.nil?
|
510
|
+
fail ArgumentError, 'database_name is nil' if database_name.nil?
|
511
|
+
policy_name = 'default'
|
512
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
513
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
514
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
515
|
+
|
516
|
+
|
517
|
+
request_headers = {}
|
518
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
519
|
+
|
520
|
+
# Set Headers
|
521
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
522
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
523
|
+
|
524
|
+
# Serialize Request
|
525
|
+
request_mapper = Azure::SQL::Mgmt::V2017_10_01_preview::Models::BackupShortTermRetentionPolicy.mapper()
|
526
|
+
request_content = @client.serialize(request_mapper, parameters)
|
527
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
528
|
+
|
529
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}'
|
530
|
+
|
531
|
+
request_url = @base_url || @client.base_url
|
532
|
+
|
533
|
+
options = {
|
534
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
535
|
+
path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'policyName' => policy_name,'subscriptionId' => @client.subscription_id},
|
536
|
+
query_params: {'api-version' => @client.api_version},
|
537
|
+
body: request_content,
|
538
|
+
headers: request_headers.merge(custom_headers || {}),
|
539
|
+
base_url: request_url
|
540
|
+
}
|
541
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
542
|
+
|
543
|
+
promise = promise.then do |result|
|
544
|
+
http_response = result.response
|
545
|
+
status_code = http_response.status
|
546
|
+
response_content = http_response.body
|
547
|
+
unless status_code == 200 || status_code == 202
|
548
|
+
error_model = JSON.load(response_content)
|
549
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
550
|
+
end
|
551
|
+
|
552
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
553
|
+
# Deserialize Response
|
554
|
+
if status_code == 200
|
555
|
+
begin
|
556
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
557
|
+
result_mapper = Azure::SQL::Mgmt::V2017_10_01_preview::Models::BackupShortTermRetentionPolicy.mapper()
|
558
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
559
|
+
rescue Exception => e
|
560
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
561
|
+
end
|
562
|
+
end
|
563
|
+
|
564
|
+
result
|
565
|
+
end
|
566
|
+
|
567
|
+
promise.execute
|
568
|
+
end
|
569
|
+
|
570
|
+
#
|
571
|
+
# Gets a database's short term retention policy.
|
572
|
+
#
|
573
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
574
|
+
# to List operation.
|
575
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
576
|
+
# will be added to the HTTP request.
|
577
|
+
#
|
578
|
+
# @return [BackupShortTermRetentionPolicyListResult] operation results.
|
579
|
+
#
|
580
|
+
def list_by_database_next(next_page_link, custom_headers:nil)
|
581
|
+
response = list_by_database_next_async(next_page_link, custom_headers:custom_headers).value!
|
582
|
+
response.body unless response.nil?
|
583
|
+
end
|
584
|
+
|
585
|
+
#
|
586
|
+
# Gets a database's short term retention policy.
|
587
|
+
#
|
588
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
589
|
+
# to List operation.
|
590
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
591
|
+
# will be added to the HTTP request.
|
592
|
+
#
|
593
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
594
|
+
#
|
595
|
+
def list_by_database_next_with_http_info(next_page_link, custom_headers:nil)
|
596
|
+
list_by_database_next_async(next_page_link, custom_headers:custom_headers).value!
|
597
|
+
end
|
598
|
+
|
599
|
+
#
|
600
|
+
# Gets a database's short term retention policy.
|
601
|
+
#
|
602
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
603
|
+
# to List operation.
|
604
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
605
|
+
# to the HTTP request.
|
606
|
+
#
|
607
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
608
|
+
#
|
609
|
+
def list_by_database_next_async(next_page_link, custom_headers:nil)
|
610
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
611
|
+
|
612
|
+
|
613
|
+
request_headers = {}
|
614
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
615
|
+
|
616
|
+
# Set Headers
|
617
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
618
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
619
|
+
path_template = '{nextLink}'
|
620
|
+
|
621
|
+
request_url = @base_url || @client.base_url
|
622
|
+
|
623
|
+
options = {
|
624
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
625
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
626
|
+
headers: request_headers.merge(custom_headers || {}),
|
627
|
+
base_url: request_url
|
628
|
+
}
|
629
|
+
promise = @client.make_request_async(:get, path_template, options)
|
630
|
+
|
631
|
+
promise = promise.then do |result|
|
632
|
+
http_response = result.response
|
633
|
+
status_code = http_response.status
|
634
|
+
response_content = http_response.body
|
635
|
+
unless status_code == 200
|
636
|
+
error_model = JSON.load(response_content)
|
637
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
638
|
+
end
|
639
|
+
|
640
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
641
|
+
# Deserialize Response
|
642
|
+
if status_code == 200
|
643
|
+
begin
|
644
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
645
|
+
result_mapper = Azure::SQL::Mgmt::V2017_10_01_preview::Models::BackupShortTermRetentionPolicyListResult.mapper()
|
646
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
647
|
+
rescue Exception => e
|
648
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
649
|
+
end
|
650
|
+
end
|
651
|
+
|
652
|
+
result
|
653
|
+
end
|
654
|
+
|
655
|
+
promise.execute
|
656
|
+
end
|
657
|
+
|
658
|
+
#
|
659
|
+
# Gets a database's short term retention policy.
|
660
|
+
#
|
661
|
+
# @param resource_group_name [String] The name of the resource group that
|
662
|
+
# contains the resource. You can obtain this value from the Azure Resource
|
663
|
+
# Manager API or the portal.
|
664
|
+
# @param server_name [String] The name of the server.
|
665
|
+
# @param database_name [String] The name of the database.
|
666
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
667
|
+
# will be added to the HTTP request.
|
668
|
+
#
|
669
|
+
# @return [BackupShortTermRetentionPolicyListResult] which provide lazy access
|
670
|
+
# to pages of the response.
|
671
|
+
#
|
672
|
+
def list_by_database_as_lazy(resource_group_name, server_name, database_name, custom_headers:nil)
|
673
|
+
response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value!
|
674
|
+
unless response.nil?
|
675
|
+
page = response.body
|
676
|
+
page.next_method = Proc.new do |next_page_link|
|
677
|
+
list_by_database_next_async(next_page_link, custom_headers:custom_headers)
|
678
|
+
end
|
679
|
+
page
|
680
|
+
end
|
681
|
+
end
|
682
|
+
|
683
|
+
end
|
684
|
+
end
|