datadog_api_client 2.17.0 → 2.19.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/.apigentools-info +4 -4
- data/.generator/conftest.py +1 -1
- data/.generator/poetry.lock +69 -69
- data/.generator/schemas/v1/openapi.yaml +334 -16
- data/.generator/schemas/v2/openapi.yaml +2864 -470
- data/.generator/src/generator/cli.py +5 -0
- data/.generator/src/generator/templates/datadog_api_client.j2 +19 -0
- data/.generator/src/generator/templates/model_generic.j2 +2 -2
- data/.pre-commit-config.yaml +1 -1
- data/CHANGELOG.md +43 -0
- data/examples/v1/aws-integration/CreateAWSAccount.rb +2 -2
- data/examples/v1/aws-integration/DeleteAWSAccount.rb +1 -1
- data/examples/v1/aws-integration/UpdateAWSAccount.rb +6 -6
- data/examples/v1/azure-integration/CreateAzureIntegration.rb +5 -4
- data/examples/v1/azure-integration/DeleteAzureIntegration.rb +2 -14
- data/examples/v1/azure-integration/UpdateAzureHostFilters.rb +1 -0
- data/examples/v1/azure-integration/UpdateAzureIntegration.rb +5 -4
- data/examples/v1/dashboards/CreateDashboard_1284514532.rb +3 -0
- data/examples/v1/gcp-integration/CreateGCPIntegration.rb +4 -5
- data/examples/v1/gcp-integration/DeleteGCPIntegration.rb +2 -14
- data/examples/v1/gcp-integration/UpdateGCPIntegration.rb +4 -5
- data/examples/v1/service-level-objectives/CreateSLO_3765703239.rb +46 -0
- data/examples/v1/synthetics/PatchTest.rb +22 -0
- data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.rb +0 -3
- data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.rb +0 -3
- data/examples/v2/cloud-cost-management/CreateCostAWSCURConfig.rb +18 -0
- data/examples/v2/cloud-cost-management/CreateCostAzureUCConfigs.rb +29 -0
- data/examples/v2/cloud-cost-management/DeleteCostAWSCURConfig.rb +5 -0
- data/examples/v2/cloud-cost-management/DeleteCostAzureUCConfig.rb +5 -0
- data/examples/v2/cloud-cost-management/GetCloudCostActivity.rb +5 -0
- data/examples/v2/cloud-cost-management/ListAWSRelatedAccounts.rb +5 -0
- data/examples/v2/cloud-cost-management/ListCostAWSCURConfigs.rb +5 -0
- data/examples/v2/cloud-cost-management/ListCostAzureUCConfigs.rb +5 -0
- data/examples/v2/cloud-cost-management/UpdateCostAWSCURConfig.rb +14 -0
- data/examples/v2/cloud-cost-management/UpdateCostAzureUCConfigs.rb +14 -0
- data/examples/v2/cloudflare-integration/CreateCloudflareAccount.rb +1 -1
- data/examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb +4 -1
- data/examples/v2/container-images/ListContainerImages.rb +0 -3
- data/examples/v2/container-images/ListContainerImages_3088586393.rb +0 -3
- data/examples/v2/container-images/ListContainerImages_3974828736.rb +0 -3
- data/examples/v2/containers/ListContainers.rb +0 -3
- data/examples/v2/containers/ListContainers_2175733917.rb +0 -3
- data/examples/v2/containers/ListContainers_931009654.rb +0 -3
- data/examples/v2/dora-metrics/CreateDORADeployment.rb +23 -0
- data/examples/v2/dora-metrics/CreateDORAIncident.rb +25 -0
- data/examples/v2/downtimes/ListMonitorDowntimes_3316718253.rb +5 -0
- data/examples/v2/events/ListEvents.rb +0 -3
- data/examples/v2/events/ListEvents_1527584014.rb +0 -3
- data/examples/v2/events/ListEvents_2663715109.rb +0 -3
- data/examples/v2/events/SearchEvents.rb +0 -3
- data/examples/v2/events/SearchEvents_3856995058.rb +0 -3
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_130557025.rb +16 -0
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_2597004741.rb +16 -0
- data/examples/v2/gcp-integration/CreateGCPSTSAccount_4235664992.rb +17 -0
- data/examples/v2/gcp-integration/UpdateGCPSTSAccount_3205636354.rb +19 -0
- data/examples/v2/okta-integration/CreateOktaAccount.rb +19 -0
- data/examples/v2/okta-integration/DeleteOktaAccount.rb +5 -0
- data/examples/v2/okta-integration/GetOktaAccount.rb +8 -0
- data/examples/v2/okta-integration/ListOktaAccounts.rb +5 -0
- data/examples/v2/okta-integration/UpdateOktaAccount.rb +20 -0
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_3367706049.rb +46 -0
- data/examples/v2/sensitive-data-scanner/CreateScanningRule.rb +7 -0
- data/examples/v2/sensitive-data-scanner/UpdateScanningRule.rb +7 -10
- data/examples/v2/teams/CreateTeamMembership.rb +6 -0
- data/examples/v2/usage-metering/GetActiveBillingDimensions.rb +8 -0
- data/examples/v2/usage-metering/GetMonthlyCostAttribution.rb +8 -0
- data/examples/v2/usage-metering/GetProjectedCost.rb +8 -0
- data/lib/datadog_api_client/configuration.rb +4 -5
- data/lib/datadog_api_client/inflector.rb +113 -0
- data/lib/datadog_api_client/v1/api/downtimes_api.rb +28 -7
- data/lib/datadog_api_client/v1/api/hosts_api.rb +1 -1
- data/lib/datadog_api_client/v1/api/monitors_api.rb +1 -1
- data/lib/datadog_api_client/v1/api/synthetics_api.rb +73 -1
- data/lib/datadog_api_client/v1/models/azure_account.rb +13 -2
- data/lib/datadog_api_client/v1/models/gcp_account.rb +22 -2
- data/lib/datadog_api_client/v1/models/organization.rb +1 -1
- data/lib/datadog_api_client/v1/models/service_level_objective.rb +11 -1
- data/lib/datadog_api_client/v1/models/service_level_objective_request.rb +11 -1
- data/lib/datadog_api_client/v1/models/slo_data_source_query_definition.rb +62 -0
- data/lib/datadog_api_client/v1/models/slo_formula.rb +98 -0
- data/lib/datadog_api_client/v1/models/slo_response_data.rb +11 -1
- data/lib/datadog_api_client/v1/models/slo_sli_spec.rb +62 -0
- data/lib/datadog_api_client/v1/models/slo_time_slice_comparator.rb +29 -0
- data/lib/datadog_api_client/v1/models/slo_time_slice_condition.rb +141 -0
- data/lib/datadog_api_client/v1/models/slo_time_slice_query.rb +131 -0
- data/lib/datadog_api_client/v1/models/slo_time_slice_spec.rb +99 -0
- data/lib/datadog_api_client/v1/models/slo_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/slo_type_numeric.rb +1 -0
- data/lib/datadog_api_client/v1/models/synthetics_patch_test_body.rb +82 -0
- data/lib/datadog_api_client/v1/models/synthetics_patch_test_operation.rb +100 -0
- data/lib/datadog_api_client/v1/models/synthetics_patch_test_operation_name.rb +31 -0
- 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 +31 -1
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +31 -1
- data/lib/datadog_api_client/v1/models/widget_live_span.rb +2 -0
- data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +0 -6
- data/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb +680 -0
- data/lib/datadog_api_client/v2/api/container_images_api.rb +0 -6
- data/lib/datadog_api_client/v2/api/containers_api.rb +0 -6
- data/lib/datadog_api_client/v2/api/dora_metrics_api.rb +181 -0
- data/lib/datadog_api_client/v2/api/downtimes_api.rb +25 -0
- data/lib/datadog_api_client/v2/api/events_api.rb +0 -12
- data/lib/datadog_api_client/v2/api/metrics_api.rb +3 -2
- data/lib/datadog_api_client/v2/api/okta_integration_api.rb +355 -0
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +241 -0
- data/lib/datadog_api_client/v2/models/active_billing_dimensions_attributes.rb +92 -0
- data/lib/datadog_api_client/v2/models/active_billing_dimensions_body.rb +100 -0
- data/lib/datadog_api_client/v2/models/active_billing_dimensions_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/active_billing_dimensions_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/api_keys_response.rb +14 -4
- data/lib/datadog_api_client/v2/models/api_keys_response_meta.rb +90 -0
- data/lib/datadog_api_client/v2/models/api_keys_response_meta_page.rb +80 -0
- data/lib/datadog_api_client/v2/models/application_key_response_meta.rb +90 -0
- data/lib/datadog_api_client/v2/models/application_key_response_meta_page.rb +80 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config.rb +129 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_attributes.rb +305 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_patch_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_patch_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_patch_request_attributes.rb +98 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_patch_request_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_post_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_post_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_post_request_attributes.rb +202 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_post_request_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/aws_cur_config_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/aws_cur_configs_response.rb +82 -0
- data/lib/datadog_api_client/v2/models/aws_related_account.rb +129 -0
- data/lib/datadog_api_client/v2/models/aws_related_account_attributes.rb +90 -0
- data/lib/datadog_api_client/v2/models/aws_related_account_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/aws_related_accounts_response.rb +82 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config.rb +378 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_pair.rb +129 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_pair_attributes.rb +110 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_pair_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_pairs_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_patch_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_patch_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_patch_request_attributes.rb +98 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_patch_request_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_post_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_post_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_post_request_attributes.rb +192 -0
- data/lib/datadog_api_client/v2/models/azure_uc_config_post_request_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/azure_uc_configs_response.rb +82 -0
- data/lib/datadog_api_client/v2/models/bill_config.rb +161 -0
- data/lib/datadog_api_client/v2/models/ci_app_git_info.rb +2 -2
- data/lib/datadog_api_client/v2/models/cloud_cost_activity.rb +119 -0
- data/lib/datadog_api_client/v2/models/cloud_cost_activity_attributes.rb +98 -0
- data/lib/datadog_api_client/v2/models/cloud_cost_activity_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/cloud_cost_activity_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb +13 -1
- data/lib/datadog_api_client/v2/models/cloudflare_account_create_request_attributes.rb +28 -4
- data/lib/datadog_api_client/v2/models/cloudflare_account_response_attributes.rb +28 -4
- data/lib/datadog_api_client/v2/models/cloudflare_account_update_request_attributes.rb +28 -4
- data/lib/datadog_api_client/v2/models/cost_attribution_aggregates_body.rb +100 -0
- data/lib/datadog_api_client/v2/models/cost_attribution_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +170 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_request_data.rb +98 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_response.rb +98 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_response_data.rb +108 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/dora_git_info.rb +125 -0
- data/lib/datadog_api_client/v2/models/dora_incident_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb +179 -0
- data/lib/datadog_api_client/v2/models/dora_incident_request_data.rb +98 -0
- data/lib/datadog_api_client/v2/models/dora_incident_response.rb +98 -0
- data/lib/datadog_api_client/v2/models/dora_incident_response_data.rb +108 -0
- data/lib/datadog_api_client/v2/models/dora_incident_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/full_api_key_attributes.rb +24 -4
- data/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb +25 -5
- data/lib/datadog_api_client/v2/models/incident_attachment_link_attributes.rb +14 -4
- data/lib/datadog_api_client/v2/models/incident_create_relationships.rb +9 -19
- data/lib/datadog_api_client/v2/models/incident_impacts_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_integration_metadata_attributes.rb +21 -1
- data/lib/datadog_api_client/v2/models/incident_integration_metadata_response_data.rb +11 -1
- data/lib/datadog_api_client/v2/models/incident_integration_relationships.rb +90 -0
- data/lib/datadog_api_client/v2/models/incident_non_datadog_creator.rb +90 -0
- data/lib/datadog_api_client/v2/models/incident_responders_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +69 -4
- data/lib/datadog_api_client/v2/models/incident_response_relationships.rb +42 -4
- data/lib/datadog_api_client/v2/models/incident_severity.rb +31 -0
- data/lib/datadog_api_client/v2/models/incident_todo_attributes.rb +24 -4
- data/lib/datadog_api_client/v2/models/incident_todo_relationships.rb +90 -0
- data/lib/datadog_api_client/v2/models/incident_todo_response_data.rb +11 -1
- data/lib/datadog_api_client/v2/models/incident_update_relationships.rb +8 -0
- data/lib/datadog_api_client/v2/models/incident_user_defined_field_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/list_application_keys_response.rb +14 -4
- data/lib/datadog_api_client/v2/models/monthly_cost_attribution_attributes.rb +151 -0
- data/lib/datadog_api_client/v2/models/monthly_cost_attribution_body.rb +100 -0
- data/lib/datadog_api_client/v2/models/monthly_cost_attribution_meta.rb +92 -0
- data/lib/datadog_api_client/v2/models/monthly_cost_attribution_pagination.rb +88 -0
- data/lib/datadog_api_client/v2/models/monthly_cost_attribution_response.rb +92 -0
- data/lib/datadog_api_client/v2/models/okta_account.rb +129 -0
- data/lib/datadog_api_client/v2/models/okta_account_attributes.rb +170 -0
- data/lib/datadog_api_client/v2/models/okta_account_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/okta_account_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/okta_account_response_data.rb +140 -0
- data/lib/datadog_api_client/v2/models/okta_account_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/okta_account_update_request.rb +98 -0
- data/lib/datadog_api_client/v2/models/okta_account_update_request_attributes.rb +149 -0
- data/lib/datadog_api_client/v2/models/okta_account_update_request_data.rb +90 -0
- data/lib/datadog_api_client/v2/models/okta_accounts_response.rb +82 -0
- data/lib/datadog_api_client/v2/models/partial_api_key_attributes.rb +24 -4
- data/lib/datadog_api_client/v2/models/powerpack_relationships.rb +2 -2
- data/lib/datadog_api_client/v2/models/powerpacks_response_meta_pagination.rb +8 -0
- data/lib/datadog_api_client/v2/models/projected_cost.rb +100 -0
- data/lib/datadog_api_client/v2/models/projected_cost_attributes.rb +132 -0
- data/lib/datadog_api_client/v2/models/projected_cost_response.rb +82 -0
- data/lib/datadog_api_client/v2/models/projected_cost_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_impact_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_impacts.rb +100 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_responder_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_responders.rb +100 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_user_defined_field_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_user_defined_fields.rb +100 -0
- data/lib/datadog_api_client/v2/models/relationship_to_user_team_team.rb +98 -0
- data/lib/datadog_api_client/v2/models/relationship_to_user_team_team_data.rb +119 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb +14 -4
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_third_party_options.rb +114 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_type_create.rb +1 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb +13 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +13 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +13 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_third_party_root_query.rb +92 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_third_party_rule_case.rb +112 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_third_party_rule_case_create.rb +130 -0
- data/lib/datadog_api_client/v2/models/sensitive_data_scanner_included_keyword_configuration.rb +134 -0
- data/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_attributes.rb +46 -1
- data/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_attributes.rb +45 -1
- data/lib/datadog_api_client/v2/models/sort_direction.rb +27 -0
- data/lib/datadog_api_client/v2/models/user_team_attributes.rb +24 -1
- data/lib/datadog_api_client/v2/models/user_team_relationships.rb +11 -1
- data/lib/datadog_api_client/v2/models/user_team_team_type.rb +26 -0
- data/lib/datadog_api_client/version.rb +1 -1
- data/lib/datadog_api_client.rb +16 -1
- metadata +144 -2
|
@@ -43,12 +43,6 @@ module DatadogAPIClient::V2
|
|
|
43
43
|
# @option opts [String] :page_cursor String to query the next page of results. This key is provided with each valid response from the API in `meta.pagination.next_cursor`.
|
|
44
44
|
# @return [Array<(ContainersResponse, Integer, Hash)>] ContainersResponse data, response status code and response headers
|
|
45
45
|
def list_containers_with_http_info(opts = {})
|
|
46
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.list_containers".to_sym]
|
|
47
|
-
if unstable_enabled
|
|
48
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_containers")
|
|
49
|
-
else
|
|
50
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_containers"))
|
|
51
|
-
end
|
|
52
46
|
|
|
53
47
|
if @api_client.config.debugging
|
|
54
48
|
@api_client.config.logger.debug 'Calling API: ContainersAPI.list_containers ...'
|
|
@@ -0,0 +1,181 @@
|
|
|
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 DORAMetricsAPI
|
|
20
|
+
attr_accessor :api_client
|
|
21
|
+
|
|
22
|
+
def initialize(api_client = DatadogAPIClient::APIClient.default)
|
|
23
|
+
@api_client = api_client
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Send a deployment event for DORA Metrics.
|
|
27
|
+
#
|
|
28
|
+
# @see #create_dora_deployment_with_http_info
|
|
29
|
+
def create_dora_deployment(body, opts = {})
|
|
30
|
+
data, _status_code, _headers = create_dora_deployment_with_http_info(body, opts)
|
|
31
|
+
data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Send a deployment event for DORA Metrics.
|
|
35
|
+
#
|
|
36
|
+
# Use this API endpoint to provide data about deployments for DORA metrics.
|
|
37
|
+
#
|
|
38
|
+
# This is necessary for:
|
|
39
|
+
# - Deployment Frequency
|
|
40
|
+
# - Change Lead Time
|
|
41
|
+
# - Change Failure Rate
|
|
42
|
+
#
|
|
43
|
+
# @param body [DORADeploymentRequest]
|
|
44
|
+
# @param opts [Hash] the optional parameters
|
|
45
|
+
# @return [Array<(DORADeploymentResponse, Integer, Hash)>] DORADeploymentResponse data, response status code and response headers
|
|
46
|
+
def create_dora_deployment_with_http_info(body, opts = {})
|
|
47
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.create_dora_deployment".to_sym]
|
|
48
|
+
if unstable_enabled
|
|
49
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_dora_deployment")
|
|
50
|
+
else
|
|
51
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_dora_deployment"))
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
if @api_client.config.debugging
|
|
55
|
+
@api_client.config.logger.debug 'Calling API: DORAMetricsAPI.create_dora_deployment ...'
|
|
56
|
+
end
|
|
57
|
+
# verify the required parameter 'body' is set
|
|
58
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
59
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling DORAMetricsAPI.create_dora_deployment"
|
|
60
|
+
end
|
|
61
|
+
# resource path
|
|
62
|
+
local_var_path = '/api/v2/dora/deployment'
|
|
63
|
+
|
|
64
|
+
# query parameters
|
|
65
|
+
query_params = opts[:query_params] || {}
|
|
66
|
+
|
|
67
|
+
# header parameters
|
|
68
|
+
header_params = opts[:header_params] || {}
|
|
69
|
+
# HTTP header 'Accept' (if needed)
|
|
70
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
71
|
+
# HTTP header 'Content-Type'
|
|
72
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
73
|
+
|
|
74
|
+
# form parameters
|
|
75
|
+
form_params = opts[:form_params] || {}
|
|
76
|
+
|
|
77
|
+
# http body (model)
|
|
78
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
79
|
+
|
|
80
|
+
# return_type
|
|
81
|
+
return_type = opts[:debug_return_type] || 'DORADeploymentResponse'
|
|
82
|
+
|
|
83
|
+
# auth_names
|
|
84
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth]
|
|
85
|
+
|
|
86
|
+
new_options = opts.merge(
|
|
87
|
+
:operation => :create_dora_deployment,
|
|
88
|
+
:header_params => header_params,
|
|
89
|
+
:query_params => query_params,
|
|
90
|
+
:form_params => form_params,
|
|
91
|
+
:body => post_body,
|
|
92
|
+
:auth_names => auth_names,
|
|
93
|
+
:return_type => return_type,
|
|
94
|
+
:api_version => "V2"
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
|
98
|
+
if @api_client.config.debugging
|
|
99
|
+
@api_client.config.logger.debug "API called: DORAMetricsAPI#create_dora_deployment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
100
|
+
end
|
|
101
|
+
return data, status_code, headers
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Send an incident event for DORA Metrics.
|
|
105
|
+
#
|
|
106
|
+
# @see #create_dora_incident_with_http_info
|
|
107
|
+
def create_dora_incident(body, opts = {})
|
|
108
|
+
data, _status_code, _headers = create_dora_incident_with_http_info(body, opts)
|
|
109
|
+
data
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Send an incident event for DORA Metrics.
|
|
113
|
+
#
|
|
114
|
+
# Use this API endpoint to provide data about incidents for DORA metrics.
|
|
115
|
+
#
|
|
116
|
+
# This is necessary for:
|
|
117
|
+
# - Change Failure Rate
|
|
118
|
+
# - Time to Restore
|
|
119
|
+
#
|
|
120
|
+
# @param body [DORAIncidentRequest]
|
|
121
|
+
# @param opts [Hash] the optional parameters
|
|
122
|
+
# @return [Array<(DORAIncidentResponse, Integer, Hash)>] DORAIncidentResponse data, response status code and response headers
|
|
123
|
+
def create_dora_incident_with_http_info(body, opts = {})
|
|
124
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.create_dora_incident".to_sym]
|
|
125
|
+
if unstable_enabled
|
|
126
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_dora_incident")
|
|
127
|
+
else
|
|
128
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_dora_incident"))
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if @api_client.config.debugging
|
|
132
|
+
@api_client.config.logger.debug 'Calling API: DORAMetricsAPI.create_dora_incident ...'
|
|
133
|
+
end
|
|
134
|
+
# verify the required parameter 'body' is set
|
|
135
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
136
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling DORAMetricsAPI.create_dora_incident"
|
|
137
|
+
end
|
|
138
|
+
# resource path
|
|
139
|
+
local_var_path = '/api/v2/dora/incident'
|
|
140
|
+
|
|
141
|
+
# query parameters
|
|
142
|
+
query_params = opts[:query_params] || {}
|
|
143
|
+
|
|
144
|
+
# header parameters
|
|
145
|
+
header_params = opts[:header_params] || {}
|
|
146
|
+
# HTTP header 'Accept' (if needed)
|
|
147
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
148
|
+
# HTTP header 'Content-Type'
|
|
149
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
150
|
+
|
|
151
|
+
# form parameters
|
|
152
|
+
form_params = opts[:form_params] || {}
|
|
153
|
+
|
|
154
|
+
# http body (model)
|
|
155
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
156
|
+
|
|
157
|
+
# return_type
|
|
158
|
+
return_type = opts[:debug_return_type] || 'DORAIncidentResponse'
|
|
159
|
+
|
|
160
|
+
# auth_names
|
|
161
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth]
|
|
162
|
+
|
|
163
|
+
new_options = opts.merge(
|
|
164
|
+
:operation => :create_dora_incident,
|
|
165
|
+
:header_params => header_params,
|
|
166
|
+
:query_params => query_params,
|
|
167
|
+
:form_params => form_params,
|
|
168
|
+
:body => post_body,
|
|
169
|
+
:auth_names => auth_names,
|
|
170
|
+
:return_type => return_type,
|
|
171
|
+
:api_version => "V2"
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
|
175
|
+
if @api_client.config.debugging
|
|
176
|
+
@api_client.config.logger.debug "API called: DORAMetricsAPI#create_dora_incident\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
177
|
+
end
|
|
178
|
+
return data, status_code, headers
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
end
|
|
@@ -325,6 +325,8 @@ module DatadogAPIClient::V2
|
|
|
325
325
|
#
|
|
326
326
|
# @param monitor_id [Integer] The id of the monitor.
|
|
327
327
|
# @param opts [Hash] the optional parameters
|
|
328
|
+
# @option opts [Integer] :page_offset Specific offset to use as the beginning of the returned page.
|
|
329
|
+
# @option opts [Integer] :page_limit Maximum number of downtimes in the response.
|
|
328
330
|
# @return [Array<(MonitorDowntimeMatchResponse, Integer, Hash)>] MonitorDowntimeMatchResponse data, response status code and response headers
|
|
329
331
|
def list_monitor_downtimes_with_http_info(monitor_id, opts = {})
|
|
330
332
|
|
|
@@ -340,6 +342,8 @@ module DatadogAPIClient::V2
|
|
|
340
342
|
|
|
341
343
|
# query parameters
|
|
342
344
|
query_params = opts[:query_params] || {}
|
|
345
|
+
query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].nil?
|
|
346
|
+
query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil?
|
|
343
347
|
|
|
344
348
|
# header parameters
|
|
345
349
|
header_params = opts[:header_params] || {}
|
|
@@ -376,6 +380,27 @@ module DatadogAPIClient::V2
|
|
|
376
380
|
return data, status_code, headers
|
|
377
381
|
end
|
|
378
382
|
|
|
383
|
+
# Get active downtimes for a monitor.
|
|
384
|
+
#
|
|
385
|
+
# Provide a paginated version of {#list_monitor_downtimes}, returning all items.
|
|
386
|
+
#
|
|
387
|
+
# To use it you need to use a block: list_monitor_downtimes_with_pagination { |item| p item }
|
|
388
|
+
#
|
|
389
|
+
# @yield [MonitorDowntimeMatchResponseData] Paginated items
|
|
390
|
+
def list_monitor_downtimes_with_pagination(monitor_id, opts = {})
|
|
391
|
+
api_version = "V2"
|
|
392
|
+
page_size = @api_client.get_attribute_from_path(opts, "page_limit", 30)
|
|
393
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_limit", Integer, page_size)
|
|
394
|
+
while true do
|
|
395
|
+
response = list_monitor_downtimes(monitor_id, opts)
|
|
396
|
+
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
|
397
|
+
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
|
398
|
+
break
|
|
399
|
+
end
|
|
400
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_offset", Integer, @api_client.get_attribute_from_path(opts, "page_offset", 0) + page_size)
|
|
401
|
+
end
|
|
402
|
+
end
|
|
403
|
+
|
|
379
404
|
# Update a downtime.
|
|
380
405
|
#
|
|
381
406
|
# @see #update_downtime_with_http_info
|
|
@@ -47,12 +47,6 @@ module DatadogAPIClient::V2
|
|
|
47
47
|
# @option opts [Integer] :page_limit Maximum number of events in the response.
|
|
48
48
|
# @return [Array<(EventsListResponse, Integer, Hash)>] EventsListResponse data, response status code and response headers
|
|
49
49
|
def list_events_with_http_info(opts = {})
|
|
50
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.list_events".to_sym]
|
|
51
|
-
if unstable_enabled
|
|
52
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_events")
|
|
53
|
-
else
|
|
54
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_events"))
|
|
55
|
-
end
|
|
56
50
|
|
|
57
51
|
if @api_client.config.debugging
|
|
58
52
|
@api_client.config.logger.debug 'Calling API: EventsAPI.list_events ...'
|
|
@@ -151,12 +145,6 @@ module DatadogAPIClient::V2
|
|
|
151
145
|
# @option opts [EventsListRequest] :body
|
|
152
146
|
# @return [Array<(EventsListResponse, Integer, Hash)>] EventsListResponse data, response status code and response headers
|
|
153
147
|
def search_events_with_http_info(opts = {})
|
|
154
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.search_events".to_sym]
|
|
155
|
-
if unstable_enabled
|
|
156
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.search_events")
|
|
157
|
-
else
|
|
158
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.search_events"))
|
|
159
|
-
end
|
|
160
148
|
|
|
161
149
|
if @api_client.config.debugging
|
|
162
150
|
@api_client.config.logger.debug 'Calling API: EventsAPI.search_events ...'
|
|
@@ -541,7 +541,7 @@ module DatadogAPIClient::V2
|
|
|
541
541
|
# @option opts [String] :filter_tags_configured Filter tag configurations by configured tags.
|
|
542
542
|
# @option opts [MetricTagConfigurationMetricTypes] :filter_metric_type Filter metrics by metric type.
|
|
543
543
|
# @option opts [Boolean] :filter_include_percentiles Filter distributions with additional percentile aggregations enabled or disabled.
|
|
544
|
-
# @option opts [Boolean] :filter_queried Filter custom metrics that have or have not been queried in the specified window[seconds]. If no window is provided or the window is less than 2 hours, a default of 2 hours will be applied.
|
|
544
|
+
# @option opts [Boolean] :filter_queried (Beta) Filter custom metrics that have or have not been queried in the specified window[seconds]. If no window is provided or the window is less than 2 hours, a default of 2 hours will be applied.
|
|
545
545
|
# @option opts [String] :filter_tags Filter metrics that have been submitted with the given tags. Supports boolean and wildcard expressions. Can only be combined with the filter[queried] filter.
|
|
546
546
|
# @option opts [Integer] :window_seconds The number of seconds of look back (from now) to apply to a filter[tag] or filter[queried] query. Default value is 3600 (1 hour), maximum value is 2,592,000 (30 days).
|
|
547
547
|
# @return [Array<(MetricsAndMetricTagConfigurationsResponse, Integer, Hash)>] MetricsAndMetricTagConfigurationsResponse data, response status code and response headers
|
|
@@ -980,7 +980,8 @@ module DatadogAPIClient::V2
|
|
|
980
980
|
# Update the tag configuration of a metric or percentile aggregations of a distribution metric or custom aggregations
|
|
981
981
|
# of a count, rate, or gauge metric. By setting `exclude_tags_mode` to true the behavior is changed
|
|
982
982
|
# from an allow-list to a deny-list, and tags in the defined list will not be queryable.
|
|
983
|
-
# Can only be used with application keys from users with the `Manage Tags for Metrics` permission.
|
|
983
|
+
# Can only be used with application keys from users with the `Manage Tags for Metrics` permission. This endpoint requires
|
|
984
|
+
# a tag configuration to be created first.
|
|
984
985
|
#
|
|
985
986
|
# @param metric_name [String] The name of the metric.
|
|
986
987
|
# @param body [MetricTagConfigurationUpdateRequest]
|
|
@@ -0,0 +1,355 @@
|
|
|
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 OktaIntegrationAPI
|
|
20
|
+
attr_accessor :api_client
|
|
21
|
+
|
|
22
|
+
def initialize(api_client = DatadogAPIClient::APIClient.default)
|
|
23
|
+
@api_client = api_client
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Add Okta account.
|
|
27
|
+
#
|
|
28
|
+
# @see #create_okta_account_with_http_info
|
|
29
|
+
def create_okta_account(body, opts = {})
|
|
30
|
+
data, _status_code, _headers = create_okta_account_with_http_info(body, opts)
|
|
31
|
+
data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Add Okta account.
|
|
35
|
+
#
|
|
36
|
+
# Create an Okta account.
|
|
37
|
+
#
|
|
38
|
+
# @param body [OktaAccountRequest]
|
|
39
|
+
# @param opts [Hash] the optional parameters
|
|
40
|
+
# @return [Array<(OktaAccountResponse, Integer, Hash)>] OktaAccountResponse data, response status code and response headers
|
|
41
|
+
def create_okta_account_with_http_info(body, opts = {})
|
|
42
|
+
|
|
43
|
+
if @api_client.config.debugging
|
|
44
|
+
@api_client.config.logger.debug 'Calling API: OktaIntegrationAPI.create_okta_account ...'
|
|
45
|
+
end
|
|
46
|
+
# verify the required parameter 'body' is set
|
|
47
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
48
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling OktaIntegrationAPI.create_okta_account"
|
|
49
|
+
end
|
|
50
|
+
# resource path
|
|
51
|
+
local_var_path = '/api/v2/integrations/okta/accounts'
|
|
52
|
+
|
|
53
|
+
# query parameters
|
|
54
|
+
query_params = opts[:query_params] || {}
|
|
55
|
+
|
|
56
|
+
# header parameters
|
|
57
|
+
header_params = opts[:header_params] || {}
|
|
58
|
+
# HTTP header 'Accept' (if needed)
|
|
59
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
60
|
+
# HTTP header 'Content-Type'
|
|
61
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
62
|
+
|
|
63
|
+
# form parameters
|
|
64
|
+
form_params = opts[:form_params] || {}
|
|
65
|
+
|
|
66
|
+
# http body (model)
|
|
67
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
68
|
+
|
|
69
|
+
# return_type
|
|
70
|
+
return_type = opts[:debug_return_type] || 'OktaAccountResponse'
|
|
71
|
+
|
|
72
|
+
# auth_names
|
|
73
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
74
|
+
|
|
75
|
+
new_options = opts.merge(
|
|
76
|
+
:operation => :create_okta_account,
|
|
77
|
+
:header_params => header_params,
|
|
78
|
+
:query_params => query_params,
|
|
79
|
+
:form_params => form_params,
|
|
80
|
+
:body => post_body,
|
|
81
|
+
:auth_names => auth_names,
|
|
82
|
+
:return_type => return_type,
|
|
83
|
+
:api_version => "V2"
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
|
87
|
+
if @api_client.config.debugging
|
|
88
|
+
@api_client.config.logger.debug "API called: OktaIntegrationAPI#create_okta_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
89
|
+
end
|
|
90
|
+
return data, status_code, headers
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Delete Okta account.
|
|
94
|
+
#
|
|
95
|
+
# @see #delete_okta_account_with_http_info
|
|
96
|
+
def delete_okta_account(account_id, opts = {})
|
|
97
|
+
delete_okta_account_with_http_info(account_id, opts)
|
|
98
|
+
nil
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Delete Okta account.
|
|
102
|
+
#
|
|
103
|
+
# Delete an Okta account.
|
|
104
|
+
#
|
|
105
|
+
# @param account_id [String] None
|
|
106
|
+
# @param opts [Hash] the optional parameters
|
|
107
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
108
|
+
def delete_okta_account_with_http_info(account_id, opts = {})
|
|
109
|
+
|
|
110
|
+
if @api_client.config.debugging
|
|
111
|
+
@api_client.config.logger.debug 'Calling API: OktaIntegrationAPI.delete_okta_account ...'
|
|
112
|
+
end
|
|
113
|
+
# verify the required parameter 'account_id' is set
|
|
114
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
115
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling OktaIntegrationAPI.delete_okta_account"
|
|
116
|
+
end
|
|
117
|
+
# resource path
|
|
118
|
+
local_var_path = '/api/v2/integrations/okta/accounts/{account_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/'))
|
|
119
|
+
|
|
120
|
+
# query parameters
|
|
121
|
+
query_params = opts[:query_params] || {}
|
|
122
|
+
|
|
123
|
+
# header parameters
|
|
124
|
+
header_params = opts[:header_params] || {}
|
|
125
|
+
# HTTP header 'Accept' (if needed)
|
|
126
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
127
|
+
|
|
128
|
+
# form parameters
|
|
129
|
+
form_params = opts[:form_params] || {}
|
|
130
|
+
|
|
131
|
+
# http body (model)
|
|
132
|
+
post_body = opts[:debug_body]
|
|
133
|
+
|
|
134
|
+
# return_type
|
|
135
|
+
return_type = opts[:debug_return_type]
|
|
136
|
+
|
|
137
|
+
# auth_names
|
|
138
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
139
|
+
|
|
140
|
+
new_options = opts.merge(
|
|
141
|
+
:operation => :delete_okta_account,
|
|
142
|
+
:header_params => header_params,
|
|
143
|
+
:query_params => query_params,
|
|
144
|
+
:form_params => form_params,
|
|
145
|
+
:body => post_body,
|
|
146
|
+
:auth_names => auth_names,
|
|
147
|
+
:return_type => return_type,
|
|
148
|
+
:api_version => "V2"
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
|
|
152
|
+
if @api_client.config.debugging
|
|
153
|
+
@api_client.config.logger.debug "API called: OktaIntegrationAPI#delete_okta_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
154
|
+
end
|
|
155
|
+
return data, status_code, headers
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Get Okta account.
|
|
159
|
+
#
|
|
160
|
+
# @see #get_okta_account_with_http_info
|
|
161
|
+
def get_okta_account(account_id, opts = {})
|
|
162
|
+
data, _status_code, _headers = get_okta_account_with_http_info(account_id, opts)
|
|
163
|
+
data
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Get Okta account.
|
|
167
|
+
#
|
|
168
|
+
# Get an Okta account.
|
|
169
|
+
#
|
|
170
|
+
# @param account_id [String] None
|
|
171
|
+
# @param opts [Hash] the optional parameters
|
|
172
|
+
# @return [Array<(OktaAccountResponse, Integer, Hash)>] OktaAccountResponse data, response status code and response headers
|
|
173
|
+
def get_okta_account_with_http_info(account_id, opts = {})
|
|
174
|
+
|
|
175
|
+
if @api_client.config.debugging
|
|
176
|
+
@api_client.config.logger.debug 'Calling API: OktaIntegrationAPI.get_okta_account ...'
|
|
177
|
+
end
|
|
178
|
+
# verify the required parameter 'account_id' is set
|
|
179
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
180
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling OktaIntegrationAPI.get_okta_account"
|
|
181
|
+
end
|
|
182
|
+
# resource path
|
|
183
|
+
local_var_path = '/api/v2/integrations/okta/accounts/{account_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/'))
|
|
184
|
+
|
|
185
|
+
# query parameters
|
|
186
|
+
query_params = opts[:query_params] || {}
|
|
187
|
+
|
|
188
|
+
# header parameters
|
|
189
|
+
header_params = opts[:header_params] || {}
|
|
190
|
+
# HTTP header 'Accept' (if needed)
|
|
191
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
192
|
+
|
|
193
|
+
# form parameters
|
|
194
|
+
form_params = opts[:form_params] || {}
|
|
195
|
+
|
|
196
|
+
# http body (model)
|
|
197
|
+
post_body = opts[:debug_body]
|
|
198
|
+
|
|
199
|
+
# return_type
|
|
200
|
+
return_type = opts[:debug_return_type] || 'OktaAccountResponse'
|
|
201
|
+
|
|
202
|
+
# auth_names
|
|
203
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
204
|
+
|
|
205
|
+
new_options = opts.merge(
|
|
206
|
+
:operation => :get_okta_account,
|
|
207
|
+
:header_params => header_params,
|
|
208
|
+
:query_params => query_params,
|
|
209
|
+
:form_params => form_params,
|
|
210
|
+
:body => post_body,
|
|
211
|
+
:auth_names => auth_names,
|
|
212
|
+
:return_type => return_type,
|
|
213
|
+
:api_version => "V2"
|
|
214
|
+
)
|
|
215
|
+
|
|
216
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
217
|
+
if @api_client.config.debugging
|
|
218
|
+
@api_client.config.logger.debug "API called: OktaIntegrationAPI#get_okta_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
219
|
+
end
|
|
220
|
+
return data, status_code, headers
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# List Okta accounts.
|
|
224
|
+
#
|
|
225
|
+
# @see #list_okta_accounts_with_http_info
|
|
226
|
+
def list_okta_accounts(opts = {})
|
|
227
|
+
data, _status_code, _headers = list_okta_accounts_with_http_info(opts)
|
|
228
|
+
data
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# List Okta accounts.
|
|
232
|
+
#
|
|
233
|
+
# List Okta accounts.
|
|
234
|
+
#
|
|
235
|
+
# @param opts [Hash] the optional parameters
|
|
236
|
+
# @return [Array<(OktaAccountsResponse, Integer, Hash)>] OktaAccountsResponse data, response status code and response headers
|
|
237
|
+
def list_okta_accounts_with_http_info(opts = {})
|
|
238
|
+
|
|
239
|
+
if @api_client.config.debugging
|
|
240
|
+
@api_client.config.logger.debug 'Calling API: OktaIntegrationAPI.list_okta_accounts ...'
|
|
241
|
+
end
|
|
242
|
+
# resource path
|
|
243
|
+
local_var_path = '/api/v2/integrations/okta/accounts'
|
|
244
|
+
|
|
245
|
+
# query parameters
|
|
246
|
+
query_params = opts[:query_params] || {}
|
|
247
|
+
|
|
248
|
+
# header parameters
|
|
249
|
+
header_params = opts[:header_params] || {}
|
|
250
|
+
# HTTP header 'Accept' (if needed)
|
|
251
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
252
|
+
|
|
253
|
+
# form parameters
|
|
254
|
+
form_params = opts[:form_params] || {}
|
|
255
|
+
|
|
256
|
+
# http body (model)
|
|
257
|
+
post_body = opts[:debug_body]
|
|
258
|
+
|
|
259
|
+
# return_type
|
|
260
|
+
return_type = opts[:debug_return_type] || 'OktaAccountsResponse'
|
|
261
|
+
|
|
262
|
+
# auth_names
|
|
263
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
264
|
+
|
|
265
|
+
new_options = opts.merge(
|
|
266
|
+
:operation => :list_okta_accounts,
|
|
267
|
+
:header_params => header_params,
|
|
268
|
+
:query_params => query_params,
|
|
269
|
+
:form_params => form_params,
|
|
270
|
+
:body => post_body,
|
|
271
|
+
:auth_names => auth_names,
|
|
272
|
+
:return_type => return_type,
|
|
273
|
+
:api_version => "V2"
|
|
274
|
+
)
|
|
275
|
+
|
|
276
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
277
|
+
if @api_client.config.debugging
|
|
278
|
+
@api_client.config.logger.debug "API called: OktaIntegrationAPI#list_okta_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
279
|
+
end
|
|
280
|
+
return data, status_code, headers
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
# Update Okta account.
|
|
284
|
+
#
|
|
285
|
+
# @see #update_okta_account_with_http_info
|
|
286
|
+
def update_okta_account(account_id, body, opts = {})
|
|
287
|
+
data, _status_code, _headers = update_okta_account_with_http_info(account_id, body, opts)
|
|
288
|
+
data
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
# Update Okta account.
|
|
292
|
+
#
|
|
293
|
+
# Update an Okta account.
|
|
294
|
+
#
|
|
295
|
+
# @param account_id [String] None
|
|
296
|
+
# @param body [OktaAccountUpdateRequest]
|
|
297
|
+
# @param opts [Hash] the optional parameters
|
|
298
|
+
# @return [Array<(OktaAccountResponse, Integer, Hash)>] OktaAccountResponse data, response status code and response headers
|
|
299
|
+
def update_okta_account_with_http_info(account_id, body, opts = {})
|
|
300
|
+
|
|
301
|
+
if @api_client.config.debugging
|
|
302
|
+
@api_client.config.logger.debug 'Calling API: OktaIntegrationAPI.update_okta_account ...'
|
|
303
|
+
end
|
|
304
|
+
# verify the required parameter 'account_id' is set
|
|
305
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
306
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling OktaIntegrationAPI.update_okta_account"
|
|
307
|
+
end
|
|
308
|
+
# verify the required parameter 'body' is set
|
|
309
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
310
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling OktaIntegrationAPI.update_okta_account"
|
|
311
|
+
end
|
|
312
|
+
# resource path
|
|
313
|
+
local_var_path = '/api/v2/integrations/okta/accounts/{account_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/'))
|
|
314
|
+
|
|
315
|
+
# query parameters
|
|
316
|
+
query_params = opts[:query_params] || {}
|
|
317
|
+
|
|
318
|
+
# header parameters
|
|
319
|
+
header_params = opts[:header_params] || {}
|
|
320
|
+
# HTTP header 'Accept' (if needed)
|
|
321
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
322
|
+
# HTTP header 'Content-Type'
|
|
323
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
324
|
+
|
|
325
|
+
# form parameters
|
|
326
|
+
form_params = opts[:form_params] || {}
|
|
327
|
+
|
|
328
|
+
# http body (model)
|
|
329
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
330
|
+
|
|
331
|
+
# return_type
|
|
332
|
+
return_type = opts[:debug_return_type] || 'OktaAccountResponse'
|
|
333
|
+
|
|
334
|
+
# auth_names
|
|
335
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
336
|
+
|
|
337
|
+
new_options = opts.merge(
|
|
338
|
+
:operation => :update_okta_account,
|
|
339
|
+
:header_params => header_params,
|
|
340
|
+
:query_params => query_params,
|
|
341
|
+
:form_params => form_params,
|
|
342
|
+
:body => post_body,
|
|
343
|
+
:auth_names => auth_names,
|
|
344
|
+
:return_type => return_type,
|
|
345
|
+
:api_version => "V2"
|
|
346
|
+
)
|
|
347
|
+
|
|
348
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
|
|
349
|
+
if @api_client.config.debugging
|
|
350
|
+
@api_client.config.logger.debug "API called: OktaIntegrationAPI#update_okta_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
351
|
+
end
|
|
352
|
+
return data, status_code, headers
|
|
353
|
+
end
|
|
354
|
+
end
|
|
355
|
+
end
|