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,149 @@
|
|
|
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
|
+
# NotificationsApi
|
|
8
|
+
class NotificationsApi < BaseApi
|
|
9
|
+
# Creates a notification endpoint for an organization. `name`,
|
|
10
|
+
# `organizationId`, `type` and `value` are required, where `value` is the
|
|
11
|
+
# target address such as a webhook URL. Supply `webhookSecret` to have env
|
|
12
|
+
# zero sign webhook payloads. The secret is not returned.
|
|
13
|
+
# @param [NotificationsApiCreateNotificationEndpointRequestBody] body
|
|
14
|
+
# Required parameter: TODO: type description here
|
|
15
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
16
|
+
def notifications_create_notification_endpoint(body)
|
|
17
|
+
@api_call
|
|
18
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
19
|
+
'/notifications/endpoints',
|
|
20
|
+
Server::DEFAULT)
|
|
21
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
22
|
+
.body_param(new_parameter(body)
|
|
23
|
+
.is_required(true))
|
|
24
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
25
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
26
|
+
.auth(Single.new('env0_API_Key')))
|
|
27
|
+
.response(new_response_handler
|
|
28
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
29
|
+
.deserialize_into(NotificationsApiCreateNotificationEndpointResponse.method(:from_hash))
|
|
30
|
+
.is_api_response(true)
|
|
31
|
+
.local_error('401',
|
|
32
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
33
|
+
' invalid.',
|
|
34
|
+
ErrorException)
|
|
35
|
+
.local_error('403',
|
|
36
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
37
|
+
' the route does not exist for the caller.',
|
|
38
|
+
ErrorException))
|
|
39
|
+
.execute
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Returns the notification endpoints configured for an organization - the
|
|
43
|
+
# Slack, Microsoft Teams, email and webhook targets that deployment and
|
|
44
|
+
# drift events can be sent to. Webhook secrets are not returned.
|
|
45
|
+
# @param [String] organization_id Required parameter: TODO: type description
|
|
46
|
+
# here
|
|
47
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
48
|
+
def notifications_find_notification_endpoints(organization_id)
|
|
49
|
+
@api_call
|
|
50
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
51
|
+
'/notifications/endpoints',
|
|
52
|
+
Server::DEFAULT)
|
|
53
|
+
.query_param(new_parameter(organization_id, key: 'organizationId')
|
|
54
|
+
.is_required(true))
|
|
55
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
56
|
+
.auth(Single.new('env0_API_Key')))
|
|
57
|
+
.response(new_response_handler
|
|
58
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
59
|
+
.deserialize_into(NotificationsApiNotificationEndpointWithoutSecret.method(:from_hash))
|
|
60
|
+
.is_api_response(true)
|
|
61
|
+
.is_response_array(true)
|
|
62
|
+
.local_error('401',
|
|
63
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
64
|
+
' invalid.',
|
|
65
|
+
ErrorException)
|
|
66
|
+
.local_error('403',
|
|
67
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
68
|
+
' the route does not exist for the caller.',
|
|
69
|
+
ErrorException))
|
|
70
|
+
.execute
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Returns the notification settings for a project - which endpoints receive
|
|
74
|
+
# which events, including the drift detected, no drift detected and drift
|
|
75
|
+
# failed events.
|
|
76
|
+
# @param [String] project_id Required parameter: TODO: type description
|
|
77
|
+
# here
|
|
78
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
79
|
+
def notifications_find_project_notification_settings(project_id)
|
|
80
|
+
@api_call
|
|
81
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
82
|
+
'/notifications/projects/{projectId}',
|
|
83
|
+
Server::DEFAULT)
|
|
84
|
+
.template_param(new_parameter(project_id, key: 'projectId')
|
|
85
|
+
.is_required(true)
|
|
86
|
+
.should_encode(true))
|
|
87
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
88
|
+
.auth(Single.new('env0_API_Key')))
|
|
89
|
+
.response(new_response_handler
|
|
90
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
91
|
+
.deserialize_into(NotificationsApiProjectNotificationSetting.method(:from_hash))
|
|
92
|
+
.is_api_response(true)
|
|
93
|
+
.is_response_array(true)
|
|
94
|
+
.local_error('401',
|
|
95
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
96
|
+
' invalid.',
|
|
97
|
+
ErrorException)
|
|
98
|
+
.local_error('403',
|
|
99
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
100
|
+
' the route does not exist for the caller.',
|
|
101
|
+
ErrorException))
|
|
102
|
+
.execute
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Sets which events a notification endpoint receives for a project,
|
|
106
|
+
# replacing the endpoint's current `eventNames` for that project. Returns
|
|
107
|
+
# the resulting setting.
|
|
108
|
+
# @param [String] project_id Required parameter: TODO: type description
|
|
109
|
+
# here
|
|
110
|
+
# @param [String] endpoint_id Required parameter: TODO: type description
|
|
111
|
+
# here
|
|
112
|
+
# @param [NotificationsApiUpdateProjectNotificationSettingsRequestBody] body
|
|
113
|
+
# Required parameter: TODO: type description here
|
|
114
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
115
|
+
def notifications_update_project_notification_settings(project_id,
|
|
116
|
+
endpoint_id,
|
|
117
|
+
body)
|
|
118
|
+
@api_call
|
|
119
|
+
.request(new_request_builder(HttpMethodEnum::PUT,
|
|
120
|
+
'/notifications/projects/{projectId}/endpoints/{endpointId}',
|
|
121
|
+
Server::DEFAULT)
|
|
122
|
+
.template_param(new_parameter(project_id, key: 'projectId')
|
|
123
|
+
.is_required(true)
|
|
124
|
+
.should_encode(true))
|
|
125
|
+
.template_param(new_parameter(endpoint_id, key: 'endpointId')
|
|
126
|
+
.is_required(true)
|
|
127
|
+
.should_encode(true))
|
|
128
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
129
|
+
.body_param(new_parameter(body)
|
|
130
|
+
.is_required(true))
|
|
131
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
132
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
133
|
+
.auth(Single.new('env0_API_Key')))
|
|
134
|
+
.response(new_response_handler
|
|
135
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
136
|
+
.deserialize_into(NotificationsApiUpdateProjectNotificationSettingsResponse.method(:from_hash))
|
|
137
|
+
.is_api_response(true)
|
|
138
|
+
.local_error('401',
|
|
139
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
140
|
+
' invalid.',
|
|
141
|
+
ErrorException)
|
|
142
|
+
.local_error('403',
|
|
143
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
144
|
+
' the route does not exist for the caller.',
|
|
145
|
+
ErrorException))
|
|
146
|
+
.execute
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
end
|
|
@@ -0,0 +1,132 @@
|
|
|
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
|
+
# OrganizationApi
|
|
8
|
+
class OrganizationApi < BaseApi
|
|
9
|
+
# Returns the organization's limits, such as the maximum number of
|
|
10
|
+
# environments. Useful for checking headroom before creating environments.
|
|
11
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
12
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
13
|
+
def organization_get_organization_limits(id)
|
|
14
|
+
@api_call
|
|
15
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
16
|
+
'/organizations/{id}/limits',
|
|
17
|
+
Server::DEFAULT)
|
|
18
|
+
.template_param(new_parameter(id, key: 'id')
|
|
19
|
+
.is_required(true)
|
|
20
|
+
.should_encode(true))
|
|
21
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
22
|
+
.auth(Single.new('env0_API_Key')))
|
|
23
|
+
.response(new_response_handler
|
|
24
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
25
|
+
.deserialize_into(OrganizationApiGetOrganizationLimitsResponse.method(:from_hash))
|
|
26
|
+
.is_api_response(true)
|
|
27
|
+
.local_error('401',
|
|
28
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
29
|
+
' invalid.',
|
|
30
|
+
ErrorException)
|
|
31
|
+
.local_error('403',
|
|
32
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
33
|
+
' the route does not exist for the caller.',
|
|
34
|
+
ErrorException))
|
|
35
|
+
.execute
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Returns an organization by id, including its default and maximum TTL,
|
|
39
|
+
# secrets and OIDC policies, pull-request and approval settings, and IP
|
|
40
|
+
# allowlist.
|
|
41
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
42
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
43
|
+
def organization_find_organization_by_id(id)
|
|
44
|
+
@api_call
|
|
45
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
46
|
+
'/organizations/{id}',
|
|
47
|
+
Server::DEFAULT)
|
|
48
|
+
.template_param(new_parameter(id, key: 'id')
|
|
49
|
+
.is_required(true)
|
|
50
|
+
.should_encode(true))
|
|
51
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
52
|
+
.auth(Single.new('env0_API_Key')))
|
|
53
|
+
.response(new_response_handler
|
|
54
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
55
|
+
.deserialize_into(OrganizationApiFindOrganizationByIdResponse.method(:from_hash))
|
|
56
|
+
.is_api_response(true)
|
|
57
|
+
.local_error('401',
|
|
58
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
59
|
+
' invalid.',
|
|
60
|
+
ErrorException)
|
|
61
|
+
.local_error('403',
|
|
62
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
63
|
+
' the route does not exist for the caller.',
|
|
64
|
+
ErrorException))
|
|
65
|
+
.execute
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Returns the organizations the authenticated API key can access. Use this
|
|
69
|
+
# to resolve the organization id that most other operations require.
|
|
70
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
71
|
+
def organization_find_organizations
|
|
72
|
+
@api_call
|
|
73
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
74
|
+
'/organizations',
|
|
75
|
+
Server::DEFAULT)
|
|
76
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
77
|
+
.auth(Single.new('env0_API_Key')))
|
|
78
|
+
.response(new_response_handler
|
|
79
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
80
|
+
.deserialize_into(OrganizationApiOrganization.method(:from_hash))
|
|
81
|
+
.is_api_response(true)
|
|
82
|
+
.is_response_array(true)
|
|
83
|
+
.local_error('401',
|
|
84
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
85
|
+
' invalid.',
|
|
86
|
+
ErrorException)
|
|
87
|
+
.local_error('403',
|
|
88
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
89
|
+
' the route does not exist for the caller.',
|
|
90
|
+
ErrorException))
|
|
91
|
+
.execute
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Returns the users in an organization, with their roles. Set
|
|
95
|
+
# `includeApiKeys` to include API keys, which behave as users, and `query`
|
|
96
|
+
# to search.
|
|
97
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
98
|
+
# @param [String] include_api_keys Optional parameter: TODO: type
|
|
99
|
+
# description here
|
|
100
|
+
# @param [String] query Optional parameter: TODO: type description here
|
|
101
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
102
|
+
def organization_get_users(id,
|
|
103
|
+
include_api_keys: nil,
|
|
104
|
+
query: nil)
|
|
105
|
+
@api_call
|
|
106
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
107
|
+
'/organizations/{id}/users',
|
|
108
|
+
Server::DEFAULT)
|
|
109
|
+
.template_param(new_parameter(id, key: 'id')
|
|
110
|
+
.is_required(true)
|
|
111
|
+
.should_encode(true))
|
|
112
|
+
.query_param(new_parameter(include_api_keys, key: 'includeApiKeys'))
|
|
113
|
+
.query_param(new_parameter(query, key: 'query'))
|
|
114
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
115
|
+
.auth(Single.new('env0_API_Key')))
|
|
116
|
+
.response(new_response_handler
|
|
117
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
118
|
+
.deserialize_into(OrganizationUser.method(:from_hash))
|
|
119
|
+
.is_api_response(true)
|
|
120
|
+
.is_response_array(true)
|
|
121
|
+
.local_error('401',
|
|
122
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
123
|
+
' invalid.',
|
|
124
|
+
ErrorException)
|
|
125
|
+
.local_error('403',
|
|
126
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
127
|
+
' the route does not exist for the caller.',
|
|
128
|
+
ErrorException))
|
|
129
|
+
.execute
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
end
|
|
@@ -0,0 +1,202 @@
|
|
|
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
|
+
# ProjectsApi
|
|
8
|
+
class ProjectsApi < BaseApi
|
|
9
|
+
# Creates a project in an organization. `name` and `organizationId` are
|
|
10
|
+
# required; supply `parentProjectId` to create it as a sub-project. Returns
|
|
11
|
+
# the created project.
|
|
12
|
+
# @param [ProjectApiCreateProjectRequestBody] body Required parameter: TODO:
|
|
13
|
+
# type description here
|
|
14
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
15
|
+
def projects_create_project(body)
|
|
16
|
+
@api_call
|
|
17
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
18
|
+
'/projects',
|
|
19
|
+
Server::DEFAULT)
|
|
20
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
21
|
+
.body_param(new_parameter(body)
|
|
22
|
+
.is_required(true))
|
|
23
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
24
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
25
|
+
.auth(Single.new('env0_API_Key')))
|
|
26
|
+
.response(new_response_handler
|
|
27
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
28
|
+
.deserialize_into(ProjectApiCreateProjectResponse.method(:from_hash))
|
|
29
|
+
.is_api_response(true)
|
|
30
|
+
.local_error('401',
|
|
31
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
32
|
+
' invalid.',
|
|
33
|
+
ErrorException)
|
|
34
|
+
.local_error('403',
|
|
35
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
36
|
+
' the route does not exist for the caller.',
|
|
37
|
+
ErrorException))
|
|
38
|
+
.execute
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns the projects in an organization that the caller may view. Set
|
|
42
|
+
# `isArchived` to include or exclude archived projects.
|
|
43
|
+
# @param [String] organization_id Required parameter: TODO: type description
|
|
44
|
+
# here
|
|
45
|
+
# @param [String] is_archived Optional parameter: TODO: type description
|
|
46
|
+
# here
|
|
47
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
48
|
+
def projects_find_by_organization_id(organization_id,
|
|
49
|
+
is_archived: nil)
|
|
50
|
+
@api_call
|
|
51
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
52
|
+
'/projects',
|
|
53
|
+
Server::DEFAULT)
|
|
54
|
+
.query_param(new_parameter(organization_id, key: 'organizationId')
|
|
55
|
+
.is_required(true))
|
|
56
|
+
.query_param(new_parameter(is_archived, key: 'isArchived'))
|
|
57
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
58
|
+
.auth(Single.new('env0_API_Key')))
|
|
59
|
+
.response(new_response_handler
|
|
60
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
61
|
+
.deserialize_into(ProjectApiProject.method(:from_hash))
|
|
62
|
+
.is_api_response(true)
|
|
63
|
+
.is_response_array(true)
|
|
64
|
+
.local_error('401',
|
|
65
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
66
|
+
' invalid.',
|
|
67
|
+
ErrorException)
|
|
68
|
+
.local_error('403',
|
|
69
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
70
|
+
' the route does not exist for the caller.',
|
|
71
|
+
ErrorException))
|
|
72
|
+
.execute
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Returns a project by id, including its tags, parent project and position
|
|
76
|
+
# in the project hierarchy.
|
|
77
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
78
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
79
|
+
def projects_find_by_id(id)
|
|
80
|
+
@api_call
|
|
81
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
82
|
+
'/projects/{id}',
|
|
83
|
+
Server::DEFAULT)
|
|
84
|
+
.template_param(new_parameter(id, key: 'id')
|
|
85
|
+
.is_required(true)
|
|
86
|
+
.should_encode(true))
|
|
87
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
88
|
+
.auth(Single.new('env0_API_Key')))
|
|
89
|
+
.response(new_response_handler
|
|
90
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
91
|
+
.deserialize_into(ProjectApiFindByIdResponse.method(:from_hash))
|
|
92
|
+
.is_api_response(true)
|
|
93
|
+
.local_error('401',
|
|
94
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
95
|
+
' invalid.',
|
|
96
|
+
ErrorException)
|
|
97
|
+
.local_error('403',
|
|
98
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
99
|
+
' the route does not exist for the caller.',
|
|
100
|
+
ErrorException))
|
|
101
|
+
.execute
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Returns the policy in force for a project - its environment limits,
|
|
105
|
+
# default and maximum TTL, approval and cost-estimation defaults, destroy
|
|
106
|
+
# protection, drift detection schedule and automatic drift remediation
|
|
107
|
+
# strategy, and the other deployment controls that apply to its
|
|
108
|
+
# environments.
|
|
109
|
+
# @param [String] project_id Required parameter: TODO: type description
|
|
110
|
+
# here
|
|
111
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
112
|
+
def environments_get_policies(project_id)
|
|
113
|
+
@api_call
|
|
114
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
115
|
+
'/policies',
|
|
116
|
+
Server::DEFAULT)
|
|
117
|
+
.query_param(new_parameter(project_id, key: 'projectId')
|
|
118
|
+
.is_required(true))
|
|
119
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
120
|
+
.auth(Single.new('env0_API_Key')))
|
|
121
|
+
.response(new_response_handler
|
|
122
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
123
|
+
.deserialize_into(EnvironmentApiGetPoliciesResponse.method(:from_hash))
|
|
124
|
+
.is_api_response(true)
|
|
125
|
+
.local_error('401',
|
|
126
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
127
|
+
' invalid.',
|
|
128
|
+
ErrorException)
|
|
129
|
+
.local_error('403',
|
|
130
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
131
|
+
' the route does not exist for the caller.',
|
|
132
|
+
ErrorException))
|
|
133
|
+
.execute
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Updates the policy for a project, identified by the required `projectId`.
|
|
137
|
+
# Fields left out are unchanged. This is where a project's drift detection
|
|
138
|
+
# schedule, automatic drift remediation strategy, environment limits, TTL
|
|
139
|
+
# bounds and destroy protection are set for its environments. Returns the
|
|
140
|
+
# updated policy.
|
|
141
|
+
# @param [EnvironmentApiUpdatePoliciesRequestBody] body Required parameter:
|
|
142
|
+
# TODO: type description here
|
|
143
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
144
|
+
def environments_update_policies(body)
|
|
145
|
+
@api_call
|
|
146
|
+
.request(new_request_builder(HttpMethodEnum::PUT,
|
|
147
|
+
'/policies',
|
|
148
|
+
Server::DEFAULT)
|
|
149
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
150
|
+
.body_param(new_parameter(body)
|
|
151
|
+
.is_required(true))
|
|
152
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
153
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
154
|
+
.auth(Single.new('env0_API_Key')))
|
|
155
|
+
.response(new_response_handler
|
|
156
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
157
|
+
.deserialize_into(EnvironmentApiUpdatePoliciesResponse.method(:from_hash))
|
|
158
|
+
.is_api_response(true)
|
|
159
|
+
.local_error('401',
|
|
160
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
161
|
+
' invalid.',
|
|
162
|
+
ErrorException)
|
|
163
|
+
.local_error('403',
|
|
164
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
165
|
+
' the route does not exist for the caller.',
|
|
166
|
+
ErrorException))
|
|
167
|
+
.execute
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Returns all users who have access to a project, including organization
|
|
171
|
+
# admins, users with direct project assignments, and users who have access
|
|
172
|
+
# through team assignments. Currently supports organizations with up to
|
|
173
|
+
# approximately 1000 users due to our limits.
|
|
174
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
175
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
176
|
+
def projects_get_project_users(id)
|
|
177
|
+
@api_call
|
|
178
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
179
|
+
'/projects/{id}/users',
|
|
180
|
+
Server::DEFAULT)
|
|
181
|
+
.template_param(new_parameter(id, key: 'id')
|
|
182
|
+
.is_required(true)
|
|
183
|
+
.should_encode(true))
|
|
184
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
185
|
+
.auth(Single.new('env0_API_Key')))
|
|
186
|
+
.response(new_response_handler
|
|
187
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
188
|
+
.deserialize_into(ProjectApiUserWithAccess.method(:from_hash))
|
|
189
|
+
.is_api_response(true)
|
|
190
|
+
.is_response_array(true)
|
|
191
|
+
.local_error('401',
|
|
192
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
193
|
+
' invalid.',
|
|
194
|
+
ErrorException)
|
|
195
|
+
.local_error('403',
|
|
196
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
197
|
+
' the route does not exist for the caller.',
|
|
198
|
+
ErrorException))
|
|
199
|
+
.execute
|
|
200
|
+
end
|
|
201
|
+
end
|
|
202
|
+
end
|
|
@@ -0,0 +1,175 @@
|
|
|
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
|
+
# SchedulingApi
|
|
8
|
+
class SchedulingApi < BaseApi
|
|
9
|
+
# Returns the drift detection schedule for an environment: whether detection
|
|
10
|
+
# is enabled, its cron expression, the next scheduled run, the automatic
|
|
11
|
+
# drift remediation strategy in force, and, when detection is disabled, the
|
|
12
|
+
# reason. An environment with detection disabled or broken is a monitoring
|
|
13
|
+
# blind spot.
|
|
14
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
15
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
16
|
+
def scheduling_get_drift_detection_by_environment_id(id)
|
|
17
|
+
@api_call
|
|
18
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
19
|
+
'/scheduling/drift-detection/environments/{id}',
|
|
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: 'accept'))
|
|
25
|
+
.auth(Single.new('env0_API_Key')))
|
|
26
|
+
.response(new_response_handler
|
|
27
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
28
|
+
.deserialize_into(SchedulingApiGetDriftDetectionByEnvironmentIdResponse.method(:from_hash))
|
|
29
|
+
.is_api_response(true)
|
|
30
|
+
.local_error('401',
|
|
31
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
32
|
+
' invalid.',
|
|
33
|
+
ErrorException)
|
|
34
|
+
.local_error('403',
|
|
35
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
36
|
+
' the route does not exist for the caller.',
|
|
37
|
+
ErrorException))
|
|
38
|
+
.execute
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Enables, disables or reschedules drift detection for an environment, and
|
|
42
|
+
# sets its automatic drift remediation strategy. `enabled` is required;
|
|
43
|
+
# supply `cron` to set the detection interval. Note that the scheduler runs
|
|
44
|
+
# hourly, so the exact minute within the hour cannot be controlled, and the
|
|
45
|
+
# minimum interval depends on the organization's plan.
|
|
46
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
47
|
+
# @param [SchedulingApiSetDriftDetectionRequestBody] body Required
|
|
48
|
+
# parameter: TODO: type description here
|
|
49
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
50
|
+
def scheduling_set_drift_detection(id,
|
|
51
|
+
body)
|
|
52
|
+
@api_call
|
|
53
|
+
.request(new_request_builder(HttpMethodEnum::PATCH,
|
|
54
|
+
'/scheduling/drift-detection/environments/{id}',
|
|
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(proc do |param| param.to_json unless param.nil? end)
|
|
64
|
+
.auth(Single.new('env0_API_Key')))
|
|
65
|
+
.response(new_response_handler
|
|
66
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
67
|
+
.deserialize_into(SchedulingApiSetDriftDetectionResponse.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 scheduled deploy and destroy cron expressions configured for
|
|
81
|
+
# an environment.
|
|
82
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
83
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
84
|
+
def scheduling_get_schedule_by_environment_id(id)
|
|
85
|
+
@api_call
|
|
86
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
87
|
+
'/scheduling/environments/{id}',
|
|
88
|
+
Server::DEFAULT)
|
|
89
|
+
.template_param(new_parameter(id, key: 'id')
|
|
90
|
+
.is_required(true)
|
|
91
|
+
.should_encode(true))
|
|
92
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
93
|
+
.auth(Single.new('env0_API_Key')))
|
|
94
|
+
.response(new_response_handler
|
|
95
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
96
|
+
.deserialize_into(SchedulingApiGetScheduleByEnvironmentIdResponse.method(:from_hash))
|
|
97
|
+
.is_api_response(true)
|
|
98
|
+
.local_error('401',
|
|
99
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
100
|
+
' invalid.',
|
|
101
|
+
ErrorException)
|
|
102
|
+
.local_error('403',
|
|
103
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
104
|
+
' the route does not exist for the caller.',
|
|
105
|
+
ErrorException))
|
|
106
|
+
.execute
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Sets the scheduled deploy and destroy cron expressions for an environment.
|
|
110
|
+
# Returns the resulting schedule.
|
|
111
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
112
|
+
# @param [SchedulingApiSetEnvironmentScheduleRequestBody] body Required
|
|
113
|
+
# parameter: TODO: type description here
|
|
114
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
115
|
+
def scheduling_set_environment_schedule(id,
|
|
116
|
+
body)
|
|
117
|
+
@api_call
|
|
118
|
+
.request(new_request_builder(HttpMethodEnum::PUT,
|
|
119
|
+
'/scheduling/environments/{id}',
|
|
120
|
+
Server::DEFAULT)
|
|
121
|
+
.template_param(new_parameter(id, key: 'id')
|
|
122
|
+
.is_required(true)
|
|
123
|
+
.should_encode(true))
|
|
124
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
125
|
+
.body_param(new_parameter(body)
|
|
126
|
+
.is_required(true))
|
|
127
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
128
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
129
|
+
.auth(Single.new('env0_API_Key')))
|
|
130
|
+
.response(new_response_handler
|
|
131
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
132
|
+
.deserialize_into(SchedulingApiSetEnvironmentScheduleResponse.method(:from_hash))
|
|
133
|
+
.is_api_response(true)
|
|
134
|
+
.local_error('401',
|
|
135
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
136
|
+
' invalid.',
|
|
137
|
+
ErrorException)
|
|
138
|
+
.local_error('403',
|
|
139
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
140
|
+
' the route does not exist for the caller.',
|
|
141
|
+
ErrorException))
|
|
142
|
+
.execute
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Returns the scheduled deploy and destroy configuration for every
|
|
146
|
+
# environment in a project.
|
|
147
|
+
# @param [String] id Required parameter: TODO: type description here
|
|
148
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
149
|
+
def scheduling_get_schedule_by_project_id(id)
|
|
150
|
+
@api_call
|
|
151
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
152
|
+
'/scheduling/projects/{id}',
|
|
153
|
+
Server::DEFAULT)
|
|
154
|
+
.template_param(new_parameter(id, key: 'id')
|
|
155
|
+
.is_required(true)
|
|
156
|
+
.should_encode(true))
|
|
157
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
158
|
+
.auth(Single.new('env0_API_Key')))
|
|
159
|
+
.response(new_response_handler
|
|
160
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
161
|
+
.deserialize_into(SchedulingApiGetScheduleByEnvironmentIdResponse.method(:from_hash))
|
|
162
|
+
.is_api_response(true)
|
|
163
|
+
.is_response_array(true)
|
|
164
|
+
.local_error('401',
|
|
165
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
166
|
+
' invalid.',
|
|
167
|
+
ErrorException)
|
|
168
|
+
.local_error('403',
|
|
169
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
170
|
+
' the route does not exist for the caller.',
|
|
171
|
+
ErrorException))
|
|
172
|
+
.execute
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
end
|