ezero-apimatic-sdk 0.0.1
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 +28 -0
- data/README.md +180 -0
- data/bin/console +15 -0
- data/lib/env_zero_api/api_helper.rb +10 -0
- data/lib/env_zero_api/apis/approval_policy_api.rb +107 -0
- data/lib/env_zero_api/apis/base_api.rb +67 -0
- data/lib/env_zero_api/apis/bulk_operations_api.rb +297 -0
- data/lib/env_zero_api/apis/configuration_api.rb +311 -0
- data/lib/env_zero_api/apis/credentials_api.rb +72 -0
- data/lib/env_zero_api/apis/deployment_logs_api.rb +79 -0
- data/lib/env_zero_api/apis/drift_api.rb +201 -0
- data/lib/env_zero_api/apis/environment_outputs_api.rb +39 -0
- data/lib/env_zero_api/apis/environments_api.rb +1082 -0
- data/lib/env_zero_api/apis/notifications_api.rb +149 -0
- data/lib/env_zero_api/apis/organization_api.rb +132 -0
- data/lib/env_zero_api/apis/projects_api.rb +202 -0
- data/lib/env_zero_api/apis/scheduling_api.rb +175 -0
- data/lib/env_zero_api/apis/templates_api.rb +206 -0
- data/lib/env_zero_api/client.rb +145 -0
- data/lib/env_zero_api/configuration.rb +166 -0
- data/lib/env_zero_api/exceptions/api_exception.rb +21 -0
- data/lib/env_zero_api/exceptions/error_exception.rb +46 -0
- data/lib/env_zero_api/http/api_response.rb +19 -0
- data/lib/env_zero_api/http/auth/basic_auth.rb +62 -0
- data/lib/env_zero_api/http/http_call_back.rb +10 -0
- data/lib/env_zero_api/http/http_method_enum.rb +10 -0
- data/lib/env_zero_api/http/http_request.rb +10 -0
- data/lib/env_zero_api/http/http_response.rb +10 -0
- data/lib/env_zero_api/http/proxy_settings.rb +22 -0
- data/lib/env_zero_api/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/env_zero_api/logging/sdk_logger.rb +17 -0
- data/lib/env_zero_api/models/action.rb +36 -0
- data/lib/env_zero_api/models/action_reason.rb +68 -0
- data/lib/env_zero_api/models/api_key_type.rb +26 -0
- data/lib/env_zero_api/models/api_key_user.rb +150 -0
- data/lib/env_zero_api/models/api_key_user_identity.rb +82 -0
- data/lib/env_zero_api/models/app_metadata.rb +175 -0
- data/lib/env_zero_api/models/app_metadata1.rb +60 -0
- data/lib/env_zero_api/models/approval_policy_type.rb +26 -0
- data/lib/env_zero_api/models/auto_destroy_status.rb +26 -0
- data/lib/env_zero_api/models/auto_destroy_status1.rb +26 -0
- data/lib/env_zero_api/models/auto_destroy_status2.rb +26 -0
- data/lib/env_zero_api/models/auto_destroy_status3.rb +26 -0
- data/lib/env_zero_api/models/base_model.rb +110 -0
- data/lib/env_zero_api/models/blueprint_api_add_blueprint_to_project_request_body.rb +60 -0
- data/lib/env_zero_api/models/blueprint_api_add_blueprint_to_project_response.rb +675 -0
- data/lib/env_zero_api/models/blueprint_api_approval_policy_assignment.rb +98 -0
- data/lib/env_zero_api/models/blueprint_api_approval_policy_assignment_request.rb +77 -0
- data/lib/env_zero_api/models/blueprint_api_approval_policy_scope.rb +44 -0
- data/lib/env_zero_api/models/blueprint_api_approval_policy_template.rb +375 -0
- data/lib/env_zero_api/models/blueprint_api_approval_policy_template_with_scope.rb +96 -0
- data/lib/env_zero_api/models/blueprint_api_approval_policy_type.rb +26 -0
- data/lib/env_zero_api/models/blueprint_api_assign_approval_policy_request_body.rb +77 -0
- data/lib/env_zero_api/models/blueprint_api_assign_approval_policy_response.rb +98 -0
- data/lib/env_zero_api/models/blueprint_api_blueprint.rb +675 -0
- data/lib/env_zero_api/models/blueprint_api_blueprint_type.rb +26 -0
- data/lib/env_zero_api/models/blueprint_api_blueprint_type1.rb +26 -0
- data/lib/env_zero_api/models/blueprint_api_create_blueprint_request_body.rb +544 -0
- data/lib/env_zero_api/models/blueprint_api_create_blueprint_response.rb +675 -0
- data/lib/env_zero_api/models/blueprint_api_creation_scope.rb +36 -0
- data/lib/env_zero_api/models/blueprint_api_custom_flow_type.rb +26 -0
- data/lib/env_zero_api/models/blueprint_api_deployable_type.rb +26 -0
- data/lib/env_zero_api/models/blueprint_api_find_all_approval_policies_response.rb +77 -0
- data/lib/env_zero_api/models/blueprint_api_get_blueprint_by_id_response.rb +675 -0
- data/lib/env_zero_api/models/blueprint_api_retry.rb +85 -0
- data/lib/env_zero_api/models/blueprint_api_retry_deploy_or_destroy_config.rb +98 -0
- data/lib/env_zero_api/models/blueprint_api_ssh_key.rb +90 -0
- data/lib/env_zero_api/models/blueprint_api_terragrunt_tf_binary.rb +36 -0
- data/lib/env_zero_api/models/blueprint_api_update_blueprint_request_body.rb +483 -0
- data/lib/env_zero_api/models/blueprint_api_update_blueprint_response.rb +675 -0
- data/lib/env_zero_api/models/bulk_operation_type.rb +72 -0
- data/lib/env_zero_api/models/bulk_operations_api_base_payload.rb +72 -0
- data/lib/env_zero_api/models/bulk_operations_api_base_response.rb +91 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_add_tags_request_body.rb +82 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_add_tags_response.rb +91 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_archive_request_body.rb +72 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_archive_response.rb +91 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_deploy_request_body.rb +80 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_deploy_response.rb +91 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_destroy_request_body.rb +80 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_destroy_response.rb +91 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_lock_request_body.rb +80 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_lock_response.rb +91 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_operation_item_status.rb +26 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_operation_item_status1.rb +26 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_operation_item_status2.rb +26 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_operation_item_status3.rb +26 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_remove_tags_request_body.rb +81 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_remove_tags_response.rb +91 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_run_task_request_body.rb +80 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_run_task_response.rb +91 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_unlock_request_body.rb +72 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_unlock_response.rb +91 -0
- data/lib/env_zero_api/models/bulk_operations_api_get_bulk_operation_item.rb +128 -0
- data/lib/env_zero_api/models/bulk_operations_api_get_bulk_operation_response.rb +106 -0
- data/lib/env_zero_api/models/bulk_operations_api_single_result.rb +79 -0
- data/lib/env_zero_api/models/cause_key_parts.rb +104 -0
- data/lib/env_zero_api/models/cause_key_parts1.rb +74 -0
- data/lib/env_zero_api/models/cause_key_parts2.rb +91 -0
- data/lib/env_zero_api/models/cause_key_parts4.rb +132 -0
- data/lib/env_zero_api/models/cause_key_parts5.rb +92 -0
- data/lib/env_zero_api/models/checkout_updated_code.rb +36 -0
- data/lib/env_zero_api/models/cloud_resource_api_change_event.rb +199 -0
- data/lib/env_zero_api/models/cloud_resource_api_change_event_source.rb +40 -0
- data/lib/env_zero_api/models/cloud_resource_api_management_type.rb +40 -0
- data/lib/env_zero_api/models/configuration_api_create_configuration_set_request_body.rb +108 -0
- data/lib/env_zero_api/models/configuration_api_create_configuration_set_response.rb +200 -0
- data/lib/env_zero_api/models/configuration_api_find_variable_by_id_response.rb +305 -0
- data/lib/env_zero_api/models/configuration_api_find_variables_by_scope_overriding_configuration_property.rb +342 -0
- data/lib/env_zero_api/models/configuration_property_request.rb +284 -0
- data/lib/env_zero_api/models/configuration_property_response.rb +305 -0
- data/lib/env_zero_api/models/configuration_scope.rb +60 -0
- data/lib/env_zero_api/models/configuration_set.rb +200 -0
- data/lib/env_zero_api/models/configuration_set_assignment_scope.rb +52 -0
- data/lib/env_zero_api/models/configuration_type.rb +27 -0
- data/lib/env_zero_api/models/configuration_type1.rb +27 -0
- data/lib/env_zero_api/models/credentials_api_api_key.rb +167 -0
- data/lib/env_zero_api/models/credentials_api_create_api_key_request_body.rb +91 -0
- data/lib/env_zero_api/models/credentials_api_create_api_key_response.rb +167 -0
- data/lib/env_zero_api/models/custom_env0_environment_variables.rb +537 -0
- data/lib/env_zero_api/models/custom_flow_type.rb +26 -0
- data/lib/env_zero_api/models/data.rb +65 -0
- data/lib/env_zero_api/models/data1.rb +73 -0
- data/lib/env_zero_api/models/data2.rb +73 -0
- data/lib/env_zero_api/models/data3.rb +62 -0
- data/lib/env_zero_api/models/data4.rb +61 -0
- data/lib/env_zero_api/models/data5.rb +71 -0
- data/lib/env_zero_api/models/deploy_request.rb +343 -0
- data/lib/env_zero_api/models/deployment_api_plan_attribute_change.rb +94 -0
- data/lib/env_zero_api/models/deployment_api_plan_change_action.rb +48 -0
- data/lib/env_zero_api/models/deployment_api_plan_plan.rb +118 -0
- data/lib/env_zero_api/models/deployment_api_plan_plan_output_change.rb +127 -0
- data/lib/env_zero_api/models/deployment_api_plan_plan_resource_change.rb +240 -0
- data/lib/env_zero_api/models/deployment_api_plan_plan_summary.rb +114 -0
- data/lib/env_zero_api/models/deployment_api_plan_resource_import_data.rb +74 -0
- data/lib/env_zero_api/models/deployment_command.rb +68 -0
- data/lib/env_zero_api/models/deployment_step_api_deployment_step_status.rb +64 -0
- data/lib/env_zero_api/models/deployment_step_api_find_by_deployment_log_id_response.rb +195 -0
- data/lib/env_zero_api/models/deployment_step_api_find_step_log_response.rb +117 -0
- data/lib/env_zero_api/models/deployment_step_api_log_event.rb +131 -0
- data/lib/env_zero_api/models/deployment_type.rb +40 -0
- data/lib/env_zero_api/models/deployment_type1.rb +56 -0
- data/lib/env_zero_api/models/diff.rb +75 -0
- data/lib/env_zero_api/models/drift_api_drift_cause_environment.rb +117 -0
- data/lib/env_zero_api/models/drift_api_drift_cause_group.rb +169 -0
- data/lib/env_zero_api/models/drift_api_drift_cause_group1.rb +169 -0
- data/lib/env_zero_api/models/drift_api_drift_cause_group2.rb +169 -0
- data/lib/env_zero_api/models/drift_api_drift_cause_group4.rb +169 -0
- data/lib/env_zero_api/models/drift_api_drift_cause_group5.rb +169 -0
- data/lib/env_zero_api/models/drift_api_drift_cause_skip.rb +68 -0
- data/lib/env_zero_api/models/drift_api_drift_cause_skip_reason.rb +40 -0
- data/lib/env_zero_api/models/drift_api_get_drift_causes_response.rb +76 -0
- data/lib/env_zero_api/models/drift_api_get_drift_causes_response1.rb +76 -0
- data/lib/env_zero_api/models/drift_api_get_drift_fix_stats_response.rb +81 -0
- data/lib/env_zero_api/models/drift_api_get_drift_fix_stats_response1.rb +81 -0
- data/lib/env_zero_api/models/drift_api_get_ignored_drift_causes_response.rb +76 -0
- data/lib/env_zero_api/models/drift_api_ignore_drift_cause_body.rb +72 -0
- data/lib/env_zero_api/models/drift_api_ignore_drift_cause_request_body.rb +72 -0
- data/lib/env_zero_api/models/drift_api_ignore_drift_cause_response.rb +77 -0
- data/lib/env_zero_api/models/drift_api_ignored_drift_cause_environment.rb +140 -0
- data/lib/env_zero_api/models/drift_api_ignored_drift_cause_group.rb +157 -0
- data/lib/env_zero_api/models/drift_api_ignored_drift_cause_group1.rb +157 -0
- data/lib/env_zero_api/models/drift_api_ignored_drift_cause_group2.rb +157 -0
- data/lib/env_zero_api/models/drift_api_ignored_drift_cause_group4.rb +157 -0
- data/lib/env_zero_api/models/drift_api_ignored_drift_cause_group5.rb +157 -0
- data/lib/env_zero_api/models/drift_api_state_modifying_deployment_type.rb +40 -0
- data/lib/env_zero_api/models/drift_api_un_ignore_drift_cause_request_body.rb +72 -0
- data/lib/env_zero_api/models/drift_api_un_ignore_drift_cause_response.rb +77 -0
- data/lib/env_zero_api/models/drift_api_variable_change_type.rb +40 -0
- data/lib/env_zero_api/models/drift_cause.rb +87 -0
- data/lib/env_zero_api/models/environment_api_auto_drift_remediation_strategy.rb +44 -0
- data/lib/env_zero_api/models/environment_api_cancel_response.rb +60 -0
- data/lib/env_zero_api/models/environment_api_configuration_property_change.rb +255 -0
- data/lib/env_zero_api/models/environment_api_configuration_set_changes.rb +81 -0
- data/lib/env_zero_api/models/environment_api_create_environment_request.rb +356 -0
- data/lib/env_zero_api/models/environment_api_create_request_body.rb +356 -0
- data/lib/env_zero_api/models/environment_api_create_response.rb +539 -0
- data/lib/env_zero_api/models/environment_api_deploy_request_body.rb +343 -0
- data/lib/env_zero_api/models/environment_api_deploy_request_on_create_flow.rb +154 -0
- data/lib/env_zero_api/models/environment_api_deploy_response.rb +796 -0
- data/lib/env_zero_api/models/environment_api_deployment_log.rb +792 -0
- data/lib/env_zero_api/models/environment_api_deployment_log_status.rb +76 -0
- data/lib/env_zero_api/models/environment_api_deployment_type.rb +60 -0
- data/lib/env_zero_api/models/environment_api_destroy_request_body.rb +108 -0
- data/lib/env_zero_api/models/environment_api_destroy_response.rb +60 -0
- data/lib/env_zero_api/models/environment_api_drift_cause_compass_scan_status.rb +48 -0
- data/lib/env_zero_api/models/environment_api_drift_cause_unapplied_commit.rb +111 -0
- data/lib/env_zero_api/models/environment_api_drift_cause_unmanaged_change_type.rb +36 -0
- data/lib/env_zero_api/models/environment_api_drift_detection_request.rb +81 -0
- data/lib/env_zero_api/models/environment_api_drift_status.rb +48 -0
- data/lib/env_zero_api/models/environment_api_environment.rb +539 -0
- data/lib/env_zero_api/models/environment_api_environment_lock_status.rb +119 -0
- data/lib/env_zero_api/models/environment_api_environment_next_scheduled_dates.rb +98 -0
- data/lib/env_zero_api/models/environment_api_environment_resource.rb +123 -0
- data/lib/env_zero_api/models/environment_api_environment_status.rb +84 -0
- data/lib/env_zero_api/models/environment_api_find_by_id_response.rb +539 -0
- data/lib/env_zero_api/models/environment_api_find_deployment_drift_status_response.rb +92 -0
- data/lib/env_zero_api/models/environment_api_find_deployment_log_by_id_response.rb +792 -0
- data/lib/env_zero_api/models/environment_api_get_deployment_plan_json_response.rb +86 -0
- data/lib/env_zero_api/models/environment_api_get_drifted_resource_event_details_response.rb +60 -0
- data/lib/env_zero_api/models/environment_api_get_drifted_resource_events_response.rb +98 -0
- data/lib/env_zero_api/models/environment_api_get_environments_outputs_response.rb +69 -0
- data/lib/env_zero_api/models/environment_api_get_plan_impact_destructive_change.rb +98 -0
- data/lib/env_zero_api/models/environment_api_get_plan_impact_plan_impact.rb +163 -0
- data/lib/env_zero_api/models/environment_api_get_policies_response.rb +298 -0
- data/lib/env_zero_api/models/environment_api_git_metadata.rb +110 -0
- data/lib/env_zero_api/models/environment_api_output_data.rb +103 -0
- data/lib/env_zero_api/models/environment_api_policy.rb +298 -0
- data/lib/env_zero_api/models/environment_api_remediate_drift_response.rb +792 -0
- data/lib/env_zero_api/models/environment_api_resume_response.rb +60 -0
- data/lib/env_zero_api/models/environment_api_reviewer.rb +90 -0
- data/lib/env_zero_api/models/environment_api_reviewer_user.rb +92 -0
- data/lib/env_zero_api/models/environment_api_state_file_hash.rb +87 -0
- data/lib/env_zero_api/models/environment_api_stopped_by_timeout_reason.rb +40 -0
- data/lib/env_zero_api/models/environment_api_terragrunt_run_all_output.rb +96 -0
- data/lib/env_zero_api/models/environment_api_ttl_request.rb +86 -0
- data/lib/env_zero_api/models/environment_api_ttl_request_body.rb +72 -0
- data/lib/env_zero_api/models/environment_api_ttl_response.rb +539 -0
- data/lib/env_zero_api/models/environment_api_ttl_type.rb +40 -0
- data/lib/env_zero_api/models/environment_api_update_environment_lock_request_body.rb +70 -0
- data/lib/env_zero_api/models/environment_api_update_environment_lock_response.rb +97 -0
- data/lib/env_zero_api/models/environment_api_update_policies_request_body.rb +334 -0
- data/lib/env_zero_api/models/environment_api_update_policies_response.rb +298 -0
- data/lib/env_zero_api/models/environment_api_update_request_body.rb +191 -0
- data/lib/env_zero_api/models/environment_api_update_response.rb +539 -0
- data/lib/env_zero_api/models/environment_api_update_tags_response.rb +539 -0
- data/lib/env_zero_api/models/environment_api_variable.rb +241 -0
- data/lib/env_zero_api/models/environment_api_vcs_provider.rb +56 -0
- data/lib/env_zero_api/models/environment_api_vcs_provider1.rb +56 -0
- data/lib/env_zero_api/models/environment_api_vcs_provider3.rb +56 -0
- data/lib/env_zero_api/models/environment_api_workflow_environments_workflow_file.rb +92 -0
- data/lib/env_zero_api/models/environment_api_workflow_environments_workflow_sub_environment.rb +226 -0
- data/lib/env_zero_api/models/environment_discovery_type.rb +26 -0
- data/lib/env_zero_api/models/environment_outputs_api_environment_state_access.rb +154 -0
- data/lib/env_zero_api/models/environment_outputs_api_get_state_access_config_response.rb +154 -0
- data/lib/env_zero_api/models/environment_removal_strategy.rb +36 -0
- data/lib/env_zero_api/models/environments.rb +80 -0
- data/lib/env_zero_api/models/event_name_type.rb +92 -0
- data/lib/env_zero_api/models/external_trigger_name.rb +40 -0
- data/lib/env_zero_api/models/family.rb +36 -0
- data/lib/env_zero_api/models/format.rb +40 -0
- data/lib/env_zero_api/models/git_user_data.rb +92 -0
- data/lib/env_zero_api/models/iac_type.rb +60 -0
- data/lib/env_zero_api/models/infracost_cost_estimation.rb +119 -0
- data/lib/env_zero_api/models/infracost_cost_estimation_project.rb +76 -0
- data/lib/env_zero_api/models/internal_trigger_name.rb +60 -0
- data/lib/env_zero_api/models/is_scheduled_run.rb +36 -0
- data/lib/env_zero_api/models/mode.rb +36 -0
- data/lib/env_zero_api/models/module_type.rb +26 -0
- data/lib/env_zero_api/models/notification_endpoint_type.rb +44 -0
- data/lib/env_zero_api/models/notifications_api_create_notification_endpoint_request_body.rb +122 -0
- data/lib/env_zero_api/models/notifications_api_create_notification_endpoint_response.rb +124 -0
- data/lib/env_zero_api/models/notifications_api_notification_endpoint_without_secret.rb +124 -0
- data/lib/env_zero_api/models/notifications_api_project_notification_setting.rb +102 -0
- data/lib/env_zero_api/models/notifications_api_update_project_notification_settings_request_body.rb +60 -0
- data/lib/env_zero_api/models/notifications_api_update_project_notification_settings_response.rb +102 -0
- data/lib/env_zero_api/models/organization_api_find_organization_by_id_response.rb +393 -0
- data/lib/env_zero_api/models/organization_api_get_organization_limits_response.rb +60 -0
- data/lib/env_zero_api/models/organization_api_ip_allowlist_rule.rb +119 -0
- data/lib/env_zero_api/models/organization_api_ip_allowlist_rule_type.rb +40 -0
- data/lib/env_zero_api/models/organization_api_ip_allowlist_rule_type2.rb +40 -0
- data/lib/env_zero_api/models/organization_api_organization.rb +393 -0
- data/lib/env_zero_api/models/organization_api_organization_limits.rb +60 -0
- data/lib/env_zero_api/models/organization_api_organization_mode.rb +36 -0
- data/lib/env_zero_api/models/organization_api_permissions.rb +82 -0
- data/lib/env_zero_api/models/organization_api_project_custom_flows_policy.rb +36 -0
- data/lib/env_zero_api/models/organization_api_project_permission.rb +69 -0
- data/lib/env_zero_api/models/organization_role.rb +36 -0
- data/lib/env_zero_api/models/organization_user.rb +77 -0
- data/lib/env_zero_api/models/organization_user_status.rb +36 -0
- data/lib/env_zero_api/models/output.rb +153 -0
- data/lib/env_zero_api/models/overwrites.rb +206 -0
- data/lib/env_zero_api/models/partial_json_schema7.rb +81 -0
- data/lib/env_zero_api/models/partial_json_schema72.rb +97 -0
- data/lib/env_zero_api/models/profile_data.rb +81 -0
- data/lib/env_zero_api/models/project_api_create_project_request.rb +102 -0
- data/lib/env_zero_api/models/project_api_create_project_request_body.rb +102 -0
- data/lib/env_zero_api/models/project_api_create_project_response.rb +150 -0
- data/lib/env_zero_api/models/project_api_find_by_id_response.rb +150 -0
- data/lib/env_zero_api/models/project_api_project.rb +150 -0
- data/lib/env_zero_api/models/project_api_user_access_source.rb +40 -0
- data/lib/env_zero_api/models/project_api_user_with_access.rb +148 -0
- data/lib/env_zero_api/models/requires_approval.rb +36 -0
- data/lib/env_zero_api/models/scheduling_api_disabled_reason.rb +36 -0
- data/lib/env_zero_api/models/scheduling_api_get_drift_detection_by_environment_id_response.rb +231 -0
- data/lib/env_zero_api/models/scheduling_api_get_schedule_by_environment_id_response.rb +71 -0
- data/lib/env_zero_api/models/scheduling_api_scheduled_action.rb +219 -0
- data/lib/env_zero_api/models/scheduling_api_set_drift_detection_request_body.rb +82 -0
- data/lib/env_zero_api/models/scheduling_api_set_drift_detection_response.rb +231 -0
- data/lib/env_zero_api/models/scheduling_api_set_environment_schedule_request_body.rb +75 -0
- data/lib/env_zero_api/models/scheduling_api_set_environment_schedule_request_scheduled_action.rb +70 -0
- data/lib/env_zero_api/models/scheduling_api_set_environment_schedule_response.rb +71 -0
- data/lib/env_zero_api/models/scope.rb +44 -0
- data/lib/env_zero_api/models/set_creation_scope.rb +36 -0
- data/lib/env_zero_api/models/settings.rb +76 -0
- data/lib/env_zero_api/models/skip_state_refresh.rb +36 -0
- data/lib/env_zero_api/models/status.rb +36 -0
- data/lib/env_zero_api/models/type.rb +36 -0
- data/lib/env_zero_api/models/user.rb +182 -0
- data/lib/env_zero_api/models/user1.rb +132 -0
- data/lib/env_zero_api/models/user_organization.rb +93 -0
- data/lib/env_zero_api/models/vcs.rb +368 -0
- data/lib/env_zero_api/models/workflow_deployment_options.rb +90 -0
- data/lib/env_zero_api/models/workflow_deployment_options1.rb +92 -0
- data/lib/env_zero_api/models/workflow_partial_deploy_operation.rb +40 -0
- data/lib/env_zero_api/models/workflow_sub_environment_request.rb +164 -0
- data/lib/env_zero_api/utilities/date_time_helper.rb +11 -0
- data/lib/env_zero_api/utilities/file_wrapper.rb +28 -0
- data/lib/env_zero_api/utilities/union_type_lookup.rb +379 -0
- data/lib/env_zero_api.rb +414 -0
- metadata +395 -0
|
@@ -0,0 +1,1082 @@
|
|
|
1
|
+
# env_zero_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module EnvZeroApi
|
|
7
|
+
# EnvironmentsApi
|
|
8
|
+
class EnvironmentsApi < BaseApi
|
|
9
|
+
# Aborts a deployment that is already running. Returns no content. Aborting
|
|
10
|
+
# a run mid-apply can leave cloud resources partially applied.
|
|
11
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
12
|
+
# @param [Object] body Required parameter: The upstream documentation
|
|
13
|
+
# defines no fields for this request body. Send an empty JSON object `{}`.
|
|
14
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
15
|
+
def environments_abort(id,
|
|
16
|
+
body)
|
|
17
|
+
@api_call
|
|
18
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
19
|
+
'/environments/deployments/{id}/abort',
|
|
20
|
+
Server::DEFAULT)
|
|
21
|
+
.template_param(new_parameter(id, key: 'id')
|
|
22
|
+
.is_required(true)
|
|
23
|
+
.should_encode(true))
|
|
24
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
25
|
+
.body_param(new_parameter(body)
|
|
26
|
+
.is_required(true))
|
|
27
|
+
.body_serializer(APIHelper.method(:json_serialize))
|
|
28
|
+
.auth(Single.new('env0_API_Key')))
|
|
29
|
+
.response(new_response_handler
|
|
30
|
+
.is_nullable_response(true)
|
|
31
|
+
.is_response_void(true)
|
|
32
|
+
.is_api_response(true)
|
|
33
|
+
.local_error('401',
|
|
34
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
35
|
+
' invalid.',
|
|
36
|
+
ErrorException)
|
|
37
|
+
.local_error('403',
|
|
38
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
39
|
+
' the route does not exist for the caller.',
|
|
40
|
+
ErrorException))
|
|
41
|
+
.execute
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Cancels a deployment that is queued or waiting for approval, before it
|
|
45
|
+
# starts applying. Returns the deployment id.
|
|
46
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
47
|
+
# @param [Object] body Required parameter: The upstream documentation
|
|
48
|
+
# defines no fields for this request body. Send an empty JSON object `{}`.
|
|
49
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
50
|
+
def environments_cancel(id,
|
|
51
|
+
body)
|
|
52
|
+
@api_call
|
|
53
|
+
.request(new_request_builder(HttpMethodEnum::PUT,
|
|
54
|
+
'/environments/deployments/{id}/cancel',
|
|
55
|
+
Server::DEFAULT)
|
|
56
|
+
.template_param(new_parameter(id, key: 'id')
|
|
57
|
+
.is_required(true)
|
|
58
|
+
.should_encode(true))
|
|
59
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
60
|
+
.body_param(new_parameter(body)
|
|
61
|
+
.is_required(true))
|
|
62
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
63
|
+
.body_serializer(APIHelper.method(:json_serialize))
|
|
64
|
+
.auth(Single.new('env0_API_Key')))
|
|
65
|
+
.response(new_response_handler
|
|
66
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
67
|
+
.deserialize_into(EnvironmentApiCancelResponse.method(:from_hash))
|
|
68
|
+
.is_api_response(true)
|
|
69
|
+
.local_error('401',
|
|
70
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
71
|
+
' invalid.',
|
|
72
|
+
ErrorException)
|
|
73
|
+
.local_error('403',
|
|
74
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
75
|
+
' the route does not exist for the caller.',
|
|
76
|
+
ErrorException))
|
|
77
|
+
.execute
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Returns the number of environments in a project as a bare number,
|
|
81
|
+
# optionally restricted by active state and status. Useful for checking a
|
|
82
|
+
# project against its environment limit without fetching the environments
|
|
83
|
+
# themselves.
|
|
84
|
+
# @param [String] project_id Required parameter: TODO: type description
|
|
85
|
+
# here
|
|
86
|
+
# @param [String] is_active Optional parameter: TODO: type description
|
|
87
|
+
# here
|
|
88
|
+
# @param [String] status Optional parameter: TODO: type description here
|
|
89
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
90
|
+
def environments_count_by_project(project_id,
|
|
91
|
+
is_active: nil,
|
|
92
|
+
status: nil)
|
|
93
|
+
@api_call
|
|
94
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
95
|
+
'/environments/count',
|
|
96
|
+
Server::DEFAULT)
|
|
97
|
+
.query_param(new_parameter(project_id, key: 'projectId')
|
|
98
|
+
.is_required(true))
|
|
99
|
+
.query_param(new_parameter(is_active, key: 'isActive'))
|
|
100
|
+
.query_param(new_parameter(status, key: 'status'))
|
|
101
|
+
.auth(Single.new('env0_API_Key')))
|
|
102
|
+
.response(new_response_handler
|
|
103
|
+
.deserializer(APIHelper.method(:deserialize_primitive_types))
|
|
104
|
+
.deserialize_into(proc do |response| response&.to_f end)
|
|
105
|
+
.is_api_response(true)
|
|
106
|
+
.is_primitive_response(true)
|
|
107
|
+
.local_error('401',
|
|
108
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
109
|
+
' invalid.',
|
|
110
|
+
ErrorException)
|
|
111
|
+
.local_error('403',
|
|
112
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
113
|
+
' the route does not exist for the caller.',
|
|
114
|
+
ErrorException))
|
|
115
|
+
.execute
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Creates an environment in a project and triggers its first deployment.
|
|
119
|
+
# `name`, `projectId` and `deployRequest` are required; the remaining fields
|
|
120
|
+
# set the environment's TTL, tags, variable and configuration-set changes,
|
|
121
|
+
# continuous deployment and pull-request behaviour, drift detection, and
|
|
122
|
+
# remote backend settings at creation time. Returns the created environment.
|
|
123
|
+
# @param [EnvironmentApiCreateRequestBody] body Required parameter: TODO:
|
|
124
|
+
# type description here
|
|
125
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
126
|
+
def environments_create(body)
|
|
127
|
+
@api_call
|
|
128
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
129
|
+
'/environments',
|
|
130
|
+
Server::DEFAULT)
|
|
131
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
132
|
+
.body_param(new_parameter(body)
|
|
133
|
+
.is_required(true))
|
|
134
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
135
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
136
|
+
.auth(Single.new('env0_API_Key')))
|
|
137
|
+
.response(new_response_handler
|
|
138
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
139
|
+
.deserialize_into(EnvironmentApiCreateResponse.method(:from_hash))
|
|
140
|
+
.is_api_response(true)
|
|
141
|
+
.local_error('401',
|
|
142
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
143
|
+
' invalid.',
|
|
144
|
+
ErrorException)
|
|
145
|
+
.local_error('403',
|
|
146
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
147
|
+
' the route does not exist for the caller.',
|
|
148
|
+
ErrorException))
|
|
149
|
+
.execute
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Returns the environments the caller may view, filtered by any combination
|
|
153
|
+
# of the supported query parameters - organization, project, name, drift
|
|
154
|
+
# status, tags, active and destroyed state, workspace name, and free-text
|
|
155
|
+
# search. Results are paginated with `limit` (maximum and default 100) and
|
|
156
|
+
# `offset`, so a large fleet must be read page by page. Use `excludeFields`
|
|
157
|
+
# to omit expensive fields such as the latest deployment log.
|
|
158
|
+
# @param [String] limit Optional parameter: Number of environments per page.
|
|
159
|
+
# The maximum is 100, with the default value is set to maximum
|
|
160
|
+
# @param [String] offset Optional parameter: The offset of the first
|
|
161
|
+
# environment returned. Defaults to 0
|
|
162
|
+
# @param [String] exclude_fields Optional parameter: Comma-separated list of
|
|
163
|
+
# fields to exclude from the response (e.g.,
|
|
164
|
+
# 'latestDeploymentLog.output,latestDeploymentLog.plan')
|
|
165
|
+
# @param [String] drift_status Optional parameter: Comma-separated list of
|
|
166
|
+
# drift statuses to filter by (ERROR, DRIFTED, OK, NEVER_RUN, DISABLED)
|
|
167
|
+
# @param [String] tags Optional parameter: Comma-separated list of tags to
|
|
168
|
+
# filter by, ANDed together. Each item is either a bare key (matches any
|
|
169
|
+
# value) or 'key=value' (e.g. 'team=eng,cost-center')
|
|
170
|
+
# @param [String] is_destroyed Optional parameter: Splits the isActive=false
|
|
171
|
+
# set. 'true' returns environments env0 destroyed, 'false' returns
|
|
172
|
+
# environments marked inactive whose resources may still exist. May be sent
|
|
173
|
+
# only with isActive=false; omit to get both
|
|
174
|
+
# @param [String] organization_id Optional parameter: TODO: type description
|
|
175
|
+
# here
|
|
176
|
+
# @param [String] project_id Optional parameter: TODO: type description
|
|
177
|
+
# here
|
|
178
|
+
# @param [String] only_my Optional parameter: TODO: type description here
|
|
179
|
+
# @param [String] is_active Optional parameter: TODO: type description
|
|
180
|
+
# here
|
|
181
|
+
# @param [String] name Optional parameter: TODO: type description here
|
|
182
|
+
# @param [String] is_remote_backend Optional parameter: TODO: type
|
|
183
|
+
# description here
|
|
184
|
+
# @param [String] workspace_name Optional parameter: TODO: type description
|
|
185
|
+
# here
|
|
186
|
+
# @param [String] workspace_name_prefix Optional parameter: TODO: type
|
|
187
|
+
# description here
|
|
188
|
+
# @param [String] include_sub_environments Optional parameter: TODO: type
|
|
189
|
+
# description here
|
|
190
|
+
# @param [String] search_text Optional parameter: TODO: type description
|
|
191
|
+
# here
|
|
192
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
193
|
+
def environments_find_all(limit: nil,
|
|
194
|
+
offset: nil,
|
|
195
|
+
exclude_fields: nil,
|
|
196
|
+
drift_status: nil,
|
|
197
|
+
tags: nil,
|
|
198
|
+
is_destroyed: nil,
|
|
199
|
+
organization_id: nil,
|
|
200
|
+
project_id: nil,
|
|
201
|
+
only_my: nil,
|
|
202
|
+
is_active: nil,
|
|
203
|
+
name: nil,
|
|
204
|
+
is_remote_backend: nil,
|
|
205
|
+
workspace_name: nil,
|
|
206
|
+
workspace_name_prefix: nil,
|
|
207
|
+
include_sub_environments: nil,
|
|
208
|
+
search_text: nil)
|
|
209
|
+
@api_call
|
|
210
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
211
|
+
'/environments',
|
|
212
|
+
Server::DEFAULT)
|
|
213
|
+
.query_param(new_parameter(limit, key: 'limit'))
|
|
214
|
+
.query_param(new_parameter(offset, key: 'offset'))
|
|
215
|
+
.query_param(new_parameter(exclude_fields, key: 'excludeFields'))
|
|
216
|
+
.query_param(new_parameter(drift_status, key: 'driftStatus'))
|
|
217
|
+
.query_param(new_parameter(tags, key: 'tags'))
|
|
218
|
+
.query_param(new_parameter(is_destroyed, key: 'isDestroyed'))
|
|
219
|
+
.query_param(new_parameter(organization_id, key: 'organizationId'))
|
|
220
|
+
.query_param(new_parameter(project_id, key: 'projectId'))
|
|
221
|
+
.query_param(new_parameter(only_my, key: 'onlyMy'))
|
|
222
|
+
.query_param(new_parameter(is_active, key: 'isActive'))
|
|
223
|
+
.query_param(new_parameter(name, key: 'name'))
|
|
224
|
+
.query_param(new_parameter(is_remote_backend, key: 'isRemoteBackend'))
|
|
225
|
+
.query_param(new_parameter(workspace_name, key: 'workspaceName'))
|
|
226
|
+
.query_param(new_parameter(workspace_name_prefix, key: 'workspaceNamePrefix'))
|
|
227
|
+
.query_param(new_parameter(include_sub_environments, key: 'includeSubEnvironments'))
|
|
228
|
+
.query_param(new_parameter(search_text, key: 'searchText'))
|
|
229
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
230
|
+
.auth(Single.new('env0_API_Key')))
|
|
231
|
+
.response(new_response_handler
|
|
232
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
233
|
+
.deserialize_into(EnvironmentApiEnvironment.method(:from_hash))
|
|
234
|
+
.is_api_response(true)
|
|
235
|
+
.is_response_array(true)
|
|
236
|
+
.local_error('401',
|
|
237
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
238
|
+
' invalid.',
|
|
239
|
+
ErrorException)
|
|
240
|
+
.local_error('403',
|
|
241
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
242
|
+
' the route does not exist for the caller.',
|
|
243
|
+
ErrorException))
|
|
244
|
+
.execute
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
# Triggers a deployment of an environment and returns the resulting
|
|
248
|
+
# deployment log. The request body selects what to deploy and how - the
|
|
249
|
+
# deployment type, the template revision or repository, variable and
|
|
250
|
+
# configuration-set changes, targeted resources, a TTL, an approval
|
|
251
|
+
# requirement, and the automatic drift remediation strategy. Deployment is
|
|
252
|
+
# asynchronous: poll `GET /environments/deployments/{id}` for the outcome.
|
|
253
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
254
|
+
# @param [EnvironmentApiDeployRequestBody] body Required parameter: TODO:
|
|
255
|
+
# type description here
|
|
256
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
257
|
+
def environments_deploy(id,
|
|
258
|
+
body)
|
|
259
|
+
@api_call
|
|
260
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
261
|
+
'/environments/{id}/deployments',
|
|
262
|
+
Server::DEFAULT)
|
|
263
|
+
.template_param(new_parameter(id, key: 'id')
|
|
264
|
+
.is_required(true)
|
|
265
|
+
.should_encode(true))
|
|
266
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
267
|
+
.body_param(new_parameter(body)
|
|
268
|
+
.is_required(true))
|
|
269
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
270
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
271
|
+
.auth(Single.new('env0_API_Key')))
|
|
272
|
+
.response(new_response_handler
|
|
273
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
274
|
+
.deserialize_into(EnvironmentApiDeployResponse.method(:from_hash))
|
|
275
|
+
.is_api_response(true)
|
|
276
|
+
.local_error('401',
|
|
277
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
278
|
+
' invalid.',
|
|
279
|
+
ErrorException)
|
|
280
|
+
.local_error('403',
|
|
281
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
282
|
+
' the route does not exist for the caller.',
|
|
283
|
+
ErrorException))
|
|
284
|
+
.execute
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
# Returns the deployment logs of an environment, most useful for
|
|
288
|
+
# distinguishing deploy, destroy and drift-detection runs and for finding
|
|
289
|
+
# the drift-detection deployment that a drift cause refers to. Filter by
|
|
290
|
+
# date range, deployment type, status and deploying user; paginate with
|
|
291
|
+
# `limit` (maximum and default 100) and `offset`.
|
|
292
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
293
|
+
# @param [String] limit Optional parameter: Number of deployments per page.
|
|
294
|
+
# The maximum is 100, with the default value is set to maximum
|
|
295
|
+
# @param [String] offset Optional parameter: The offset of the first
|
|
296
|
+
# deployment returned. Defaults to 0
|
|
297
|
+
# @param [String] from_date Optional parameter: The start date of the first
|
|
298
|
+
# deployment log in the response. Must be provided with toDate and in the
|
|
299
|
+
# following format YYYY-MM-DDTHH:mm:ss.sssZ
|
|
300
|
+
# @param [String] to_date Optional parameter: The start date of the last
|
|
301
|
+
# deployment log in the response. Must be provided with fromDate and in the
|
|
302
|
+
# following format YYYY-MM-DDTHH:mm:ss.sssZ
|
|
303
|
+
# @param [String] deployment_types Optional parameter: The types of the
|
|
304
|
+
# deployment logs in the response. The types should be in Camel case and
|
|
305
|
+
# separated by commas. For example:
|
|
306
|
+
# deploymentTypes=deploy,prPlan,driftDetection
|
|
307
|
+
# @param [String] statuses Optional parameter: The statuses of the
|
|
308
|
+
# deployment logs in the response. The statuses should be separated by
|
|
309
|
+
# commas.
|
|
310
|
+
# @param [String] deployer_user_ids Optional parameter: The ids of the users
|
|
311
|
+
# who started the deployments. The ids should be separated by commas.
|
|
312
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
313
|
+
def environments_find_deployment_logs_by_environment_id(id,
|
|
314
|
+
limit: nil,
|
|
315
|
+
offset: nil,
|
|
316
|
+
from_date: nil,
|
|
317
|
+
to_date: nil,
|
|
318
|
+
deployment_types: nil,
|
|
319
|
+
statuses: nil,
|
|
320
|
+
deployer_user_ids: nil)
|
|
321
|
+
@api_call
|
|
322
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
323
|
+
'/environments/{id}/deployments',
|
|
324
|
+
Server::DEFAULT)
|
|
325
|
+
.template_param(new_parameter(id, key: 'id')
|
|
326
|
+
.is_required(true)
|
|
327
|
+
.should_encode(true))
|
|
328
|
+
.query_param(new_parameter(limit, key: 'limit'))
|
|
329
|
+
.query_param(new_parameter(offset, key: 'offset'))
|
|
330
|
+
.query_param(new_parameter(from_date, key: 'fromDate'))
|
|
331
|
+
.query_param(new_parameter(to_date, key: 'toDate'))
|
|
332
|
+
.query_param(new_parameter(deployment_types, key: 'deploymentTypes'))
|
|
333
|
+
.query_param(new_parameter(statuses, key: 'statuses'))
|
|
334
|
+
.query_param(new_parameter(deployer_user_ids, key: 'deployerUserIds'))
|
|
335
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
336
|
+
.auth(Single.new('env0_API_Key')))
|
|
337
|
+
.response(new_response_handler
|
|
338
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
339
|
+
.deserialize_into(EnvironmentApiDeploymentLog.method(:from_hash))
|
|
340
|
+
.is_api_response(true)
|
|
341
|
+
.is_response_array(true)
|
|
342
|
+
.local_error('401',
|
|
343
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
344
|
+
' invalid.',
|
|
345
|
+
ErrorException)
|
|
346
|
+
.local_error('403',
|
|
347
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
348
|
+
' the route does not exist for the caller.',
|
|
349
|
+
ErrorException))
|
|
350
|
+
.execute
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
# Destroys the cloud resources of an environment, returning the id of the
|
|
354
|
+
# destroy deployment. The query parameters control whether updated code is
|
|
355
|
+
# checked out, which revision is used, whether state refresh is skipped,
|
|
356
|
+
# whether the run counts as scheduled, and whether the destroy requires
|
|
357
|
+
# approval. This is destructive and is refused when destroy protection is
|
|
358
|
+
# enabled for the environment.
|
|
359
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
360
|
+
# @param [EnvironmentApiDestroyRequestBody] body Required parameter: TODO:
|
|
361
|
+
# type description here
|
|
362
|
+
# @param [CheckoutUpdatedCode] checkout_updated_code Optional parameter:
|
|
363
|
+
# Checkout updated code
|
|
364
|
+
# @param [IsScheduledRun] is_scheduled_run Optional parameter: Is scheduled
|
|
365
|
+
# run
|
|
366
|
+
# @param [SkipStateRefresh] skip_state_refresh Optional parameter: Skip
|
|
367
|
+
# automatic state refresh
|
|
368
|
+
# @param [String] revision Optional parameter: Revision
|
|
369
|
+
# @param [RequiresApproval] requires_approval Optional parameter: Requires
|
|
370
|
+
# approval
|
|
371
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
372
|
+
def environments_destroy(id,
|
|
373
|
+
body,
|
|
374
|
+
checkout_updated_code: nil,
|
|
375
|
+
is_scheduled_run: nil,
|
|
376
|
+
skip_state_refresh: nil,
|
|
377
|
+
revision: nil,
|
|
378
|
+
requires_approval: nil)
|
|
379
|
+
@api_call
|
|
380
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
381
|
+
'/environments/{id}/destroy',
|
|
382
|
+
Server::DEFAULT)
|
|
383
|
+
.template_param(new_parameter(id, key: 'id')
|
|
384
|
+
.is_required(true)
|
|
385
|
+
.should_encode(true))
|
|
386
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
387
|
+
.body_param(new_parameter(body)
|
|
388
|
+
.is_required(true))
|
|
389
|
+
.query_param(new_parameter(checkout_updated_code, key: 'checkoutUpdatedCode'))
|
|
390
|
+
.query_param(new_parameter(is_scheduled_run, key: 'isScheduledRun'))
|
|
391
|
+
.query_param(new_parameter(skip_state_refresh, key: 'skipStateRefresh'))
|
|
392
|
+
.query_param(new_parameter(revision, key: 'revision'))
|
|
393
|
+
.query_param(new_parameter(requires_approval, key: 'requiresApproval'))
|
|
394
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
395
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
396
|
+
.auth(Single.new('env0_API_Key')))
|
|
397
|
+
.response(new_response_handler
|
|
398
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
399
|
+
.deserialize_into(EnvironmentApiDestroyResponse.method(:from_hash))
|
|
400
|
+
.is_api_response(true)
|
|
401
|
+
.local_error('401',
|
|
402
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
403
|
+
' invalid.',
|
|
404
|
+
ErrorException)
|
|
405
|
+
.local_error('403',
|
|
406
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
407
|
+
' the route does not exist for the caller.',
|
|
408
|
+
ErrorException))
|
|
409
|
+
.execute
|
|
410
|
+
end
|
|
411
|
+
|
|
412
|
+
# Downloads the complete Terraform/OpenTofu plan JSON (the output of 'show
|
|
413
|
+
# -json') of the given deployment,
|
|
414
|
+
# including resources with no changes - unlike the parsed plan returned by
|
|
415
|
+
# 'GET /environments/deployments/{id}?fields=plan',
|
|
416
|
+
# which contains only changed resources. Intended for external policy
|
|
417
|
+
# evaluation (for example Checkov).
|
|
418
|
+
# Responses:
|
|
419
|
+
# * 302 (default) - the 'Location' header holds a short-lived (5 minutes)
|
|
420
|
+
# signed download URL. Follow the
|
|
421
|
+
# redirect to download the file, for example with 'curl -L'.
|
|
422
|
+
# * 200 - only when 'redirect=false' is passed: the same signed URL is
|
|
423
|
+
# returned as a JSON body ({ "url": "..." })
|
|
424
|
+
# instead of a redirect. Browser clients should prefer this, since
|
|
425
|
+
# following the 302 with a cross-origin
|
|
426
|
+
# request that carries custom headers triggers a CORS preflight against
|
|
427
|
+
# the storage bucket.
|
|
428
|
+
# * 404 - the deployment does not exist, or no plan JSON is available for
|
|
429
|
+
# it (see below).
|
|
430
|
+
# * 403 - the caller is not allowed to view the deployment's environment.
|
|
431
|
+
# NOTE: the generated schema below documents only the 200 response body; the
|
|
432
|
+
# default response of this endpoint
|
|
433
|
+
# is the 302 described above.
|
|
434
|
+
# Sensitive values are masked: anything Terraform marks as sensitive is
|
|
435
|
+
# replaced with '<sensitive>', and values
|
|
436
|
+
# of sensitive env zero variables are redacted. Expect masked placeholders
|
|
437
|
+
# rather than real secrets in the file.
|
|
438
|
+
# A plan JSON is available only when all of the following hold, otherwise
|
|
439
|
+
# the endpoint returns 404:
|
|
440
|
+
# * the deployment is a deploy, destroy, or dry run - drift detection, PR
|
|
441
|
+
# plan and remote plan deployments do not produce one
|
|
442
|
+
# * the template is Terraform, OpenTofu or Terragrunt (Terragrunt run-all
|
|
443
|
+
# is not supported)
|
|
444
|
+
# * the deployment reached and completed its plan step
|
|
445
|
+
# * the deployment ran on an agent version that supports the feature
|
|
446
|
+
# (self-hosted agents may need an upgrade)
|
|
447
|
+
# * the deployment is less than 30 days old - plan JSON files are retained
|
|
448
|
+
# for 30 days and then deleted
|
|
449
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
450
|
+
# @param [String] redirect Optional parameter: Pass 'false' to receive the
|
|
451
|
+
# signed download URL as a JSON body ({ "url": "..." }) instead of a 302
|
|
452
|
+
# redirect. Any other value, or omitting the parameter, returns the
|
|
453
|
+
# redirect.
|
|
454
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
455
|
+
def environments_get_deployment_plan_json(id,
|
|
456
|
+
redirect: nil)
|
|
457
|
+
@api_call
|
|
458
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
459
|
+
'/environments/deployments/{id}/plan-json',
|
|
460
|
+
Server::DEFAULT)
|
|
461
|
+
.template_param(new_parameter(id, key: 'id')
|
|
462
|
+
.is_required(true)
|
|
463
|
+
.should_encode(true))
|
|
464
|
+
.query_param(new_parameter(redirect, key: 'redirect'))
|
|
465
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
466
|
+
.auth(Single.new('env0_API_Key')))
|
|
467
|
+
.response(new_response_handler
|
|
468
|
+
.deserializer(proc do |response, should_symbolize|
|
|
469
|
+
APIHelper.deserialize_union_type(
|
|
470
|
+
UnionTypeLookUp.get(:EnvironmentApiGetDeploymentPlanJsonResponse2),
|
|
471
|
+
response, should_symbolize, true
|
|
472
|
+
)
|
|
473
|
+
end)
|
|
474
|
+
.is_api_response(true)
|
|
475
|
+
.local_error('401',
|
|
476
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
477
|
+
' invalid.',
|
|
478
|
+
ErrorException)
|
|
479
|
+
.local_error('403',
|
|
480
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
481
|
+
' the route does not exist for the caller.',
|
|
482
|
+
ErrorException))
|
|
483
|
+
.execute
|
|
484
|
+
end
|
|
485
|
+
|
|
486
|
+
# Returns the drift status recorded for a drift-detection deployment,
|
|
487
|
+
# including the deployment log itself, the date of the cloud change events
|
|
488
|
+
# currently held for it, and the status of the event scan that produced
|
|
489
|
+
# them.
|
|
490
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
491
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
492
|
+
def environments_find_deployment_drift_status(id)
|
|
493
|
+
@api_call
|
|
494
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
495
|
+
'/environments/deployments/{id}/drift-status',
|
|
496
|
+
Server::DEFAULT)
|
|
497
|
+
.template_param(new_parameter(id, key: 'id')
|
|
498
|
+
.is_required(true)
|
|
499
|
+
.should_encode(true))
|
|
500
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
501
|
+
.auth(Single.new('env0_API_Key')))
|
|
502
|
+
.response(new_response_handler
|
|
503
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
504
|
+
.deserialize_into(EnvironmentApiFindDeploymentDriftStatusResponse.method(:from_hash))
|
|
505
|
+
.is_api_response(true)
|
|
506
|
+
.local_error('401',
|
|
507
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
508
|
+
' invalid.',
|
|
509
|
+
ErrorException)
|
|
510
|
+
.local_error('403',
|
|
511
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
512
|
+
' the route does not exist for the caller.',
|
|
513
|
+
ErrorException))
|
|
514
|
+
.execute
|
|
515
|
+
end
|
|
516
|
+
|
|
517
|
+
# Returns the full detail of one cloud change event on a drifted resource,
|
|
518
|
+
# for inspecting exactly what changed outside of env zero.
|
|
519
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
520
|
+
# @param [String] resource_id Required parameter: TODO: type description
|
|
521
|
+
# here
|
|
522
|
+
# @param [String] event_id Required parameter: TODO: type description here
|
|
523
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
524
|
+
def environments_get_drifted_resource_event_details(id,
|
|
525
|
+
resource_id,
|
|
526
|
+
event_id)
|
|
527
|
+
@api_call
|
|
528
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
529
|
+
'/environments/deployments/{id}/resources/{resourceId}/events/{eventId}',
|
|
530
|
+
Server::DEFAULT)
|
|
531
|
+
.template_param(new_parameter(id, key: 'id')
|
|
532
|
+
.is_required(true)
|
|
533
|
+
.should_encode(true))
|
|
534
|
+
.template_param(new_parameter(resource_id, key: 'resourceId')
|
|
535
|
+
.is_required(true)
|
|
536
|
+
.should_encode(true))
|
|
537
|
+
.template_param(new_parameter(event_id, key: 'eventId')
|
|
538
|
+
.is_required(true)
|
|
539
|
+
.should_encode(true))
|
|
540
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
541
|
+
.auth(Single.new('env0_API_Key')))
|
|
542
|
+
.response(new_response_handler
|
|
543
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
544
|
+
.deserialize_into(EnvironmentApiGetDriftedResourceEventDetailsResponse.method(:from_hash))
|
|
545
|
+
.is_api_response(true)
|
|
546
|
+
.local_error('401',
|
|
547
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
548
|
+
' invalid.',
|
|
549
|
+
ErrorException)
|
|
550
|
+
.local_error('403',
|
|
551
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
552
|
+
' the route does not exist for the caller.',
|
|
553
|
+
ErrorException))
|
|
554
|
+
.execute
|
|
555
|
+
end
|
|
556
|
+
|
|
557
|
+
# Returns the cloud change events recorded against a single drifted resource
|
|
558
|
+
# of a drift-detection deployment, together with the time window the events
|
|
559
|
+
# cover.
|
|
560
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
561
|
+
# @param [String] resource_id Required parameter: TODO: type description
|
|
562
|
+
# here
|
|
563
|
+
# @param [String] resource_type Required parameter: TODO: type description
|
|
564
|
+
# here
|
|
565
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
566
|
+
def environments_get_drifted_resource_events(id,
|
|
567
|
+
resource_id,
|
|
568
|
+
resource_type)
|
|
569
|
+
@api_call
|
|
570
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
571
|
+
'/environments/deployments/{id}/resources/{resourceId}/{resourceType}/events',
|
|
572
|
+
Server::DEFAULT)
|
|
573
|
+
.template_param(new_parameter(id, key: 'id')
|
|
574
|
+
.is_required(true)
|
|
575
|
+
.should_encode(true))
|
|
576
|
+
.template_param(new_parameter(resource_id, key: 'resourceId')
|
|
577
|
+
.is_required(true)
|
|
578
|
+
.should_encode(true))
|
|
579
|
+
.template_param(new_parameter(resource_type, key: 'resourceType')
|
|
580
|
+
.is_required(true)
|
|
581
|
+
.should_encode(true))
|
|
582
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
583
|
+
.auth(Single.new('env0_API_Key')))
|
|
584
|
+
.response(new_response_handler
|
|
585
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
586
|
+
.deserialize_into(EnvironmentApiGetDriftedResourceEventsResponse.method(:from_hash))
|
|
587
|
+
.is_api_response(true)
|
|
588
|
+
.local_error('401',
|
|
589
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
590
|
+
' invalid.',
|
|
591
|
+
ErrorException)
|
|
592
|
+
.local_error('403',
|
|
593
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
594
|
+
' the route does not exist for the caller.',
|
|
595
|
+
ErrorException))
|
|
596
|
+
.execute
|
|
597
|
+
end
|
|
598
|
+
|
|
599
|
+
# Returns a deployment log by id, including its type, status, timings,
|
|
600
|
+
# output, and any error and failed command. Use `fields` or `exclude_fields`
|
|
601
|
+
# to narrow the response - for example requesting only the plan. Poll this
|
|
602
|
+
# to follow an asynchronous deployment to completion.
|
|
603
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
604
|
+
# @param [String] exclude_fields Optional parameter: Fields to filter from
|
|
605
|
+
# the response body
|
|
606
|
+
# @param [String] fields Optional parameter: Fields to get from the response
|
|
607
|
+
# body
|
|
608
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
609
|
+
def environments_find_deployment_log_by_id(id,
|
|
610
|
+
exclude_fields: nil,
|
|
611
|
+
fields: nil)
|
|
612
|
+
@api_call
|
|
613
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
614
|
+
'/environments/deployments/{id}',
|
|
615
|
+
Server::DEFAULT)
|
|
616
|
+
.template_param(new_parameter(id, key: 'id')
|
|
617
|
+
.is_required(true)
|
|
618
|
+
.should_encode(true))
|
|
619
|
+
.query_param(new_parameter(exclude_fields, key: 'exclude_fields'))
|
|
620
|
+
.query_param(new_parameter(fields, key: 'fields'))
|
|
621
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
622
|
+
.auth(Single.new('env0_API_Key')))
|
|
623
|
+
.response(new_response_handler
|
|
624
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
625
|
+
.deserialize_into(EnvironmentApiFindDeploymentLogByIdResponse.method(:from_hash))
|
|
626
|
+
.is_api_response(true)
|
|
627
|
+
.local_error('401',
|
|
628
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
629
|
+
' invalid.',
|
|
630
|
+
ErrorException)
|
|
631
|
+
.local_error('403',
|
|
632
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
633
|
+
' the route does not exist for the caller.',
|
|
634
|
+
ErrorException))
|
|
635
|
+
.execute
|
|
636
|
+
end
|
|
637
|
+
|
|
638
|
+
# Resumes a deployment that is waiting for user approval, letting the apply
|
|
639
|
+
# proceed. Returns the deployment id.
|
|
640
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
641
|
+
# @param [Object] body Required parameter: The upstream documentation
|
|
642
|
+
# defines no fields for this request body. Send an empty JSON object `{}`.
|
|
643
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
644
|
+
def environments_resume(id,
|
|
645
|
+
body)
|
|
646
|
+
@api_call
|
|
647
|
+
.request(new_request_builder(HttpMethodEnum::PUT,
|
|
648
|
+
'/environments/deployments/{id}',
|
|
649
|
+
Server::DEFAULT)
|
|
650
|
+
.template_param(new_parameter(id, key: 'id')
|
|
651
|
+
.is_required(true)
|
|
652
|
+
.should_encode(true))
|
|
653
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
654
|
+
.body_param(new_parameter(body)
|
|
655
|
+
.is_required(true))
|
|
656
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
657
|
+
.body_serializer(APIHelper.method(:json_serialize))
|
|
658
|
+
.auth(Single.new('env0_API_Key')))
|
|
659
|
+
.response(new_response_handler
|
|
660
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
661
|
+
.deserialize_into(EnvironmentApiResumeResponse.method(:from_hash))
|
|
662
|
+
.is_api_response(true)
|
|
663
|
+
.local_error('401',
|
|
664
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
665
|
+
' invalid.',
|
|
666
|
+
ErrorException)
|
|
667
|
+
.local_error('403',
|
|
668
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
669
|
+
' the route does not exist for the caller.',
|
|
670
|
+
ErrorException))
|
|
671
|
+
.execute
|
|
672
|
+
end
|
|
673
|
+
|
|
674
|
+
# Returns a single environment by id, including its status, drift status,
|
|
675
|
+
# lock state, tags, TTL, and latest deployment log. Use `fields` or
|
|
676
|
+
# `exclude_fields` to narrow the response.
|
|
677
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
678
|
+
# @param [String] exclude_fields Optional parameter: TODO: type description
|
|
679
|
+
# here
|
|
680
|
+
# @param [String] fields Optional parameter: TODO: type description here
|
|
681
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
682
|
+
def environments_find_by_id(id,
|
|
683
|
+
exclude_fields: nil,
|
|
684
|
+
fields: nil)
|
|
685
|
+
@api_call
|
|
686
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
687
|
+
'/environments/{id}',
|
|
688
|
+
Server::DEFAULT)
|
|
689
|
+
.template_param(new_parameter(id, key: 'id')
|
|
690
|
+
.is_required(true)
|
|
691
|
+
.should_encode(true))
|
|
692
|
+
.query_param(new_parameter(exclude_fields, key: 'exclude_fields'))
|
|
693
|
+
.query_param(new_parameter(fields, key: 'fields'))
|
|
694
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
695
|
+
.auth(Single.new('env0_API_Key')))
|
|
696
|
+
.response(new_response_handler
|
|
697
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
698
|
+
.deserialize_into(EnvironmentApiFindByIdResponse.method(:from_hash))
|
|
699
|
+
.is_api_response(true)
|
|
700
|
+
.local_error('401',
|
|
701
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
702
|
+
' invalid.',
|
|
703
|
+
ErrorException)
|
|
704
|
+
.local_error('403',
|
|
705
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
706
|
+
' the route does not exist for the caller.',
|
|
707
|
+
ErrorException))
|
|
708
|
+
.execute
|
|
709
|
+
end
|
|
710
|
+
|
|
711
|
+
# Updates an environment's settings - its name, approval requirement,
|
|
712
|
+
# archived state, continuous deployment and pull-request plan behaviour, and
|
|
713
|
+
# remote backend and remote apply flags. Fields left out are unchanged.
|
|
714
|
+
# Returns the updated environment.
|
|
715
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
716
|
+
# @param [EnvironmentApiUpdateRequestBody] body Required parameter: TODO:
|
|
717
|
+
# type description here
|
|
718
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
719
|
+
def environments_update(id,
|
|
720
|
+
body)
|
|
721
|
+
@api_call
|
|
722
|
+
.request(new_request_builder(HttpMethodEnum::PUT,
|
|
723
|
+
'/environments/{id}',
|
|
724
|
+
Server::DEFAULT)
|
|
725
|
+
.template_param(new_parameter(id, key: 'id')
|
|
726
|
+
.is_required(true)
|
|
727
|
+
.should_encode(true))
|
|
728
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
729
|
+
.body_param(new_parameter(body)
|
|
730
|
+
.is_required(true))
|
|
731
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
732
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
733
|
+
.auth(Single.new('env0_API_Key')))
|
|
734
|
+
.response(new_response_handler
|
|
735
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
736
|
+
.deserialize_into(EnvironmentApiUpdateResponse.method(:from_hash))
|
|
737
|
+
.is_api_response(true)
|
|
738
|
+
.local_error('401',
|
|
739
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
740
|
+
' invalid.',
|
|
741
|
+
ErrorException)
|
|
742
|
+
.local_error('403',
|
|
743
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
744
|
+
' the route does not exist for the caller.',
|
|
745
|
+
ErrorException))
|
|
746
|
+
.execute
|
|
747
|
+
end
|
|
748
|
+
|
|
749
|
+
# Returns the deployment outputs of the environments in a project, keyed by
|
|
750
|
+
# environment, so that one environment's outputs can be consumed as
|
|
751
|
+
# another's inputs.
|
|
752
|
+
# @param [String] project_id Required parameter: TODO: type description
|
|
753
|
+
# here
|
|
754
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
755
|
+
def environments_get_environments_outputs(project_id)
|
|
756
|
+
@api_call
|
|
757
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
758
|
+
'/environment-outputs',
|
|
759
|
+
Server::DEFAULT)
|
|
760
|
+
.query_param(new_parameter(project_id, key: 'projectId')
|
|
761
|
+
.is_required(true))
|
|
762
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
763
|
+
.auth(Single.new('env0_API_Key')))
|
|
764
|
+
.response(new_response_handler
|
|
765
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
766
|
+
.deserialize_into(EnvironmentApiGetEnvironmentsOutputsResponse.method(:from_hash))
|
|
767
|
+
.is_api_response(true)
|
|
768
|
+
.local_error('401',
|
|
769
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
770
|
+
' invalid.',
|
|
771
|
+
ErrorException)
|
|
772
|
+
.local_error('403',
|
|
773
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
774
|
+
' the route does not exist for the caller.',
|
|
775
|
+
ErrorException))
|
|
776
|
+
.execute
|
|
777
|
+
end
|
|
778
|
+
|
|
779
|
+
# Returns, per deployment id, how many resources its stored plan would
|
|
780
|
+
# create, update, delete,
|
|
781
|
+
# recreate or only change in state, plus the destructive changes it would
|
|
782
|
+
# make. Reads the plan already
|
|
783
|
+
# stored for the deployment; it runs no new plan.
|
|
784
|
+
# A recreate is destructive and is also counted under 'recreate'. 'metadata'
|
|
785
|
+
# counts resources whose
|
|
786
|
+
# state changes but whose infrastructure does not (a move or an import), and
|
|
787
|
+
# never appears in
|
|
788
|
+
# 'destructive'.
|
|
789
|
+
# 'destructive' is capped at 50 entries; 'destructiveTotal' is the true
|
|
790
|
+
# count and
|
|
791
|
+
# 'destructiveTypeCounts' covers every destructive change, not just the
|
|
792
|
+
# returned ones.
|
|
793
|
+
# 'planReadable' is false when no readable plan is stored, in which case
|
|
794
|
+
# every count is absent rather
|
|
795
|
+
# than zero. A legacy deployment that stored only a plan summary is readable
|
|
796
|
+
# but partial: it carries
|
|
797
|
+
# 'create', 'update', 'delete' and 'destructiveTotal' and omits 'recreate',
|
|
798
|
+
# 'metadata', 'destructive'
|
|
799
|
+
# and 'destructiveTypeCounts', so read each field for presence rather than
|
|
800
|
+
# inferring it from
|
|
801
|
+
# 'planReadable'. Deployments the caller may not view are absent from the
|
|
802
|
+
# response.
|
|
803
|
+
# At most 200 ids per request.
|
|
804
|
+
# @param [String] deployment_log_ids Required parameter: Comma-separated
|
|
805
|
+
# deployment ids. At most 200.
|
|
806
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
807
|
+
def environments_get_plan_impact(deployment_log_ids)
|
|
808
|
+
@api_call
|
|
809
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
810
|
+
'/environments/deployments/plan-impact',
|
|
811
|
+
Server::DEFAULT)
|
|
812
|
+
.query_param(new_parameter(deployment_log_ids, key: 'deploymentLogIds')
|
|
813
|
+
.is_required(true))
|
|
814
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
815
|
+
.auth(Single.new('env0_API_Key')))
|
|
816
|
+
.response(new_response_handler
|
|
817
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
818
|
+
.deserialize_into(EnvironmentApiGetPlanImpactPlanImpact.method(:from_hash))
|
|
819
|
+
.is_api_response(true)
|
|
820
|
+
.is_response_array(true)
|
|
821
|
+
.local_error('401',
|
|
822
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
823
|
+
' invalid.',
|
|
824
|
+
ErrorException)
|
|
825
|
+
.local_error('403',
|
|
826
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
827
|
+
' the route does not exist for the caller.',
|
|
828
|
+
ErrorException))
|
|
829
|
+
.execute
|
|
830
|
+
end
|
|
831
|
+
|
|
832
|
+
# Returns the resources recorded for a deployment, as parsed from its plan
|
|
833
|
+
# or state.
|
|
834
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
835
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
836
|
+
def environments_find_resources(id)
|
|
837
|
+
@api_call
|
|
838
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
839
|
+
'/environments/deployments/{id}/resources',
|
|
840
|
+
Server::DEFAULT)
|
|
841
|
+
.template_param(new_parameter(id, key: 'id')
|
|
842
|
+
.is_required(true)
|
|
843
|
+
.should_encode(true))
|
|
844
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
845
|
+
.auth(Single.new('env0_API_Key')))
|
|
846
|
+
.response(new_response_handler
|
|
847
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
848
|
+
.deserialize_into(EnvironmentApiEnvironmentResource.method(:from_hash))
|
|
849
|
+
.is_api_response(true)
|
|
850
|
+
.is_response_array(true)
|
|
851
|
+
.local_error('401',
|
|
852
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
853
|
+
' invalid.',
|
|
854
|
+
ErrorException)
|
|
855
|
+
.local_error('403',
|
|
856
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
857
|
+
' the route does not exist for the caller.',
|
|
858
|
+
ErrorException))
|
|
859
|
+
.execute
|
|
860
|
+
end
|
|
861
|
+
|
|
862
|
+
# Returns every tag key on the organization's environments that the caller
|
|
863
|
+
# may view, mapped to its distinct values
|
|
864
|
+
# @param [String] organization_id Required parameter: TODO: type description
|
|
865
|
+
# here
|
|
866
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
867
|
+
def environments_find_tags_by_organization_id(organization_id)
|
|
868
|
+
@api_call
|
|
869
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
870
|
+
'/environments/tags',
|
|
871
|
+
Server::DEFAULT)
|
|
872
|
+
.query_param(new_parameter(organization_id, key: 'organizationId')
|
|
873
|
+
.is_required(true))
|
|
874
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
875
|
+
.auth(Single.new('env0_API_Key')))
|
|
876
|
+
.response(new_response_handler
|
|
877
|
+
.deserializer(APIHelper.method(:dynamic_deserializer))
|
|
878
|
+
.is_api_response(true)
|
|
879
|
+
.local_error('401',
|
|
880
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
881
|
+
' invalid.',
|
|
882
|
+
ErrorException)
|
|
883
|
+
.local_error('403',
|
|
884
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
885
|
+
' the route does not exist for the caller.',
|
|
886
|
+
ErrorException))
|
|
887
|
+
.execute
|
|
888
|
+
end
|
|
889
|
+
|
|
890
|
+
# Locks or unlocks an environment. `isLocked` is required and `reason`
|
|
891
|
+
# records why, shown to project members. While locked, deploy, destroy, plan
|
|
892
|
+
# and drift detection will not run for the environment. Returns the
|
|
893
|
+
# resulting lock status.
|
|
894
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
895
|
+
# @param [EnvironmentApiUpdateEnvironmentLockRequestBody] body Required
|
|
896
|
+
# parameter: TODO: type description here
|
|
897
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
898
|
+
def environments_update_environment_lock(id,
|
|
899
|
+
body)
|
|
900
|
+
@api_call
|
|
901
|
+
.request(new_request_builder(HttpMethodEnum::PUT,
|
|
902
|
+
'/environments/{id}/lock',
|
|
903
|
+
Server::DEFAULT)
|
|
904
|
+
.template_param(new_parameter(id, key: 'id')
|
|
905
|
+
.is_required(true)
|
|
906
|
+
.should_encode(true))
|
|
907
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
908
|
+
.body_param(new_parameter(body)
|
|
909
|
+
.is_required(true))
|
|
910
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
911
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
912
|
+
.auth(Single.new('env0_API_Key')))
|
|
913
|
+
.response(new_response_handler
|
|
914
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
915
|
+
.deserialize_into(EnvironmentApiUpdateEnvironmentLockResponse.method(:from_hash))
|
|
916
|
+
.is_api_response(true)
|
|
917
|
+
.local_error('401',
|
|
918
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
919
|
+
' invalid.',
|
|
920
|
+
ErrorException)
|
|
921
|
+
.local_error('403',
|
|
922
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
923
|
+
' the route does not exist for the caller.',
|
|
924
|
+
ErrorException))
|
|
925
|
+
.execute
|
|
926
|
+
end
|
|
927
|
+
|
|
928
|
+
# Remediate a drifted environment, using a drift detection deployment ID
|
|
929
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
930
|
+
# @param [Object] body Required parameter: The upstream documentation
|
|
931
|
+
# defines no fields for this request body. Send an empty JSON object `{}`.
|
|
932
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
933
|
+
def environments_remediate_drift(id,
|
|
934
|
+
body)
|
|
935
|
+
@api_call
|
|
936
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
937
|
+
'/environments/deployments/{id}/remediate-drift',
|
|
938
|
+
Server::DEFAULT)
|
|
939
|
+
.template_param(new_parameter(id, key: 'id')
|
|
940
|
+
.is_required(true)
|
|
941
|
+
.should_encode(true))
|
|
942
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
943
|
+
.body_param(new_parameter(body)
|
|
944
|
+
.is_required(true))
|
|
945
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
946
|
+
.body_serializer(APIHelper.method(:json_serialize))
|
|
947
|
+
.auth(Single.new('env0_API_Key')))
|
|
948
|
+
.response(new_response_handler
|
|
949
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
950
|
+
.deserialize_into(EnvironmentApiRemediateDriftResponse.method(:from_hash))
|
|
951
|
+
.is_api_response(true)
|
|
952
|
+
.local_error('401',
|
|
953
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
954
|
+
' invalid.',
|
|
955
|
+
ErrorException)
|
|
956
|
+
.local_error('403',
|
|
957
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
958
|
+
' the route does not exist for the caller.',
|
|
959
|
+
ErrorException))
|
|
960
|
+
.execute
|
|
961
|
+
end
|
|
962
|
+
|
|
963
|
+
# Starts a scan for the cloud change events behind a drift-detection
|
|
964
|
+
# deployment, which is what makes per-resource drift events available for
|
|
965
|
+
# that deployment. The scan runs asynchronously and the call returns no
|
|
966
|
+
# content; poll `GET /environments/deployments/{id}/drift-status` for the
|
|
967
|
+
# scan status.
|
|
968
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
969
|
+
# @param [Object] body Required parameter: The upstream documentation
|
|
970
|
+
# defines no fields for this request body. Send an empty JSON object `{}`.
|
|
971
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
972
|
+
def environments_drift_scan(id,
|
|
973
|
+
body)
|
|
974
|
+
@api_call
|
|
975
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
976
|
+
'/environments/deployments/{id}/drift-scan',
|
|
977
|
+
Server::DEFAULT)
|
|
978
|
+
.template_param(new_parameter(id, key: 'id')
|
|
979
|
+
.is_required(true)
|
|
980
|
+
.should_encode(true))
|
|
981
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
982
|
+
.body_param(new_parameter(body)
|
|
983
|
+
.is_required(true))
|
|
984
|
+
.body_serializer(APIHelper.method(:json_serialize))
|
|
985
|
+
.auth(Single.new('env0_API_Key')))
|
|
986
|
+
.response(new_response_handler
|
|
987
|
+
.is_nullable_response(true)
|
|
988
|
+
.is_response_void(true)
|
|
989
|
+
.is_api_response(true)
|
|
990
|
+
.local_error('401',
|
|
991
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
992
|
+
' invalid.',
|
|
993
|
+
ErrorException)
|
|
994
|
+
.local_error('403',
|
|
995
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
996
|
+
' the route does not exist for the caller.',
|
|
997
|
+
ErrorException))
|
|
998
|
+
.execute
|
|
999
|
+
end
|
|
1000
|
+
|
|
1001
|
+
# Applies a JSON merge-patch (RFC 7396) to the environment's tags - a
|
|
1002
|
+
# non-empty array replaces that key's values wholesale, null removes the
|
|
1003
|
+
# key, and keys that are not mentioned are left untouched
|
|
1004
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
1005
|
+
# @param [Hash[String, Array[String]]] body Required parameter: TODO: type
|
|
1006
|
+
# description here
|
|
1007
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
1008
|
+
def environments_update_tags(id,
|
|
1009
|
+
body)
|
|
1010
|
+
@api_call
|
|
1011
|
+
.request(new_request_builder(HttpMethodEnum::PUT,
|
|
1012
|
+
'/environments/{id}/tags',
|
|
1013
|
+
Server::DEFAULT)
|
|
1014
|
+
.template_param(new_parameter(id, key: 'id')
|
|
1015
|
+
.is_required(true)
|
|
1016
|
+
.should_encode(true))
|
|
1017
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
1018
|
+
.body_param(new_parameter(body)
|
|
1019
|
+
.is_required(true)
|
|
1020
|
+
.validator(proc do |value|
|
|
1021
|
+
UnionTypeLookUp.get(:EnvironmentApiUpdateTagsRequestBody)
|
|
1022
|
+
.validate(value)
|
|
1023
|
+
end))
|
|
1024
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
1025
|
+
.body_serializer(APIHelper.method(:json_serialize))
|
|
1026
|
+
.auth(Single.new('env0_API_Key')))
|
|
1027
|
+
.response(new_response_handler
|
|
1028
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
1029
|
+
.deserialize_into(EnvironmentApiUpdateTagsResponse.method(:from_hash))
|
|
1030
|
+
.is_api_response(true)
|
|
1031
|
+
.local_error('401',
|
|
1032
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
1033
|
+
' invalid.',
|
|
1034
|
+
ErrorException)
|
|
1035
|
+
.local_error('403',
|
|
1036
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
1037
|
+
' the route does not exist for the caller.',
|
|
1038
|
+
ErrorException))
|
|
1039
|
+
.execute
|
|
1040
|
+
end
|
|
1041
|
+
|
|
1042
|
+
# Sets an environment's time-to-live, after which env zero destroys it
|
|
1043
|
+
# automatically. `type` is required and selects whether the environment has
|
|
1044
|
+
# a finite or infinite lifespan, with `value` giving the deadline. Maximum
|
|
1045
|
+
# TTL is constrained by the organization's and project's TTL policy and is
|
|
1046
|
+
# measured from the environment's creation time. Returns the updated
|
|
1047
|
+
# environment.
|
|
1048
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
1049
|
+
# @param [EnvironmentApiTtlRequestBody] body Required parameter: TODO: type
|
|
1050
|
+
# description here
|
|
1051
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
1052
|
+
def environments_ttl(id,
|
|
1053
|
+
body)
|
|
1054
|
+
@api_call
|
|
1055
|
+
.request(new_request_builder(HttpMethodEnum::PUT,
|
|
1056
|
+
'/environments/{id}/ttl',
|
|
1057
|
+
Server::DEFAULT)
|
|
1058
|
+
.template_param(new_parameter(id, key: 'id')
|
|
1059
|
+
.is_required(true)
|
|
1060
|
+
.should_encode(true))
|
|
1061
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
1062
|
+
.body_param(new_parameter(body)
|
|
1063
|
+
.is_required(true))
|
|
1064
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
1065
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
1066
|
+
.auth(Single.new('env0_API_Key')))
|
|
1067
|
+
.response(new_response_handler
|
|
1068
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
1069
|
+
.deserialize_into(EnvironmentApiTtlResponse.method(:from_hash))
|
|
1070
|
+
.is_api_response(true)
|
|
1071
|
+
.local_error('401',
|
|
1072
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
1073
|
+
' invalid.',
|
|
1074
|
+
ErrorException)
|
|
1075
|
+
.local_error('403',
|
|
1076
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
1077
|
+
' the route does not exist for the caller.',
|
|
1078
|
+
ErrorException))
|
|
1079
|
+
.execute
|
|
1080
|
+
end
|
|
1081
|
+
end
|
|
1082
|
+
end
|