volcano-sdk 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +203 -0
- data/README.md +758 -0
- data/lib/volcano/auth.rb +113 -0
- data/lib/volcano/auth_anonymous.rb +51 -0
- data/lib/volcano/auth_confirm_email.rb +19 -0
- data/lib/volcano/auth_email_change.rb +75 -0
- data/lib/volcano/auth_get_user.rb +110 -0
- data/lib/volcano/auth_hosted.rb +43 -0
- data/lib/volcano/auth_oauth.rb +102 -0
- data/lib/volcano/auth_oauth_api.rb +51 -0
- data/lib/volcano/auth_oauth_sign_in.rb +61 -0
- data/lib/volcano/auth_oauth_token.rb +51 -0
- data/lib/volcano/auth_refresh.rb +117 -0
- data/lib/volcano/auth_resend_confirmation.rb +19 -0
- data/lib/volcano/auth_reset_password.rb +23 -0
- data/lib/volcano/auth_reset_password_for_email.rb +19 -0
- data/lib/volcano/auth_sessions.rb +139 -0
- data/lib/volcano/auth_sign_up.rb +40 -0
- data/lib/volcano/auth_state.rb +148 -0
- data/lib/volcano/auth_update_user.rb +32 -0
- data/lib/volcano/client.rb +121 -0
- data/lib/volcano/connection_string.rb +85 -0
- data/lib/volcano/database.rb +243 -0
- data/lib/volcano/errors.rb +38 -0
- data/lib/volcano/function_resolution.rb +120 -0
- data/lib/volcano/function_response.rb +26 -0
- data/lib/volcano/functions.rb +136 -0
- data/lib/volcano/generated/lib/volcano-generated/api/anon_keys_api.rb +471 -0
- data/lib/volcano/generated/lib/volcano-generated/api/auth_admin_api.rb +739 -0
- data/lib/volcano/generated/lib/volcano-generated/api/auth_configuration_api.rb +1798 -0
- data/lib/volcano/generated/lib/volcano-generated/api/authentication_api.rb +1523 -0
- data/lib/volcano/generated/lib/volcano-generated/api/database_backups_api.rb +791 -0
- data/lib/volcano/generated/lib/volcano-generated/api/database_branches_api.rb +665 -0
- data/lib/volcano/generated/lib/volcano-generated/api/database_queries_api.rb +905 -0
- data/lib/volcano/generated/lib/volcano-generated/api/databases_api.rb +819 -0
- data/lib/volcano/generated/lib/volcano-generated/api/frontends_api.rb +913 -0
- data/lib/volcano/generated/lib/volcano-generated/api/functions_api.rb +1355 -0
- data/lib/volcano/generated/lib/volcano-generated/api/git_connections_api.rb +1012 -0
- data/lib/volcano/generated/lib/volcano-generated/api/locks_api.rb +480 -0
- data/lib/volcano/generated/lib/volcano-generated/api/logs_api.rb +250 -0
- data/lib/volcano/generated/lib/volcano-generated/api/o_auth_authentication_api.rb +962 -0
- data/lib/volcano/generated/lib/volcano-generated/api/o_auth_configuration_api.rb +452 -0
- data/lib/volcano/generated/lib/volcano-generated/api/project_imports_api.rb +599 -0
- data/lib/volcano/generated/lib/volcano-generated/api/projects_api.rb +1862 -0
- data/lib/volcano/generated/lib/volcano-generated/api/realtime_api.rb +222 -0
- data/lib/volcano/generated/lib/volcano-generated/api/service_keys_api.rb +402 -0
- data/lib/volcano/generated/lib/volcano-generated/api/storage_admin_api.rb +189 -0
- data/lib/volcano/generated/lib/volcano-generated/api/storage_buckets_api.rb +437 -0
- data/lib/volcano/generated/lib/volcano-generated/api/storage_objects_api.rb +857 -0
- data/lib/volcano/generated/lib/volcano-generated/api/storage_policies_api.rb +277 -0
- data/lib/volcano/generated/lib/volcano-generated/api/system_api.rb +79 -0
- data/lib/volcano/generated/lib/volcano-generated/api/variables_api.rb +454 -0
- data/lib/volcano/generated/lib/volcano-generated/api_client.rb +393 -0
- data/lib/volcano/generated/lib/volcano-generated/api_error.rb +58 -0
- data/lib/volcano/generated/lib/volcano-generated/api_model_base.rb +88 -0
- data/lib/volcano/generated/lib/volcano-generated/configuration.rb +337 -0
- data/lib/volcano/generated/lib/volcano-generated/models/anon_key.rb +257 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_config.rb +728 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email200_response.rb +181 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email_change200_response.rb +156 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email_change_request.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_confirm_email_request.rb +165 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_convert_anonymous200_response.rb +147 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_device_authorize_request.rb +165 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_device_token_request.rb +240 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_device_verify200_response.rb +156 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_device_verify_request.rb +209 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_forgot_password200_response.rb +147 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_forgot_password_request.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_get_my_sessions200_response.rb +231 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page.rb +225 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page_defaults.rb +193 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page_response.rb +203 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_hosted_page_runtime.rb +220 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_identities_response.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_identity.rb +273 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_insights_interval.rb +41 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_insights_response.rb +270 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_insights_series_point.rb +263 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_insights_summary.rb +210 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_insights_window.rb +238 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_link_o_auth_provider200_response.rb +147 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_list_o_auth_providers200_response.rb +149 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_list_o_auth_providers200_response_providers_inner.rb +165 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_method_summary.rb +370 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_methods_response.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_o_auth_exchange_request.rb +190 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_appearance_defaults.rb +212 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_appearance_options.rb +306 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_appearance_response.rb +299 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_density.rb +41 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_font.rb +43 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_layout.rb +41 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_radius.rb +42 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_scale.rb +41 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_theme.rb +318 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_page_theme_colors.rb +323 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_password_policy.rb +409 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_platform_exchange_request.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_refresh_request.rb +190 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_request_email_change200_response.rb +156 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_request_email_change_request.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_reset_password200_response.rb +147 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_reset_password_request.rb +192 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_session.rb +393 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_signin_request.rb +233 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_signup_anonymous_request.rb +150 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_signup_request.rb +202 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_signup_response.rb +193 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_token_response.rb +254 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_update_user_request.rb +160 -0
- data/lib/volcano/generated/lib/volcano-generated/models/auth_user.rb +330 -0
- data/lib/volcano/generated/lib/volcano-generated/models/ban_auth_user_request.rb +148 -0
- data/lib/volcano/generated/lib/volcano-generated/models/ban_user_response.rb +278 -0
- data/lib/volcano/generated/lib/volcano-generated/models/batch_function_deploy_failure.rb +242 -0
- data/lib/volcano/generated/lib/volcano-generated/models/batch_function_deploy_response.rb +205 -0
- data/lib/volcano/generated/lib/volcano-generated/models/call_o_auth_provider_api200_response.rb +272 -0
- data/lib/volcano/generated/lib/volcano-generated/models/call_o_auth_provider_api_request.rb +223 -0
- data/lib/volcano/generated/lib/volcano-generated/models/complete_upload_session_response.rb +148 -0
- data/lib/volcano/generated/lib/volcano-generated/models/configure_auth_methods_request.rb +167 -0
- data/lib/volcano/generated/lib/volcano-generated/models/configure_auth_methods_request_oauth_providers_inner.rb +156 -0
- data/lib/volcano/generated/lib/volcano-generated/models/connect_project_git_request.rb +250 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_anon_key_request.rb +228 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_database_backup_request.rb +185 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_database_branch_request.rb +223 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_database_request.rb +290 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_database_restore_request.rb +187 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_email_template_request.rb +270 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_frontend_custom_domain_request.rb +191 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_function_scheduler_request.rb +252 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_o_auth_config_request.rb +230 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_project_request.rb +219 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_service_key_request.rb +206 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_storage_bucket_request.rb +216 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_storage_policy_request.rb +243 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_upload_session_request.rb +276 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_upload_session_response.rb +179 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_variable_request.rb +219 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database.rb +442 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_backup.rb +283 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_backup_list.rb +175 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_backup_schedule.rb +167 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_backup_schedule_entry.rb +301 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_branch.rb +480 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_branch_list.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_branch_storage.rb +228 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_delete_request.rb +203 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_insert_request.rb +194 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_query_filter.rb +242 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_query_filter_value.rb +106 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_query_filter_value_one_of_inner.rb +105 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_query_order.rb +187 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_query_performance_database.rb +190 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_query_performance_item.rb +411 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_query_performance_response.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_query_result.rb +161 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_restore.rb +388 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_restore_list.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_restore_window.rb +159 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_select_request.rb +268 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_stats.rb +447 -0
- data/lib/volcano/generated/lib/volcano-generated/models/database_update_request.rb +232 -0
- data/lib/volcano/generated/lib/volcano-generated/models/delete_database202_response.rb +156 -0
- data/lib/volcano/generated/lib/volcano-generated/models/delete_database_backup200_response.rb +190 -0
- data/lib/volcano/generated/lib/volcano-generated/models/delete_database_branch202_response.rb +190 -0
- data/lib/volcano/generated/lib/volcano-generated/models/deployment_phase.rb +263 -0
- data/lib/volcano/generated/lib/volcano-generated/models/deployment_progress.rb +324 -0
- data/lib/volcano/generated/lib/volcano-generated/models/deployment_reference.rb +165 -0
- data/lib/volcano/generated/lib/volcano-generated/models/device_authorization_response.rb +296 -0
- data/lib/volcano/generated/lib/volcano-generated/models/email_template.rb +305 -0
- data/lib/volcano/generated/lib/volcano-generated/models/error.rb +174 -0
- data/lib/volcano/generated/lib/volcano-generated/models/export_project_source_request.rb +174 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend.rb +504 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_response.rb +370 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_tls_config.rb +253 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_deployment.rb +487 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_domain_routing_record.rb +240 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_domain_verification_record.rb +216 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_usage_daily_entry.rb +247 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_usage_data.rb +204 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_usage_history_response.rb +298 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function.rb +565 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_deployment.rb +477 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_http_auth_mode.rb +40 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_invocation_mode.rb +40 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_invocation_request.rb +150 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_region.rb +219 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_runtime_deployment.rb +250 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_runtime_option.rb +245 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_runtimes_response.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_scheduler.rb +330 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_scheduler_list_response.rb +290 -0
- data/lib/volcano/generated/lib/volcano-generated/models/get_auth_methods200_response.rb +178 -0
- data/lib/volcano/generated/lib/volcano-generated/models/get_auth_methods200_response_email_password.rb +165 -0
- data/lib/volcano/generated/lib/volcano-generated/models/get_auth_methods200_response_oauth_providers_inner.rb +194 -0
- data/lib/volcano/generated/lib/volcano-generated/models/git_connect_start_response.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/git_connection.rb +346 -0
- data/lib/volcano/generated/lib/volcano-generated/models/git_connections_response.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/git_installation.rb +242 -0
- data/lib/volcano/generated/lib/volcano-generated/models/git_installations_response.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/git_repositories_response.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/git_repository.rb +270 -0
- data/lib/volcano/generated/lib/volcano-generated/models/hosted_auth_page_type.rb +44 -0
- data/lib/volcano/generated/lib/volcano-generated/models/hosted_login_email_check_request.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/hosted_login_email_check_response.rb +147 -0
- data/lib/volcano/generated/lib/volcano-generated/models/hosted_login_options_response.rb +185 -0
- data/lib/volcano/generated/lib/volcano-generated/models/hosted_renderable_page_type.rb +43 -0
- data/lib/volcano/generated/lib/volcano-generated/models/import_connect_start_response.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/import_connection.rb +432 -0
- data/lib/volcano/generated/lib/volcano-generated/models/import_connections_response.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/import_provider.rb +39 -0
- data/lib/volcano/generated/lib/volcano-generated/models/import_source.rb +242 -0
- data/lib/volcano/generated/lib/volcano-generated/models/import_sources_response.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/list_anon_keys200_response.rb +189 -0
- data/lib/volcano/generated/lib/volcano-generated/models/list_available_o_auth_providers200_response.rb +149 -0
- data/lib/volcano/generated/lib/volcano-generated/models/list_available_o_auth_providers200_response_providers_inner.rb +167 -0
- data/lib/volcano/generated/lib/volcano-generated/models/list_database_regions200_response_inner.rb +158 -0
- data/lib/volcano/generated/lib/volcano-generated/models/list_email_templates200_response.rb +149 -0
- data/lib/volcano/generated/lib/volcano-generated/models/list_o_auth_configs200_response.rb +149 -0
- data/lib/volcano/generated/lib/volcano-generated/models/list_postgres_versions200_response_inner.rb +178 -0
- data/lib/volcano/generated/lib/volcano-generated/models/list_storage_buckets200_response.rb +104 -0
- data/lib/volcano/generated/lib/volcano-generated/models/list_storage_objects_admin200_response.rb +205 -0
- data/lib/volcano/generated/lib/volcano-generated/models/live_log_level.rb +44 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_activity_bucket.rb +246 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_activity_bucket_counts.rb +226 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_activity_request.rb +252 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_activity_response.rb +194 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_database_request_resource.rb +221 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_deployment.rb +210 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_deployment_request_selector.rb +170 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_event.rb +257 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_event_body.rb +108 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_frontend_request_resource.rb +230 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_function_request_resource.rb +230 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_request_resource.rb +58 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_resource.rb +227 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_search_event.rb +297 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_search_request.rb +264 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_search_response.rb +232 -0
- data/lib/volcano/generated/lib/volcano-generated/models/log_stream_request.rb +244 -0
- data/lib/volcano/generated/lib/volcano-generated/models/metric_usage_data.rb +278 -0
- data/lib/volcano/generated/lib/volcano-generated/models/o_auth_config.rb +256 -0
- data/lib/volcano/generated/lib/volcano-generated/models/o_auth_error_response.rb +173 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_auth_users.rb +284 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_databases.rb +304 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_frontend_deployments.rb +284 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_frontends.rb +304 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_function_deployments.rb +284 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_functions.rb +304 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_project_custom_domains.rb +284 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_project_deployments.rb +306 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_projects.rb +368 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_service_keys.rb +304 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_storage_buckets.rb +251 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_variables.rb +304 -0
- data/lib/volcano/generated/lib/volcano-generated/models/platform_exchange_response.rb +242 -0
- data/lib/volcano/generated/lib/volcano-generated/models/preview_auth_page_request.rb +221 -0
- data/lib/volcano/generated/lib/volcano-generated/models/preview_auth_page_response.rb +190 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project.rb +419 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config.rb +273 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_apply_result.rb +261 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_apply_result_entry.rb +245 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_apply_summary.rb +320 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth.rb +238 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_cors.rb +176 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email.rb +175 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_from.rb +156 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_password_provider.rb +147 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_smtp.rb +184 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_email_verification.rb +158 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_managed_pages.rb +175 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_page_appearance.rb +156 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_page_layouts.rb +214 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_password.rb +211 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_password_reset.rb +167 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_providers.rb +159 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_rate_limits.rb +175 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_redirects.rb +180 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_sessions.rb +158 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_signup.rb +232 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_tokens.rb +175 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_bucket.rb +226 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_bucket_policy.rb +250 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_custom_domain.rb +175 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_database.rb +274 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_email_template.rb +205 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_email_templates.rb +175 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_frontend.rb +183 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_function.rb +248 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_hosted_page.rb +203 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_hosted_pages.rb +193 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_missing_resource.rb +214 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_o_auth_provider.rb +238 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_project.rb +209 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_realtime.rb +174 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_scheduler.rb +229 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_skipped_resource.rb +240 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_validation_error.rb +201 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_validation_error_response.rb +193 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_variable.rb +199 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_deployment.rb +412 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_deployment_resource.rb +241 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_deployment_summary.rb +312 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_frontend_custom_domain.rb +403 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_frontend_custom_domain_all_of_frontend.rb +191 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_git_connection.rb +296 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_git_connection_summary.rb +294 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_git_deploy_settings.rb +239 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_category.rb +40 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_check.rb +316 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_data_status.rb +42 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_evidence.rb +251 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_resource.rb +240 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_response.rb +356 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_scope.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_status.rb +42 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_summary.rb +186 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_action.rb +238 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_action_code.rb +42 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_destination.rb +238 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_destination_mode.rb +39 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_disposition.rb +42 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_finding.rb +327 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_impact.rb +41 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_preflight_request.rb +305 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_readiness.rb +41 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_report.rb +476 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_resource.rb +270 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_resource_kind.rb +43 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_run.rb +412 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_run_status.rb +43 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_start_request.rb +365 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_summary.rb +348 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_import_target.rb +39 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_lock_lease.rb +192 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_lock_lease_request.rb +183 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_lock_state.rb +185 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_data_status.rb +41 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_dimensions.rb +190 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_group_by.rb +40 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_metric.rb +42 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query.rb +250 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query_request.rb +210 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query_response.rb +227 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_query_time_range.rb +188 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_result.rb +292 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_unit.rb +41 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_value.rb +199 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_metrics_window.rb +190 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_source_export.rb +302 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_source_export_omission.rb +218 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_source_export_skip.rb +217 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_source_export_state.rb +228 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_usage_response.rb +234 -0
- data/lib/volcano/generated/lib/volcano-generated/models/realtime_config.rb +217 -0
- data/lib/volcano/generated/lib/volcano-generated/models/realtime_plan_limits.rb +189 -0
- data/lib/volcano/generated/lib/volcano-generated/models/realtime_stats.rb +178 -0
- data/lib/volcano/generated/lib/volcano-generated/models/refresh_o_auth_provider_token200_response.rb +165 -0
- data/lib/volcano/generated/lib/volcano-generated/models/reset_database_password200_response.rb +177 -0
- data/lib/volcano/generated/lib/volcano-generated/models/resolve_function_response.rb +248 -0
- data/lib/volcano/generated/lib/volcano-generated/models/resource_reference.rb +241 -0
- data/lib/volcano/generated/lib/volcano-generated/models/schedule_request.rb +210 -0
- data/lib/volcano/generated/lib/volcano-generated/models/service_key.rb +294 -0
- data/lib/volcano/generated/lib/volcano-generated/models/set_project_git_production_branch_request.rb +183 -0
- data/lib/volcano/generated/lib/volcano-generated/models/storage_bucket.rb +282 -0
- data/lib/volcano/generated/lib/volcano-generated/models/storage_copy_request.rb +192 -0
- data/lib/volcano/generated/lib/volcano-generated/models/storage_list_response.rb +159 -0
- data/lib/volcano/generated/lib/volcano-generated/models/storage_move_request.rb +192 -0
- data/lib/volcano/generated/lib/volcano-generated/models/storage_object.rb +359 -0
- data/lib/volcano/generated/lib/volcano-generated/models/storage_object_with_bucket.rb +383 -0
- data/lib/volcano/generated/lib/volcano-generated/models/storage_policy.rb +313 -0
- data/lib/volcano/generated/lib/volcano-generated/models/storage_stats.rb +220 -0
- data/lib/volcano/generated/lib/volcano-generated/models/storage_visibility_request.rb +165 -0
- data/lib/volcano/generated/lib/volcano-generated/models/test_email_request.rb +234 -0
- data/lib/volcano/generated/lib/volcano-generated/models/test_email_response.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/unban_user_response.rb +267 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_auth_config_request.rb +626 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_auth_hosted_page_request.rb +175 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_auth_page_layout_request.rb +186 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_auth_page_theme_request.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_database_branch_request.rb +184 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_database_type_request.rb +190 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_email_template_request.rb +165 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_function_request.rb +201 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_function_scheduler_request.rb +225 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_o_auth_config_request.rb +187 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_project_git_deploy_settings_request.rb +211 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_project_request.rb +198 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_realtime_config_request.rb +179 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_storage_bucket_request.rb +158 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_variable_request.rb +164 -0
- data/lib/volcano/generated/lib/volcano-generated/models/upload_session_part.rb +169 -0
- data/lib/volcano/generated/lib/volcano-generated/models/upload_session_status_response.rb +295 -0
- data/lib/volcano/generated/lib/volcano-generated/models/upload_storage_object201_response.rb +104 -0
- data/lib/volcano/generated/lib/volcano-generated/models/usage_data_point.rb +193 -0
- data/lib/volcano/generated/lib/volcano-generated/models/variable.rb +389 -0
- data/lib/volcano/generated/lib/volcano-generated/version.rb +15 -0
- data/lib/volcano/generated/lib/volcano-generated.rb +405 -0
- data/lib/volcano/generated_transport.rb +131 -0
- data/lib/volcano/generated_transport_anonymous.rb +34 -0
- data/lib/volcano/generated_transport_auth.rb +108 -0
- data/lib/volcano/generated_transport_confirmation.rb +30 -0
- data/lib/volcano/generated_transport_database.rb +54 -0
- data/lib/volcano/generated_transport_email_change.rb +44 -0
- data/lib/volcano/generated_transport_functions.rb +108 -0
- data/lib/volcano/generated_transport_logs.rb +31 -0
- data/lib/volcano/generated_transport_oauth.rb +64 -0
- data/lib/volcano/generated_transport_sessions.rb +27 -0
- data/lib/volcano/generated_transport_storage.rb +86 -0
- data/lib/volcano/generated_transport_support.rb +221 -0
- data/lib/volcano/generated_transport_upload_session_api.rb +69 -0
- data/lib/volcano/generated_transport_upload_sessions.rb +67 -0
- data/lib/volcano/lock_auto_renewal.rb +51 -0
- data/lib/volcano/lock_guard.rb +135 -0
- data/lib/volcano/lock_lease_clock.rb +39 -0
- data/lib/volcano/lock_renewer.rb +73 -0
- data/lib/volcano/lock_session.rb +70 -0
- data/lib/volcano/locks.rb +109 -0
- data/lib/volcano/log_responses.rb +39 -0
- data/lib/volcano/logs.rb +82 -0
- data/lib/volcano/models.rb +115 -0
- data/lib/volcano/realtime/blocking_call.rb +32 -0
- data/lib/volcano/realtime/broadcast_delivery.rb +63 -0
- data/lib/volcano/realtime/channel_callbacks.rb +127 -0
- data/lib/volcano/realtime/channel_lifecycle.rb +133 -0
- data/lib/volcano/realtime/connection.rb +114 -0
- data/lib/volcano/realtime/connection_callbacks.rb +126 -0
- data/lib/volcano/realtime/lifecycle.rb +46 -0
- data/lib/volcano/realtime/postgres_batch.rb +89 -0
- data/lib/volcano/realtime/postgres_changes.rb +107 -0
- data/lib/volcano/realtime/postgres_database.rb +63 -0
- data/lib/volcano/realtime/postgres_delivery.rb +113 -0
- data/lib/volcano/realtime/postgres_expansion.rb +66 -0
- data/lib/volcano/realtime/presence.rb +122 -0
- data/lib/volcano/realtime/presence_state.rb +61 -0
- data/lib/volcano/realtime/protocol.rb +150 -0
- data/lib/volcano/realtime/protocol_dispatch.rb +114 -0
- data/lib/volcano/realtime/protocol_io.rb +96 -0
- data/lib/volcano/realtime/protocol_lifecycle.rb +122 -0
- data/lib/volcano/realtime/protocol_publication_dispatch.rb +121 -0
- data/lib/volcano/realtime/protocol_recovery.rb +117 -0
- data/lib/volcano/realtime/protocol_recovery_dispatch.rb +106 -0
- data/lib/volcano/realtime/protocol_recovery_position.rb +95 -0
- data/lib/volcano/realtime/reconnect.rb +88 -0
- data/lib/volcano/realtime.rb +260 -0
- data/lib/volcano/redaction.rb +60 -0
- data/lib/volcano/sign_up_result.rb +9 -0
- data/lib/volcano/storage.rb +120 -0
- data/lib/volcano/storage_models.rb +121 -0
- data/lib/volcano/storage_mutations.rb +81 -0
- data/lib/volcano/storage_public_url.rb +64 -0
- data/lib/volcano/storage_resumable_upload.rb +90 -0
- data/lib/volcano/storage_upload_sessions.rb +116 -0
- data/lib/volcano/transport.rb +60 -0
- data/lib/volcano/version.rb +5 -0
- data/lib/volcano.rb +58 -0
- metadata +580 -0
|
@@ -0,0 +1,665 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Volcano Hosting API
|
|
3
|
+
|
|
4
|
+
#Public API for Volcano Hosting clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 3.0.0
|
|
7
|
+
Contact: support@volcano.dev
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.17.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Volcano::Generated
|
|
16
|
+
class DatabaseBranchesApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create a branch of a database
|
|
23
|
+
# Forks the database into a new branch. The branch starts as an exact copy of the parent's data and diverges from there. Provisioning is asynchronous: the response is `202` with the branch in `provisioning` and no connection string. Poll the branch until it reports `active`, at which point it carries its own connection string. Retrying a create with a name that already exists returns `409` rather than a second branch, so a retried request cannot silently consume two slots of the branch allowance.
|
|
24
|
+
# @param id [String] Project ID
|
|
25
|
+
# @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only)
|
|
26
|
+
# @param create_database_branch_request [CreateDatabaseBranchRequest]
|
|
27
|
+
# @param [Hash] opts the optional parameters
|
|
28
|
+
# @return [DatabaseBranch]
|
|
29
|
+
def create_database_branch(id, database_name, create_database_branch_request, opts = {})
|
|
30
|
+
data, _status_code, _headers = create_database_branch_with_http_info(id, database_name, create_database_branch_request, opts)
|
|
31
|
+
data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Create a branch of a database
|
|
35
|
+
# Forks the database into a new branch. The branch starts as an exact copy of the parent's data and diverges from there. Provisioning is asynchronous: the response is `202` with the branch in `provisioning` and no connection string. Poll the branch until it reports `active`, at which point it carries its own connection string. Retrying a create with a name that already exists returns `409` rather than a second branch, so a retried request cannot silently consume two slots of the branch allowance.
|
|
36
|
+
# @param id [String] Project ID
|
|
37
|
+
# @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only)
|
|
38
|
+
# @param create_database_branch_request [CreateDatabaseBranchRequest]
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @return [Array<(DatabaseBranch, Integer, Hash)>] DatabaseBranch data, response status code and response headers
|
|
41
|
+
def create_database_branch_with_http_info(id, database_name, create_database_branch_request, opts = {})
|
|
42
|
+
if @api_client.config.debugging
|
|
43
|
+
@api_client.config.logger.debug 'Calling API: DatabaseBranchesApi.create_database_branch ...'
|
|
44
|
+
end
|
|
45
|
+
# verify the required parameter 'id' is set
|
|
46
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
47
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling DatabaseBranchesApi.create_database_branch"
|
|
48
|
+
end
|
|
49
|
+
# verify the required parameter 'database_name' is set
|
|
50
|
+
if @api_client.config.client_side_validation && database_name.nil?
|
|
51
|
+
fail ArgumentError, "Missing the required parameter 'database_name' when calling DatabaseBranchesApi.create_database_branch"
|
|
52
|
+
end
|
|
53
|
+
if @api_client.config.client_side_validation && database_name.to_s.length > 64
|
|
54
|
+
fail ArgumentError, 'invalid value for "database_name" when calling DatabaseBranchesApi.create_database_branch, the character length must be smaller than or equal to 64.'
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
pattern = Regexp.new(/^[a-z0-9_]+$/)
|
|
58
|
+
if @api_client.config.client_side_validation && database_name !~ pattern
|
|
59
|
+
fail ArgumentError, "invalid value for 'database_name' when calling DatabaseBranchesApi.create_database_branch, must conform to the pattern #{pattern}."
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# verify the required parameter 'create_database_branch_request' is set
|
|
63
|
+
if @api_client.config.client_side_validation && create_database_branch_request.nil?
|
|
64
|
+
fail ArgumentError, "Missing the required parameter 'create_database_branch_request' when calling DatabaseBranchesApi.create_database_branch"
|
|
65
|
+
end
|
|
66
|
+
# resource path
|
|
67
|
+
local_var_path = '/projects/{id}/databases/{databaseName}/branches'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'databaseName' + '}', CGI.escape(database_name.to_s))
|
|
68
|
+
|
|
69
|
+
# query parameters
|
|
70
|
+
query_params = opts[:query_params] || {}
|
|
71
|
+
|
|
72
|
+
# header parameters
|
|
73
|
+
header_params = opts[:header_params] || {}
|
|
74
|
+
# HTTP header 'Accept' (if needed)
|
|
75
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
76
|
+
# HTTP header 'Content-Type'
|
|
77
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
78
|
+
if !content_type.nil?
|
|
79
|
+
header_params['Content-Type'] = content_type
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# form parameters
|
|
83
|
+
form_params = opts[:form_params] || {}
|
|
84
|
+
|
|
85
|
+
# http body (model)
|
|
86
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_database_branch_request)
|
|
87
|
+
|
|
88
|
+
# return_type
|
|
89
|
+
return_type = opts[:debug_return_type] || 'DatabaseBranch'
|
|
90
|
+
|
|
91
|
+
# auth_names
|
|
92
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
93
|
+
|
|
94
|
+
new_options = opts.merge(
|
|
95
|
+
:operation => :"DatabaseBranchesApi.create_database_branch",
|
|
96
|
+
:header_params => header_params,
|
|
97
|
+
:query_params => query_params,
|
|
98
|
+
:form_params => form_params,
|
|
99
|
+
:body => post_body,
|
|
100
|
+
:auth_names => auth_names,
|
|
101
|
+
:return_type => return_type
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
105
|
+
if @api_client.config.debugging
|
|
106
|
+
@api_client.config.logger.debug "API called: DatabaseBranchesApi#create_database_branch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
107
|
+
end
|
|
108
|
+
return data, status_code, headers
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Delete a branch
|
|
112
|
+
# Marks the branch for teardown and returns immediately. The branch stops accepting connections at once; its fork and its row are removed by a background job, so a provider outage cannot leave the call hanging or the branch half-deleted. Deleting a branch that is still provisioning is allowed and stops the build, and repeating the call while teardown is in progress is accepted again. Once the branch is gone the call returns `404`.
|
|
113
|
+
# @param id [String] Project ID
|
|
114
|
+
# @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only)
|
|
115
|
+
# @param branch_name [String] Branch name (unique within the parent database, lowercase letters, numbers, and underscores only)
|
|
116
|
+
# @param [Hash] opts the optional parameters
|
|
117
|
+
# @return [DeleteDatabaseBranch202Response]
|
|
118
|
+
def delete_database_branch(id, database_name, branch_name, opts = {})
|
|
119
|
+
data, _status_code, _headers = delete_database_branch_with_http_info(id, database_name, branch_name, opts)
|
|
120
|
+
data
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Delete a branch
|
|
124
|
+
# Marks the branch for teardown and returns immediately. The branch stops accepting connections at once; its fork and its row are removed by a background job, so a provider outage cannot leave the call hanging or the branch half-deleted. Deleting a branch that is still provisioning is allowed and stops the build, and repeating the call while teardown is in progress is accepted again. Once the branch is gone the call returns `404`.
|
|
125
|
+
# @param id [String] Project ID
|
|
126
|
+
# @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only)
|
|
127
|
+
# @param branch_name [String] Branch name (unique within the parent database, lowercase letters, numbers, and underscores only)
|
|
128
|
+
# @param [Hash] opts the optional parameters
|
|
129
|
+
# @return [Array<(DeleteDatabaseBranch202Response, Integer, Hash)>] DeleteDatabaseBranch202Response data, response status code and response headers
|
|
130
|
+
def delete_database_branch_with_http_info(id, database_name, branch_name, opts = {})
|
|
131
|
+
if @api_client.config.debugging
|
|
132
|
+
@api_client.config.logger.debug 'Calling API: DatabaseBranchesApi.delete_database_branch ...'
|
|
133
|
+
end
|
|
134
|
+
# verify the required parameter 'id' is set
|
|
135
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
136
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling DatabaseBranchesApi.delete_database_branch"
|
|
137
|
+
end
|
|
138
|
+
# verify the required parameter 'database_name' is set
|
|
139
|
+
if @api_client.config.client_side_validation && database_name.nil?
|
|
140
|
+
fail ArgumentError, "Missing the required parameter 'database_name' when calling DatabaseBranchesApi.delete_database_branch"
|
|
141
|
+
end
|
|
142
|
+
if @api_client.config.client_side_validation && database_name.to_s.length > 64
|
|
143
|
+
fail ArgumentError, 'invalid value for "database_name" when calling DatabaseBranchesApi.delete_database_branch, the character length must be smaller than or equal to 64.'
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
pattern = Regexp.new(/^[a-z0-9_]+$/)
|
|
147
|
+
if @api_client.config.client_side_validation && database_name !~ pattern
|
|
148
|
+
fail ArgumentError, "invalid value for 'database_name' when calling DatabaseBranchesApi.delete_database_branch, must conform to the pattern #{pattern}."
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# verify the required parameter 'branch_name' is set
|
|
152
|
+
if @api_client.config.client_side_validation && branch_name.nil?
|
|
153
|
+
fail ArgumentError, "Missing the required parameter 'branch_name' when calling DatabaseBranchesApi.delete_database_branch"
|
|
154
|
+
end
|
|
155
|
+
if @api_client.config.client_side_validation && branch_name.to_s.length > 64
|
|
156
|
+
fail ArgumentError, 'invalid value for "branch_name" when calling DatabaseBranchesApi.delete_database_branch, the character length must be smaller than or equal to 64.'
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
pattern = Regexp.new(/^[a-z0-9_]+$/)
|
|
160
|
+
if @api_client.config.client_side_validation && branch_name !~ pattern
|
|
161
|
+
fail ArgumentError, "invalid value for 'branch_name' when calling DatabaseBranchesApi.delete_database_branch, must conform to the pattern #{pattern}."
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# resource path
|
|
165
|
+
local_var_path = '/projects/{id}/databases/{databaseName}/branches/{branchName}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'databaseName' + '}', CGI.escape(database_name.to_s)).sub('{' + 'branchName' + '}', CGI.escape(branch_name.to_s))
|
|
166
|
+
|
|
167
|
+
# query parameters
|
|
168
|
+
query_params = opts[:query_params] || {}
|
|
169
|
+
|
|
170
|
+
# header parameters
|
|
171
|
+
header_params = opts[:header_params] || {}
|
|
172
|
+
# HTTP header 'Accept' (if needed)
|
|
173
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
174
|
+
|
|
175
|
+
# form parameters
|
|
176
|
+
form_params = opts[:form_params] || {}
|
|
177
|
+
|
|
178
|
+
# http body (model)
|
|
179
|
+
post_body = opts[:debug_body]
|
|
180
|
+
|
|
181
|
+
# return_type
|
|
182
|
+
return_type = opts[:debug_return_type] || 'DeleteDatabaseBranch202Response'
|
|
183
|
+
|
|
184
|
+
# auth_names
|
|
185
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
186
|
+
|
|
187
|
+
new_options = opts.merge(
|
|
188
|
+
:operation => :"DatabaseBranchesApi.delete_database_branch",
|
|
189
|
+
:header_params => header_params,
|
|
190
|
+
:query_params => query_params,
|
|
191
|
+
:form_params => form_params,
|
|
192
|
+
:body => post_body,
|
|
193
|
+
:auth_names => auth_names,
|
|
194
|
+
:return_type => return_type
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
198
|
+
if @api_client.config.debugging
|
|
199
|
+
@api_client.config.logger.debug "API called: DatabaseBranchesApi#delete_database_branch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
200
|
+
end
|
|
201
|
+
return data, status_code, headers
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Get a branch
|
|
205
|
+
# Returns the branch, including its connection string once it is `active`. Poll this after creating a branch to learn when it is connectable.
|
|
206
|
+
# @param id [String] Project ID
|
|
207
|
+
# @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only)
|
|
208
|
+
# @param branch_name [String] Branch name (unique within the parent database, lowercase letters, numbers, and underscores only)
|
|
209
|
+
# @param [Hash] opts the optional parameters
|
|
210
|
+
# @return [DatabaseBranch]
|
|
211
|
+
def get_database_branch(id, database_name, branch_name, opts = {})
|
|
212
|
+
data, _status_code, _headers = get_database_branch_with_http_info(id, database_name, branch_name, opts)
|
|
213
|
+
data
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Get a branch
|
|
217
|
+
# Returns the branch, including its connection string once it is `active`. Poll this after creating a branch to learn when it is connectable.
|
|
218
|
+
# @param id [String] Project ID
|
|
219
|
+
# @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only)
|
|
220
|
+
# @param branch_name [String] Branch name (unique within the parent database, lowercase letters, numbers, and underscores only)
|
|
221
|
+
# @param [Hash] opts the optional parameters
|
|
222
|
+
# @return [Array<(DatabaseBranch, Integer, Hash)>] DatabaseBranch data, response status code and response headers
|
|
223
|
+
def get_database_branch_with_http_info(id, database_name, branch_name, opts = {})
|
|
224
|
+
if @api_client.config.debugging
|
|
225
|
+
@api_client.config.logger.debug 'Calling API: DatabaseBranchesApi.get_database_branch ...'
|
|
226
|
+
end
|
|
227
|
+
# verify the required parameter 'id' is set
|
|
228
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
229
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling DatabaseBranchesApi.get_database_branch"
|
|
230
|
+
end
|
|
231
|
+
# verify the required parameter 'database_name' is set
|
|
232
|
+
if @api_client.config.client_side_validation && database_name.nil?
|
|
233
|
+
fail ArgumentError, "Missing the required parameter 'database_name' when calling DatabaseBranchesApi.get_database_branch"
|
|
234
|
+
end
|
|
235
|
+
if @api_client.config.client_side_validation && database_name.to_s.length > 64
|
|
236
|
+
fail ArgumentError, 'invalid value for "database_name" when calling DatabaseBranchesApi.get_database_branch, the character length must be smaller than or equal to 64.'
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
pattern = Regexp.new(/^[a-z0-9_]+$/)
|
|
240
|
+
if @api_client.config.client_side_validation && database_name !~ pattern
|
|
241
|
+
fail ArgumentError, "invalid value for 'database_name' when calling DatabaseBranchesApi.get_database_branch, must conform to the pattern #{pattern}."
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# verify the required parameter 'branch_name' is set
|
|
245
|
+
if @api_client.config.client_side_validation && branch_name.nil?
|
|
246
|
+
fail ArgumentError, "Missing the required parameter 'branch_name' when calling DatabaseBranchesApi.get_database_branch"
|
|
247
|
+
end
|
|
248
|
+
if @api_client.config.client_side_validation && branch_name.to_s.length > 64
|
|
249
|
+
fail ArgumentError, 'invalid value for "branch_name" when calling DatabaseBranchesApi.get_database_branch, the character length must be smaller than or equal to 64.'
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
pattern = Regexp.new(/^[a-z0-9_]+$/)
|
|
253
|
+
if @api_client.config.client_side_validation && branch_name !~ pattern
|
|
254
|
+
fail ArgumentError, "invalid value for 'branch_name' when calling DatabaseBranchesApi.get_database_branch, must conform to the pattern #{pattern}."
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# resource path
|
|
258
|
+
local_var_path = '/projects/{id}/databases/{databaseName}/branches/{branchName}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'databaseName' + '}', CGI.escape(database_name.to_s)).sub('{' + 'branchName' + '}', CGI.escape(branch_name.to_s))
|
|
259
|
+
|
|
260
|
+
# query parameters
|
|
261
|
+
query_params = opts[:query_params] || {}
|
|
262
|
+
|
|
263
|
+
# header parameters
|
|
264
|
+
header_params = opts[:header_params] || {}
|
|
265
|
+
# HTTP header 'Accept' (if needed)
|
|
266
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
267
|
+
|
|
268
|
+
# form parameters
|
|
269
|
+
form_params = opts[:form_params] || {}
|
|
270
|
+
|
|
271
|
+
# http body (model)
|
|
272
|
+
post_body = opts[:debug_body]
|
|
273
|
+
|
|
274
|
+
# return_type
|
|
275
|
+
return_type = opts[:debug_return_type] || 'DatabaseBranch'
|
|
276
|
+
|
|
277
|
+
# auth_names
|
|
278
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
279
|
+
|
|
280
|
+
new_options = opts.merge(
|
|
281
|
+
:operation => :"DatabaseBranchesApi.get_database_branch",
|
|
282
|
+
:header_params => header_params,
|
|
283
|
+
:query_params => query_params,
|
|
284
|
+
:form_params => form_params,
|
|
285
|
+
:body => post_body,
|
|
286
|
+
:auth_names => auth_names,
|
|
287
|
+
:return_type => return_type
|
|
288
|
+
)
|
|
289
|
+
|
|
290
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
291
|
+
if @api_client.config.debugging
|
|
292
|
+
@api_client.config.logger.debug "API called: DatabaseBranchesApi#get_database_branch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
293
|
+
end
|
|
294
|
+
return data, status_code, headers
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
# List a database's branches
|
|
298
|
+
# Returns every branch of the database, including those still provisioning and those that failed, since each still holds a name. Connection strings are omitted. Fetch a single branch to get its connection string.
|
|
299
|
+
# @param id [String] Project ID
|
|
300
|
+
# @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only)
|
|
301
|
+
# @param [Hash] opts the optional parameters
|
|
302
|
+
# @return [DatabaseBranchList]
|
|
303
|
+
def list_database_branches(id, database_name, opts = {})
|
|
304
|
+
data, _status_code, _headers = list_database_branches_with_http_info(id, database_name, opts)
|
|
305
|
+
data
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
# List a database's branches
|
|
309
|
+
# Returns every branch of the database, including those still provisioning and those that failed, since each still holds a name. Connection strings are omitted. Fetch a single branch to get its connection string.
|
|
310
|
+
# @param id [String] Project ID
|
|
311
|
+
# @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only)
|
|
312
|
+
# @param [Hash] opts the optional parameters
|
|
313
|
+
# @return [Array<(DatabaseBranchList, Integer, Hash)>] DatabaseBranchList data, response status code and response headers
|
|
314
|
+
def list_database_branches_with_http_info(id, database_name, opts = {})
|
|
315
|
+
if @api_client.config.debugging
|
|
316
|
+
@api_client.config.logger.debug 'Calling API: DatabaseBranchesApi.list_database_branches ...'
|
|
317
|
+
end
|
|
318
|
+
# verify the required parameter 'id' is set
|
|
319
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
320
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling DatabaseBranchesApi.list_database_branches"
|
|
321
|
+
end
|
|
322
|
+
# verify the required parameter 'database_name' is set
|
|
323
|
+
if @api_client.config.client_side_validation && database_name.nil?
|
|
324
|
+
fail ArgumentError, "Missing the required parameter 'database_name' when calling DatabaseBranchesApi.list_database_branches"
|
|
325
|
+
end
|
|
326
|
+
if @api_client.config.client_side_validation && database_name.to_s.length > 64
|
|
327
|
+
fail ArgumentError, 'invalid value for "database_name" when calling DatabaseBranchesApi.list_database_branches, the character length must be smaller than or equal to 64.'
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
pattern = Regexp.new(/^[a-z0-9_]+$/)
|
|
331
|
+
if @api_client.config.client_side_validation && database_name !~ pattern
|
|
332
|
+
fail ArgumentError, "invalid value for 'database_name' when calling DatabaseBranchesApi.list_database_branches, must conform to the pattern #{pattern}."
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
# resource path
|
|
336
|
+
local_var_path = '/projects/{id}/databases/{databaseName}/branches'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'databaseName' + '}', CGI.escape(database_name.to_s))
|
|
337
|
+
|
|
338
|
+
# query parameters
|
|
339
|
+
query_params = opts[:query_params] || {}
|
|
340
|
+
|
|
341
|
+
# header parameters
|
|
342
|
+
header_params = opts[:header_params] || {}
|
|
343
|
+
# HTTP header 'Accept' (if needed)
|
|
344
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
345
|
+
|
|
346
|
+
# form parameters
|
|
347
|
+
form_params = opts[:form_params] || {}
|
|
348
|
+
|
|
349
|
+
# http body (model)
|
|
350
|
+
post_body = opts[:debug_body]
|
|
351
|
+
|
|
352
|
+
# return_type
|
|
353
|
+
return_type = opts[:debug_return_type] || 'DatabaseBranchList'
|
|
354
|
+
|
|
355
|
+
# auth_names
|
|
356
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
357
|
+
|
|
358
|
+
new_options = opts.merge(
|
|
359
|
+
:operation => :"DatabaseBranchesApi.list_database_branches",
|
|
360
|
+
:header_params => header_params,
|
|
361
|
+
:query_params => query_params,
|
|
362
|
+
:form_params => form_params,
|
|
363
|
+
:body => post_body,
|
|
364
|
+
:auth_names => auth_names,
|
|
365
|
+
:return_type => return_type
|
|
366
|
+
)
|
|
367
|
+
|
|
368
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
369
|
+
if @api_client.config.debugging
|
|
370
|
+
@api_client.config.logger.debug "API called: DatabaseBranchesApi#list_database_branches\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
371
|
+
end
|
|
372
|
+
return data, status_code, headers
|
|
373
|
+
end
|
|
374
|
+
|
|
375
|
+
# Reset a branch to its parent's current state
|
|
376
|
+
# Discards everything written on the branch and re-forks it from the parent as it is now. Returns immediately with the branch in `provisioning`. The rewind runs in the background; poll the branch until it reports `active` before connecting again. The branch keeps its name and its connection string, so anything holding that string keeps working once it is active again, and its lifetime is re-armed to the duration it was created with. The branch does not serve connections for the duration of the reset.
|
|
377
|
+
# @param id [String] Project ID
|
|
378
|
+
# @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only)
|
|
379
|
+
# @param branch_name [String] Branch name (unique within the parent database, lowercase letters, numbers, and underscores only)
|
|
380
|
+
# @param [Hash] opts the optional parameters
|
|
381
|
+
# @return [DatabaseBranch]
|
|
382
|
+
def reset_database_branch(id, database_name, branch_name, opts = {})
|
|
383
|
+
data, _status_code, _headers = reset_database_branch_with_http_info(id, database_name, branch_name, opts)
|
|
384
|
+
data
|
|
385
|
+
end
|
|
386
|
+
|
|
387
|
+
# Reset a branch to its parent's current state
|
|
388
|
+
# Discards everything written on the branch and re-forks it from the parent as it is now. Returns immediately with the branch in `provisioning`. The rewind runs in the background; poll the branch until it reports `active` before connecting again. The branch keeps its name and its connection string, so anything holding that string keeps working once it is active again, and its lifetime is re-armed to the duration it was created with. The branch does not serve connections for the duration of the reset.
|
|
389
|
+
# @param id [String] Project ID
|
|
390
|
+
# @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only)
|
|
391
|
+
# @param branch_name [String] Branch name (unique within the parent database, lowercase letters, numbers, and underscores only)
|
|
392
|
+
# @param [Hash] opts the optional parameters
|
|
393
|
+
# @return [Array<(DatabaseBranch, Integer, Hash)>] DatabaseBranch data, response status code and response headers
|
|
394
|
+
def reset_database_branch_with_http_info(id, database_name, branch_name, opts = {})
|
|
395
|
+
if @api_client.config.debugging
|
|
396
|
+
@api_client.config.logger.debug 'Calling API: DatabaseBranchesApi.reset_database_branch ...'
|
|
397
|
+
end
|
|
398
|
+
# verify the required parameter 'id' is set
|
|
399
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
400
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling DatabaseBranchesApi.reset_database_branch"
|
|
401
|
+
end
|
|
402
|
+
# verify the required parameter 'database_name' is set
|
|
403
|
+
if @api_client.config.client_side_validation && database_name.nil?
|
|
404
|
+
fail ArgumentError, "Missing the required parameter 'database_name' when calling DatabaseBranchesApi.reset_database_branch"
|
|
405
|
+
end
|
|
406
|
+
if @api_client.config.client_side_validation && database_name.to_s.length > 64
|
|
407
|
+
fail ArgumentError, 'invalid value for "database_name" when calling DatabaseBranchesApi.reset_database_branch, the character length must be smaller than or equal to 64.'
|
|
408
|
+
end
|
|
409
|
+
|
|
410
|
+
pattern = Regexp.new(/^[a-z0-9_]+$/)
|
|
411
|
+
if @api_client.config.client_side_validation && database_name !~ pattern
|
|
412
|
+
fail ArgumentError, "invalid value for 'database_name' when calling DatabaseBranchesApi.reset_database_branch, must conform to the pattern #{pattern}."
|
|
413
|
+
end
|
|
414
|
+
|
|
415
|
+
# verify the required parameter 'branch_name' is set
|
|
416
|
+
if @api_client.config.client_side_validation && branch_name.nil?
|
|
417
|
+
fail ArgumentError, "Missing the required parameter 'branch_name' when calling DatabaseBranchesApi.reset_database_branch"
|
|
418
|
+
end
|
|
419
|
+
if @api_client.config.client_side_validation && branch_name.to_s.length > 64
|
|
420
|
+
fail ArgumentError, 'invalid value for "branch_name" when calling DatabaseBranchesApi.reset_database_branch, the character length must be smaller than or equal to 64.'
|
|
421
|
+
end
|
|
422
|
+
|
|
423
|
+
pattern = Regexp.new(/^[a-z0-9_]+$/)
|
|
424
|
+
if @api_client.config.client_side_validation && branch_name !~ pattern
|
|
425
|
+
fail ArgumentError, "invalid value for 'branch_name' when calling DatabaseBranchesApi.reset_database_branch, must conform to the pattern #{pattern}."
|
|
426
|
+
end
|
|
427
|
+
|
|
428
|
+
# resource path
|
|
429
|
+
local_var_path = '/projects/{id}/databases/{databaseName}/branches/{branchName}/reset'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'databaseName' + '}', CGI.escape(database_name.to_s)).sub('{' + 'branchName' + '}', CGI.escape(branch_name.to_s))
|
|
430
|
+
|
|
431
|
+
# query parameters
|
|
432
|
+
query_params = opts[:query_params] || {}
|
|
433
|
+
|
|
434
|
+
# header parameters
|
|
435
|
+
header_params = opts[:header_params] || {}
|
|
436
|
+
# HTTP header 'Accept' (if needed)
|
|
437
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
438
|
+
|
|
439
|
+
# form parameters
|
|
440
|
+
form_params = opts[:form_params] || {}
|
|
441
|
+
|
|
442
|
+
# http body (model)
|
|
443
|
+
post_body = opts[:debug_body]
|
|
444
|
+
|
|
445
|
+
# return_type
|
|
446
|
+
return_type = opts[:debug_return_type] || 'DatabaseBranch'
|
|
447
|
+
|
|
448
|
+
# auth_names
|
|
449
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
450
|
+
|
|
451
|
+
new_options = opts.merge(
|
|
452
|
+
:operation => :"DatabaseBranchesApi.reset_database_branch",
|
|
453
|
+
:header_params => header_params,
|
|
454
|
+
:query_params => query_params,
|
|
455
|
+
:form_params => form_params,
|
|
456
|
+
:body => post_body,
|
|
457
|
+
:auth_names => auth_names,
|
|
458
|
+
:return_type => return_type
|
|
459
|
+
)
|
|
460
|
+
|
|
461
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
462
|
+
if @api_client.config.debugging
|
|
463
|
+
@api_client.config.logger.debug "API called: DatabaseBranchesApi#reset_database_branch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
464
|
+
end
|
|
465
|
+
return data, status_code, headers
|
|
466
|
+
end
|
|
467
|
+
|
|
468
|
+
# Rotate a branch's password
|
|
469
|
+
# Issues a new password for the branch and invalidates the previous connection string. Existing connections are not interrupted; new ones must use the returned string. Proxies pick the rotation up within a few seconds, so the previous password can still open new connections until then. The parent database's credentials are untouched.
|
|
470
|
+
# @param id [String] Project ID
|
|
471
|
+
# @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only)
|
|
472
|
+
# @param branch_name [String] Branch name (unique within the parent database, lowercase letters, numbers, and underscores only)
|
|
473
|
+
# @param [Hash] opts the optional parameters
|
|
474
|
+
# @return [DatabaseBranch]
|
|
475
|
+
def reset_database_branch_password(id, database_name, branch_name, opts = {})
|
|
476
|
+
data, _status_code, _headers = reset_database_branch_password_with_http_info(id, database_name, branch_name, opts)
|
|
477
|
+
data
|
|
478
|
+
end
|
|
479
|
+
|
|
480
|
+
# Rotate a branch's password
|
|
481
|
+
# Issues a new password for the branch and invalidates the previous connection string. Existing connections are not interrupted; new ones must use the returned string. Proxies pick the rotation up within a few seconds, so the previous password can still open new connections until then. The parent database's credentials are untouched.
|
|
482
|
+
# @param id [String] Project ID
|
|
483
|
+
# @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only)
|
|
484
|
+
# @param branch_name [String] Branch name (unique within the parent database, lowercase letters, numbers, and underscores only)
|
|
485
|
+
# @param [Hash] opts the optional parameters
|
|
486
|
+
# @return [Array<(DatabaseBranch, Integer, Hash)>] DatabaseBranch data, response status code and response headers
|
|
487
|
+
def reset_database_branch_password_with_http_info(id, database_name, branch_name, opts = {})
|
|
488
|
+
if @api_client.config.debugging
|
|
489
|
+
@api_client.config.logger.debug 'Calling API: DatabaseBranchesApi.reset_database_branch_password ...'
|
|
490
|
+
end
|
|
491
|
+
# verify the required parameter 'id' is set
|
|
492
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
493
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling DatabaseBranchesApi.reset_database_branch_password"
|
|
494
|
+
end
|
|
495
|
+
# verify the required parameter 'database_name' is set
|
|
496
|
+
if @api_client.config.client_side_validation && database_name.nil?
|
|
497
|
+
fail ArgumentError, "Missing the required parameter 'database_name' when calling DatabaseBranchesApi.reset_database_branch_password"
|
|
498
|
+
end
|
|
499
|
+
if @api_client.config.client_side_validation && database_name.to_s.length > 64
|
|
500
|
+
fail ArgumentError, 'invalid value for "database_name" when calling DatabaseBranchesApi.reset_database_branch_password, the character length must be smaller than or equal to 64.'
|
|
501
|
+
end
|
|
502
|
+
|
|
503
|
+
pattern = Regexp.new(/^[a-z0-9_]+$/)
|
|
504
|
+
if @api_client.config.client_side_validation && database_name !~ pattern
|
|
505
|
+
fail ArgumentError, "invalid value for 'database_name' when calling DatabaseBranchesApi.reset_database_branch_password, must conform to the pattern #{pattern}."
|
|
506
|
+
end
|
|
507
|
+
|
|
508
|
+
# verify the required parameter 'branch_name' is set
|
|
509
|
+
if @api_client.config.client_side_validation && branch_name.nil?
|
|
510
|
+
fail ArgumentError, "Missing the required parameter 'branch_name' when calling DatabaseBranchesApi.reset_database_branch_password"
|
|
511
|
+
end
|
|
512
|
+
if @api_client.config.client_side_validation && branch_name.to_s.length > 64
|
|
513
|
+
fail ArgumentError, 'invalid value for "branch_name" when calling DatabaseBranchesApi.reset_database_branch_password, the character length must be smaller than or equal to 64.'
|
|
514
|
+
end
|
|
515
|
+
|
|
516
|
+
pattern = Regexp.new(/^[a-z0-9_]+$/)
|
|
517
|
+
if @api_client.config.client_side_validation && branch_name !~ pattern
|
|
518
|
+
fail ArgumentError, "invalid value for 'branch_name' when calling DatabaseBranchesApi.reset_database_branch_password, must conform to the pattern #{pattern}."
|
|
519
|
+
end
|
|
520
|
+
|
|
521
|
+
# resource path
|
|
522
|
+
local_var_path = '/projects/{id}/databases/{databaseName}/branches/{branchName}/reset-password'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'databaseName' + '}', CGI.escape(database_name.to_s)).sub('{' + 'branchName' + '}', CGI.escape(branch_name.to_s))
|
|
523
|
+
|
|
524
|
+
# query parameters
|
|
525
|
+
query_params = opts[:query_params] || {}
|
|
526
|
+
|
|
527
|
+
# header parameters
|
|
528
|
+
header_params = opts[:header_params] || {}
|
|
529
|
+
# HTTP header 'Accept' (if needed)
|
|
530
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
531
|
+
|
|
532
|
+
# form parameters
|
|
533
|
+
form_params = opts[:form_params] || {}
|
|
534
|
+
|
|
535
|
+
# http body (model)
|
|
536
|
+
post_body = opts[:debug_body]
|
|
537
|
+
|
|
538
|
+
# return_type
|
|
539
|
+
return_type = opts[:debug_return_type] || 'DatabaseBranch'
|
|
540
|
+
|
|
541
|
+
# auth_names
|
|
542
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
543
|
+
|
|
544
|
+
new_options = opts.merge(
|
|
545
|
+
:operation => :"DatabaseBranchesApi.reset_database_branch_password",
|
|
546
|
+
:header_params => header_params,
|
|
547
|
+
:query_params => query_params,
|
|
548
|
+
:form_params => form_params,
|
|
549
|
+
:body => post_body,
|
|
550
|
+
:auth_names => auth_names,
|
|
551
|
+
:return_type => return_type
|
|
552
|
+
)
|
|
553
|
+
|
|
554
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
555
|
+
if @api_client.config.debugging
|
|
556
|
+
@api_client.config.logger.debug "API called: DatabaseBranchesApi#reset_database_branch_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
557
|
+
end
|
|
558
|
+
return data, status_code, headers
|
|
559
|
+
end
|
|
560
|
+
|
|
561
|
+
# Extend a branch's lifetime
|
|
562
|
+
# Replaces the branch's lifetime and restarts the countdown from now, so a branch you are still working on is not swept mid-session. The new duration is remembered, so a later reset re-arms the same lifetime.
|
|
563
|
+
# @param id [String] Project ID
|
|
564
|
+
# @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only)
|
|
565
|
+
# @param branch_name [String] Branch name (unique within the parent database, lowercase letters, numbers, and underscores only)
|
|
566
|
+
# @param update_database_branch_request [UpdateDatabaseBranchRequest]
|
|
567
|
+
# @param [Hash] opts the optional parameters
|
|
568
|
+
# @return [DatabaseBranch]
|
|
569
|
+
def update_database_branch(id, database_name, branch_name, update_database_branch_request, opts = {})
|
|
570
|
+
data, _status_code, _headers = update_database_branch_with_http_info(id, database_name, branch_name, update_database_branch_request, opts)
|
|
571
|
+
data
|
|
572
|
+
end
|
|
573
|
+
|
|
574
|
+
# Extend a branch's lifetime
|
|
575
|
+
# Replaces the branch's lifetime and restarts the countdown from now, so a branch you are still working on is not swept mid-session. The new duration is remembered, so a later reset re-arms the same lifetime.
|
|
576
|
+
# @param id [String] Project ID
|
|
577
|
+
# @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only)
|
|
578
|
+
# @param branch_name [String] Branch name (unique within the parent database, lowercase letters, numbers, and underscores only)
|
|
579
|
+
# @param update_database_branch_request [UpdateDatabaseBranchRequest]
|
|
580
|
+
# @param [Hash] opts the optional parameters
|
|
581
|
+
# @return [Array<(DatabaseBranch, Integer, Hash)>] DatabaseBranch data, response status code and response headers
|
|
582
|
+
def update_database_branch_with_http_info(id, database_name, branch_name, update_database_branch_request, opts = {})
|
|
583
|
+
if @api_client.config.debugging
|
|
584
|
+
@api_client.config.logger.debug 'Calling API: DatabaseBranchesApi.update_database_branch ...'
|
|
585
|
+
end
|
|
586
|
+
# verify the required parameter 'id' is set
|
|
587
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
588
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling DatabaseBranchesApi.update_database_branch"
|
|
589
|
+
end
|
|
590
|
+
# verify the required parameter 'database_name' is set
|
|
591
|
+
if @api_client.config.client_side_validation && database_name.nil?
|
|
592
|
+
fail ArgumentError, "Missing the required parameter 'database_name' when calling DatabaseBranchesApi.update_database_branch"
|
|
593
|
+
end
|
|
594
|
+
if @api_client.config.client_side_validation && database_name.to_s.length > 64
|
|
595
|
+
fail ArgumentError, 'invalid value for "database_name" when calling DatabaseBranchesApi.update_database_branch, the character length must be smaller than or equal to 64.'
|
|
596
|
+
end
|
|
597
|
+
|
|
598
|
+
pattern = Regexp.new(/^[a-z0-9_]+$/)
|
|
599
|
+
if @api_client.config.client_side_validation && database_name !~ pattern
|
|
600
|
+
fail ArgumentError, "invalid value for 'database_name' when calling DatabaseBranchesApi.update_database_branch, must conform to the pattern #{pattern}."
|
|
601
|
+
end
|
|
602
|
+
|
|
603
|
+
# verify the required parameter 'branch_name' is set
|
|
604
|
+
if @api_client.config.client_side_validation && branch_name.nil?
|
|
605
|
+
fail ArgumentError, "Missing the required parameter 'branch_name' when calling DatabaseBranchesApi.update_database_branch"
|
|
606
|
+
end
|
|
607
|
+
if @api_client.config.client_side_validation && branch_name.to_s.length > 64
|
|
608
|
+
fail ArgumentError, 'invalid value for "branch_name" when calling DatabaseBranchesApi.update_database_branch, the character length must be smaller than or equal to 64.'
|
|
609
|
+
end
|
|
610
|
+
|
|
611
|
+
pattern = Regexp.new(/^[a-z0-9_]+$/)
|
|
612
|
+
if @api_client.config.client_side_validation && branch_name !~ pattern
|
|
613
|
+
fail ArgumentError, "invalid value for 'branch_name' when calling DatabaseBranchesApi.update_database_branch, must conform to the pattern #{pattern}."
|
|
614
|
+
end
|
|
615
|
+
|
|
616
|
+
# verify the required parameter 'update_database_branch_request' is set
|
|
617
|
+
if @api_client.config.client_side_validation && update_database_branch_request.nil?
|
|
618
|
+
fail ArgumentError, "Missing the required parameter 'update_database_branch_request' when calling DatabaseBranchesApi.update_database_branch"
|
|
619
|
+
end
|
|
620
|
+
# resource path
|
|
621
|
+
local_var_path = '/projects/{id}/databases/{databaseName}/branches/{branchName}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'databaseName' + '}', CGI.escape(database_name.to_s)).sub('{' + 'branchName' + '}', CGI.escape(branch_name.to_s))
|
|
622
|
+
|
|
623
|
+
# query parameters
|
|
624
|
+
query_params = opts[:query_params] || {}
|
|
625
|
+
|
|
626
|
+
# header parameters
|
|
627
|
+
header_params = opts[:header_params] || {}
|
|
628
|
+
# HTTP header 'Accept' (if needed)
|
|
629
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
630
|
+
# HTTP header 'Content-Type'
|
|
631
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
632
|
+
if !content_type.nil?
|
|
633
|
+
header_params['Content-Type'] = content_type
|
|
634
|
+
end
|
|
635
|
+
|
|
636
|
+
# form parameters
|
|
637
|
+
form_params = opts[:form_params] || {}
|
|
638
|
+
|
|
639
|
+
# http body (model)
|
|
640
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_database_branch_request)
|
|
641
|
+
|
|
642
|
+
# return_type
|
|
643
|
+
return_type = opts[:debug_return_type] || 'DatabaseBranch'
|
|
644
|
+
|
|
645
|
+
# auth_names
|
|
646
|
+
auth_names = opts[:debug_auth_names] || ['UserToken']
|
|
647
|
+
|
|
648
|
+
new_options = opts.merge(
|
|
649
|
+
:operation => :"DatabaseBranchesApi.update_database_branch",
|
|
650
|
+
:header_params => header_params,
|
|
651
|
+
:query_params => query_params,
|
|
652
|
+
:form_params => form_params,
|
|
653
|
+
:body => post_body,
|
|
654
|
+
:auth_names => auth_names,
|
|
655
|
+
:return_type => return_type
|
|
656
|
+
)
|
|
657
|
+
|
|
658
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
659
|
+
if @api_client.config.debugging
|
|
660
|
+
@api_client.config.logger.debug "API called: DatabaseBranchesApi#update_database_branch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
661
|
+
end
|
|
662
|
+
return data, status_code, headers
|
|
663
|
+
end
|
|
664
|
+
end
|
|
665
|
+
end
|