datadog_api_client 2.45.0 → 2.46.0
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 +4 -4
- data/.generator/schemas/v1/openapi.yaml +81 -0
- data/.generator/schemas/v2/openapi.yaml +3968 -94
- data/.pre-commit-config.yaml +4 -0
- data/CHANGELOG.md +20 -0
- data/examples/v1/monitors/CreateMonitor_3541766733.rb +32 -0
- data/examples/v2/deployment-gates/CreateDeploymentGate.rb +20 -0
- data/examples/v2/deployment-gates/CreateDeploymentRule.rb +25 -0
- data/examples/v2/deployment-gates/DeleteDeploymentGate.rb +11 -0
- data/examples/v2/deployment-gates/DeleteDeploymentRule.rb +14 -0
- data/examples/v2/deployment-gates/GetDeploymentGate.rb +11 -0
- data/examples/v2/deployment-gates/GetDeploymentRule.rb +14 -0
- data/examples/v2/deployment-gates/UpdateDeploymentGate.rb +21 -0
- data/examples/v2/deployment-gates/UpdateDeploymentRule.rb +27 -0
- data/examples/v2/fleet-automation/GetFleetAgentInfo.rb +8 -0
- data/examples/v2/fleet-automation/ListFleetAgents.rb +8 -0
- data/examples/v2/logs-restriction-queries/AddRoleToRestrictionQuery.rb +21 -0
- data/examples/v2/logs-restriction-queries/CreateRestrictionQuery.rb +17 -0
- data/examples/v2/logs-restriction-queries/DeleteRestrictionQuery.rb +11 -0
- data/examples/v2/logs-restriction-queries/GetRestrictionQuery.rb +11 -0
- data/examples/v2/logs-restriction-queries/GetRoleRestrictionQuery.rb +11 -0
- data/examples/v2/logs-restriction-queries/ListRestrictionQueries.rb +8 -0
- data/examples/v2/logs-restriction-queries/ListRestrictionQueryRoles.rb +11 -0
- data/examples/v2/logs-restriction-queries/ListUserRestrictionQueries.rb +11 -0
- data/examples/v2/logs-restriction-queries/RemoveRoleFromRestrictionQuery.rb +21 -0
- data/examples/v2/logs-restriction-queries/ReplaceRestrictionQuery.rb +20 -0
- data/examples/v2/logs-restriction-queries/UpdateRestrictionQuery.rb +20 -0
- data/examples/v2/monitors/CreateMonitorNotificationRule_1379932371.rb +21 -0
- data/examples/v2/monitors/UpdateMonitorNotificationRule_1446058210.rb +24 -0
- data/examples/v2/on-call/CreateOnCallEscalationPolicy.rb +9 -0
- data/examples/v2/on-call/GetScheduleOnCallUser.rb +1 -1
- data/examples/v2/reference-tables/CreateReferenceTable.rb +23 -14
- data/examples/v2/reference-tables/DeleteRows.rb +14 -0
- data/examples/v2/reference-tables/UpsertRows.rb +19 -0
- data/examples/v2/security-monitoring/AttachCase.rb +26 -0
- data/examples/v2/security-monitoring/AttachCase_897782765.rb +22 -0
- data/examples/v2/security-monitoring/AttachJiraIssue.rb +34 -0
- data/examples/v2/security-monitoring/AttachJiraIssue_3042842144.rb +30 -0
- data/examples/v2/security-monitoring/CreateCases.rb +56 -0
- data/examples/v2/security-monitoring/CreateCases_2385516013.rb +33 -0
- data/examples/v2/security-monitoring/CreateCases_2798851680.rb +37 -0
- data/examples/v2/security-monitoring/CreateJiraIssues.rb +96 -0
- data/examples/v2/security-monitoring/CreateJiraIssues_379590688.rb +56 -0
- data/examples/v2/security-monitoring/CreateJiraIssues_829823123.rb +64 -0
- data/examples/v2/security-monitoring/DetachCase.rb +21 -0
- data/examples/v2/teams/AddTeamHierarchyLink.rb +31 -0
- data/examples/v2/{team-connections → teams}/CreateTeamConnections.rb +1 -1
- data/examples/v2/{team-connections → teams}/DeleteTeamConnections.rb +1 -1
- data/examples/v2/teams/GetTeamHierarchyLink.rb +8 -0
- data/examples/v2/teams/GetTeamSync.rb +8 -0
- data/examples/v2/{team-connections → teams}/ListTeamConnections.rb +1 -1
- data/examples/v2/{team-connections → teams}/ListTeamConnections_1473516764.rb +1 -1
- data/examples/v2/{team-connections → teams}/ListTeamConnections_2418873869.rb +1 -1
- data/examples/v2/teams/ListTeamHierarchyLinks.rb +15 -0
- data/examples/v2/teams/ListTeamHierarchyLinks_3360757486.rb +5 -0
- data/examples/v2/teams/RemoveTeamHierarchyLink.rb +8 -0
- data/lib/datadog_api_client/configuration.rb +25 -3
- data/lib/datadog_api_client/inflector.rb +141 -3
- data/lib/datadog_api_client/v1/api/monitors_api.rb +2 -0
- data/lib/datadog_api_client/v1/models/monitor.rb +13 -1
- data/lib/datadog_api_client/v1/models/monitor_asset.rb +186 -0
- data/lib/datadog_api_client/v1/models/monitor_asset_category.rb +26 -0
- data/lib/datadog_api_client/v1/models/monitor_asset_resource_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/monitor_update_request.rb +14 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +11 -1
- data/lib/datadog_api_client/v2/api/deployment_gates_api.rb +632 -0
- data/lib/datadog_api_client/v2/api/fleet_automation_api.rb +166 -1
- data/lib/datadog_api_client/v2/api/logs_restriction_queries_api.rb +842 -0
- data/lib/datadog_api_client/v2/api/on_call_api.rb +2 -2
- data/lib/datadog_api_client/v2/api/reference_tables_api.rb +144 -0
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +355 -5
- data/lib/datadog_api_client/v2/api/teams_api.rb +628 -1
- data/lib/datadog_api_client/v2/models/attach_case_request.rb +105 -0
- data/lib/datadog_api_client/v2/models/attach_case_request_data.rb +154 -0
- data/lib/datadog_api_client/v2/models/attach_case_request_data_relationships.rb +123 -0
- data/lib/datadog_api_client/v2/models/attach_jira_issue_request.rb +105 -0
- data/lib/datadog_api_client/v2/models/attach_jira_issue_request_data.rb +153 -0
- data/lib/datadog_api_client/v2/models/attach_jira_issue_request_data_attributes.rb +123 -0
- data/lib/datadog_api_client/v2/models/attach_jira_issue_request_data_relationships.rb +144 -0
- data/lib/datadog_api_client/v2/models/batch_delete_rows_request_array.rb +129 -0
- data/lib/datadog_api_client/v2/models/batch_delete_rows_request_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/batch_upsert_rows_request_array.rb +129 -0
- data/lib/datadog_api_client/v2/models/batch_upsert_rows_request_data.rb +154 -0
- data/lib/datadog_api_client/v2/models/batch_upsert_rows_request_data_attributes.rb +123 -0
- data/lib/datadog_api_client/v2/models/case_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/case_insights_items.rb +125 -0
- data/lib/datadog_api_client/v2/models/case_management_project.rb +123 -0
- data/lib/datadog_api_client/v2/models/case_management_project_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/case_management_project_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/configured_schedule.rb +186 -0
- data/lib/datadog_api_client/v2/models/configured_schedule_target.rb +144 -0
- data/lib/datadog_api_client/v2/models/configured_schedule_target_attributes.rb +123 -0
- data/lib/datadog_api_client/v2/models/configured_schedule_target_relationships.rb +123 -0
- data/lib/datadog_api_client/v2/models/configured_schedule_target_relationships_schedule.rb +123 -0
- data/lib/datadog_api_client/v2/models/configured_schedule_target_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/create_case_request_array.rb +125 -0
- data/lib/datadog_api_client/v2/models/create_case_request_data.rb +153 -0
- data/lib/datadog_api_client/v2/models/create_case_request_data_attributes.rb +135 -0
- data/lib/datadog_api_client/v2/models/create_case_request_data_relationships.rb +144 -0
- data/lib/datadog_api_client/v2/models/create_deployment_gate_params.rb +123 -0
- data/lib/datadog_api_client/v2/models/create_deployment_gate_params_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/create_deployment_gate_params_data_attributes.rb +164 -0
- data/lib/datadog_api_client/v2/models/create_deployment_rule_params.rb +105 -0
- data/lib/datadog_api_client/v2/models/create_deployment_rule_params_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/create_deployment_rule_params_data_attributes.rb +175 -0
- data/lib/datadog_api_client/v2/models/create_jira_issue_request_array.rb +137 -0
- data/lib/datadog_api_client/v2/models/create_jira_issue_request_array_included.rb +64 -0
- data/lib/datadog_api_client/v2/models/create_jira_issue_request_data.rb +153 -0
- data/lib/datadog_api_client/v2/models/create_jira_issue_request_data_attributes.rb +105 -0
- data/lib/datadog_api_client/v2/models/create_jira_issue_request_data_attributes_fields.rb +105 -0
- data/lib/datadog_api_client/v2/models/create_jira_issue_request_data_relationships.rb +123 -0
- data/lib/datadog_api_client/v2/models/create_jira_issue_request_data_relationships_case.rb +123 -0
- data/lib/datadog_api_client/v2/models/create_jira_issue_request_data_relationships_case_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/deployment_gate_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/deployment_gate_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/deployment_gate_response_data.rb +165 -0
- data/lib/datadog_api_client/v2/models/deployment_gate_response_data_attributes.rb +248 -0
- data/lib/datadog_api_client/v2/models/deployment_gate_response_data_attributes_created_by.rb +143 -0
- data/lib/datadog_api_client/v2/models/deployment_gate_response_data_attributes_updated_by.rb +143 -0
- data/lib/datadog_api_client/v2/models/deployment_rule_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/{table_result_v2_data_attributes_file_metadata_local_file.rb → deployment_rule_options_faulty_deployment_detection.rb} +21 -19
- data/lib/datadog_api_client/v2/models/deployment_rule_options_monitor.rb +108 -0
- data/lib/datadog_api_client/v2/models/deployment_rule_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/deployment_rule_response_data.rb +165 -0
- data/lib/datadog_api_client/v2/models/deployment_rule_response_data_attributes.rb +269 -0
- data/lib/datadog_api_client/v2/models/deployment_rule_response_data_attributes_created_by.rb +143 -0
- data/lib/datadog_api_client/v2/models/deployment_rule_response_data_attributes_type.rb +27 -0
- data/lib/datadog_api_client/v2/models/deployment_rule_response_data_attributes_updated_by.rb +143 -0
- data/lib/datadog_api_client/v2/models/deployment_rules_options.rb +63 -0
- data/lib/datadog_api_client/v2/models/detach_case_request.rb +105 -0
- data/lib/datadog_api_client/v2/models/detach_case_request_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/detach_case_request_data_relationships.rb +123 -0
- data/lib/datadog_api_client/v2/models/escalation_policy_create_request_data_attributes.rb +28 -1
- data/lib/datadog_api_client/v2/models/escalation_policy_create_request_data_attributes_steps_items.rb +16 -1
- data/lib/datadog_api_client/v2/models/escalation_policy_data_attributes.rb +20 -1
- data/lib/datadog_api_client/v2/models/escalation_policy_included.rb +3 -2
- data/lib/datadog_api_client/v2/models/escalation_policy_step_target.rb +12 -2
- data/lib/datadog_api_client/v2/models/escalation_policy_step_target_config.rb +105 -0
- data/lib/datadog_api_client/v2/models/escalation_policy_step_target_config_schedule.rb +105 -0
- data/lib/datadog_api_client/v2/models/escalation_policy_update_request_data_attributes.rb +28 -1
- data/lib/datadog_api_client/v2/models/escalation_policy_update_request_data_attributes_steps_items.rb +16 -1
- data/lib/datadog_api_client/v2/models/escalation_target.rb +3 -2
- data/lib/datadog_api_client/v2/models/finding_case_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/finding_case_response_array.rb +125 -0
- data/lib/datadog_api_client/v2/models/finding_case_response_data.rb +153 -0
- data/lib/datadog_api_client/v2/models/finding_case_response_data_attributes.rb +277 -0
- data/lib/datadog_api_client/v2/models/finding_case_response_data_relationships.rb +125 -0
- data/lib/datadog_api_client/v2/models/finding_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/finding_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/finding_jira_issue.rb +125 -0
- data/lib/datadog_api_client/v2/models/finding_jira_issue_result.rb +135 -0
- data/lib/datadog_api_client/v2/models/findings.rb +107 -0
- data/lib/datadog_api_client/v2/models/fleet_agent_attributes.rb +327 -0
- data/lib/datadog_api_client/v2/models/fleet_agent_attributes_tags_items.rb +115 -0
- data/lib/datadog_api_client/v2/models/fleet_agent_info.rb +165 -0
- data/lib/datadog_api_client/v2/models/fleet_agent_info_attributes.rb +137 -0
- data/lib/datadog_api_client/v2/models/fleet_agent_info_details.rb +403 -0
- data/lib/datadog_api_client/v2/models/fleet_agent_info_resource_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/fleet_agent_info_response.rb +123 -0
- data/lib/datadog_api_client/v2/models/fleet_agents_response.rb +133 -0
- data/lib/datadog_api_client/v2/models/fleet_agents_response_data.rb +165 -0
- data/lib/datadog_api_client/v2/models/fleet_agents_response_data_attributes.rb +107 -0
- data/lib/datadog_api_client/v2/models/fleet_agents_response_meta.rb +105 -0
- data/lib/datadog_api_client/v2/models/fleet_configuration_file.rb +125 -0
- data/lib/datadog_api_client/v2/models/fleet_configuration_layer.rb +155 -0
- data/lib/datadog_api_client/v2/models/fleet_detected_integration.rb +115 -0
- data/lib/datadog_api_client/v2/models/fleet_integration_details.rb +197 -0
- data/lib/datadog_api_client/v2/models/fleet_integrations_by_status.rb +165 -0
- data/lib/datadog_api_client/v2/models/httpcd_gates_bad_request_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/httpcd_gates_not_found_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/httpcd_rules_not_found_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/jira_issues_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/layer_attributes.rb +13 -3
- data/lib/datadog_api_client/v2/models/logs_restriction_queries_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/monitor_notification_rule_attributes.rb +2 -2
- data/lib/datadog_api_client/v2/models/monitor_notification_rule_condition.rb +1 -1
- data/lib/datadog_api_client/v2/models/monitor_notification_rule_conditional_recipients.rb +2 -2
- data/lib/datadog_api_client/v2/models/monitor_notification_rule_filter.rb +2 -1
- data/lib/datadog_api_client/v2/models/monitor_notification_rule_filter_scope.rb +106 -0
- data/lib/datadog_api_client/v2/models/monitor_notification_rule_filter_tags.rb +2 -2
- data/lib/datadog_api_client/v2/models/monitor_notification_rule_response_attributes.rb +2 -2
- data/lib/datadog_api_client/v2/models/observability_pipeline_google_chronicle_destination.rb +1 -12
- data/lib/datadog_api_client/v2/models/observability_pipeline_google_cloud_storage_destination.rb +2 -24
- data/lib/datadog_api_client/v2/models/observability_pipeline_google_pub_sub_source.rb +1 -12
- data/lib/datadog_api_client/v2/models/relationship_to_user_team_permission.rb +8 -0
- data/lib/datadog_api_client/v2/models/restriction_query_attributes.rb +165 -0
- data/lib/datadog_api_client/v2/models/restriction_query_create_attributes.rb +123 -0
- data/lib/datadog_api_client/v2/models/restriction_query_create_data.rb +115 -0
- data/lib/datadog_api_client/v2/models/restriction_query_create_payload.rb +105 -0
- data/lib/datadog_api_client/v2/models/restriction_query_list_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/restriction_query_response_included_item.rb +62 -0
- data/lib/datadog_api_client/v2/models/restriction_query_role.rb +165 -0
- data/lib/datadog_api_client/v2/models/restriction_query_role_attribute.rb +105 -0
- data/lib/datadog_api_client/v2/models/restriction_query_roles_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/restriction_query_update_attributes.rb +123 -0
- data/lib/datadog_api_client/v2/models/restriction_query_update_data.rb +115 -0
- data/lib/datadog_api_client/v2/models/restriction_query_update_payload.rb +105 -0
- data/lib/datadog_api_client/v2/models/restriction_query_with_relationships.rb +135 -0
- data/lib/datadog_api_client/v2/models/restriction_query_with_relationships_response.rb +117 -0
- data/lib/datadog_api_client/v2/models/restriction_query_without_relationships.rb +125 -0
- data/lib/datadog_api_client/v2/models/restriction_query_without_relationships_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items.rb +13 -3
- data/lib/datadog_api_client/v2/models/schedule_target.rb +1 -1
- data/lib/datadog_api_client/v2/models/schedule_target_position.rb +28 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items.rb +13 -3
- data/lib/datadog_api_client/v2/models/table_result_v2_data_attributes.rb +8 -0
- data/lib/datadog_api_client/v2/models/table_result_v2_data_attributes_file_metadata.rb +101 -36
- data/lib/datadog_api_client/v2/models/team_attributes.rb +13 -1
- data/lib/datadog_api_client/v2/models/team_hierarchy_link.rb +175 -0
- data/lib/datadog_api_client/v2/models/team_hierarchy_link_attributes.rb +144 -0
- data/lib/datadog_api_client/v2/models/team_hierarchy_link_create.rb +144 -0
- data/lib/datadog_api_client/v2/models/team_hierarchy_link_create_relationships.rb +144 -0
- data/lib/datadog_api_client/v2/models/team_hierarchy_link_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/team_hierarchy_link_create_team.rb +144 -0
- data/lib/datadog_api_client/v2/models/team_hierarchy_link_create_team_relationship.rb +123 -0
- data/lib/datadog_api_client/v2/models/team_hierarchy_link_relationships.rb +144 -0
- data/lib/datadog_api_client/v2/models/team_hierarchy_link_response.rb +127 -0
- data/lib/datadog_api_client/v2/models/team_hierarchy_link_team.rb +154 -0
- data/lib/datadog_api_client/v2/models/team_hierarchy_link_team_attributes.rb +223 -0
- data/lib/datadog_api_client/v2/models/team_hierarchy_link_team_relationship.rb +123 -0
- data/lib/datadog_api_client/v2/models/team_hierarchy_link_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/team_hierarchy_links_response.rb +139 -0
- data/lib/datadog_api_client/v2/models/team_sync_attributes.rb +22 -2
- data/lib/datadog_api_client/v2/models/team_sync_attributes_frequency.rb +28 -0
- data/lib/datadog_api_client/v2/models/team_sync_attributes_type.rb +2 -1
- data/lib/datadog_api_client/v2/models/team_sync_data.rb +12 -2
- data/lib/datadog_api_client/v2/models/team_sync_request.rb +1 -1
- data/lib/datadog_api_client/v2/models/team_sync_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/teams_hierarchy_links_response_links.rb +156 -0
- data/lib/datadog_api_client/v2/models/teams_hierarchy_links_response_meta.rb +105 -0
- data/lib/datadog_api_client/v2/models/teams_hierarchy_links_response_meta_page.rb +184 -0
- data/lib/datadog_api_client/v2/models/threat_hunting_job_response_attributes.rb +13 -3
- data/lib/datadog_api_client/v2/models/update_deployment_gate_params.rb +123 -0
- data/lib/datadog_api_client/v2/models/update_deployment_gate_params_data.rb +165 -0
- data/lib/datadog_api_client/v2/models/update_deployment_gate_params_data_attributes.rb +123 -0
- data/lib/datadog_api_client/v2/models/update_deployment_rule_params.rb +123 -0
- data/lib/datadog_api_client/v2/models/update_deployment_rule_params_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/update_deployment_rule_params_data_attributes.rb +165 -0
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +190 -9
- data/lib/datadog_api_client/v2/api/team_connections_api.rb +0 -272
- data/lib/datadog_api_client/v2/models/table_result_v2_data_attributes_file_metadata_cloud_storage.rb +0 -138
|
@@ -0,0 +1,632 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V2 Collection
|
|
3
|
+
|
|
4
|
+
#Collection of all Datadog Public endpoints.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@datadoghq.com
|
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
|
9
|
+
|
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
|
13
|
+
|
|
14
|
+
=end
|
|
15
|
+
|
|
16
|
+
require 'cgi'
|
|
17
|
+
|
|
18
|
+
module DatadogAPIClient::V2
|
|
19
|
+
class DeploymentGatesAPI
|
|
20
|
+
attr_accessor :api_client
|
|
21
|
+
|
|
22
|
+
def initialize(api_client = DatadogAPIClient::APIClient.default)
|
|
23
|
+
@api_client = api_client
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Create deployment gate.
|
|
27
|
+
#
|
|
28
|
+
# @see #create_deployment_gate_with_http_info
|
|
29
|
+
def create_deployment_gate(body, opts = {})
|
|
30
|
+
data, _status_code, _headers = create_deployment_gate_with_http_info(body, opts)
|
|
31
|
+
data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Create deployment gate.
|
|
35
|
+
#
|
|
36
|
+
# Endpoint to create a deployment gate.
|
|
37
|
+
#
|
|
38
|
+
# @param body [CreateDeploymentGateParams]
|
|
39
|
+
# @param opts [Hash] the optional parameters
|
|
40
|
+
# @return [Array<(DeploymentGateResponse, Integer, Hash)>] DeploymentGateResponse data, response status code and response headers
|
|
41
|
+
def create_deployment_gate_with_http_info(body, opts = {})
|
|
42
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.create_deployment_gate".to_sym]
|
|
43
|
+
if unstable_enabled
|
|
44
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_deployment_gate")
|
|
45
|
+
else
|
|
46
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_deployment_gate"))
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
if @api_client.config.debugging
|
|
50
|
+
@api_client.config.logger.debug 'Calling API: DeploymentGatesAPI.create_deployment_gate ...'
|
|
51
|
+
end
|
|
52
|
+
# verify the required parameter 'body' is set
|
|
53
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
54
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling DeploymentGatesAPI.create_deployment_gate"
|
|
55
|
+
end
|
|
56
|
+
# resource path
|
|
57
|
+
local_var_path = '/api/v2/deployment_gates'
|
|
58
|
+
|
|
59
|
+
# query parameters
|
|
60
|
+
query_params = opts[:query_params] || {}
|
|
61
|
+
|
|
62
|
+
# header parameters
|
|
63
|
+
header_params = opts[:header_params] || {}
|
|
64
|
+
# HTTP header 'Accept' (if needed)
|
|
65
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
66
|
+
# HTTP header 'Content-Type'
|
|
67
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
68
|
+
|
|
69
|
+
# form parameters
|
|
70
|
+
form_params = opts[:form_params] || {}
|
|
71
|
+
|
|
72
|
+
# http body (model)
|
|
73
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
74
|
+
|
|
75
|
+
# return_type
|
|
76
|
+
return_type = opts[:debug_return_type] || 'DeploymentGateResponse'
|
|
77
|
+
|
|
78
|
+
# auth_names
|
|
79
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
80
|
+
|
|
81
|
+
new_options = opts.merge(
|
|
82
|
+
:operation => :create_deployment_gate,
|
|
83
|
+
:header_params => header_params,
|
|
84
|
+
:query_params => query_params,
|
|
85
|
+
:form_params => form_params,
|
|
86
|
+
:body => post_body,
|
|
87
|
+
:auth_names => auth_names,
|
|
88
|
+
:return_type => return_type,
|
|
89
|
+
:api_version => "V2"
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
|
93
|
+
if @api_client.config.debugging
|
|
94
|
+
@api_client.config.logger.debug "API called: DeploymentGatesAPI#create_deployment_gate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
95
|
+
end
|
|
96
|
+
return data, status_code, headers
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Create deployment rule.
|
|
100
|
+
#
|
|
101
|
+
# @see #create_deployment_rule_with_http_info
|
|
102
|
+
def create_deployment_rule(gate_id, body, opts = {})
|
|
103
|
+
data, _status_code, _headers = create_deployment_rule_with_http_info(gate_id, body, opts)
|
|
104
|
+
data
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Create deployment rule.
|
|
108
|
+
#
|
|
109
|
+
# Endpoint to create a deployment rule. A gate for the rule must already exist.
|
|
110
|
+
#
|
|
111
|
+
# @param gate_id [String] The ID of the deployment gate.
|
|
112
|
+
# @param body [CreateDeploymentRuleParams]
|
|
113
|
+
# @param opts [Hash] the optional parameters
|
|
114
|
+
# @return [Array<(DeploymentRuleResponse, Integer, Hash)>] DeploymentRuleResponse data, response status code and response headers
|
|
115
|
+
def create_deployment_rule_with_http_info(gate_id, body, opts = {})
|
|
116
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.create_deployment_rule".to_sym]
|
|
117
|
+
if unstable_enabled
|
|
118
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_deployment_rule")
|
|
119
|
+
else
|
|
120
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_deployment_rule"))
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if @api_client.config.debugging
|
|
124
|
+
@api_client.config.logger.debug 'Calling API: DeploymentGatesAPI.create_deployment_rule ...'
|
|
125
|
+
end
|
|
126
|
+
# verify the required parameter 'gate_id' is set
|
|
127
|
+
if @api_client.config.client_side_validation && gate_id.nil?
|
|
128
|
+
fail ArgumentError, "Missing the required parameter 'gate_id' when calling DeploymentGatesAPI.create_deployment_rule"
|
|
129
|
+
end
|
|
130
|
+
# verify the required parameter 'body' is set
|
|
131
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
132
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling DeploymentGatesAPI.create_deployment_rule"
|
|
133
|
+
end
|
|
134
|
+
# resource path
|
|
135
|
+
local_var_path = '/api/v2/deployment_gates/{gate_id}/rules'.sub('{gate_id}', CGI.escape(gate_id.to_s).gsub('%2F', '/'))
|
|
136
|
+
|
|
137
|
+
# query parameters
|
|
138
|
+
query_params = opts[:query_params] || {}
|
|
139
|
+
|
|
140
|
+
# header parameters
|
|
141
|
+
header_params = opts[:header_params] || {}
|
|
142
|
+
# HTTP header 'Accept' (if needed)
|
|
143
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
144
|
+
# HTTP header 'Content-Type'
|
|
145
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
146
|
+
|
|
147
|
+
# form parameters
|
|
148
|
+
form_params = opts[:form_params] || {}
|
|
149
|
+
|
|
150
|
+
# http body (model)
|
|
151
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
152
|
+
|
|
153
|
+
# return_type
|
|
154
|
+
return_type = opts[:debug_return_type] || 'DeploymentRuleResponse'
|
|
155
|
+
|
|
156
|
+
# auth_names
|
|
157
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
158
|
+
|
|
159
|
+
new_options = opts.merge(
|
|
160
|
+
:operation => :create_deployment_rule,
|
|
161
|
+
:header_params => header_params,
|
|
162
|
+
:query_params => query_params,
|
|
163
|
+
:form_params => form_params,
|
|
164
|
+
:body => post_body,
|
|
165
|
+
:auth_names => auth_names,
|
|
166
|
+
:return_type => return_type,
|
|
167
|
+
:api_version => "V2"
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
|
171
|
+
if @api_client.config.debugging
|
|
172
|
+
@api_client.config.logger.debug "API called: DeploymentGatesAPI#create_deployment_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
173
|
+
end
|
|
174
|
+
return data, status_code, headers
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Delete deployment gate.
|
|
178
|
+
#
|
|
179
|
+
# @see #delete_deployment_gate_with_http_info
|
|
180
|
+
def delete_deployment_gate(id, opts = {})
|
|
181
|
+
delete_deployment_gate_with_http_info(id, opts)
|
|
182
|
+
nil
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Delete deployment gate.
|
|
186
|
+
#
|
|
187
|
+
# Endpoint to delete a deployment gate. Rules associated with the gate are also deleted.
|
|
188
|
+
#
|
|
189
|
+
# @param id [String] The ID of the deployment gate.
|
|
190
|
+
# @param opts [Hash] the optional parameters
|
|
191
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
192
|
+
def delete_deployment_gate_with_http_info(id, opts = {})
|
|
193
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.delete_deployment_gate".to_sym]
|
|
194
|
+
if unstable_enabled
|
|
195
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_deployment_gate")
|
|
196
|
+
else
|
|
197
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_deployment_gate"))
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
if @api_client.config.debugging
|
|
201
|
+
@api_client.config.logger.debug 'Calling API: DeploymentGatesAPI.delete_deployment_gate ...'
|
|
202
|
+
end
|
|
203
|
+
# verify the required parameter 'id' is set
|
|
204
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
205
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling DeploymentGatesAPI.delete_deployment_gate"
|
|
206
|
+
end
|
|
207
|
+
# resource path
|
|
208
|
+
local_var_path = '/api/v2/deployment_gates/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/'))
|
|
209
|
+
|
|
210
|
+
# query parameters
|
|
211
|
+
query_params = opts[:query_params] || {}
|
|
212
|
+
|
|
213
|
+
# header parameters
|
|
214
|
+
header_params = opts[:header_params] || {}
|
|
215
|
+
# HTTP header 'Accept' (if needed)
|
|
216
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
217
|
+
|
|
218
|
+
# form parameters
|
|
219
|
+
form_params = opts[:form_params] || {}
|
|
220
|
+
|
|
221
|
+
# http body (model)
|
|
222
|
+
post_body = opts[:debug_body]
|
|
223
|
+
|
|
224
|
+
# return_type
|
|
225
|
+
return_type = opts[:debug_return_type]
|
|
226
|
+
|
|
227
|
+
# auth_names
|
|
228
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
229
|
+
|
|
230
|
+
new_options = opts.merge(
|
|
231
|
+
:operation => :delete_deployment_gate,
|
|
232
|
+
:header_params => header_params,
|
|
233
|
+
:query_params => query_params,
|
|
234
|
+
:form_params => form_params,
|
|
235
|
+
:body => post_body,
|
|
236
|
+
:auth_names => auth_names,
|
|
237
|
+
:return_type => return_type,
|
|
238
|
+
:api_version => "V2"
|
|
239
|
+
)
|
|
240
|
+
|
|
241
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
|
|
242
|
+
if @api_client.config.debugging
|
|
243
|
+
@api_client.config.logger.debug "API called: DeploymentGatesAPI#delete_deployment_gate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
244
|
+
end
|
|
245
|
+
return data, status_code, headers
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Delete deployment rule.
|
|
249
|
+
#
|
|
250
|
+
# @see #delete_deployment_rule_with_http_info
|
|
251
|
+
def delete_deployment_rule(gate_id, id, opts = {})
|
|
252
|
+
delete_deployment_rule_with_http_info(gate_id, id, opts)
|
|
253
|
+
nil
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Delete deployment rule.
|
|
257
|
+
#
|
|
258
|
+
# Endpoint to delete a deployment rule.
|
|
259
|
+
#
|
|
260
|
+
# @param gate_id [String] The ID of the deployment gate.
|
|
261
|
+
# @param id [String] The ID of the deployment rule.
|
|
262
|
+
# @param opts [Hash] the optional parameters
|
|
263
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
264
|
+
def delete_deployment_rule_with_http_info(gate_id, id, opts = {})
|
|
265
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.delete_deployment_rule".to_sym]
|
|
266
|
+
if unstable_enabled
|
|
267
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_deployment_rule")
|
|
268
|
+
else
|
|
269
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_deployment_rule"))
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
if @api_client.config.debugging
|
|
273
|
+
@api_client.config.logger.debug 'Calling API: DeploymentGatesAPI.delete_deployment_rule ...'
|
|
274
|
+
end
|
|
275
|
+
# verify the required parameter 'gate_id' is set
|
|
276
|
+
if @api_client.config.client_side_validation && gate_id.nil?
|
|
277
|
+
fail ArgumentError, "Missing the required parameter 'gate_id' when calling DeploymentGatesAPI.delete_deployment_rule"
|
|
278
|
+
end
|
|
279
|
+
# verify the required parameter 'id' is set
|
|
280
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
281
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling DeploymentGatesAPI.delete_deployment_rule"
|
|
282
|
+
end
|
|
283
|
+
# resource path
|
|
284
|
+
local_var_path = '/api/v2/deployment_gates/{gate_id}/rules/{id}'.sub('{gate_id}', CGI.escape(gate_id.to_s).gsub('%2F', '/')).sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/'))
|
|
285
|
+
|
|
286
|
+
# query parameters
|
|
287
|
+
query_params = opts[:query_params] || {}
|
|
288
|
+
|
|
289
|
+
# header parameters
|
|
290
|
+
header_params = opts[:header_params] || {}
|
|
291
|
+
# HTTP header 'Accept' (if needed)
|
|
292
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
293
|
+
|
|
294
|
+
# form parameters
|
|
295
|
+
form_params = opts[:form_params] || {}
|
|
296
|
+
|
|
297
|
+
# http body (model)
|
|
298
|
+
post_body = opts[:debug_body]
|
|
299
|
+
|
|
300
|
+
# return_type
|
|
301
|
+
return_type = opts[:debug_return_type]
|
|
302
|
+
|
|
303
|
+
# auth_names
|
|
304
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
305
|
+
|
|
306
|
+
new_options = opts.merge(
|
|
307
|
+
:operation => :delete_deployment_rule,
|
|
308
|
+
:header_params => header_params,
|
|
309
|
+
:query_params => query_params,
|
|
310
|
+
:form_params => form_params,
|
|
311
|
+
:body => post_body,
|
|
312
|
+
:auth_names => auth_names,
|
|
313
|
+
:return_type => return_type,
|
|
314
|
+
:api_version => "V2"
|
|
315
|
+
)
|
|
316
|
+
|
|
317
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
|
|
318
|
+
if @api_client.config.debugging
|
|
319
|
+
@api_client.config.logger.debug "API called: DeploymentGatesAPI#delete_deployment_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
320
|
+
end
|
|
321
|
+
return data, status_code, headers
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
# Get deployment gate.
|
|
325
|
+
#
|
|
326
|
+
# @see #get_deployment_gate_with_http_info
|
|
327
|
+
def get_deployment_gate(id, opts = {})
|
|
328
|
+
data, _status_code, _headers = get_deployment_gate_with_http_info(id, opts)
|
|
329
|
+
data
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
# Get deployment gate.
|
|
333
|
+
#
|
|
334
|
+
# Endpoint to get a deployment gate.
|
|
335
|
+
#
|
|
336
|
+
# @param id [String] The ID of the deployment gate.
|
|
337
|
+
# @param opts [Hash] the optional parameters
|
|
338
|
+
# @return [Array<(DeploymentGateResponse, Integer, Hash)>] DeploymentGateResponse data, response status code and response headers
|
|
339
|
+
def get_deployment_gate_with_http_info(id, opts = {})
|
|
340
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.get_deployment_gate".to_sym]
|
|
341
|
+
if unstable_enabled
|
|
342
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_deployment_gate")
|
|
343
|
+
else
|
|
344
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_deployment_gate"))
|
|
345
|
+
end
|
|
346
|
+
|
|
347
|
+
if @api_client.config.debugging
|
|
348
|
+
@api_client.config.logger.debug 'Calling API: DeploymentGatesAPI.get_deployment_gate ...'
|
|
349
|
+
end
|
|
350
|
+
# verify the required parameter 'id' is set
|
|
351
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
352
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling DeploymentGatesAPI.get_deployment_gate"
|
|
353
|
+
end
|
|
354
|
+
# resource path
|
|
355
|
+
local_var_path = '/api/v2/deployment_gates/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/'))
|
|
356
|
+
|
|
357
|
+
# query parameters
|
|
358
|
+
query_params = opts[:query_params] || {}
|
|
359
|
+
|
|
360
|
+
# header parameters
|
|
361
|
+
header_params = opts[:header_params] || {}
|
|
362
|
+
# HTTP header 'Accept' (if needed)
|
|
363
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
364
|
+
|
|
365
|
+
# form parameters
|
|
366
|
+
form_params = opts[:form_params] || {}
|
|
367
|
+
|
|
368
|
+
# http body (model)
|
|
369
|
+
post_body = opts[:debug_body]
|
|
370
|
+
|
|
371
|
+
# return_type
|
|
372
|
+
return_type = opts[:debug_return_type] || 'DeploymentGateResponse'
|
|
373
|
+
|
|
374
|
+
# auth_names
|
|
375
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
376
|
+
|
|
377
|
+
new_options = opts.merge(
|
|
378
|
+
:operation => :get_deployment_gate,
|
|
379
|
+
:header_params => header_params,
|
|
380
|
+
:query_params => query_params,
|
|
381
|
+
:form_params => form_params,
|
|
382
|
+
:body => post_body,
|
|
383
|
+
:auth_names => auth_names,
|
|
384
|
+
:return_type => return_type,
|
|
385
|
+
:api_version => "V2"
|
|
386
|
+
)
|
|
387
|
+
|
|
388
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
389
|
+
if @api_client.config.debugging
|
|
390
|
+
@api_client.config.logger.debug "API called: DeploymentGatesAPI#get_deployment_gate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
391
|
+
end
|
|
392
|
+
return data, status_code, headers
|
|
393
|
+
end
|
|
394
|
+
|
|
395
|
+
# Get deployment rule.
|
|
396
|
+
#
|
|
397
|
+
# @see #get_deployment_rule_with_http_info
|
|
398
|
+
def get_deployment_rule(gate_id, id, opts = {})
|
|
399
|
+
data, _status_code, _headers = get_deployment_rule_with_http_info(gate_id, id, opts)
|
|
400
|
+
data
|
|
401
|
+
end
|
|
402
|
+
|
|
403
|
+
# Get deployment rule.
|
|
404
|
+
#
|
|
405
|
+
# Endpoint to get a deployment rule.
|
|
406
|
+
#
|
|
407
|
+
# @param gate_id [String] The ID of the deployment gate.
|
|
408
|
+
# @param id [String] The ID of the deployment rule.
|
|
409
|
+
# @param opts [Hash] the optional parameters
|
|
410
|
+
# @return [Array<(DeploymentRuleResponse, Integer, Hash)>] DeploymentRuleResponse data, response status code and response headers
|
|
411
|
+
def get_deployment_rule_with_http_info(gate_id, id, opts = {})
|
|
412
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.get_deployment_rule".to_sym]
|
|
413
|
+
if unstable_enabled
|
|
414
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_deployment_rule")
|
|
415
|
+
else
|
|
416
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_deployment_rule"))
|
|
417
|
+
end
|
|
418
|
+
|
|
419
|
+
if @api_client.config.debugging
|
|
420
|
+
@api_client.config.logger.debug 'Calling API: DeploymentGatesAPI.get_deployment_rule ...'
|
|
421
|
+
end
|
|
422
|
+
# verify the required parameter 'gate_id' is set
|
|
423
|
+
if @api_client.config.client_side_validation && gate_id.nil?
|
|
424
|
+
fail ArgumentError, "Missing the required parameter 'gate_id' when calling DeploymentGatesAPI.get_deployment_rule"
|
|
425
|
+
end
|
|
426
|
+
# verify the required parameter 'id' is set
|
|
427
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
428
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling DeploymentGatesAPI.get_deployment_rule"
|
|
429
|
+
end
|
|
430
|
+
# resource path
|
|
431
|
+
local_var_path = '/api/v2/deployment_gates/{gate_id}/rules/{id}'.sub('{gate_id}', CGI.escape(gate_id.to_s).gsub('%2F', '/')).sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/'))
|
|
432
|
+
|
|
433
|
+
# query parameters
|
|
434
|
+
query_params = opts[:query_params] || {}
|
|
435
|
+
|
|
436
|
+
# header parameters
|
|
437
|
+
header_params = opts[:header_params] || {}
|
|
438
|
+
# HTTP header 'Accept' (if needed)
|
|
439
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
440
|
+
|
|
441
|
+
# form parameters
|
|
442
|
+
form_params = opts[:form_params] || {}
|
|
443
|
+
|
|
444
|
+
# http body (model)
|
|
445
|
+
post_body = opts[:debug_body]
|
|
446
|
+
|
|
447
|
+
# return_type
|
|
448
|
+
return_type = opts[:debug_return_type] || 'DeploymentRuleResponse'
|
|
449
|
+
|
|
450
|
+
# auth_names
|
|
451
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
452
|
+
|
|
453
|
+
new_options = opts.merge(
|
|
454
|
+
:operation => :get_deployment_rule,
|
|
455
|
+
:header_params => header_params,
|
|
456
|
+
:query_params => query_params,
|
|
457
|
+
:form_params => form_params,
|
|
458
|
+
:body => post_body,
|
|
459
|
+
:auth_names => auth_names,
|
|
460
|
+
:return_type => return_type,
|
|
461
|
+
:api_version => "V2"
|
|
462
|
+
)
|
|
463
|
+
|
|
464
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
465
|
+
if @api_client.config.debugging
|
|
466
|
+
@api_client.config.logger.debug "API called: DeploymentGatesAPI#get_deployment_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
467
|
+
end
|
|
468
|
+
return data, status_code, headers
|
|
469
|
+
end
|
|
470
|
+
|
|
471
|
+
# Update deployment gate.
|
|
472
|
+
#
|
|
473
|
+
# @see #update_deployment_gate_with_http_info
|
|
474
|
+
def update_deployment_gate(id, body, opts = {})
|
|
475
|
+
data, _status_code, _headers = update_deployment_gate_with_http_info(id, body, opts)
|
|
476
|
+
data
|
|
477
|
+
end
|
|
478
|
+
|
|
479
|
+
# Update deployment gate.
|
|
480
|
+
#
|
|
481
|
+
# Endpoint to update a deployment gate.
|
|
482
|
+
#
|
|
483
|
+
# @param id [String] The ID of the deployment gate.
|
|
484
|
+
# @param body [UpdateDeploymentGateParams]
|
|
485
|
+
# @param opts [Hash] the optional parameters
|
|
486
|
+
# @return [Array<(DeploymentGateResponse, Integer, Hash)>] DeploymentGateResponse data, response status code and response headers
|
|
487
|
+
def update_deployment_gate_with_http_info(id, body, opts = {})
|
|
488
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.update_deployment_gate".to_sym]
|
|
489
|
+
if unstable_enabled
|
|
490
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_deployment_gate")
|
|
491
|
+
else
|
|
492
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_deployment_gate"))
|
|
493
|
+
end
|
|
494
|
+
|
|
495
|
+
if @api_client.config.debugging
|
|
496
|
+
@api_client.config.logger.debug 'Calling API: DeploymentGatesAPI.update_deployment_gate ...'
|
|
497
|
+
end
|
|
498
|
+
# verify the required parameter 'id' is set
|
|
499
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
500
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling DeploymentGatesAPI.update_deployment_gate"
|
|
501
|
+
end
|
|
502
|
+
# verify the required parameter 'body' is set
|
|
503
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
504
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling DeploymentGatesAPI.update_deployment_gate"
|
|
505
|
+
end
|
|
506
|
+
# resource path
|
|
507
|
+
local_var_path = '/api/v2/deployment_gates/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/'))
|
|
508
|
+
|
|
509
|
+
# query parameters
|
|
510
|
+
query_params = opts[:query_params] || {}
|
|
511
|
+
|
|
512
|
+
# header parameters
|
|
513
|
+
header_params = opts[:header_params] || {}
|
|
514
|
+
# HTTP header 'Accept' (if needed)
|
|
515
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
516
|
+
# HTTP header 'Content-Type'
|
|
517
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
518
|
+
|
|
519
|
+
# form parameters
|
|
520
|
+
form_params = opts[:form_params] || {}
|
|
521
|
+
|
|
522
|
+
# http body (model)
|
|
523
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
524
|
+
|
|
525
|
+
# return_type
|
|
526
|
+
return_type = opts[:debug_return_type] || 'DeploymentGateResponse'
|
|
527
|
+
|
|
528
|
+
# auth_names
|
|
529
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
530
|
+
|
|
531
|
+
new_options = opts.merge(
|
|
532
|
+
:operation => :update_deployment_gate,
|
|
533
|
+
:header_params => header_params,
|
|
534
|
+
:query_params => query_params,
|
|
535
|
+
:form_params => form_params,
|
|
536
|
+
:body => post_body,
|
|
537
|
+
:auth_names => auth_names,
|
|
538
|
+
:return_type => return_type,
|
|
539
|
+
:api_version => "V2"
|
|
540
|
+
)
|
|
541
|
+
|
|
542
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options)
|
|
543
|
+
if @api_client.config.debugging
|
|
544
|
+
@api_client.config.logger.debug "API called: DeploymentGatesAPI#update_deployment_gate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
545
|
+
end
|
|
546
|
+
return data, status_code, headers
|
|
547
|
+
end
|
|
548
|
+
|
|
549
|
+
# Update deployment rule.
|
|
550
|
+
#
|
|
551
|
+
# @see #update_deployment_rule_with_http_info
|
|
552
|
+
def update_deployment_rule(gate_id, id, body, opts = {})
|
|
553
|
+
data, _status_code, _headers = update_deployment_rule_with_http_info(gate_id, id, body, opts)
|
|
554
|
+
data
|
|
555
|
+
end
|
|
556
|
+
|
|
557
|
+
# Update deployment rule.
|
|
558
|
+
#
|
|
559
|
+
# Endpoint to update a deployment rule.
|
|
560
|
+
#
|
|
561
|
+
# @param gate_id [String] The ID of the deployment gate.
|
|
562
|
+
# @param id [String] The ID of the deployment rule.
|
|
563
|
+
# @param body [UpdateDeploymentRuleParams]
|
|
564
|
+
# @param opts [Hash] the optional parameters
|
|
565
|
+
# @return [Array<(DeploymentRuleResponse, Integer, Hash)>] DeploymentRuleResponse data, response status code and response headers
|
|
566
|
+
def update_deployment_rule_with_http_info(gate_id, id, body, opts = {})
|
|
567
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.update_deployment_rule".to_sym]
|
|
568
|
+
if unstable_enabled
|
|
569
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_deployment_rule")
|
|
570
|
+
else
|
|
571
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_deployment_rule"))
|
|
572
|
+
end
|
|
573
|
+
|
|
574
|
+
if @api_client.config.debugging
|
|
575
|
+
@api_client.config.logger.debug 'Calling API: DeploymentGatesAPI.update_deployment_rule ...'
|
|
576
|
+
end
|
|
577
|
+
# verify the required parameter 'gate_id' is set
|
|
578
|
+
if @api_client.config.client_side_validation && gate_id.nil?
|
|
579
|
+
fail ArgumentError, "Missing the required parameter 'gate_id' when calling DeploymentGatesAPI.update_deployment_rule"
|
|
580
|
+
end
|
|
581
|
+
# verify the required parameter 'id' is set
|
|
582
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
583
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling DeploymentGatesAPI.update_deployment_rule"
|
|
584
|
+
end
|
|
585
|
+
# verify the required parameter 'body' is set
|
|
586
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
587
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling DeploymentGatesAPI.update_deployment_rule"
|
|
588
|
+
end
|
|
589
|
+
# resource path
|
|
590
|
+
local_var_path = '/api/v2/deployment_gates/{gate_id}/rules/{id}'.sub('{gate_id}', CGI.escape(gate_id.to_s).gsub('%2F', '/')).sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/'))
|
|
591
|
+
|
|
592
|
+
# query parameters
|
|
593
|
+
query_params = opts[:query_params] || {}
|
|
594
|
+
|
|
595
|
+
# header parameters
|
|
596
|
+
header_params = opts[:header_params] || {}
|
|
597
|
+
# HTTP header 'Accept' (if needed)
|
|
598
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
599
|
+
# HTTP header 'Content-Type'
|
|
600
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
601
|
+
|
|
602
|
+
# form parameters
|
|
603
|
+
form_params = opts[:form_params] || {}
|
|
604
|
+
|
|
605
|
+
# http body (model)
|
|
606
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
607
|
+
|
|
608
|
+
# return_type
|
|
609
|
+
return_type = opts[:debug_return_type] || 'DeploymentRuleResponse'
|
|
610
|
+
|
|
611
|
+
# auth_names
|
|
612
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
613
|
+
|
|
614
|
+
new_options = opts.merge(
|
|
615
|
+
:operation => :update_deployment_rule,
|
|
616
|
+
:header_params => header_params,
|
|
617
|
+
:query_params => query_params,
|
|
618
|
+
:form_params => form_params,
|
|
619
|
+
:body => post_body,
|
|
620
|
+
:auth_names => auth_names,
|
|
621
|
+
:return_type => return_type,
|
|
622
|
+
:api_version => "V2"
|
|
623
|
+
)
|
|
624
|
+
|
|
625
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options)
|
|
626
|
+
if @api_client.config.debugging
|
|
627
|
+
@api_client.config.logger.debug "API called: DeploymentGatesAPI#update_deployment_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
628
|
+
end
|
|
629
|
+
return data, status_code, headers
|
|
630
|
+
end
|
|
631
|
+
end
|
|
632
|
+
end
|