From 39c99a863e9117aedf9aab5b664de6e1cc041eb7 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 10 Jan 2025 21:32:17 +0000 Subject: [PATCH] Regenerate client from commit cf3ae49b of spec repo --- .apigentools-info | 8 +- .generator/schemas/v2/openapi.yaml | 3 +- .../v1_aws-integration_CreateAWSAccount.rs | 1 + ...-integration_CreateAWSEventBridgeSource.rs | 1 + .../v1_aws-integration_CreateAWSTagFilter.rs | 1 + ..._aws-integration_CreateNewAWSExternalID.rs | 1 + .../v1_aws-integration_DeleteAWSAccount.rs | 1 + ...-integration_DeleteAWSEventBridgeSource.rs | 1 + .../v1_aws-integration_DeleteAWSTagFilter.rs | 1 + .../v1_aws-integration_UpdateAWSAccount.rs | 1 + ...ogs-integration_CheckAWSLogsLambdaAsync.rs | 1 + ...s-integration_CheckAWSLogsServicesAsync.rs | 1 + ...aws-logs-integration_CreateAWSLambdaARN.rs | 1 + ...aws-logs-integration_DeleteAWSLambdaARN.rs | 1 + ...s-logs-integration_EnableAWSLogServices.rs | 1 + ...zure-integration_CreateAzureIntegration.rs | 1 + ...zure-integration_DeleteAzureIntegration.rs | 1 + ...zure-integration_UpdateAzureHostFilters.rs | 1 + ...zure-integration_UpdateAzureIntegration.rs | 1 + .../v1_dashboard-lists_CreateDashboardList.rs | 1 + .../v1_dashboard-lists_DeleteDashboardList.rs | 1 + .../v1_dashboard-lists_GetDashboardList.rs | 1 + .../v1_dashboard-lists_UpdateDashboardList.rs | 1 + examples/v1_dashboards_CreateDashboard.rs | 1 + ...1_dashboards_CreateDashboard_1024858348.rs | 51 +----- ...1_dashboards_CreateDashboard_1039800684.rs | 1 + ...v1_dashboards_CreateDashboard_109450134.rs | 1 + ...1_dashboards_CreateDashboard_1094917386.rs | 1 + ...1_dashboards_CreateDashboard_1177423752.rs | 1 + ...1_dashboards_CreateDashboard_1200099236.rs | 1 + ...1_dashboards_CreateDashboard_1213075383.rs | 75 +------- ...1_dashboards_CreateDashboard_1284514532.rs | 55 +----- ...1_dashboards_CreateDashboard_1307120899.rs | 66 +------ ...1_dashboards_CreateDashboard_1413226400.rs | 76 +------- ...1_dashboards_CreateDashboard_1423904722.rs | 1 + ...1_dashboards_CreateDashboard_1433408735.rs | 48 +---- ...1_dashboards_CreateDashboard_1442588603.rs | 63 +------ ...v1_dashboards_CreateDashboard_145494973.rs | 46 +---- ...v1_dashboards_CreateDashboard_173805046.rs | 1 + ...1_dashboards_CreateDashboard_1738608750.rs | 1 + ...1_dashboards_CreateDashboard_1754992756.rs | 1 + ...1_dashboards_CreateDashboard_1877023900.rs | 1 + ...1_dashboards_CreateDashboard_2029850837.rs | 1 + ...1_dashboards_CreateDashboard_2034634967.rs | 1 + ...1_dashboards_CreateDashboard_2064651578.rs | 60 +----- ...1_dashboards_CreateDashboard_2104498738.rs | 64 +------ ...1_dashboards_CreateDashboard_2261785072.rs | 61 +------ ...1_dashboards_CreateDashboard_2278756614.rs | 79 +------- ...1_dashboards_CreateDashboard_2308247857.rs | 1 + ...1_dashboards_CreateDashboard_2316374332.rs | 1 + ...1_dashboards_CreateDashboard_2336428357.rs | 68 +------ ...1_dashboards_CreateDashboard_2338918735.rs | 1 + ...1_dashboards_CreateDashboard_2342457693.rs | 81 +-------- ...1_dashboards_CreateDashboard_2349863258.rs | 45 +---- ...1_dashboards_CreateDashboard_2361531620.rs | 1 + ...1_dashboards_CreateDashboard_2432046716.rs | 1 + ...1_dashboards_CreateDashboard_2490110261.rs | 45 +---- ...v1_dashboards_CreateDashboard_252716965.rs | 63 +------ ...1_dashboards_CreateDashboard_2563642929.rs | 75 +------- ...1_dashboards_CreateDashboard_2607944105.rs | 1 + ...1_dashboards_CreateDashboard_2610827685.rs | 1 + ...1_dashboards_CreateDashboard_2618036642.rs | 1 + ...1_dashboards_CreateDashboard_2634813877.rs | 1 + ...1_dashboards_CreateDashboard_2644712913.rs | 43 +---- ...1_dashboards_CreateDashboard_2652180930.rs | 1 + ...1_dashboards_CreateDashboard_2705593938.rs | 41 +---- ...1_dashboards_CreateDashboard_2800096921.rs | 66 +------ ...1_dashboards_CreateDashboard_2843286292.rs | 1 + ...1_dashboards_CreateDashboard_2850365602.rs | 4 +- ...1_dashboards_CreateDashboard_2917274132.rs | 1 + ...1_dashboards_CreateDashboard_2921337351.rs | 1 + ...1_dashboards_CreateDashboard_3066042014.rs | 76 +------- ...1_dashboards_CreateDashboard_3117424216.rs | 1 + ...1_dashboards_CreateDashboard_3195475781.rs | 1 + ...1_dashboards_CreateDashboard_3250131584.rs | 1 + ...1_dashboards_CreateDashboard_3298564989.rs | 1 + ...1_dashboards_CreateDashboard_3451918078.rs | 76 +------- ...1_dashboards_CreateDashboard_3513586382.rs | 1 + ...1_dashboards_CreateDashboard_3562282606.rs | 4 +- ...1_dashboards_CreateDashboard_3669695268.rs | 1 + ...1_dashboards_CreateDashboard_3777304439.rs | 44 +---- ...1_dashboards_CreateDashboard_3882428227.rs | 64 +------ ...1_dashboards_CreateDashboard_3982498788.rs | 32 +--- ...1_dashboards_CreateDashboard_4026341408.rs | 1 + ...1_dashboards_CreateDashboard_4076476470.rs | 1 + .../v1_dashboards_CreateDashboard_41622531.rs | 67 +------ ...v1_dashboards_CreateDashboard_417992286.rs | 1 + ...1_dashboards_CreateDashboard_4262729673.rs | 72 +------- ...v1_dashboards_CreateDashboard_578885732.rs | 60 +----- ...v1_dashboards_CreateDashboard_651038379.rs | 1 + ...v1_dashboards_CreateDashboard_765140092.rs | 48 +---- ...v1_dashboards_CreateDashboard_794302680.rs | 164 +---------------- ...v1_dashboards_CreateDashboard_798168180.rs | 46 +---- ...v1_dashboards_CreateDashboard_803346562.rs | 1 + ...v1_dashboards_CreateDashboard_858397694.rs | 1 + ...v1_dashboards_CreateDashboard_913313564.rs | 1 + ...v1_dashboards_CreateDashboard_915214113.rs | 86 +-------- ...v1_dashboards_CreateDashboard_927141680.rs | 1 + ...v1_dashboards_CreateDashboard_985012506.rs | 66 +------ .../v1_dashboards_CreatePublicDashboard.rs | 1 + examples/v1_dashboards_DeleteDashboard.rs | 1 + examples/v1_dashboards_DeleteDashboards.rs | 1 + ...hboards_DeletePublicDashboardInvitation.rs | 1 + examples/v1_dashboards_GetDashboard.rs | 1 + .../v1_dashboards_GetDashboard_4262333854.rs | 1 + examples/v1_dashboards_GetPublicDashboard.rs | 1 + ...ashboards_GetPublicDashboardInvitations.rs | 1 + ...v1_dashboards_ListDashboards_1062671515.rs | 1 + examples/v1_dashboards_RestoreDashboards.rs | 1 + ...ashboards_SendPublicDashboardInvitation.rs | 1 + examples/v1_dashboards_UpdateDashboard.rs | 1 + ...1_dashboards_UpdateDashboard_3454865944.rs | 1 + .../v1_dashboards_UpdatePublicDashboard.rs | 1 + examples/v1_downtimes_CancelDowntime.rs | 1 + .../v1_downtimes_CancelDowntimesByScope.rs | 1 + examples/v1_downtimes_CreateDowntime.rs | 1 + .../v1_downtimes_CreateDowntime_1393233946.rs | 1 + .../v1_downtimes_CreateDowntime_2908359488.rs | 1 + .../v1_downtimes_CreateDowntime_3059354445.rs | 1 + .../v1_downtimes_CreateDowntime_3355644446.rs | 1 + examples/v1_downtimes_GetDowntime.rs | 1 + examples/v1_downtimes_UpdateDowntime.rs | 1 + examples/v1_events_CreateEvent.rs | 1 + examples/v1_events_CreateEvent_19927815.rs | 7 +- ...v1_gcp-integration_CreateGCPIntegration.rs | 1 + ...v1_gcp-integration_DeleteGCPIntegration.rs | 1 + ...v1_gcp-integration_UpdateGCPIntegration.rs | 1 + ...gration_UpdateGCPIntegration_3544259255.rs | 1 + examples/v1_hosts_MuteHost.rs | 1 + examples/v1_key-management_CreateAPIKey.rs | 1 + .../v1_key-management_CreateApplicationKey.rs | 1 + examples/v1_key-management_UpdateAPIKey.rs | 1 + .../v1_key-management_UpdateApplicationKey.rs | 1 + examples/v1_logs-indexes_CreateLogsIndex.rs | 1 + examples/v1_logs-indexes_UpdateLogsIndex.rs | 1 + .../v1_logs-indexes_UpdateLogsIndexOrder.rs | 1 + .../v1_logs-pipelines_CreateLogsPipeline.rs | 1 + .../v1_logs-pipelines_UpdateLogsPipeline.rs | 1 + ..._logs-pipelines_UpdateLogsPipelineOrder.rs | 1 + examples/v1_logs_ListLogs.rs | 1 + examples/v1_logs_ListLogs_235998668.rs | 1 + examples/v1_logs_SubmitLog.rs | 1 + examples/v1_logs_SubmitLog_1920474053.rs | 1 + examples/v1_logs_SubmitLog_3418823904.rs | 4 +- .../v1_metrics_SubmitDistributionPoints.rs | 1 + ...ics_SubmitDistributionPoints_3109558960.rs | 1 + examples/v1_metrics_SubmitMetrics.rs | 1 + .../v1_metrics_SubmitMetrics_2203981258.rs | 1 + examples/v1_metrics_UpdateMetricMetadata.rs | 1 + examples/v1_monitors_CheckCanDeleteMonitor.rs | 1 + examples/v1_monitors_CreateMonitor.rs | 12 +- .../v1_monitors_CreateMonitor_1539578087.rs | 11 +- .../v1_monitors_CreateMonitor_1969035628.rs | 53 +----- .../v1_monitors_CreateMonitor_2012680290.rs | 1 + .../v1_monitors_CreateMonitor_2520912138.rs | 12 +- .../v1_monitors_CreateMonitor_3790803616.rs | 12 +- .../v1_monitors_CreateMonitor_3824294658.rs | 53 +----- .../v1_monitors_CreateMonitor_3883669300.rs | 50 +---- .../v1_monitors_CreateMonitor_440013737.rs | 12 +- examples/v1_monitors_DeleteMonitor.rs | 1 + examples/v1_monitors_GetMonitor.rs | 1 + examples/v1_monitors_GetMonitor_2200114573.rs | 1 + examples/v1_monitors_GetMonitor_3691711704.rs | 1 + .../v1_monitors_ListMonitors_463213563.rs | 1 + examples/v1_monitors_UpdateMonitor.rs | 1 + .../v1_monitors_ValidateExistingMonitor.rs | 29 +-- examples/v1_monitors_ValidateMonitor.rs | 29 +-- .../v1_monitors_ValidateMonitor_4247196452.rs | 30 +-- examples/v1_notebooks_CreateNotebook.rs | 1 + examples/v1_notebooks_DeleteNotebook.rs | 1 + examples/v1_notebooks_GetNotebook.rs | 1 + .../v1_notebooks_ListNotebooks_788665428.rs | 1 + examples/v1_notebooks_UpdateNotebook.rs | 1 + examples/v1_organizations_CreateChildOrg.rs | 1 + examples/v1_organizations_UpdateOrg.rs | 1 + ...ation_CreatePagerDutyIntegrationService.rs | 1 + ...ation_UpdatePagerDutyIntegrationService.rs | 1 + ...g_AddSecurityMonitoringSignalToIncident.rs | 1 + ...ng_EditSecurityMonitoringSignalAssignee.rs | 1 + ...oring_EditSecurityMonitoringSignalState.rs | 1 + .../v1_service-checks_SubmitServiceCheck.rs | 1 + ...jective-corrections_CreateSLOCorrection.rs | 1 + ...rections_CreateSLOCorrection_1326388368.rs | 1 + ...-objective-corrections_GetSLOCorrection.rs | 1 + ...orrections_ListSLOCorrection_2647266873.rs | 1 + ...jective-corrections_UpdateSLOCorrection.rs | 1 + .../v1_service-level-objectives_CreateSLO.rs | 1 + ...e-level-objectives_CreateSLO_3765703239.rs | 1 + .../v1_service-level-objectives_DeleteSLO.rs | 1 + ...vel-objectives_DeleteSLOTimeframeInBulk.rs | 1 + .../v1_service-level-objectives_GetSLO.rs | 1 + ...vice-level-objectives_GetSLOCorrections.rs | 1 + ..._service-level-objectives_GetSLOHistory.rs | 1 + .../v1_service-level-objectives_ListSLOs.rs | 1 + ...ce-level-objectives_ListSLOs_3036942817.rs | 1 + .../v1_service-level-objectives_SearchSLO.rs | 1 + .../v1_service-level-objectives_UpdateSLO.rs | 1 + ...tegration_CreateSlackIntegrationChannel.rs | 1 + ...tegration_RemoveSlackIntegrationChannel.rs | 3 +- ...tegration_UpdateSlackIntegrationChannel.rs | 1 + .../v1_synthetics_CreateGlobalVariable.rs | 1 + ...thetics_CreateGlobalVariable_1068962881.rs | 1 + ...thetics_CreateGlobalVariable_3298562511.rs | 1 + ...thetics_CreateGlobalVariable_3397718516.rs | 1 + .../v1_synthetics_CreatePrivateLocation.rs | 1 + .../v1_synthetics_CreateSyntheticsAPITest.rs | 1 + ...tics_CreateSyntheticsAPITest_1072503741.rs | 1 + ...tics_CreateSyntheticsAPITest_1241981394.rs | 4 +- ...tics_CreateSyntheticsAPITest_1279271422.rs | 117 +----------- ...tics_CreateSyntheticsAPITest_1402674167.rs | 4 +- ...tics_CreateSyntheticsAPITest_1487281163.rs | 171 +----------------- ...tics_CreateSyntheticsAPITest_1717840259.rs | 4 +- ...tics_CreateSyntheticsAPITest_1987645492.rs | 168 +---------------- ...tics_CreateSyntheticsAPITest_2472747642.rs | 4 +- ...tics_CreateSyntheticsAPITest_3829801148.rs | 4 +- ...etics_CreateSyntheticsAPITest_960766374.rs | 139 +------------- ..._synthetics_CreateSyntheticsBrowserTest.rs | 1 + ..._CreateSyntheticsBrowserTest_2932742688.rs | 1 + ...s_CreateSyntheticsBrowserTest_397420811.rs | 4 +- ...1_synthetics_CreateSyntheticsMobileTest.rs | 1 + examples/v1_synthetics_DeleteTests.rs | 1 + examples/v1_synthetics_EditGlobalVariable.rs | 1 + examples/v1_synthetics_FetchUptimes.rs | 1 + ..._synthetics_GetAPITestResult_1321866518.rs | 2 +- examples/v1_synthetics_GetMobileTest.rs | 1 + examples/v1_synthetics_ListTests.rs | 3 +- .../v1_synthetics_ListTests_1938827783.rs | 4 +- examples/v1_synthetics_PatchTest.rs | 1 + examples/v1_synthetics_TriggerCITests.rs | 1 + examples/v1_synthetics_TriggerTests.rs | 1 + examples/v1_synthetics_UpdateAPITest.rs | 99 +--------- examples/v1_synthetics_UpdateBrowserTest.rs | 1 + examples/v1_synthetics_UpdateMobileTest.rs | 1 + .../v1_synthetics_UpdatePrivateLocation.rs | 1 + .../v1_synthetics_UpdateTestPauseStatus.rs | 4 +- examples/v1_tags_CreateHostTags.rs | 1 + examples/v1_tags_UpdateHostTags.rs | 1 + ...g_GetMonthlyUsageAttribution_3849653599.rs | 1 + examples/v1_users_CreateUser.rs | 1 + examples/v1_users_CreateUser_266604071.rs | 1 + examples/v1_users_UpdateUser.rs | 1 + ...s-integration_CreateWebhooksIntegration.rs | 1 + ...CreateWebhooksIntegrationCustomVariable.rs | 1 + ...s-integration_DeleteWebhooksIntegration.rs | 1 + ...DeleteWebhooksIntegrationCustomVariable.rs | 1 + ...ooks-integration_GetWebhooksIntegration.rs | 1 + ...s-integration_UpdateWebhooksIntegration.rs | 1 + ...UpdateWebhooksIntegrationCustomVariable.rs | 1 + examples/v2_api-management_DeleteOpenAPI.rs | 1 + examples/v2_api-management_GetOpenAPI.rs | 1 + examples/v2_api-management_UpdateOpenAPI.rs | 1 + ...ention-filters_CreateApmRetentionFilter.rs | 1 + ...ention-filters_DeleteApmRetentionFilter.rs | 1 + ...retention-filters_GetApmRetentionFilter.rs | 1 + ...tion-filters_ReorderApmRetentionFilters.rs | 1 + ...ention-filters_UpdateApmRetentionFilter.rs | 1 + examples/v2_apps_CreateApp.rs | 1 + examples/v2_apps_DeleteApp.rs | 1 + examples/v2_apps_DeleteApps.rs | 1 + examples/v2_apps_DeployApp.rs | 1 + examples/v2_apps_DisableApp.rs | 1 + examples/v2_apps_GetApp.rs | 1 + examples/v2_apps_UpdateApp.rs | 1 + examples/v2_audit_ListAuditLogs_1275402458.rs | 1 + examples/v2_audit_SearchAuditLogs.rs | 1 + .../v2_audit_SearchAuditLogs_3215529662.rs | 2 + .../v2_authn-mappings_CreateAuthNMapping.rs | 1 + .../v2_authn-mappings_DeleteAuthNMapping.rs | 1 + examples/v2_authn-mappings_GetAuthNMapping.rs | 1 + .../v2_authn-mappings_UpdateAuthNMapping.rs | 2 +- .../v2_aws-integration_CreateAWSAccount.rs | 1 + ...integration_CreateAWSAccount_1716720881.rs | 1 + .../v2_aws-integration_DeleteAWSAccount.rs | 1 + examples/v2_aws-integration_GetAWSAccount.rs | 1 + .../v2_aws-integration_UpdateAWSAccount.rs | 48 +---- ...ws-logs-integration_ListAWSLogsServices.rs | 3 +- examples/v2_case-management_ArchiveCase.rs | 1 + examples/v2_case-management_AssignCase.rs | 2 +- examples/v2_case-management_CreateCase.rs | 1 + examples/v2_case-management_CreateProject.rs | 1 + examples/v2_case-management_GetCase.rs | 1 + ..._case-management_SearchCases_3433960044.rs | 1 + examples/v2_case-management_UnarchiveCase.rs | 1 + examples/v2_case-management_UnassignCase.rs | 1 + examples/v2_case-management_UpdatePriority.rs | 1 + examples/v2_case-management_UpdateStatus.rs | 1 + ...-pipelines_AggregateCIAppPipelineEvents.rs | 1 + ...lity-pipelines_CreateCIAppPipelineEvent.rs | 1 + ...ines_CreateCIAppPipelineEvent_129899466.rs | 1 + ...nes_CreateCIAppPipelineEvent_2341150096.rs | 1 + ...ines_ListCIAppPipelineEvents_1270618359.rs | 1 + ...ity-pipelines_SearchCIAppPipelineEvents.rs | 1 + ...es_SearchCIAppPipelineEvents_3246135003.rs | 2 + ...sibility-tests_AggregateCIAppTestEvents.rs | 1 + ...ty-tests_ListCIAppTestEvents_3852605281.rs | 1 + ...-visibility-tests_SearchCIAppTestEvents.rs | 1 + ...-tests_SearchCIAppTestEvents_1675695429.rs | 2 + ...-cost-management_CreateCostAWSCURConfig.rs | 1 + ...ost-management_CreateCostAzureUCConfigs.rs | 1 + ...-cost-management_UpdateCostAWSCURConfig.rs | 1 + ...ost-management_UpdateCostAzureUCConfigs.rs | 1 + ...d-cost-management_UploadCustomCostsFile.rs | 1 + ...gement_UploadCustomCostsFile_4125168396.rs | 1 + ...are-integration_CreateCloudflareAccount.rs | 1 + ...dflare-integration_GetCloudflareAccount.rs | 1 + ...are-integration_UpdateCloudflareAccount.rs | 1 + ..._confluent-cloud_CreateConfluentAccount.rs | 1 + ...confluent-cloud_CreateConfluentResource.rs | 1 + ..._confluent-cloud_DeleteConfluentAccount.rs | 1 + .../v2_confluent-cloud_GetConfluentAccount.rs | 1 + ..._confluent-cloud_UpdateConfluentAccount.rs | 1 + ...confluent-cloud_UpdateConfluentResource.rs | 1 + ...r-images_ListContainerImages_3088586393.rs | 1 + .../v2_containers_ListContainers_931009654.rs | 1 + ...2_csm-threats_CreateCSMThreatsAgentRule.rs | 1 + ...ts_CreateCloudWorkloadSecurityAgentRule.rs | 1 + ...2_csm-threats_DeleteCSMThreatsAgentRule.rs | 1 + ...ts_DeleteCloudWorkloadSecurityAgentRule.rs | 1 + .../v2_csm-threats_GetCSMThreatsAgentRule.rs | 1 + ...reats_GetCloudWorkloadSecurityAgentRule.rs | 1 + ...2_csm-threats_UpdateCSMThreatsAgentRule.rs | 1 + ...ts_UpdateCloudWorkloadSecurityAgentRule.rs | 1 + ...ashboard-lists_CreateDashboardListItems.rs | 1 + ...sts_CreateDashboardListItems_3995409989.rs | 5 +- ...ists_CreateDashboardListItems_825696022.rs | 5 +- ...ashboard-lists_DeleteDashboardListItems.rs | 1 + ...sts_DeleteDashboardListItems_2656706656.rs | 5 +- ...sts_DeleteDashboardListItems_3851624753.rs | 5 +- ...2_dashboard-lists_GetDashboardListItems.rs | 1 + ...ashboard-lists_UpdateDashboardListItems.rs | 2 +- ...data-deletion_CancelDataDeletionRequest.rs | 1 + ...data-deletion_CreateDataDeletionRequest.rs | 1 + ...2_domain-allowlist_PatchDomainAllowlist.rs | 1 + .../v2_dora-metrics_CreateDORADeployment.rs | 1 + .../v2_dora-metrics_CreateDORAIncident.rs | 1 + examples/v2_downtimes_CancelDowntime.rs | 1 + examples/v2_downtimes_CreateDowntime.rs | 1 + examples/v2_downtimes_GetDowntime.rs | 1 + .../v2_downtimes_ListDowntimes_805770330.rs | 1 + ...wntimes_ListMonitorDowntimes_3316718253.rs | 1 + examples/v2_downtimes_UpdateDowntime.rs | 1 + examples/v2_events_CreateEvent.rs | 1 + examples/v2_events_ListEvents_1527584014.rs | 1 + examples/v2_events_SearchEvents.rs | 1 + examples/v2_events_SearchEvents_3856995058.rs | 2 + ..._fastly-integration_CreateFastlyAccount.rs | 1 + ..._fastly-integration_CreateFastlyService.rs | 1 + .../v2_fastly-integration_GetFastlyAccount.rs | 1 + ..._fastly-integration_UpdateFastlyAccount.rs | 1 + ..._fastly-integration_UpdateFastlyService.rs | 1 + .../v2_gcp-integration_CreateGCPSTSAccount.rs | 1 + ...tegration_CreateGCPSTSAccount_109518525.rs | 4 +- ...tegration_CreateGCPSTSAccount_130557025.rs | 4 +- ...tegration_CreateGCPSTSAccount_194782945.rs | 4 +- ...egration_CreateGCPSTSAccount_2597004741.rs | 4 +- ...egration_CreateGCPSTSAccount_4235664992.rs | 4 +- ...ntegration_MakeGCPSTSDelegate_962598975.rs | 1 + .../v2_gcp-integration_UpdateGCPSTSAccount.rs | 1 + ...egration_UpdateGCPSTSAccount_2241994060.rs | 1 + ...egration_UpdateGCPSTSAccount_3205636354.rs | 4 +- ...incident-services_CreateIncidentService.rs | 1 + ...incident-services_DeleteIncidentService.rs | 1 + ...v2_incident-services_GetIncidentService.rs | 1 + ..._incident-services_ListIncidentServices.rs | 1 + ...incident-services_UpdateIncidentService.rs | 1 + .../v2_incident-teams_CreateIncidentTeam.rs | 1 + .../v2_incident-teams_DeleteIncidentTeam.rs | 1 + examples/v2_incident-teams_GetIncidentTeam.rs | 1 + .../v2_incident-teams_ListIncidentTeams.rs | 1 + .../v2_incident-teams_UpdateIncidentTeam.rs | 1 + examples/v2_incidents_CreateIncident.rs | 1 + .../v2_incidents_CreateIncidentIntegration.rs | 1 + examples/v2_incidents_CreateIncidentTodo.rs | 1 + examples/v2_incidents_CreateIncidentType.rs | 13 +- examples/v2_incidents_DeleteIncident.rs | 1 + .../v2_incidents_DeleteIncidentIntegration.rs | 2 +- examples/v2_incidents_DeleteIncidentTodo.rs | 2 +- examples/v2_incidents_DeleteIncidentType.rs | 1 + examples/v2_incidents_GetIncident.rs | 1 + .../v2_incidents_GetIncidentIntegration.rs | 2 +- examples/v2_incidents_GetIncidentTodo.rs | 2 +- ...ents_ListIncidentAttachments_2457735435.rs | 1 + .../v2_incidents_ListIncidentIntegrations.rs | 1 + examples/v2_incidents_ListIncidentTodos.rs | 1 + .../v2_incidents_ListIncidents_2665616954.rs | 1 + ...v2_incidents_SearchIncidents_1931679109.rs | 1 + examples/v2_incidents_UpdateIncident.rs | 1 + .../v2_incidents_UpdateIncidentAttachments.rs | 1 + ...ts_UpdateIncidentAttachments_3881702075.rs | 1 + .../v2_incidents_UpdateIncidentIntegration.rs | 2 +- examples/v2_incidents_UpdateIncidentTodo.rs | 2 +- examples/v2_incidents_UpdateIncidentType.rs | 1 + .../v2_incidents_UpdateIncident_1009194038.rs | 1 + .../v2_incidents_UpdateIncident_3369341440.rs | 2 +- examples/v2_ip-allowlist_UpdateIPAllowlist.rs | 1 + examples/v2_key-management_CreateAPIKey.rs | 1 + ...agement_CreateCurrentUserApplicationKey.rs | 1 + ...ateCurrentUserApplicationKey_3383369233.rs | 4 +- examples/v2_key-management_DeleteAPIKey.rs | 1 + .../v2_key-management_DeleteApplicationKey.rs | 1 + ...agement_DeleteCurrentUserApplicationKey.rs | 1 + examples/v2_key-management_GetAPIKey.rs | 1 + .../v2_key-management_GetApplicationKey.rs | 1 + examples/v2_key-management_ListAPIKeys.rs | 1 + examples/v2_key-management_UpdateAPIKey.rs | 1 + .../v2_key-management_UpdateApplicationKey.rs | 1 + ...agement_UpdateCurrentUserApplicationKey.rs | 1 + .../v2_logs-archives_AddReadRoleToArchive.rs | 1 + .../v2_logs-archives_CreateLogsArchive.rs | 1 + .../v2_logs-archives_RemoveRoleFromArchive.rs | 1 + .../v2_logs-archives_UpdateLogsArchive.rs | 1 + ...v2_logs-archives_UpdateLogsArchiveOrder.rs | 1 + ...estinations_CreateLogsCustomDestination.rs | 1 + ..._CreateLogsCustomDestination_1091442807.rs | 34 +--- ..._CreateLogsCustomDestination_1288180912.rs | 1 + ...s_CreateLogsCustomDestination_141236188.rs | 1 + ..._CreateLogsCustomDestination_2184123765.rs | 1 + ...estinations_DeleteLogsCustomDestination.rs | 1 + ...m-destinations_GetLogsCustomDestination.rs | 1 + ...estinations_UpdateLogsCustomDestination.rs | 1 + examples/v2_logs-metrics_CreateLogsMetric.rs | 1 + examples/v2_logs-metrics_DeleteLogsMetric.rs | 1 + examples/v2_logs-metrics_GetLogsMetric.rs | 1 + examples/v2_logs-metrics_UpdateLogsMetric.rs | 1 + ...ogs-metrics_UpdateLogsMetric_1901534424.rs | 1 + examples/v2_logs_AggregateLogs.rs | 1 + examples/v2_logs_AggregateLogs_2527007002.rs | 1 + examples/v2_logs_AggregateLogs_2955613758.rs | 1 + examples/v2_logs_ListLogs.rs | 21 +-- examples/v2_logs_ListLogsGet_175182691.rs | 1 + examples/v2_logs_ListLogsGet_738202670.rs | 1 + examples/v2_logs_ListLogs_3138392594.rs | 2 + examples/v2_logs_ListLogs_3400928236.rs | 1 + examples/v2_logs_ListLogs_534975433.rs | 22 +-- examples/v2_logs_SubmitLog.rs | 4 +- examples/v2_logs_SubmitLog_3496222707.rs | 4 +- examples/v2_logs_SubmitLog_904601870.rs | 4 +- ...rics_CreateBulkTagsMetricsConfiguration.rs | 1 + examples/v2_metrics_CreateTagConfiguration.rs | 1 + ...rics_DeleteBulkTagsMetricsConfiguration.rs | 1 + .../v2_metrics_ListTagConfigurationByName.rs | 1 + ...etrics_ListTagConfigurations_3969783727.rs | 1 + examples/v2_metrics_ListTagsByMetricName.rs | 1 + examples/v2_metrics_QueryScalarData.rs | 1 + .../v2_metrics_QueryScalarData_3112571352.rs | 1 + examples/v2_metrics_QueryTimeseriesData.rs | 1 + ...2_metrics_QueryTimeseriesData_301142940.rs | 1 + examples/v2_metrics_SubmitMetrics.rs | 1 + .../v2_metrics_SubmitMetrics_1762007427.rs | 1 + examples/v2_metrics_UpdateTagConfiguration.rs | 1 + ...ams-integration_CreateTenantBasedHandle.rs | 1 + ...tion_CreateTenantBasedHandle_1540689753.rs | 1 + ...ation_DeleteTenantBasedHandle_377884154.rs | 1 + ...gration_GetTenantBasedHandle_2883785101.rs | 1 + ...ams-integration_UpdateTenantBasedHandle.rs | 1 + ...ation_UpdateTenantBasedHandle_419892746.rs | 1 + .../v2_monitors_CreateMonitorConfigPolicy.rs | 1 + .../v2_monitors_DeleteMonitorConfigPolicy.rs | 1 + .../v2_monitors_GetMonitorConfigPolicy.rs | 1 + .../v2_monitors_UpdateMonitorConfigPolicy.rs | 1 + ...-device-monitoring_UpdateDeviceUserTags.rs | 1 + .../v2_okta-integration_CreateOktaAccount.rs | 1 + .../v2_okta-integration_GetOktaAccount.rs | 1 + .../v2_okta-integration_UpdateOktaAccount.rs | 1 + ...genie-integration_CreateOpsgenieService.rs | 1 + ...genie-integration_DeleteOpsgenieService.rs | 1 + ...opsgenie-integration_GetOpsgenieService.rs | 1 + ...genie-integration_UpdateOpsgenieService.rs | 1 + examples/v2_organizations_UpdateOrgConfig.rs | 1 + examples/v2_powerpack_CreatePowerpack.rs | 1 + examples/v2_powerpack_DeletePowerpack.rs | 1 + examples/v2_powerpack_GetPowerpack.rs | 1 + .../v2_powerpack_ListPowerpacks_1173755071.rs | 1 + examples/v2_powerpack_UpdatePowerpack.rs | 1 + .../v2_processes_ListProcesses_797840471.rs | 1 + ...iction-policies_UpdateRestrictionPolicy.rs | 1 + examples/v2_roles_AddPermissionToRole.rs | 2 +- examples/v2_roles_AddUserToRole.rs | 2 +- examples/v2_roles_CloneRole.rs | 1 + examples/v2_roles_CreateRole.rs | 1 + examples/v2_roles_CreateRole_3862893229.rs | 9 +- examples/v2_roles_DeleteRole.rs | 1 + examples/v2_roles_GetRole.rs | 1 + examples/v2_roles_ListRolePermissions.rs | 1 + examples/v2_roles_ListRoleUsers.rs | 1 + examples/v2_roles_ListRoles.rs | 1 + examples/v2_roles_RemovePermissionFromRole.rs | 2 +- examples/v2_roles_RemoveUserFromRole.rs | 2 +- examples/v2_roles_UpdateRole.rs | 10 +- examples/v2_rum-metrics_CreateRumMetric.rs | 1 + examples/v2_rum-metrics_DeleteRumMetric.rs | 1 + examples/v2_rum-metrics_GetRumMetric.rs | 1 + examples/v2_rum-metrics_UpdateRumMetric.rs | 1 + examples/v2_rum_AggregateRUMEvents.rs | 1 + examples/v2_rum_CreateRUMApplication.rs | 1 + examples/v2_rum_DeleteRUMApplication.rs | 1 + examples/v2_rum_GetRUMApplication.rs | 1 + examples/v2_rum_ListRUMEvents_2680821282.rs | 1 + examples/v2_rum_SearchRUMEvents.rs | 1 + examples/v2_rum_SearchRUMEvents_574690310.rs | 2 + examples/v2_rum_UpdateRUMApplication.rs | 1 + ...security-monitoring_CancelHistoricalJob.rs | 1 + ...g_ConvertExistingSecurityMonitoringRule.rs | 1 + ...ity-monitoring_ConvertJobResultToSignal.rs | 1 + ...curityMonitoringRuleFromJSONToTerraform.rs | 1 + ...ecurity-monitoring_CreateSecurityFilter.rs | 1 + ...monitoring_CreateSecurityMonitoringRule.rs | 1 + ...CreateSecurityMonitoringRule_1092490364.rs | 45 +---- ...CreateSecurityMonitoringRule_3367706049.rs | 4 +- ..._CreateSecurityMonitoringRule_461183901.rs | 1 + ..._CreateSecurityMonitoringRule_498211763.rs | 1 + ..._CreateSecurityMonitoringRule_914562040.rs | 2 +- ...ing_CreateSecurityMonitoringSuppression.rs | 1 + ...ecurityMonitoringSuppression_3192265332.rs | 1 + ...nitoring_DeleteSecurityFilter_555029489.rs | 1 + ...monitoring_DeleteSecurityMonitoringRule.rs | 1 + ...ing_DeleteSecurityMonitoringSuppression.rs | 1 + ...ng_EditSecurityMonitoringSignalAssignee.rs | 1 + ...g_EditSecurityMonitoringSignalIncidents.rs | 1 + ...oring_EditSecurityMonitoringSignalState.rs | 1 + examples/v2_security-monitoring_GetFinding.rs | 8 +- ...v2_security-monitoring_GetHistoricalJob.rs | 1 + ...2_security-monitoring_GetSecurityFilter.rs | 1 + ...ty-monitoring_GetSecurityMonitoringRule.rs | 1 + ...ng_GetSecurityMonitoringRule_3370522281.rs | 1 + ...toring_GetSecurityMonitoringSuppression.rs | 1 + ...rity-monitoring_ListFindings_3865842421.rs | 1 + ..._security-monitoring_ListHistoricalJobs.rs | 1 + ...istSecurityMonitoringSignals_3960412991.rs | 1 + .../v2_security-monitoring_MuteFindings.rs | 1 + ...v2_security-monitoring_RunHistoricalJob.rs | 1 + ...itoring_SearchSecurityMonitoringSignals.rs | 26 +-- ...rchSecurityMonitoringSignals_1309350146.rs | 2 + ...ring_TestExistingSecurityMonitoringRule.rs | 1 + ...y-monitoring_TestSecurityMonitoringRule.rs | 1 + ...ecurity-monitoring_UpdateSecurityFilter.rs | 1 + ...monitoring_UpdateSecurityMonitoringRule.rs | 1 + ..._UpdateSecurityMonitoringRule_428087276.rs | 35 +--- ...ing_UpdateSecurityMonitoringSuppression.rs | 1 + ...nitoring_ValidateSecurityMonitoringRule.rs | 1 + ...sitive-data-scanner_CreateScanningGroup.rs | 28 +-- ...nsitive-data-scanner_CreateScanningRule.rs | 1 + ...sitive-data-scanner_DeleteScanningGroup.rs | 1 + ...nsitive-data-scanner_DeleteScanningRule.rs | 1 + ...tive-data-scanner_ReorderScanningGroups.rs | 2 +- ...sitive-data-scanner_UpdateScanningGroup.rs | 31 +--- ...nsitive-data-scanner_UpdateScanningRule.rs | 1 + ...2_service-accounts_CreateServiceAccount.rs | 1 + ...unts_CreateServiceAccountApplicationKey.rs | 1 + ...ServiceAccountApplicationKey_3480494373.rs | 4 +- ...unts_DeleteServiceAccountApplicationKey.rs | 2 +- ...ccounts_GetServiceAccountApplicationKey.rs | 2 +- ...ounts_ListServiceAccountApplicationKeys.rs | 1 + ...unts_UpdateServiceAccountApplicationKey.rs | 2 +- ...nition_CreateOrUpdateServiceDefinitions.rs | 1 + ...teOrUpdateServiceDefinitions_1808735248.rs | 1 + ...teOrUpdateServiceDefinitions_2619874414.rs | 1 + ...teOrUpdateServiceDefinitions_2621709423.rs | 1 + ...nition_ListServiceDefinitions_336468013.rs | 1 + ...ice-level-objectives_CreateSLOReportJob.rs | 1 + ...-level-objectives_GetSLOReportJobStatus.rs | 1 + ...scorecards_CreateScorecardOutcomesBatch.rs | 1 + ..._service-scorecards_CreateScorecardRule.rs | 1 + ..._service-scorecards_DeleteScorecardRule.rs | 1 + ...ecards_ListScorecardOutcomes_2663454275.rs | 1 + ...corecards_ListScorecardRules_4057666343.rs | 1 + ..._service-scorecards_UpdateScorecardRule.rs | 1 + ...re-catalog_ListCatalogEntity_2305103326.rs | 1 + ...v2_software-catalog_UpsertCatalogEntity.rs | 1 + ...e-catalog_UpsertCatalogEntity_586948155.rs | 4 +- .../v2_spans-metrics_CreateSpansMetric.rs | 1 + .../v2_spans-metrics_DeleteSpansMetric.rs | 1 + examples/v2_spans-metrics_GetSpansMetric.rs | 1 + .../v2_spans-metrics_UpdateSpansMetric.rs | 1 + examples/v2_spans_AggregateSpans.rs | 1 + examples/v2_spans_ListSpans.rs | 1 + examples/v2_spans_ListSpansGet_1130763422.rs | 1 + examples/v2_spans_ListSpans_3495563906.rs | 2 + ...v2_synthetics_SetOnDemandConcurrencyCap.rs | 1 + examples/v2_teams_CreateTeam.rs | 1 + examples/v2_teams_CreateTeamLink.rs | 1 + examples/v2_teams_CreateTeamMembership.rs | 4 +- examples/v2_teams_CreateTeam_252121814.rs | 1 + examples/v2_teams_DeleteTeam.rs | 1 + examples/v2_teams_DeleteTeamLink.rs | 2 +- examples/v2_teams_DeleteTeamMembership.rs | 1 + examples/v2_teams_GetTeam.rs | 1 + examples/v2_teams_GetTeamLink.rs | 2 +- examples/v2_teams_GetTeamLinks.rs | 1 + examples/v2_teams_GetTeamMemberships.rs | 4 +- .../v2_teams_GetTeamMemberships_3799131168.rs | 4 +- .../v2_teams_GetTeamPermissionSettings.rs | 1 + examples/v2_teams_GetUserMemberships.rs | 4 +- examples/v2_teams_ListTeams_3592098458.rs | 1 + examples/v2_teams_UpdateTeam.rs | 1 + examples/v2_teams_UpdateTeamLink.rs | 2 +- examples/v2_teams_UpdateTeamMembership.rs | 4 +- .../v2_teams_UpdateTeamPermissionSetting.rs | 1 + examples/v2_users_CreateUser.rs | 1 + examples/v2_users_DisableUser.rs | 1 + examples/v2_users_GetInvitation.rs | 1 + examples/v2_users_GetUser.rs | 1 + examples/v2_users_ListUserPermissions.rs | 1 + examples/v2_users_ListUsers.rs | 1 + examples/v2_users_ListUsers_4075885358.rs | 1 + examples/v2_users_SendInvitations.rs | 1 + examples/v2_users_UpdateUser.rs | 1 + ...kflow-automation_CreateWorkflowInstance.rs | 1 + src/datadogV2/api/api_spans.rs | 4 +- 609 files changed, 737 insertions(+), 3466 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index bf18e65e2..5cf4e6926 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-01-09 22:06:04.168404", - "spec_repo_commit": "8d40e082" + "regenerated": "2025-01-10 21:28:31.672569", + "spec_repo_commit": "cf3ae49b" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-01-09 22:06:04.183707", - "spec_repo_commit": "8d40e082" + "regenerated": "2025-01-10 21:28:31.688174", + "spec_repo_commit": "cf3ae49b" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 7e519f926..686a96c33 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -45687,7 +45687,8 @@ paths: required: false schema: type: string - - description: Maximum number of spans in the response. + - description: Maximum number of spans in the response. Defaults to 10 and allows + up to 5000. example: 25 in: query name: page[limit] diff --git a/examples/v1_aws-integration_CreateAWSAccount.rs b/examples/v1_aws-integration_CreateAWSAccount.rs index e074c132f..b644af1d7 100644 --- a/examples/v1_aws-integration_CreateAWSAccount.rs +++ b/examples/v1_aws-integration_CreateAWSAccount.rs @@ -16,6 +16,7 @@ async fn main() { .host_tags(vec!["$KEY:$VALUE".to_string()]) .metrics_collection_enabled(false) .role_name("DatadogAWSIntegrationRole".to_string()); + let configuration = datadog::Configuration::new(); let api = AWSIntegrationAPI::with_config(configuration); let resp = api.create_aws_account(body).await; diff --git a/examples/v1_aws-integration_CreateAWSEventBridgeSource.rs b/examples/v1_aws-integration_CreateAWSEventBridgeSource.rs index 891e2045a..d1180fbbe 100644 --- a/examples/v1_aws-integration_CreateAWSEventBridgeSource.rs +++ b/examples/v1_aws-integration_CreateAWSEventBridgeSource.rs @@ -10,6 +10,7 @@ async fn main() { .create_event_bus(true) .event_generator_name("app-alerts".to_string()) .region("us-east-1".to_string()); + let configuration = datadog::Configuration::new(); let api = AWSIntegrationAPI::with_config(configuration); let resp = api.create_aws_event_bridge_source(body).await; diff --git a/examples/v1_aws-integration_CreateAWSTagFilter.rs b/examples/v1_aws-integration_CreateAWSTagFilter.rs index f425f8a4c..b9a791238 100644 --- a/examples/v1_aws-integration_CreateAWSTagFilter.rs +++ b/examples/v1_aws-integration_CreateAWSTagFilter.rs @@ -10,6 +10,7 @@ async fn main() { .account_id("123456789012".to_string()) .namespace(AWSNamespace::ELB) .tag_filter_str("prod*".to_string()); + let configuration = datadog::Configuration::new(); let api = AWSIntegrationAPI::with_config(configuration); let resp = api.create_aws_tag_filter(body).await; diff --git a/examples/v1_aws-integration_CreateNewAWSExternalID.rs b/examples/v1_aws-integration_CreateNewAWSExternalID.rs index 4ee91dd5b..cb69073b4 100644 --- a/examples/v1_aws-integration_CreateNewAWSExternalID.rs +++ b/examples/v1_aws-integration_CreateNewAWSExternalID.rs @@ -20,6 +20,7 @@ async fn main() { .metrics_collection_enabled(false) .resource_collection_enabled(true) .role_name("DatadogAWSIntegrationRole".to_string()); + let configuration = datadog::Configuration::new(); let api = AWSIntegrationAPI::with_config(configuration); let resp = api.create_new_aws_external_id(body).await; diff --git a/examples/v1_aws-integration_DeleteAWSAccount.rs b/examples/v1_aws-integration_DeleteAWSAccount.rs index 45251ec83..7fcaccf2f 100644 --- a/examples/v1_aws-integration_DeleteAWSAccount.rs +++ b/examples/v1_aws-integration_DeleteAWSAccount.rs @@ -8,6 +8,7 @@ async fn main() { let body = AWSAccountDeleteRequest::new() .account_id("163662907100".to_string()) .role_name("DatadogAWSIntegrationRole".to_string()); + let configuration = datadog::Configuration::new(); let api = AWSIntegrationAPI::with_config(configuration); let resp = api.delete_aws_account(body).await; diff --git a/examples/v1_aws-integration_DeleteAWSEventBridgeSource.rs b/examples/v1_aws-integration_DeleteAWSEventBridgeSource.rs index 47f950c44..9501a5294 100644 --- a/examples/v1_aws-integration_DeleteAWSEventBridgeSource.rs +++ b/examples/v1_aws-integration_DeleteAWSEventBridgeSource.rs @@ -9,6 +9,7 @@ async fn main() { .account_id("123456789012".to_string()) .event_generator_name("app-alerts-zyxw3210".to_string()) .region("us-east-1".to_string()); + let configuration = datadog::Configuration::new(); let api = AWSIntegrationAPI::with_config(configuration); let resp = api.delete_aws_event_bridge_source(body).await; diff --git a/examples/v1_aws-integration_DeleteAWSTagFilter.rs b/examples/v1_aws-integration_DeleteAWSTagFilter.rs index 050e21194..79602ba92 100644 --- a/examples/v1_aws-integration_DeleteAWSTagFilter.rs +++ b/examples/v1_aws-integration_DeleteAWSTagFilter.rs @@ -9,6 +9,7 @@ async fn main() { let body = AWSTagFilterDeleteRequest::new() .account_id("FAKEAC0FAKEAC2FAKEAC".to_string()) .namespace(AWSNamespace::ELB); + let configuration = datadog::Configuration::new(); let api = AWSIntegrationAPI::with_config(configuration); let resp = api.delete_aws_tag_filter(body).await; diff --git a/examples/v1_aws-integration_UpdateAWSAccount.rs b/examples/v1_aws-integration_UpdateAWSAccount.rs index 7e78facb5..a824f60e4 100644 --- a/examples/v1_aws-integration_UpdateAWSAccount.rs +++ b/examples/v1_aws-integration_UpdateAWSAccount.rs @@ -17,6 +17,7 @@ async fn main() { .host_tags(vec!["$KEY:$VALUE".to_string()]) .metrics_collection_enabled(true) .role_name("DatadogAWSIntegrationRole".to_string()); + let configuration = datadog::Configuration::new(); let api = AWSIntegrationAPI::with_config(configuration); let resp = api diff --git a/examples/v1_aws-logs-integration_CheckAWSLogsLambdaAsync.rs b/examples/v1_aws-logs-integration_CheckAWSLogsLambdaAsync.rs index 3c4c68b4c..abb76dd9c 100644 --- a/examples/v1_aws-logs-integration_CheckAWSLogsLambdaAsync.rs +++ b/examples/v1_aws-logs-integration_CheckAWSLogsLambdaAsync.rs @@ -9,6 +9,7 @@ async fn main() { "1234567".to_string(), "arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest".to_string(), ); + let configuration = datadog::Configuration::new(); let api = AWSLogsIntegrationAPI::with_config(configuration); let resp = api.check_aws_logs_lambda_async(body).await; diff --git a/examples/v1_aws-logs-integration_CheckAWSLogsServicesAsync.rs b/examples/v1_aws-logs-integration_CheckAWSLogsServicesAsync.rs index 2e4d918df..e2b04b9ed 100644 --- a/examples/v1_aws-logs-integration_CheckAWSLogsServicesAsync.rs +++ b/examples/v1_aws-logs-integration_CheckAWSLogsServicesAsync.rs @@ -16,6 +16,7 @@ async fn main() { "lambda".to_string(), ], ); + let configuration = datadog::Configuration::new(); let api = AWSLogsIntegrationAPI::with_config(configuration); let resp = api.check_aws_logs_services_async(body).await; diff --git a/examples/v1_aws-logs-integration_CreateAWSLambdaARN.rs b/examples/v1_aws-logs-integration_CreateAWSLambdaARN.rs index 95c16698f..4b97fa3cd 100644 --- a/examples/v1_aws-logs-integration_CreateAWSLambdaARN.rs +++ b/examples/v1_aws-logs-integration_CreateAWSLambdaARN.rs @@ -9,6 +9,7 @@ async fn main() { "1234567".to_string(), "arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest".to_string(), ); + let configuration = datadog::Configuration::new(); let api = AWSLogsIntegrationAPI::with_config(configuration); let resp = api.create_aws_lambda_arn(body).await; diff --git a/examples/v1_aws-logs-integration_DeleteAWSLambdaARN.rs b/examples/v1_aws-logs-integration_DeleteAWSLambdaARN.rs index 6be1b0f6e..0fc7c41e4 100644 --- a/examples/v1_aws-logs-integration_DeleteAWSLambdaARN.rs +++ b/examples/v1_aws-logs-integration_DeleteAWSLambdaARN.rs @@ -9,6 +9,7 @@ async fn main() { "1234567".to_string(), "arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest".to_string(), ); + let configuration = datadog::Configuration::new(); let api = AWSLogsIntegrationAPI::with_config(configuration); let resp = api.delete_aws_lambda_arn(body).await; diff --git a/examples/v1_aws-logs-integration_EnableAWSLogServices.rs b/examples/v1_aws-logs-integration_EnableAWSLogServices.rs index e52fbb99d..0b47134f1 100644 --- a/examples/v1_aws-logs-integration_EnableAWSLogServices.rs +++ b/examples/v1_aws-logs-integration_EnableAWSLogServices.rs @@ -16,6 +16,7 @@ async fn main() { "lambda".to_string(), ], ); + let configuration = datadog::Configuration::new(); let api = AWSLogsIntegrationAPI::with_config(configuration); let resp = api.enable_aws_log_services(body).await; diff --git a/examples/v1_azure-integration_CreateAzureIntegration.rs b/examples/v1_azure-integration_CreateAzureIntegration.rs index e09c2c033..916e7e121 100644 --- a/examples/v1_azure-integration_CreateAzureIntegration.rs +++ b/examples/v1_azure-integration_CreateAzureIntegration.rs @@ -19,6 +19,7 @@ async fn main() { .new_tenant_name("".to_string()) .resource_collection_enabled(true) .tenant_name("".to_string()); + let configuration = datadog::Configuration::new(); let api = AzureIntegrationAPI::with_config(configuration); let resp = api.create_azure_integration(body).await; diff --git a/examples/v1_azure-integration_DeleteAzureIntegration.rs b/examples/v1_azure-integration_DeleteAzureIntegration.rs index 592bb0fcd..db7103d39 100644 --- a/examples/v1_azure-integration_DeleteAzureIntegration.rs +++ b/examples/v1_azure-integration_DeleteAzureIntegration.rs @@ -8,6 +8,7 @@ async fn main() { let body = AzureAccount::new() .client_id("".to_string()) .tenant_name("".to_string()); + let configuration = datadog::Configuration::new(); let api = AzureIntegrationAPI::with_config(configuration); let resp = api.delete_azure_integration(body).await; diff --git a/examples/v1_azure-integration_UpdateAzureHostFilters.rs b/examples/v1_azure-integration_UpdateAzureHostFilters.rs index d80f09f0a..d6bf66852 100644 --- a/examples/v1_azure-integration_UpdateAzureHostFilters.rs +++ b/examples/v1_azure-integration_UpdateAzureHostFilters.rs @@ -26,6 +26,7 @@ async fn main() { .namespace("Microsoft.Compute".to_string())]) .tenant_name("testc44-1234-5678-9101-cc00736ftest".to_string()) .usage_metrics_enabled(true); + let configuration = datadog::Configuration::new(); let api = AzureIntegrationAPI::with_config(configuration); let resp = api.update_azure_host_filters(body).await; diff --git a/examples/v1_azure-integration_UpdateAzureIntegration.rs b/examples/v1_azure-integration_UpdateAzureIntegration.rs index b3c767dff..3f7db20ab 100644 --- a/examples/v1_azure-integration_UpdateAzureIntegration.rs +++ b/examples/v1_azure-integration_UpdateAzureIntegration.rs @@ -19,6 +19,7 @@ async fn main() { .new_tenant_name("".to_string()) .resource_collection_enabled(true) .tenant_name("".to_string()); + let configuration = datadog::Configuration::new(); let api = AzureIntegrationAPI::with_config(configuration); let resp = api.update_azure_integration(body).await; diff --git a/examples/v1_dashboard-lists_CreateDashboardList.rs b/examples/v1_dashboard-lists_CreateDashboardList.rs index bd3b5b544..117bda206 100644 --- a/examples/v1_dashboard-lists_CreateDashboardList.rs +++ b/examples/v1_dashboard-lists_CreateDashboardList.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV1::model::DashboardList; #[tokio::main] async fn main() { let body = DashboardList::new("Example-Dashboard-List".to_string()); + let configuration = datadog::Configuration::new(); let api = DashboardListsAPI::with_config(configuration); let resp = api.create_dashboard_list(body).await; diff --git a/examples/v1_dashboard-lists_DeleteDashboardList.rs b/examples/v1_dashboard-lists_DeleteDashboardList.rs index 6b1f28ed6..7e72d9948 100644 --- a/examples/v1_dashboard-lists_DeleteDashboardList.rs +++ b/examples/v1_dashboard-lists_DeleteDashboardList.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV1::api_dashboard_lists::DashboardListsAPI; async fn main() { // there is a valid "dashboard_list" in the system let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap(); + let configuration = datadog::Configuration::new(); let api = DashboardListsAPI::with_config(configuration); let resp = api.delete_dashboard_list(dashboard_list_id.clone()).await; diff --git a/examples/v1_dashboard-lists_GetDashboardList.rs b/examples/v1_dashboard-lists_GetDashboardList.rs index 96725e821..77c377454 100644 --- a/examples/v1_dashboard-lists_GetDashboardList.rs +++ b/examples/v1_dashboard-lists_GetDashboardList.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV1::api_dashboard_lists::DashboardListsAPI; async fn main() { // there is a valid "dashboard_list" in the system let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap(); + let configuration = datadog::Configuration::new(); let api = DashboardListsAPI::with_config(configuration); let resp = api.get_dashboard_list(dashboard_list_id.clone()).await; diff --git a/examples/v1_dashboard-lists_UpdateDashboardList.rs b/examples/v1_dashboard-lists_UpdateDashboardList.rs index 77e098eff..5abca877d 100644 --- a/examples/v1_dashboard-lists_UpdateDashboardList.rs +++ b/examples/v1_dashboard-lists_UpdateDashboardList.rs @@ -8,6 +8,7 @@ async fn main() { // there is a valid "dashboard_list" in the system let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap(); let body = DashboardList::new("updated Example-Dashboard-List".to_string()); + let configuration = datadog::Configuration::new(); let api = DashboardListsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_dashboards_CreateDashboard.rs b/examples/v1_dashboards_CreateDashboard.rs index ecabd8cb3..d238cee23 100644 --- a/examples/v1_dashboards_CreateDashboard.rs +++ b/examples/v1_dashboards_CreateDashboard.rs @@ -43,6 +43,7 @@ async fn main() { )), ))], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_1024858348.rs b/examples/v1_dashboards_CreateDashboard_1024858348.rs index 9c824ad85..133d2e3f8 100644 --- a/examples/v1_dashboards_CreateDashboard_1024858348.rs +++ b/examples/v1_dashboards_CreateDashboard_1024858348.rs @@ -20,55 +20,8 @@ use datadog_api_client::datadogV1::model::WidgetLayout; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::ORDERED, - "Example-Dashboard".to_string(), - vec![ - Widget::new( - WidgetDefinition::TreeMapWidgetDefinition( - Box::new( - TreeMapWidgetDefinition::new( - vec![ - TreeMapWidgetRequest::new() - .formulas( - vec![ - WidgetFormula::new("hour_before(query1)".to_string()), - WidgetFormula::new("query1".to_string()) - ], - ) - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionEventQueryDefinition( - Box::new( - FormulaAndFunctionEventQueryDefinition::new( - FormulaAndFunctionEventQueryDefinitionCompute::new( - FormulaAndFunctionEventAggregation::COUNT, - ), - FormulaAndFunctionEventsDataSource::LOGS, - "query1".to_string(), - ) - .group_by(vec![]) - .indexes(vec!["*".to_string()]) - .search( - FormulaAndFunctionEventQueryDefinitionSearch::new( - "".to_string(), - ), - ), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::SCALAR) - ], - TreeMapWidgetDefinitionType::TREEMAP, - ).title("".to_string()), - ), - ), - ).layout(WidgetLayout::new(4, 4, 0, 0)) - ], - ); + let body = Dashboard::new(DashboardLayoutType::ORDERED, "Example-Dashboard".to_string(), vec![Widget::new(WidgetDefinition::TreeMapWidgetDefinition(Box::new(TreeMapWidgetDefinition::new(vec![TreeMapWidgetRequest::new().formulas(vec![WidgetFormula::new("hour_before(query1)".to_string(), ),WidgetFormula::new("query1".to_string(), ),]).queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionEventQueryDefinition(Box::new(FormulaAndFunctionEventQueryDefinition::new(FormulaAndFunctionEventQueryDefinitionCompute::new(FormulaAndFunctionEventAggregation::COUNT, ), FormulaAndFunctionEventsDataSource::LOGS, "query1".to_string(), ).group_by(vec![]).indexes(vec!["*".to_string(),]).search(FormulaAndFunctionEventQueryDefinitionSearch::new("".to_string(), )))),]).response_format(FormulaAndFunctionResponseFormat::SCALAR),], TreeMapWidgetDefinitionType::TREEMAP, ).title("".to_string()))), ).layout(WidgetLayout::new(4, 4, 0, 0, )),], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_1039800684.rs b/examples/v1_dashboards_CreateDashboard_1039800684.rs index 8ad874fcf..bf9c71c74 100644 --- a/examples/v1_dashboards_CreateDashboard_1039800684.rs +++ b/examples/v1_dashboards_CreateDashboard_1039800684.rs @@ -36,6 +36,7 @@ async fn main() { )), ))], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_109450134.rs b/examples/v1_dashboards_CreateDashboard_109450134.rs index b20f7f20c..9f082cdf0 100644 --- a/examples/v1_dashboards_CreateDashboard_109450134.rs +++ b/examples/v1_dashboards_CreateDashboard_109450134.rs @@ -43,6 +43,7 @@ async fn main() { .description(Some("".to_string())) .notify_list(Some(vec![])) .template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_1094917386.rs b/examples/v1_dashboards_CreateDashboard_1094917386.rs index bfcb13517..7f533925b 100644 --- a/examples/v1_dashboards_CreateDashboard_1094917386.rs +++ b/examples/v1_dashboards_CreateDashboard_1094917386.rs @@ -40,6 +40,7 @@ async fn main() { .description(Some("".to_string())) .notify_list(Some(vec![])) .template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_1177423752.rs b/examples/v1_dashboards_CreateDashboard_1177423752.rs index 307833fac..c6f011f71 100644 --- a/examples/v1_dashboards_CreateDashboard_1177423752.rs +++ b/examples/v1_dashboards_CreateDashboard_1177423752.rs @@ -40,6 +40,7 @@ async fn main() { .description(None) .notify_list(Some(vec![])) .template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_1200099236.rs b/examples/v1_dashboards_CreateDashboard_1200099236.rs index 8b5449878..f573635a6 100644 --- a/examples/v1_dashboards_CreateDashboard_1200099236.rs +++ b/examples/v1_dashboards_CreateDashboard_1200099236.rs @@ -45,6 +45,7 @@ async fn main() { .description(None) .notify_list(Some(vec![])) .template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_1213075383.rs b/examples/v1_dashboards_CreateDashboard_1213075383.rs index 5f69de28f..b340862f8 100644 --- a/examples/v1_dashboards_CreateDashboard_1213075383.rs +++ b/examples/v1_dashboards_CreateDashboard_1213075383.rs @@ -32,79 +32,8 @@ use datadog_api_client::datadogV1::model::WidgetTime; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::FREE, - "Example-Dashboard".to_string(), - vec![ - Widget::new( - WidgetDefinition::ToplistWidgetDefinition( - Box::new( - ToplistWidgetDefinition::new( - vec![ - ToplistWidgetRequest::new() - .formulas(vec![WidgetFormula::new("query1".to_string())]) - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionMetricQueryDefinition( - Box::new( - FormulaAndFunctionMetricQueryDefinition::new( - FormulaAndFunctionMetricDataSource::METRICS, - "query1".to_string(), - "avg:system.cpu.user{*} by {service}".to_string(), - ).aggregator(FormulaAndFunctionMetricAggregation::AVG), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::SCALAR) - .sort( - WidgetSortBy::new() - .count(10) - .order_by( - vec![ - WidgetSortOrderBy::WidgetFormulaSort( - Box::new( - WidgetFormulaSort::new( - 0, - WidgetSort::DESCENDING, - FormulaType::FORMULA, - ), - ), - ) - ], - ), - ) - ], - ToplistWidgetDefinitionType::TOPLIST, - ) - .style( - ToplistWidgetStyle::new() - .display( - ToplistWidgetDisplay::ToplistWidgetStacked( - Box::new( - ToplistWidgetStacked::new( - ToplistWidgetStackedType::STACKED, - ).legend(ToplistWidgetLegend::INLINE), - ), - ), - ) - .palette("dog_classic".to_string()) - .scaling(ToplistWidgetScaling::RELATIVE), - ) - .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))) - .title("".to_string()) - .title_align(WidgetTextAlign::LEFT) - .title_size("16".to_string()), - ), - ), - ).layout(WidgetLayout::new(15, 47, 0, 0)) - ], - ) - .description(Some("".to_string())) - .notify_list(Some(vec![])) - .template_variables(Some(vec![])); + let body = Dashboard::new(DashboardLayoutType::FREE, "Example-Dashboard".to_string(), vec![Widget::new(WidgetDefinition::ToplistWidgetDefinition(Box::new(ToplistWidgetDefinition::new(vec![ToplistWidgetRequest::new().formulas(vec![WidgetFormula::new("query1".to_string(), ),]).queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionMetricQueryDefinition(Box::new(FormulaAndFunctionMetricQueryDefinition::new(FormulaAndFunctionMetricDataSource::METRICS, "query1".to_string(), "avg:system.cpu.user{*} by {service}".to_string(), ).aggregator(FormulaAndFunctionMetricAggregation::AVG))),]).response_format(FormulaAndFunctionResponseFormat::SCALAR).sort(WidgetSortBy::new().count(10).order_by(vec![WidgetSortOrderBy::WidgetFormulaSort(Box::new(WidgetFormulaSort::new(0, WidgetSort::DESCENDING, FormulaType::FORMULA, ))),])),], ToplistWidgetDefinitionType::TOPLIST, ).style(ToplistWidgetStyle::new().display(ToplistWidgetDisplay::ToplistWidgetStacked(Box::new(ToplistWidgetStacked::new(ToplistWidgetStackedType::STACKED, ).legend(ToplistWidgetLegend::INLINE)))).palette("dog_classic".to_string()).scaling(ToplistWidgetScaling::RELATIVE)).time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))).title("".to_string()).title_align(WidgetTextAlign::LEFT).title_size("16".to_string()))), ).layout(WidgetLayout::new(15, 47, 0, 0, )),], ).description(Some("".to_string())).notify_list(Some(vec![])).template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_1284514532.rs b/examples/v1_dashboards_CreateDashboard_1284514532.rs index 5e78959cb..dc242dcd8 100644 --- a/examples/v1_dashboards_CreateDashboard_1284514532.rs +++ b/examples/v1_dashboards_CreateDashboard_1284514532.rs @@ -1,5 +1,4 @@ -// Create a new dashboard with a timeseries widget using formulas and functions -// cloud cost query +// Create a new dashboard with a timeseries widget using formulas and functions cloud cost query use datadog_api_client::datadog; use datadog_api_client::datadogV1::api_dashboards::DashboardsAPI; use datadog_api_client::datadogV1::model::Dashboard; @@ -25,56 +24,8 @@ use datadog_api_client::datadogV1::model::WidgetTime; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::ORDERED, - "Example-Dashboard".to_string(), - vec![ - Widget::new( - WidgetDefinition::TimeseriesWidgetDefinition( - Box::new( - TimeseriesWidgetDefinition::new( - vec![ - TimeseriesWidgetRequest::new() - .display_type(WidgetDisplayType::BARS) - .formulas(vec![WidgetFormula::new("query1".to_string())]) - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionCloudCostQueryDefinition( - Box::new( - FormulaAndFunctionCloudCostQueryDefinition::new( - FormulaAndFunctionCloudCostDataSource::CLOUD_COST, - "query1".to_string(), - "sum:aws.cost.amortized{*} by {aws_product}.rollup(sum, monthly)".to_string(), - ), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::TIMESERIES) - .style( - WidgetRequestStyle::new() - .line_type(WidgetLineType::SOLID) - .line_width(WidgetLineWidth::NORMAL) - .palette("dog_classic".to_string()), - ) - ], - TimeseriesWidgetDefinitionType::TIMESERIES, - ) - .time( - WidgetTime::WidgetLegacyLiveSpan( - Box::new(WidgetLegacyLiveSpan::new().live_span(WidgetLiveSpan::WEEK_TO_DATE)), - ), - ) - .title("Example Cloud Cost Query".to_string()) - .title_align(WidgetTextAlign::LEFT) - .title_size("16".to_string()), - ), - ), - ) - ], - ); + let body = Dashboard::new(DashboardLayoutType::ORDERED, "Example-Dashboard".to_string(), vec![Widget::new(WidgetDefinition::TimeseriesWidgetDefinition(Box::new(TimeseriesWidgetDefinition::new(vec![TimeseriesWidgetRequest::new().display_type(WidgetDisplayType::BARS).formulas(vec![WidgetFormula::new("query1".to_string(), ),]).queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionCloudCostQueryDefinition(Box::new(FormulaAndFunctionCloudCostQueryDefinition::new(FormulaAndFunctionCloudCostDataSource::CLOUD_COST, "query1".to_string(), "sum:aws.cost.amortized{*} by {aws_product}.rollup(sum, monthly)".to_string(), ))),]).response_format(FormulaAndFunctionResponseFormat::TIMESERIES).style(WidgetRequestStyle::new().line_type(WidgetLineType::SOLID).line_width(WidgetLineWidth::NORMAL).palette("dog_classic".to_string())),], TimeseriesWidgetDefinitionType::TIMESERIES, ).time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new().live_span(WidgetLiveSpan::WEEK_TO_DATE)))).title("Example Cloud Cost Query".to_string()).title_align(WidgetTextAlign::LEFT).title_size("16".to_string()))), ),], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_1307120899.rs b/examples/v1_dashboards_CreateDashboard_1307120899.rs index 2721b558b..2d61af46c 100644 --- a/examples/v1_dashboards_CreateDashboard_1307120899.rs +++ b/examples/v1_dashboards_CreateDashboard_1307120899.rs @@ -28,70 +28,8 @@ use datadog_api_client::datadogV1::model::WidgetTime; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::ORDERED, - "Example-Dashboard with ci_tests datasource".to_string(), - vec![ - Widget::new( - WidgetDefinition::TimeseriesWidgetDefinition( - Box::new( - TimeseriesWidgetDefinition::new( - vec![ - TimeseriesWidgetRequest::new() - .display_type(WidgetDisplayType::LINE) - .formulas(vec![WidgetFormula::new("query1".to_string())]) - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionEventQueryDefinition( - Box::new( - FormulaAndFunctionEventQueryDefinition::new( - FormulaAndFunctionEventQueryDefinitionCompute::new( - FormulaAndFunctionEventAggregation::COUNT, - ), - FormulaAndFunctionEventsDataSource::CI_TESTS, - "query1".to_string(), - ) - .group_by(vec![]) - .indexes(vec!["*".to_string()]) - .search( - FormulaAndFunctionEventQueryDefinitionSearch::new( - "test_level:test".to_string(), - ), - ), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::TIMESERIES) - .style( - WidgetRequestStyle::new() - .line_type(WidgetLineType::SOLID) - .line_width(WidgetLineWidth::NORMAL) - .palette("dog_classic".to_string()), - ) - ], - TimeseriesWidgetDefinitionType::TIMESERIES, - ) - .legend_columns( - vec![ - TimeseriesWidgetLegendColumn::AVG, - TimeseriesWidgetLegendColumn::MIN, - TimeseriesWidgetLegendColumn::MAX, - TimeseriesWidgetLegendColumn::VALUE, - TimeseriesWidgetLegendColumn::SUM - ], - ) - .legend_layout(TimeseriesWidgetLegendLayout::AUTO) - .show_legend(true) - .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))) - .title("".to_string()), - ), - ), - ) - ], - ).reflow_type(DashboardReflowType::AUTO); + let body = Dashboard::new(DashboardLayoutType::ORDERED, "Example-Dashboard with ci_tests datasource".to_string(), vec![Widget::new(WidgetDefinition::TimeseriesWidgetDefinition(Box::new(TimeseriesWidgetDefinition::new(vec![TimeseriesWidgetRequest::new().display_type(WidgetDisplayType::LINE).formulas(vec![WidgetFormula::new("query1".to_string(), ),]).queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionEventQueryDefinition(Box::new(FormulaAndFunctionEventQueryDefinition::new(FormulaAndFunctionEventQueryDefinitionCompute::new(FormulaAndFunctionEventAggregation::COUNT, ), FormulaAndFunctionEventsDataSource::CI_TESTS, "query1".to_string(), ).group_by(vec![]).indexes(vec!["*".to_string(),]).search(FormulaAndFunctionEventQueryDefinitionSearch::new("test_level:test".to_string(), )))),]).response_format(FormulaAndFunctionResponseFormat::TIMESERIES).style(WidgetRequestStyle::new().line_type(WidgetLineType::SOLID).line_width(WidgetLineWidth::NORMAL).palette("dog_classic".to_string())),], TimeseriesWidgetDefinitionType::TIMESERIES, ).legend_columns(vec![TimeseriesWidgetLegendColumn::AVG,TimeseriesWidgetLegendColumn::MIN,TimeseriesWidgetLegendColumn::MAX,TimeseriesWidgetLegendColumn::VALUE,TimeseriesWidgetLegendColumn::SUM,]).legend_layout(TimeseriesWidgetLegendLayout::AUTO).show_legend(true).time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))).title("".to_string()))), ),], ).reflow_type(DashboardReflowType::AUTO); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_1413226400.rs b/examples/v1_dashboards_CreateDashboard_1413226400.rs index 251ba6601..21d42c1bf 100644 --- a/examples/v1_dashboards_CreateDashboard_1413226400.rs +++ b/examples/v1_dashboards_CreateDashboard_1413226400.rs @@ -1,5 +1,4 @@ -// Create a new dashboard with a toplist widget with stacked type and no legend -// specified +// Create a new dashboard with a toplist widget with stacked type and no legend specified use datadog_api_client::datadog; use datadog_api_client::datadogV1::api_dashboards::DashboardsAPI; use datadog_api_client::datadogV1::model::Dashboard; @@ -32,77 +31,8 @@ use datadog_api_client::datadogV1::model::WidgetTime; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::FREE, - "Example-Dashboard".to_string(), - vec![ - Widget::new( - WidgetDefinition::ToplistWidgetDefinition( - Box::new( - ToplistWidgetDefinition::new( - vec![ - ToplistWidgetRequest::new() - .formulas(vec![WidgetFormula::new("query1".to_string())]) - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionMetricQueryDefinition( - Box::new( - FormulaAndFunctionMetricQueryDefinition::new( - FormulaAndFunctionMetricDataSource::METRICS, - "query1".to_string(), - "avg:system.cpu.user{*} by {service}".to_string(), - ).aggregator(FormulaAndFunctionMetricAggregation::AVG), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::SCALAR) - .sort( - WidgetSortBy::new() - .count(10) - .order_by( - vec![ - WidgetSortOrderBy::WidgetGroupSort( - Box::new( - WidgetGroupSort::new( - "service".to_string(), - WidgetSort::ASCENDING, - GroupType::GROUP, - ), - ), - ) - ], - ), - ) - ], - ToplistWidgetDefinitionType::TOPLIST, - ) - .style( - ToplistWidgetStyle::new() - .display( - ToplistWidgetDisplay::ToplistWidgetStacked( - Box::new( - ToplistWidgetStacked::new(ToplistWidgetStackedType::STACKED), - ), - ), - ) - .palette("dog_classic".to_string()) - .scaling(ToplistWidgetScaling::RELATIVE), - ) - .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))) - .title("".to_string()) - .title_align(WidgetTextAlign::LEFT) - .title_size("16".to_string()), - ), - ), - ).layout(WidgetLayout::new(15, 47, 0, 0)) - ], - ) - .description(Some("".to_string())) - .notify_list(Some(vec![])) - .template_variables(Some(vec![])); + let body = Dashboard::new(DashboardLayoutType::FREE, "Example-Dashboard".to_string(), vec![Widget::new(WidgetDefinition::ToplistWidgetDefinition(Box::new(ToplistWidgetDefinition::new(vec![ToplistWidgetRequest::new().formulas(vec![WidgetFormula::new("query1".to_string(), ),]).queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionMetricQueryDefinition(Box::new(FormulaAndFunctionMetricQueryDefinition::new(FormulaAndFunctionMetricDataSource::METRICS, "query1".to_string(), "avg:system.cpu.user{*} by {service}".to_string(), ).aggregator(FormulaAndFunctionMetricAggregation::AVG))),]).response_format(FormulaAndFunctionResponseFormat::SCALAR).sort(WidgetSortBy::new().count(10).order_by(vec![WidgetSortOrderBy::WidgetGroupSort(Box::new(WidgetGroupSort::new("service".to_string(), WidgetSort::ASCENDING, GroupType::GROUP, ))),])),], ToplistWidgetDefinitionType::TOPLIST, ).style(ToplistWidgetStyle::new().display(ToplistWidgetDisplay::ToplistWidgetStacked(Box::new(ToplistWidgetStacked::new(ToplistWidgetStackedType::STACKED, )))).palette("dog_classic".to_string()).scaling(ToplistWidgetScaling::RELATIVE)).time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))).title("".to_string()).title_align(WidgetTextAlign::LEFT).title_size("16".to_string()))), ).layout(WidgetLayout::new(15, 47, 0, 0, )),], ).description(Some("".to_string())).notify_list(Some(vec![])).template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_1423904722.rs b/examples/v1_dashboards_CreateDashboard_1423904722.rs index 48099ebee..c76a24c62 100644 --- a/examples/v1_dashboards_CreateDashboard_1423904722.rs +++ b/examples/v1_dashboards_CreateDashboard_1423904722.rs @@ -37,6 +37,7 @@ async fn main() { .description(Some("".to_string())) .notify_list(Some(vec![])) .template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_1433408735.rs b/examples/v1_dashboards_CreateDashboard_1433408735.rs index 9f14c3ba2..51af5115a 100644 --- a/examples/v1_dashboards_CreateDashboard_1433408735.rs +++ b/examples/v1_dashboards_CreateDashboard_1433408735.rs @@ -23,52 +23,8 @@ use datadog_api_client::datadogV1::model::WidgetTime; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::ORDERED, - "Example-Dashboard".to_string(), - vec![ - Widget::new( - WidgetDefinition::TimeseriesWidgetDefinition( - Box::new( - TimeseriesWidgetDefinition::new( - vec![ - TimeseriesWidgetRequest::new() - .display_type(WidgetDisplayType::BARS) - .formulas(vec![WidgetFormula::new("query1".to_string())]) - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionCloudCostQueryDefinition( - Box::new( - FormulaAndFunctionCloudCostQueryDefinition::new( - FormulaAndFunctionCloudCostDataSource::CLOUD_COST, - "query1".to_string(), - "sum:aws.cost.amortized{*} by {aws_product}.rollup(sum, monthly)".to_string(), - ), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::TIMESERIES) - .style( - WidgetRequestStyle::new() - .line_type(WidgetLineType::SOLID) - .line_width(WidgetLineWidth::NORMAL) - .palette("dog_classic".to_string()), - ) - ], - TimeseriesWidgetDefinitionType::TIMESERIES, - ) - .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))) - .title("Example Cloud Cost Query".to_string()) - .title_align(WidgetTextAlign::LEFT) - .title_size("16".to_string()), - ), - ), - ) - ], - ); + let body = Dashboard::new(DashboardLayoutType::ORDERED, "Example-Dashboard".to_string(), vec![Widget::new(WidgetDefinition::TimeseriesWidgetDefinition(Box::new(TimeseriesWidgetDefinition::new(vec![TimeseriesWidgetRequest::new().display_type(WidgetDisplayType::BARS).formulas(vec![WidgetFormula::new("query1".to_string(), ),]).queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionCloudCostQueryDefinition(Box::new(FormulaAndFunctionCloudCostQueryDefinition::new(FormulaAndFunctionCloudCostDataSource::CLOUD_COST, "query1".to_string(), "sum:aws.cost.amortized{*} by {aws_product}.rollup(sum, monthly)".to_string(), ))),]).response_format(FormulaAndFunctionResponseFormat::TIMESERIES).style(WidgetRequestStyle::new().line_type(WidgetLineType::SOLID).line_width(WidgetLineWidth::NORMAL).palette("dog_classic".to_string())),], TimeseriesWidgetDefinitionType::TIMESERIES, ).time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))).title("Example Cloud Cost Query".to_string()).title_align(WidgetTextAlign::LEFT).title_size("16".to_string()))), ),], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_1442588603.rs b/examples/v1_dashboards_CreateDashboard_1442588603.rs index c1a719b07..22533d2a6 100644 --- a/examples/v1_dashboards_CreateDashboard_1442588603.rs +++ b/examples/v1_dashboards_CreateDashboard_1442588603.rs @@ -1,5 +1,4 @@ -// Create a distribution widget using a histogram request containing a formulas -// and functions APM Stats query +// Create a distribution widget using a histogram request containing a formulas and functions APM Stats query use datadog_api_client::datadog; use datadog_api_client::datadogV1::api_dashboards::DashboardsAPI; use datadog_api_client::datadogV1::model::Dashboard; @@ -22,64 +21,8 @@ use datadog_api_client::datadogV1::model::WidgetTextAlign; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::ORDERED, - "Example-Dashboard".to_string(), - vec![ - Widget::new( - WidgetDefinition::DistributionWidgetDefinition( - Box::new( - DistributionWidgetDefinition::new( - vec![ - DistributionWidgetRequest::new() - .query( - DistributionWidgetHistogramRequestQuery - ::FormulaAndFunctionApmResourceStatsQueryDefinition( - Box::new( - FormulaAndFunctionApmResourceStatsQueryDefinition::new( - FormulaAndFunctionApmResourceStatsDataSource - ::APM_RESOURCE_STATS, - "staging".to_string(), - "query1".to_string(), - "azure-bill-import".to_string(), - FormulaAndFunctionApmResourceStatName::LATENCY_DISTRIBUTION, - ) - .group_by(vec!["resource_name".to_string()]) - .operation_name("universal.http.client".to_string()) - .primary_tag_name("datacenter".to_string()) - .primary_tag_value("*".to_string()), - ), - ), - ) - .request_type(DistributionWidgetHistogramRequestType::HISTOGRAM) - .style(WidgetStyle::new().palette("dog_classic".to_string())) - ], - DistributionWidgetDefinitionType::DISTRIBUTION, - ) - .show_legend(false) - .title("APM Stats - Request latency HOP".to_string()) - .title_align(WidgetTextAlign::LEFT) - .title_size("16".to_string()) - .xaxis( - DistributionWidgetXAxis::new() - .include_zero(true) - .max("auto".to_string()) - .min("auto".to_string()) - .scale("linear".to_string()), - ) - .yaxis( - DistributionWidgetYAxis::new() - .include_zero(true) - .max("auto".to_string()) - .min("auto".to_string()) - .scale("linear".to_string()), - ), - ), - ), - ).layout(WidgetLayout::new(2, 4, 8, 0)) - ], - ).description(Some("".to_string())); + let body = Dashboard::new(DashboardLayoutType::ORDERED, "Example-Dashboard".to_string(), vec![Widget::new(WidgetDefinition::DistributionWidgetDefinition(Box::new(DistributionWidgetDefinition::new(vec![DistributionWidgetRequest::new().query(DistributionWidgetHistogramRequestQuery::FormulaAndFunctionApmResourceStatsQueryDefinition(Box::new(FormulaAndFunctionApmResourceStatsQueryDefinition::new(FormulaAndFunctionApmResourceStatsDataSource::APM_RESOURCE_STATS, "staging".to_string(), "query1".to_string(), "azure-bill-import".to_string(), FormulaAndFunctionApmResourceStatName::LATENCY_DISTRIBUTION, ).group_by(vec!["resource_name".to_string(),]).operation_name("universal.http.client".to_string()).primary_tag_name("datacenter".to_string()).primary_tag_value("*".to_string())))).request_type(DistributionWidgetHistogramRequestType::HISTOGRAM).style(WidgetStyle::new().palette("dog_classic".to_string())),], DistributionWidgetDefinitionType::DISTRIBUTION, ).show_legend(false).title("APM Stats - Request latency HOP".to_string()).title_align(WidgetTextAlign::LEFT).title_size("16".to_string()).xaxis(DistributionWidgetXAxis::new().include_zero(true).max("auto".to_string()).min("auto".to_string()).scale("linear".to_string())).yaxis(DistributionWidgetYAxis::new().include_zero(true).max("auto".to_string()).min("auto".to_string()).scale("linear".to_string())))), ).layout(WidgetLayout::new(2, 4, 8, 0, )),], ).description(Some("".to_string())); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_145494973.rs b/examples/v1_dashboards_CreateDashboard_145494973.rs index 45b0ef4ce..5b388865a 100644 --- a/examples/v1_dashboards_CreateDashboard_145494973.rs +++ b/examples/v1_dashboards_CreateDashboard_145494973.rs @@ -18,50 +18,8 @@ use datadog_api_client::datadogV1::model::WidgetTextAlign; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::ORDERED, - "Example-Dashboard".to_string(), - vec![ - Widget::new( - WidgetDefinition::TableWidgetDefinition( - Box::new( - TableWidgetDefinition::new( - vec![ - TableWidgetRequest::new() - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionApmResourceStatsQueryDefinition( - Box::new( - FormulaAndFunctionApmResourceStatsQueryDefinition::new( - FormulaAndFunctionApmResourceStatsDataSource - ::APM_RESOURCE_STATS, - "ci".to_string(), - "query1".to_string(), - "cassandra".to_string(), - FormulaAndFunctionApmResourceStatName::HITS, - ) - .group_by(vec!["resource_name".to_string()]) - .operation_name("cassandra.query".to_string()) - .primary_tag_name("datacenter".to_string()) - .primary_tag_value("edge-eu1.prod.dog".to_string()), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::SCALAR) - ], - TableWidgetDefinitionType::QUERY_TABLE, - ) - .title("".to_string()) - .title_align(WidgetTextAlign::LEFT) - .title_size("16".to_string()), - ), - ), - ).layout(WidgetLayout::new(4, 4, 0, 0)) - ], - ); + let body = Dashboard::new(DashboardLayoutType::ORDERED, "Example-Dashboard".to_string(), vec![Widget::new(WidgetDefinition::TableWidgetDefinition(Box::new(TableWidgetDefinition::new(vec![TableWidgetRequest::new().queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionApmResourceStatsQueryDefinition(Box::new(FormulaAndFunctionApmResourceStatsQueryDefinition::new(FormulaAndFunctionApmResourceStatsDataSource::APM_RESOURCE_STATS, "ci".to_string(), "query1".to_string(), "cassandra".to_string(), FormulaAndFunctionApmResourceStatName::HITS, ).group_by(vec!["resource_name".to_string(),]).operation_name("cassandra.query".to_string()).primary_tag_name("datacenter".to_string()).primary_tag_value("edge-eu1.prod.dog".to_string()))),]).response_format(FormulaAndFunctionResponseFormat::SCALAR),], TableWidgetDefinitionType::QUERY_TABLE, ).title("".to_string()).title_align(WidgetTextAlign::LEFT).title_size("16".to_string()))), ).layout(WidgetLayout::new(4, 4, 0, 0, )),], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_173805046.rs b/examples/v1_dashboards_CreateDashboard_173805046.rs index e45964fe2..ea97f04c7 100644 --- a/examples/v1_dashboards_CreateDashboard_173805046.rs +++ b/examples/v1_dashboards_CreateDashboard_173805046.rs @@ -35,6 +35,7 @@ async fn main() { .description(Some("".to_string())) .notify_list(Some(vec![])) .template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_1738608750.rs b/examples/v1_dashboards_CreateDashboard_1738608750.rs index ddabd6883..00e783531 100644 --- a/examples/v1_dashboards_CreateDashboard_1738608750.rs +++ b/examples/v1_dashboards_CreateDashboard_1738608750.rs @@ -31,6 +31,7 @@ async fn main() { .description(None) .notify_list(Some(vec![])) .template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_1754992756.rs b/examples/v1_dashboards_CreateDashboard_1754992756.rs index ac5ba514a..ce457ec83 100644 --- a/examples/v1_dashboards_CreateDashboard_1754992756.rs +++ b/examples/v1_dashboards_CreateDashboard_1754992756.rs @@ -38,6 +38,7 @@ async fn main() { ], ) .description(Some("description".to_string())); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_1877023900.rs b/examples/v1_dashboards_CreateDashboard_1877023900.rs index b67c2c896..f4a3178ce 100644 --- a/examples/v1_dashboards_CreateDashboard_1877023900.rs +++ b/examples/v1_dashboards_CreateDashboard_1877023900.rs @@ -41,6 +41,7 @@ async fn main() { )), ))], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2029850837.rs b/examples/v1_dashboards_CreateDashboard_2029850837.rs index 3aed42b33..8b601c647 100644 --- a/examples/v1_dashboards_CreateDashboard_2029850837.rs +++ b/examples/v1_dashboards_CreateDashboard_2029850837.rs @@ -41,6 +41,7 @@ async fn main() { .description(Some("".to_string())) .notify_list(Some(vec![])) .template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2034634967.rs b/examples/v1_dashboards_CreateDashboard_2034634967.rs index 0c6ea26fb..4c105ea86 100644 --- a/examples/v1_dashboards_CreateDashboard_2034634967.rs +++ b/examples/v1_dashboards_CreateDashboard_2034634967.rs @@ -32,6 +32,7 @@ async fn main() { .description(Some("".to_string())) .notify_list(Some(vec![])) .template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2064651578.rs b/examples/v1_dashboards_CreateDashboard_2064651578.rs index de670290e..af3269944 100644 --- a/examples/v1_dashboards_CreateDashboard_2064651578.rs +++ b/examples/v1_dashboards_CreateDashboard_2064651578.rs @@ -27,64 +27,8 @@ use datadog_api_client::datadogV1::model::WidgetTime; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::ORDERED, - "Example-Dashboard".to_string(), - vec![ - Widget::new( - WidgetDefinition::ChangeWidgetDefinition( - Box::new( - ChangeWidgetDefinition::new( - vec![ - ChangeWidgetRequest::new() - .change_type(WidgetChangeType::ABSOLUTE) - .compare_to(WidgetCompareTo::HOUR_BEFORE) - .formulas( - vec![ - WidgetFormula::new("hour_before(query1)".to_string()), - WidgetFormula::new("query1".to_string()) - ], - ) - .increase_good(true) - .order_by(WidgetOrderBy::CHANGE) - .order_dir(WidgetSort::DESCENDING) - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionEventQueryDefinition( - Box::new( - FormulaAndFunctionEventQueryDefinition::new( - FormulaAndFunctionEventQueryDefinitionCompute::new( - FormulaAndFunctionEventAggregation::COUNT, - ), - FormulaAndFunctionEventsDataSource::LOGS, - "query1".to_string(), - ) - .group_by(vec![]) - .indexes(vec!["*".to_string()]) - .search( - FormulaAndFunctionEventQueryDefinitionSearch::new( - "".to_string(), - ), - ), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::SCALAR) - ], - ChangeWidgetDefinitionType::CHANGE, - ) - .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))) - .title("".to_string()) - .title_align(WidgetTextAlign::LEFT) - .title_size("16".to_string()), - ), - ), - ).layout(WidgetLayout::new(4, 4, 0, 0)) - ], - ).tags(Some(vec!["team:foobar".to_string()])); + let body = Dashboard::new(DashboardLayoutType::ORDERED, "Example-Dashboard".to_string(), vec![Widget::new(WidgetDefinition::ChangeWidgetDefinition(Box::new(ChangeWidgetDefinition::new(vec![ChangeWidgetRequest::new().change_type(WidgetChangeType::ABSOLUTE).compare_to(WidgetCompareTo::HOUR_BEFORE).formulas(vec![WidgetFormula::new("hour_before(query1)".to_string(), ),WidgetFormula::new("query1".to_string(), ),]).increase_good(true).order_by(WidgetOrderBy::CHANGE).order_dir(WidgetSort::DESCENDING).queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionEventQueryDefinition(Box::new(FormulaAndFunctionEventQueryDefinition::new(FormulaAndFunctionEventQueryDefinitionCompute::new(FormulaAndFunctionEventAggregation::COUNT, ), FormulaAndFunctionEventsDataSource::LOGS, "query1".to_string(), ).group_by(vec![]).indexes(vec!["*".to_string(),]).search(FormulaAndFunctionEventQueryDefinitionSearch::new("".to_string(), )))),]).response_format(FormulaAndFunctionResponseFormat::SCALAR),], ChangeWidgetDefinitionType::CHANGE, ).time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))).title("".to_string()).title_align(WidgetTextAlign::LEFT).title_size("16".to_string()))), ).layout(WidgetLayout::new(4, 4, 0, 0, )),], ).tags(Some(vec!["team:foobar".to_string(),])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2104498738.rs b/examples/v1_dashboards_CreateDashboard_2104498738.rs index 6245f0515..f2b06efbe 100644 --- a/examples/v1_dashboards_CreateDashboard_2104498738.rs +++ b/examples/v1_dashboards_CreateDashboard_2104498738.rs @@ -21,68 +21,8 @@ use datadog_api_client::datadogV1::model::WidgetTextAlign; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::ORDERED, - "Example-Dashboard".to_string(), - vec![ - Widget::new( - WidgetDefinition::ScatterPlotWidgetDefinition( - Box::new( - ScatterPlotWidgetDefinition::new( - ScatterPlotWidgetDefinitionRequests - ::new().table( - ScatterplotTableRequest::new() - .formulas( - vec![ - ScatterplotWidgetFormula::new( - ScatterplotDimension::X, - "query1".to_string(), - ).alias("my-query1".to_string()), - ScatterplotWidgetFormula::new( - ScatterplotDimension::Y, - "query2".to_string(), - ).alias("my-query2".to_string()) - ], - ) - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionMetricQueryDefinition( - Box::new( - FormulaAndFunctionMetricQueryDefinition::new( - FormulaAndFunctionMetricDataSource::METRICS, - "query1".to_string(), - "avg:system.cpu.user{*} by {service}".to_string(), - ).aggregator(FormulaAndFunctionMetricAggregation::AVG), - ), - ), - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionMetricQueryDefinition( - Box::new( - FormulaAndFunctionMetricQueryDefinition::new( - FormulaAndFunctionMetricDataSource::METRICS, - "query2".to_string(), - "avg:system.mem.used{*} by {service}".to_string(), - ).aggregator(FormulaAndFunctionMetricAggregation::AVG), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::SCALAR), - ), - ScatterPlotWidgetDefinitionType::SCATTERPLOT, - ) - .title("".to_string()) - .title_align(WidgetTextAlign::LEFT) - .title_size("16".to_string()), - ), - ), - ) - .id(5346764334358972) - .layout(WidgetLayout::new(2, 4, 0, 0)) - ], - ); + let body = Dashboard::new(DashboardLayoutType::ORDERED, "Example-Dashboard".to_string(), vec![Widget::new(WidgetDefinition::ScatterPlotWidgetDefinition(Box::new(ScatterPlotWidgetDefinition::new(ScatterPlotWidgetDefinitionRequests::new().table(ScatterplotTableRequest::new().formulas(vec![ScatterplotWidgetFormula::new(ScatterplotDimension::X, "query1".to_string(), ).alias("my-query1".to_string()),ScatterplotWidgetFormula::new(ScatterplotDimension::Y, "query2".to_string(), ).alias("my-query2".to_string()),]).queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionMetricQueryDefinition(Box::new(FormulaAndFunctionMetricQueryDefinition::new(FormulaAndFunctionMetricDataSource::METRICS, "query1".to_string(), "avg:system.cpu.user{*} by {service}".to_string(), ).aggregator(FormulaAndFunctionMetricAggregation::AVG))),FormulaAndFunctionQueryDefinition::FormulaAndFunctionMetricQueryDefinition(Box::new(FormulaAndFunctionMetricQueryDefinition::new(FormulaAndFunctionMetricDataSource::METRICS, "query2".to_string(), "avg:system.mem.used{*} by {service}".to_string(), ).aggregator(FormulaAndFunctionMetricAggregation::AVG))),]).response_format(FormulaAndFunctionResponseFormat::SCALAR)), ScatterPlotWidgetDefinitionType::SCATTERPLOT, ).title("".to_string()).title_align(WidgetTextAlign::LEFT).title_size("16".to_string()))), ).id(5346764334358972).layout(WidgetLayout::new(2, 4, 0, 0, )),], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2261785072.rs b/examples/v1_dashboards_CreateDashboard_2261785072.rs index f4a2de895..f59cc2ba4 100644 --- a/examples/v1_dashboards_CreateDashboard_2261785072.rs +++ b/examples/v1_dashboards_CreateDashboard_2261785072.rs @@ -19,65 +19,8 @@ use datadog_api_client::datadogV1::model::WidgetRequestStyle; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::ORDERED, - "Example-Dashboard".to_string(), - vec![ - Widget::new( - WidgetDefinition::TimeseriesWidgetDefinition( - Box::new( - TimeseriesWidgetDefinition::new( - vec![ - TimeseriesWidgetRequest::new() - .display_type(WidgetDisplayType::LINE) - .on_right_yaxis(false) - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionMetricQueryDefinition( - Box::new( - FormulaAndFunctionMetricQueryDefinition::new( - FormulaAndFunctionMetricDataSource::METRICS, - "mymetric".to_string(), - "avg:system.cpu.user{*}".to_string(), - ), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::TIMESERIES), - TimeseriesWidgetRequest::new() - .display_type(WidgetDisplayType::OVERLAY) - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionMetricQueryDefinition( - Box::new( - FormulaAndFunctionMetricQueryDefinition::new( - FormulaAndFunctionMetricDataSource::METRICS, - "mymetricoverlay".to_string(), - "avg:system.cpu.user{*}".to_string(), - ), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::TIMESERIES) - .style( - WidgetRequestStyle::new() - .line_type(WidgetLineType::SOLID) - .line_width(WidgetLineWidth::NORMAL) - .palette("purple".to_string()), - ) - ], - TimeseriesWidgetDefinitionType::TIMESERIES, - ), - ), - ), - ) - ], - ); + let body = Dashboard::new(DashboardLayoutType::ORDERED, "Example-Dashboard".to_string(), vec![Widget::new(WidgetDefinition::TimeseriesWidgetDefinition(Box::new(TimeseriesWidgetDefinition::new(vec![TimeseriesWidgetRequest::new().display_type(WidgetDisplayType::LINE).on_right_yaxis(false).queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionMetricQueryDefinition(Box::new(FormulaAndFunctionMetricQueryDefinition::new(FormulaAndFunctionMetricDataSource::METRICS, "mymetric".to_string(), "avg:system.cpu.user{*}".to_string(), ))),]).response_format(FormulaAndFunctionResponseFormat::TIMESERIES),TimeseriesWidgetRequest::new().display_type(WidgetDisplayType::OVERLAY).queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionMetricQueryDefinition(Box::new(FormulaAndFunctionMetricQueryDefinition::new(FormulaAndFunctionMetricDataSource::METRICS, "mymetricoverlay".to_string(), "avg:system.cpu.user{*}".to_string(), ))),]).response_format(FormulaAndFunctionResponseFormat::TIMESERIES).style(WidgetRequestStyle::new().line_type(WidgetLineType::SOLID).line_width(WidgetLineWidth::NORMAL).palette("purple".to_string())),], TimeseriesWidgetDefinitionType::TIMESERIES, ))), ),], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2278756614.rs b/examples/v1_dashboards_CreateDashboard_2278756614.rs index fbc10b069..6219e577d 100644 --- a/examples/v1_dashboards_CreateDashboard_2278756614.rs +++ b/examples/v1_dashboards_CreateDashboard_2278756614.rs @@ -31,83 +31,8 @@ use datadog_api_client::datadogV1::model::WidgetTextAlign; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::ORDERED, - "Example-Dashboard".to_string(), - vec![ - Widget::new( - WidgetDefinition::SplitGraphWidgetDefinition( - Box::new( - SplitGraphWidgetDefinition::new( - SplitGraphVizSize::MD, - SplitGraphSourceWidgetDefinition::TimeseriesWidgetDefinition( - Box::new( - TimeseriesWidgetDefinition::new( - vec![ - TimeseriesWidgetRequest::new() - .display_type(WidgetDisplayType::LINE) - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionMetricQueryDefinition( - Box::new( - FormulaAndFunctionMetricQueryDefinition::new( - FormulaAndFunctionMetricDataSource::METRICS, - "query1".to_string(), - "avg:system.cpu.user{*}".to_string(), - ), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::TIMESERIES) - .style( - WidgetRequestStyle::new() - .line_type(WidgetLineType::SOLID) - .line_width(WidgetLineWidth::NORMAL) - .palette("dog_classic".to_string()), - ) - ], - TimeseriesWidgetDefinitionType::TIMESERIES, - ) - .title("".to_string()) - .title_align(WidgetTextAlign::LEFT) - .title_size("16".to_string()), - ), - ), - SplitConfig::new( - 24, - SplitSort::new( - WidgetSort::DESCENDING, - ).compute( - SplitConfigSortCompute::new("sum".to_string(), "system.cpu.user".to_string()), - ), - vec![SplitDimension::new("service".to_string())], - ).static_splits( - vec![ - vec![ - SplitVectorEntryItem::new( - "service".to_string(), - vec!["cassandra".to_string()], - ), - SplitVectorEntryItem::new("datacenter".to_string(), vec![]) - ], - vec![SplitVectorEntryItem::new("demo".to_string(), vec!["env".to_string()])] - ], - ), - SplitGraphWidgetDefinitionType::SPLIT_GROUP, - ) - .has_uniform_y_axes(true) - .title("".to_string()), - ), - ), - ).layout(WidgetLayout::new(8, 12, 0, 0)) - ], - ) - .description(Some("".to_string())) - .notify_list(Some(vec![])) - .template_variables(Some(vec![])); + let body = Dashboard::new(DashboardLayoutType::ORDERED, "Example-Dashboard".to_string(), vec![Widget::new(WidgetDefinition::SplitGraphWidgetDefinition(Box::new(SplitGraphWidgetDefinition::new(SplitGraphVizSize::MD, SplitGraphSourceWidgetDefinition::TimeseriesWidgetDefinition(Box::new(TimeseriesWidgetDefinition::new(vec![TimeseriesWidgetRequest::new().display_type(WidgetDisplayType::LINE).queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionMetricQueryDefinition(Box::new(FormulaAndFunctionMetricQueryDefinition::new(FormulaAndFunctionMetricDataSource::METRICS, "query1".to_string(), "avg:system.cpu.user{*}".to_string(), ))),]).response_format(FormulaAndFunctionResponseFormat::TIMESERIES).style(WidgetRequestStyle::new().line_type(WidgetLineType::SOLID).line_width(WidgetLineWidth::NORMAL).palette("dog_classic".to_string())),], TimeseriesWidgetDefinitionType::TIMESERIES, ).title("".to_string()).title_align(WidgetTextAlign::LEFT).title_size("16".to_string()))), SplitConfig::new(24, SplitSort::new(WidgetSort::DESCENDING, ).compute(SplitConfigSortCompute::new("sum".to_string(), "system.cpu.user".to_string(), )), vec![SplitDimension::new("service".to_string(), ),], ).static_splits(vec![vec![SplitVectorEntryItem::new("service".to_string(), vec!["cassandra".to_string(),], ),SplitVectorEntryItem::new("datacenter".to_string(), vec![], ),],vec![SplitVectorEntryItem::new("demo".to_string(), vec!["env".to_string(),], ),],]), SplitGraphWidgetDefinitionType::SPLIT_GROUP, ).has_uniform_y_axes(true).title("".to_string()))), ).layout(WidgetLayout::new(8, 12, 0, 0, )),], ).description(Some("".to_string())).notify_list(Some(vec![])).template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2308247857.rs b/examples/v1_dashboards_CreateDashboard_2308247857.rs index 0ff702fb1..74791aa63 100644 --- a/examples/v1_dashboards_CreateDashboard_2308247857.rs +++ b/examples/v1_dashboards_CreateDashboard_2308247857.rs @@ -39,6 +39,7 @@ async fn main() { .description(Some("".to_string())) .notify_list(Some(vec![])) .template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2316374332.rs b/examples/v1_dashboards_CreateDashboard_2316374332.rs index 222fbb819..1d52b7f73 100644 --- a/examples/v1_dashboards_CreateDashboard_2316374332.rs +++ b/examples/v1_dashboards_CreateDashboard_2316374332.rs @@ -35,6 +35,7 @@ async fn main() { .description(Some("".to_string())) .notify_list(Some(vec![])) .template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2336428357.rs b/examples/v1_dashboards_CreateDashboard_2336428357.rs index c54c61081..8ed4c2d1e 100644 --- a/examples/v1_dashboards_CreateDashboard_2336428357.rs +++ b/examples/v1_dashboards_CreateDashboard_2336428357.rs @@ -28,72 +28,8 @@ use datadog_api_client::datadogV1::model::WidgetTime; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::FREE, - "Example-Dashboard".to_string(), - vec![ - Widget::new( - WidgetDefinition::TableWidgetDefinition( - Box::new( - TableWidgetDefinition::new( - vec![ - TableWidgetRequest::new() - .formulas( - vec![ - WidgetFormula::new("query1".to_string()) - .cell_display_mode(TableWidgetCellDisplayMode::BAR) - .conditional_formats(vec![]) - ], - ) - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionMetricQueryDefinition( - Box::new( - FormulaAndFunctionMetricQueryDefinition::new( - FormulaAndFunctionMetricDataSource::METRICS, - "query1".to_string(), - "avg:system.cpu.user{*} by {host}".to_string(), - ).aggregator(FormulaAndFunctionMetricAggregation::AVG), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::SCALAR) - .sort( - WidgetSortBy::new() - .count(500) - .order_by( - vec![ - WidgetSortOrderBy::WidgetFormulaSort( - Box::new( - WidgetFormulaSort::new( - 0, - WidgetSort::DESCENDING, - FormulaType::FORMULA, - ), - ), - ) - ], - ), - ) - ], - TableWidgetDefinitionType::QUERY_TABLE, - ) - .has_search_bar(TableWidgetHasSearchBar::AUTO) - .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))) - .title("".to_string()) - .title_align(WidgetTextAlign::LEFT) - .title_size("16".to_string()), - ), - ), - ).layout(WidgetLayout::new(32, 54, 0, 0)) - ], - ) - .description(Some("".to_string())) - .notify_list(Some(vec![])) - .template_variables(Some(vec![])); + let body = Dashboard::new(DashboardLayoutType::FREE, "Example-Dashboard".to_string(), vec![Widget::new(WidgetDefinition::TableWidgetDefinition(Box::new(TableWidgetDefinition::new(vec![TableWidgetRequest::new().formulas(vec![WidgetFormula::new("query1".to_string(), ).cell_display_mode(TableWidgetCellDisplayMode::BAR).conditional_formats(vec![]),]).queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionMetricQueryDefinition(Box::new(FormulaAndFunctionMetricQueryDefinition::new(FormulaAndFunctionMetricDataSource::METRICS, "query1".to_string(), "avg:system.cpu.user{*} by {host}".to_string(), ).aggregator(FormulaAndFunctionMetricAggregation::AVG))),]).response_format(FormulaAndFunctionResponseFormat::SCALAR).sort(WidgetSortBy::new().count(500).order_by(vec![WidgetSortOrderBy::WidgetFormulaSort(Box::new(WidgetFormulaSort::new(0, WidgetSort::DESCENDING, FormulaType::FORMULA, ))),])),], TableWidgetDefinitionType::QUERY_TABLE, ).has_search_bar(TableWidgetHasSearchBar::AUTO).time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))).title("".to_string()).title_align(WidgetTextAlign::LEFT).title_size("16".to_string()))), ).layout(WidgetLayout::new(32, 54, 0, 0, )),], ).description(Some("".to_string())).notify_list(Some(vec![])).template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2338918735.rs b/examples/v1_dashboards_CreateDashboard_2338918735.rs index 9f710fd00..6b0f74c5d 100644 --- a/examples/v1_dashboards_CreateDashboard_2338918735.rs +++ b/examples/v1_dashboards_CreateDashboard_2338918735.rs @@ -33,6 +33,7 @@ async fn main() { )), ))], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2342457693.rs b/examples/v1_dashboards_CreateDashboard_2342457693.rs index bb8f660ff..1713abce9 100644 --- a/examples/v1_dashboards_CreateDashboard_2342457693.rs +++ b/examples/v1_dashboards_CreateDashboard_2342457693.rs @@ -24,85 +24,8 @@ use datadog_api_client::datadogV1::model::WidgetTime; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::FREE, - "Example-Dashboard".to_string(), - vec![ - Widget::new( - WidgetDefinition::ScatterPlotWidgetDefinition( - Box::new( - ScatterPlotWidgetDefinition::new( - ScatterPlotWidgetDefinitionRequests - ::new().table( - ScatterplotTableRequest::new() - .formulas( - vec![ - ScatterplotWidgetFormula::new( - ScatterplotDimension::X, - "query1".to_string(), - ).alias("".to_string()), - ScatterplotWidgetFormula::new( - ScatterplotDimension::Y, - "query2".to_string(), - ).alias("".to_string()) - ], - ) - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionMetricQueryDefinition( - Box::new( - FormulaAndFunctionMetricQueryDefinition::new( - FormulaAndFunctionMetricDataSource::METRICS, - "query1".to_string(), - "avg:system.cpu.user{*} by {service}".to_string(), - ).aggregator(FormulaAndFunctionMetricAggregation::AVG), - ), - ), - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionMetricQueryDefinition( - Box::new( - FormulaAndFunctionMetricQueryDefinition::new( - FormulaAndFunctionMetricDataSource::METRICS, - "query2".to_string(), - "avg:system.mem.used{*} by {service}".to_string(), - ).aggregator(FormulaAndFunctionMetricAggregation::AVG), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::SCALAR), - ), - ScatterPlotWidgetDefinitionType::SCATTERPLOT, - ) - .color_by_groups(vec![]) - .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))) - .title("".to_string()) - .title_align(WidgetTextAlign::LEFT) - .title_size("16".to_string()) - .xaxis( - WidgetAxis::new() - .include_zero(true) - .max("auto".to_string()) - .min("auto".to_string()) - .scale("linear".to_string()), - ) - .yaxis( - WidgetAxis::new() - .include_zero(true) - .max("auto".to_string()) - .min("auto".to_string()) - .scale("linear".to_string()), - ), - ), - ), - ).layout(WidgetLayout::new(15, 47, 0, 0)) - ], - ) - .description(Some("".to_string())) - .notify_list(Some(vec![])) - .template_variables(Some(vec![])); + let body = Dashboard::new(DashboardLayoutType::FREE, "Example-Dashboard".to_string(), vec![Widget::new(WidgetDefinition::ScatterPlotWidgetDefinition(Box::new(ScatterPlotWidgetDefinition::new(ScatterPlotWidgetDefinitionRequests::new().table(ScatterplotTableRequest::new().formulas(vec![ScatterplotWidgetFormula::new(ScatterplotDimension::X, "query1".to_string(), ).alias("".to_string()),ScatterplotWidgetFormula::new(ScatterplotDimension::Y, "query2".to_string(), ).alias("".to_string()),]).queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionMetricQueryDefinition(Box::new(FormulaAndFunctionMetricQueryDefinition::new(FormulaAndFunctionMetricDataSource::METRICS, "query1".to_string(), "avg:system.cpu.user{*} by {service}".to_string(), ).aggregator(FormulaAndFunctionMetricAggregation::AVG))),FormulaAndFunctionQueryDefinition::FormulaAndFunctionMetricQueryDefinition(Box::new(FormulaAndFunctionMetricQueryDefinition::new(FormulaAndFunctionMetricDataSource::METRICS, "query2".to_string(), "avg:system.mem.used{*} by {service}".to_string(), ).aggregator(FormulaAndFunctionMetricAggregation::AVG))),]).response_format(FormulaAndFunctionResponseFormat::SCALAR)), ScatterPlotWidgetDefinitionType::SCATTERPLOT, ).color_by_groups(vec![]).time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))).title("".to_string()).title_align(WidgetTextAlign::LEFT).title_size("16".to_string()).xaxis(WidgetAxis::new().include_zero(true).max("auto".to_string()).min("auto".to_string()).scale("linear".to_string())).yaxis(WidgetAxis::new().include_zero(true).max("auto".to_string()).min("auto".to_string()).scale("linear".to_string())))), ).layout(WidgetLayout::new(15, 47, 0, 0, )),], ).description(Some("".to_string())).notify_list(Some(vec![])).template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2349863258.rs b/examples/v1_dashboards_CreateDashboard_2349863258.rs index 469989272..00b9e35fc 100644 --- a/examples/v1_dashboards_CreateDashboard_2349863258.rs +++ b/examples/v1_dashboards_CreateDashboard_2349863258.rs @@ -20,49 +20,8 @@ use datadog_api_client::datadogV1::model::WidgetTime; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::FREE, - "Example-Dashboard".to_string(), - vec![ - Widget::new( - WidgetDefinition::QueryValueWidgetDefinition( - Box::new( - QueryValueWidgetDefinition::new( - vec![ - QueryValueWidgetRequest::new() - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionMetricQueryDefinition( - Box::new( - FormulaAndFunctionMetricQueryDefinition::new( - FormulaAndFunctionMetricDataSource::METRICS, - "query1".to_string(), - "avg:system.cpu.user{*}".to_string(), - ).aggregator(FormulaAndFunctionMetricAggregation::AVG), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::SCALAR) - ], - QueryValueWidgetDefinitionType::QUERY_VALUE, - ) - .autoscale(true) - .precision(2) - .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))) - .title("".to_string()) - .title_align(WidgetTextAlign::LEFT) - .title_size("16".to_string()), - ), - ), - ).layout(WidgetLayout::new(15, 47, 0, 0)) - ], - ) - .description(Some("".to_string())) - .notify_list(Some(vec![])) - .template_variables(Some(vec![])); + let body = Dashboard::new(DashboardLayoutType::FREE, "Example-Dashboard".to_string(), vec![Widget::new(WidgetDefinition::QueryValueWidgetDefinition(Box::new(QueryValueWidgetDefinition::new(vec![QueryValueWidgetRequest::new().queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionMetricQueryDefinition(Box::new(FormulaAndFunctionMetricQueryDefinition::new(FormulaAndFunctionMetricDataSource::METRICS, "query1".to_string(), "avg:system.cpu.user{*}".to_string(), ).aggregator(FormulaAndFunctionMetricAggregation::AVG))),]).response_format(FormulaAndFunctionResponseFormat::SCALAR),], QueryValueWidgetDefinitionType::QUERY_VALUE, ).autoscale(true).precision(2).time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))).title("".to_string()).title_align(WidgetTextAlign::LEFT).title_size("16".to_string()))), ).layout(WidgetLayout::new(15, 47, 0, 0, )),], ).description(Some("".to_string())).notify_list(Some(vec![])).template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2361531620.rs b/examples/v1_dashboards_CreateDashboard_2361531620.rs index 79237a676..2c2085918 100644 --- a/examples/v1_dashboards_CreateDashboard_2361531620.rs +++ b/examples/v1_dashboards_CreateDashboard_2361531620.rs @@ -41,6 +41,7 @@ async fn main() { )), ))], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2432046716.rs b/examples/v1_dashboards_CreateDashboard_2432046716.rs index ed7664a2c..fafbe4eaf 100644 --- a/examples/v1_dashboards_CreateDashboard_2432046716.rs +++ b/examples/v1_dashboards_CreateDashboard_2432046716.rs @@ -35,6 +35,7 @@ async fn main() { )), ))], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2490110261.rs b/examples/v1_dashboards_CreateDashboard_2490110261.rs index 024983863..fca5c56b0 100644 --- a/examples/v1_dashboards_CreateDashboard_2490110261.rs +++ b/examples/v1_dashboards_CreateDashboard_2490110261.rs @@ -19,49 +19,8 @@ use datadog_api_client::datadogV1::model::WidgetLayout; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::ORDERED, - "Example-Dashboard with Audit Logs Query".to_string(), - vec![ - Widget::new( - WidgetDefinition::TimeseriesWidgetDefinition( - Box::new( - TimeseriesWidgetDefinition::new( - vec![ - TimeseriesWidgetRequest::new() - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionEventQueryDefinition( - Box::new( - FormulaAndFunctionEventQueryDefinition::new( - FormulaAndFunctionEventQueryDefinitionCompute::new( - FormulaAndFunctionEventAggregation::COUNT, - ), - FormulaAndFunctionEventsDataSource::AUDIT, - "query1".to_string(), - ) - .group_by(vec![]) - .indexes(vec!["*".to_string()]) - .search( - FormulaAndFunctionEventQueryDefinitionSearch::new( - "".to_string(), - ), - ), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::TIMESERIES) - ], - TimeseriesWidgetDefinitionType::TIMESERIES, - ), - ), - ), - ).layout(WidgetLayout::new(2, 4, 2, 0)) - ], - ); + let body = Dashboard::new(DashboardLayoutType::ORDERED, "Example-Dashboard with Audit Logs Query".to_string(), vec![Widget::new(WidgetDefinition::TimeseriesWidgetDefinition(Box::new(TimeseriesWidgetDefinition::new(vec![TimeseriesWidgetRequest::new().queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionEventQueryDefinition(Box::new(FormulaAndFunctionEventQueryDefinition::new(FormulaAndFunctionEventQueryDefinitionCompute::new(FormulaAndFunctionEventAggregation::COUNT, ), FormulaAndFunctionEventsDataSource::AUDIT, "query1".to_string(), ).group_by(vec![]).indexes(vec!["*".to_string(),]).search(FormulaAndFunctionEventQueryDefinitionSearch::new("".to_string(), )))),]).response_format(FormulaAndFunctionResponseFormat::TIMESERIES),], TimeseriesWidgetDefinitionType::TIMESERIES, ))), ).layout(WidgetLayout::new(2, 4, 2, 0, )),], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_252716965.rs b/examples/v1_dashboards_CreateDashboard_252716965.rs index c88320b02..06d5ec4be 100644 --- a/examples/v1_dashboards_CreateDashboard_252716965.rs +++ b/examples/v1_dashboards_CreateDashboard_252716965.rs @@ -1,5 +1,4 @@ -// Create a distribution widget using a histogram request containing a formulas -// and functions metrics query +// Create a distribution widget using a histogram request containing a formulas and functions metrics query use datadog_api_client::datadog; use datadog_api_client::datadogV1::api_dashboards::DashboardsAPI; use datadog_api_client::datadogV1::model::Dashboard; @@ -22,64 +21,8 @@ use datadog_api_client::datadogV1::model::WidgetTextAlign; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::ORDERED, - "Example-Dashboard".to_string(), - vec![ - Widget::new( - WidgetDefinition::DistributionWidgetDefinition( - Box::new( - DistributionWidgetDefinition::new( - vec![ - DistributionWidgetRequest::new() - .query( - DistributionWidgetHistogramRequestQuery - ::FormulaAndFunctionMetricQueryDefinition( - Box::new( - FormulaAndFunctionMetricQueryDefinition::new( - FormulaAndFunctionMetricDataSource::METRICS, - "query1".to_string(), - "histogram:trace.Load{*}".to_string(), - ), - ), - ), - ) - .request_type(DistributionWidgetHistogramRequestType::HISTOGRAM) - .style(WidgetStyle::new().palette("dog_classic".to_string())) - ], - DistributionWidgetDefinitionType::DISTRIBUTION, - ) - .custom_links( - vec![ - WidgetCustomLink::new() - .label("Example".to_string()) - .link("https://example.org/".to_string()) - ], - ) - .show_legend(false) - .title("Metrics HOP".to_string()) - .title_align(WidgetTextAlign::LEFT) - .title_size("16".to_string()) - .xaxis( - DistributionWidgetXAxis::new() - .include_zero(true) - .max("auto".to_string()) - .min("auto".to_string()) - .scale("linear".to_string()), - ) - .yaxis( - DistributionWidgetYAxis::new() - .include_zero(true) - .max("auto".to_string()) - .min("auto".to_string()) - .scale("linear".to_string()), - ), - ), - ), - ).layout(WidgetLayout::new(2, 4, 0, 0)) - ], - ); + let body = Dashboard::new(DashboardLayoutType::ORDERED, "Example-Dashboard".to_string(), vec![Widget::new(WidgetDefinition::DistributionWidgetDefinition(Box::new(DistributionWidgetDefinition::new(vec![DistributionWidgetRequest::new().query(DistributionWidgetHistogramRequestQuery::FormulaAndFunctionMetricQueryDefinition(Box::new(FormulaAndFunctionMetricQueryDefinition::new(FormulaAndFunctionMetricDataSource::METRICS, "query1".to_string(), "histogram:trace.Load{*}".to_string(), )))).request_type(DistributionWidgetHistogramRequestType::HISTOGRAM).style(WidgetStyle::new().palette("dog_classic".to_string())),], DistributionWidgetDefinitionType::DISTRIBUTION, ).custom_links(vec![WidgetCustomLink::new().label("Example".to_string()).link("https://example.org/".to_string()),]).show_legend(false).title("Metrics HOP".to_string()).title_align(WidgetTextAlign::LEFT).title_size("16".to_string()).xaxis(DistributionWidgetXAxis::new().include_zero(true).max("auto".to_string()).min("auto".to_string()).scale("linear".to_string())).yaxis(DistributionWidgetYAxis::new().include_zero(true).max("auto".to_string()).min("auto".to_string()).scale("linear".to_string())))), ).layout(WidgetLayout::new(2, 4, 0, 0, )),], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2563642929.rs b/examples/v1_dashboards_CreateDashboard_2563642929.rs index a3f7fef64..5bacb08e8 100644 --- a/examples/v1_dashboards_CreateDashboard_2563642929.rs +++ b/examples/v1_dashboards_CreateDashboard_2563642929.rs @@ -32,79 +32,8 @@ use datadog_api_client::datadogV1::model::WidgetTime; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::FREE, - "Example-Dashboard".to_string(), - vec![ - Widget::new( - WidgetDefinition::ToplistWidgetDefinition( - Box::new( - ToplistWidgetDefinition::new( - vec![ - ToplistWidgetRequest::new() - .formulas(vec![WidgetFormula::new("query1".to_string())]) - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionMetricQueryDefinition( - Box::new( - FormulaAndFunctionMetricQueryDefinition::new( - FormulaAndFunctionMetricDataSource::METRICS, - "query1".to_string(), - "avg:system.cpu.user{*} by {service}".to_string(), - ).aggregator(FormulaAndFunctionMetricAggregation::AVG), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::SCALAR) - .sort( - WidgetSortBy::new() - .count(10) - .order_by( - vec![ - WidgetSortOrderBy::WidgetGroupSort( - Box::new( - WidgetGroupSort::new( - "service".to_string(), - WidgetSort::ASCENDING, - GroupType::GROUP, - ), - ), - ) - ], - ), - ) - ], - ToplistWidgetDefinitionType::TOPLIST, - ) - .style( - ToplistWidgetStyle::new() - .display( - ToplistWidgetDisplay::ToplistWidgetStacked( - Box::new( - ToplistWidgetStacked::new( - ToplistWidgetStackedType::STACKED, - ).legend(ToplistWidgetLegend::INLINE), - ), - ), - ) - .palette("dog_classic".to_string()) - .scaling(ToplistWidgetScaling::RELATIVE), - ) - .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))) - .title("".to_string()) - .title_align(WidgetTextAlign::LEFT) - .title_size("16".to_string()), - ), - ), - ).layout(WidgetLayout::new(15, 47, 0, 0)) - ], - ) - .description(Some("".to_string())) - .notify_list(Some(vec![])) - .template_variables(Some(vec![])); + let body = Dashboard::new(DashboardLayoutType::FREE, "Example-Dashboard".to_string(), vec![Widget::new(WidgetDefinition::ToplistWidgetDefinition(Box::new(ToplistWidgetDefinition::new(vec![ToplistWidgetRequest::new().formulas(vec![WidgetFormula::new("query1".to_string(), ),]).queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionMetricQueryDefinition(Box::new(FormulaAndFunctionMetricQueryDefinition::new(FormulaAndFunctionMetricDataSource::METRICS, "query1".to_string(), "avg:system.cpu.user{*} by {service}".to_string(), ).aggregator(FormulaAndFunctionMetricAggregation::AVG))),]).response_format(FormulaAndFunctionResponseFormat::SCALAR).sort(WidgetSortBy::new().count(10).order_by(vec![WidgetSortOrderBy::WidgetGroupSort(Box::new(WidgetGroupSort::new("service".to_string(), WidgetSort::ASCENDING, GroupType::GROUP, ))),])),], ToplistWidgetDefinitionType::TOPLIST, ).style(ToplistWidgetStyle::new().display(ToplistWidgetDisplay::ToplistWidgetStacked(Box::new(ToplistWidgetStacked::new(ToplistWidgetStackedType::STACKED, ).legend(ToplistWidgetLegend::INLINE)))).palette("dog_classic".to_string()).scaling(ToplistWidgetScaling::RELATIVE)).time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))).title("".to_string()).title_align(WidgetTextAlign::LEFT).title_size("16".to_string()))), ).layout(WidgetLayout::new(15, 47, 0, 0, )),], ).description(Some("".to_string())).notify_list(Some(vec![])).template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2607944105.rs b/examples/v1_dashboards_CreateDashboard_2607944105.rs index 711d85bf1..a5e628514 100644 --- a/examples/v1_dashboards_CreateDashboard_2607944105.rs +++ b/examples/v1_dashboards_CreateDashboard_2607944105.rs @@ -33,6 +33,7 @@ async fn main() { .description(Some("".to_string())) .notify_list(Some(vec![])) .template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2610827685.rs b/examples/v1_dashboards_CreateDashboard_2610827685.rs index 97b9ff8ac..48000670c 100644 --- a/examples/v1_dashboards_CreateDashboard_2610827685.rs +++ b/examples/v1_dashboards_CreateDashboard_2610827685.rs @@ -41,6 +41,7 @@ async fn main() { .description(Some("".to_string())) .notify_list(Some(vec![])) .template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2618036642.rs b/examples/v1_dashboards_CreateDashboard_2618036642.rs index 8b2046b63..d412f05c1 100644 --- a/examples/v1_dashboards_CreateDashboard_2618036642.rs +++ b/examples/v1_dashboards_CreateDashboard_2618036642.rs @@ -33,6 +33,7 @@ async fn main() { )), ))], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2634813877.rs b/examples/v1_dashboards_CreateDashboard_2634813877.rs index a3274f14d..156efe634 100644 --- a/examples/v1_dashboards_CreateDashboard_2634813877.rs +++ b/examples/v1_dashboards_CreateDashboard_2634813877.rs @@ -34,6 +34,7 @@ async fn main() { .description(Some("".to_string())) .notify_list(Some(vec![])) .template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2644712913.rs b/examples/v1_dashboards_CreateDashboard_2644712913.rs index 222a37cce..16d230604 100644 --- a/examples/v1_dashboards_CreateDashboard_2644712913.rs +++ b/examples/v1_dashboards_CreateDashboard_2644712913.rs @@ -21,47 +21,8 @@ use datadog_api_client::datadogV1::model::WidgetTime; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::ORDERED, - "Example-Dashboard with QVW Percentile Aggregator".to_string(), - vec![ - Widget::new( - WidgetDefinition::QueryValueWidgetDefinition( - Box::new( - QueryValueWidgetDefinition::new( - vec![ - QueryValueWidgetRequest::new() - .formulas(vec![WidgetFormula::new("query1".to_string())]) - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionMetricQueryDefinition( - Box::new( - FormulaAndFunctionMetricQueryDefinition::new( - FormulaAndFunctionMetricDataSource::METRICS, - "query1".to_string(), - "p90:dist.dd.dogweb.latency{*}".to_string(), - ).aggregator(FormulaAndFunctionMetricAggregation::PERCENTILE), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::SCALAR) - ], - QueryValueWidgetDefinitionType::QUERY_VALUE, - ) - .autoscale(true) - .precision(2) - .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))) - .title("".to_string()) - .title_align(WidgetTextAlign::LEFT) - .title_size("16".to_string()), - ), - ), - ).layout(WidgetLayout::new(2, 2, 0, 0)) - ], - ); + let body = Dashboard::new(DashboardLayoutType::ORDERED, "Example-Dashboard with QVW Percentile Aggregator".to_string(), vec![Widget::new(WidgetDefinition::QueryValueWidgetDefinition(Box::new(QueryValueWidgetDefinition::new(vec![QueryValueWidgetRequest::new().formulas(vec![WidgetFormula::new("query1".to_string(), ),]).queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionMetricQueryDefinition(Box::new(FormulaAndFunctionMetricQueryDefinition::new(FormulaAndFunctionMetricDataSource::METRICS, "query1".to_string(), "p90:dist.dd.dogweb.latency{*}".to_string(), ).aggregator(FormulaAndFunctionMetricAggregation::PERCENTILE))),]).response_format(FormulaAndFunctionResponseFormat::SCALAR),], QueryValueWidgetDefinitionType::QUERY_VALUE, ).autoscale(true).precision(2).time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))).title("".to_string()).title_align(WidgetTextAlign::LEFT).title_size("16".to_string()))), ).layout(WidgetLayout::new(2, 2, 0, 0, )),], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2652180930.rs b/examples/v1_dashboards_CreateDashboard_2652180930.rs index 57a7fa60a..5c5956d83 100644 --- a/examples/v1_dashboards_CreateDashboard_2652180930.rs +++ b/examples/v1_dashboards_CreateDashboard_2652180930.rs @@ -42,6 +42,7 @@ async fn main() { .description(Some("".to_string())) .notify_list(Some(vec![])) .template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2705593938.rs b/examples/v1_dashboards_CreateDashboard_2705593938.rs index 7dd47a639..fa4951735 100644 --- a/examples/v1_dashboards_CreateDashboard_2705593938.rs +++ b/examples/v1_dashboards_CreateDashboard_2705593938.rs @@ -20,45 +20,8 @@ use datadog_api_client::datadogV1::model::WidgetTextAlign; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::ORDERED, - "Example-Dashboard".to_string(), - vec![ - Widget::new( - WidgetDefinition::SunburstWidgetDefinition( - Box::new( - SunburstWidgetDefinition::new( - vec![ - SunburstWidgetRequest::new() - .formulas(vec![WidgetFormula::new("query1".to_string())]) - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionMetricQueryDefinition( - Box::new( - FormulaAndFunctionMetricQueryDefinition::new( - FormulaAndFunctionMetricDataSource::METRICS, - "query1".to_string(), - "sum:system.mem.used{*} by {service}".to_string(), - ).aggregator(FormulaAndFunctionMetricAggregation::SUM), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::SCALAR) - .style(WidgetStyle::new().palette("dog_classic".to_string())) - ], - SunburstWidgetDefinitionType::SUNBURST, - ) - .title("".to_string()) - .title_align(WidgetTextAlign::LEFT) - .title_size("16".to_string()), - ), - ), - ).layout(WidgetLayout::new(4, 4, 0, 0)) - ], - ); + let body = Dashboard::new(DashboardLayoutType::ORDERED, "Example-Dashboard".to_string(), vec![Widget::new(WidgetDefinition::SunburstWidgetDefinition(Box::new(SunburstWidgetDefinition::new(vec![SunburstWidgetRequest::new().formulas(vec![WidgetFormula::new("query1".to_string(), ),]).queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionMetricQueryDefinition(Box::new(FormulaAndFunctionMetricQueryDefinition::new(FormulaAndFunctionMetricDataSource::METRICS, "query1".to_string(), "sum:system.mem.used{*} by {service}".to_string(), ).aggregator(FormulaAndFunctionMetricAggregation::SUM))),]).response_format(FormulaAndFunctionResponseFormat::SCALAR).style(WidgetStyle::new().palette("dog_classic".to_string())),], SunburstWidgetDefinitionType::SUNBURST, ).title("".to_string()).title_align(WidgetTextAlign::LEFT).title_size("16".to_string()))), ).layout(WidgetLayout::new(4, 4, 0, 0, )),], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2800096921.rs b/examples/v1_dashboards_CreateDashboard_2800096921.rs index 046fa4e3e..d594fc961 100644 --- a/examples/v1_dashboards_CreateDashboard_2800096921.rs +++ b/examples/v1_dashboards_CreateDashboard_2800096921.rs @@ -28,70 +28,8 @@ use datadog_api_client::datadogV1::model::WidgetTime; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::ORDERED, - "Example-Dashboard with ci_pipelines datasource".to_string(), - vec![ - Widget::new( - WidgetDefinition::TimeseriesWidgetDefinition( - Box::new( - TimeseriesWidgetDefinition::new( - vec![ - TimeseriesWidgetRequest::new() - .display_type(WidgetDisplayType::LINE) - .formulas(vec![WidgetFormula::new("query1".to_string())]) - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionEventQueryDefinition( - Box::new( - FormulaAndFunctionEventQueryDefinition::new( - FormulaAndFunctionEventQueryDefinitionCompute::new( - FormulaAndFunctionEventAggregation::COUNT, - ).metric("@ci.queue_time".to_string()), - FormulaAndFunctionEventsDataSource::CI_PIPELINES, - "query1".to_string(), - ) - .group_by(vec![]) - .indexes(vec!["*".to_string()]) - .search( - FormulaAndFunctionEventQueryDefinitionSearch::new( - "ci_level:job".to_string(), - ), - ), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::TIMESERIES) - .style( - WidgetRequestStyle::new() - .line_type(WidgetLineType::SOLID) - .line_width(WidgetLineWidth::NORMAL) - .palette("dog_classic".to_string()), - ) - ], - TimeseriesWidgetDefinitionType::TIMESERIES, - ) - .legend_columns( - vec![ - TimeseriesWidgetLegendColumn::AVG, - TimeseriesWidgetLegendColumn::MIN, - TimeseriesWidgetLegendColumn::MAX, - TimeseriesWidgetLegendColumn::VALUE, - TimeseriesWidgetLegendColumn::SUM - ], - ) - .legend_layout(TimeseriesWidgetLegendLayout::AUTO) - .show_legend(true) - .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))) - .title("".to_string()), - ), - ), - ) - ], - ).reflow_type(DashboardReflowType::AUTO); + let body = Dashboard::new(DashboardLayoutType::ORDERED, "Example-Dashboard with ci_pipelines datasource".to_string(), vec![Widget::new(WidgetDefinition::TimeseriesWidgetDefinition(Box::new(TimeseriesWidgetDefinition::new(vec![TimeseriesWidgetRequest::new().display_type(WidgetDisplayType::LINE).formulas(vec![WidgetFormula::new("query1".to_string(), ),]).queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionEventQueryDefinition(Box::new(FormulaAndFunctionEventQueryDefinition::new(FormulaAndFunctionEventQueryDefinitionCompute::new(FormulaAndFunctionEventAggregation::COUNT, ).metric("@ci.queue_time".to_string()), FormulaAndFunctionEventsDataSource::CI_PIPELINES, "query1".to_string(), ).group_by(vec![]).indexes(vec!["*".to_string(),]).search(FormulaAndFunctionEventQueryDefinitionSearch::new("ci_level:job".to_string(), )))),]).response_format(FormulaAndFunctionResponseFormat::TIMESERIES).style(WidgetRequestStyle::new().line_type(WidgetLineType::SOLID).line_width(WidgetLineWidth::NORMAL).palette("dog_classic".to_string())),], TimeseriesWidgetDefinitionType::TIMESERIES, ).legend_columns(vec![TimeseriesWidgetLegendColumn::AVG,TimeseriesWidgetLegendColumn::MIN,TimeseriesWidgetLegendColumn::MAX,TimeseriesWidgetLegendColumn::VALUE,TimeseriesWidgetLegendColumn::SUM,]).legend_layout(TimeseriesWidgetLegendLayout::AUTO).show_legend(true).time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))).title("".to_string()))), ),], ).reflow_type(DashboardReflowType::AUTO); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2843286292.rs b/examples/v1_dashboards_CreateDashboard_2843286292.rs index d586a2842..a9ceb80a1 100644 --- a/examples/v1_dashboards_CreateDashboard_2843286292.rs +++ b/examples/v1_dashboards_CreateDashboard_2843286292.rs @@ -41,6 +41,7 @@ async fn main() { )), ))], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2850365602.rs b/examples/v1_dashboards_CreateDashboard_2850365602.rs index 29e6f00b5..805e793b8 100644 --- a/examples/v1_dashboards_CreateDashboard_2850365602.rs +++ b/examples/v1_dashboards_CreateDashboard_2850365602.rs @@ -1,5 +1,4 @@ -// Create a new dashboard with template variable presets using values returns "OK" -// response +// Create a new dashboard with template variable presets using values returns "OK" response use datadog_api_client::datadog; use datadog_api_client::datadogV1::api_dashboards::DashboardsAPI; use datadog_api_client::datadogV1::model::Dashboard; @@ -47,6 +46,7 @@ async fn main() { ])) .defaults(vec!["my-host".to_string()]) .prefix(Some("host".to_string()))])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2917274132.rs b/examples/v1_dashboards_CreateDashboard_2917274132.rs index 8d82b4721..284c03cda 100644 --- a/examples/v1_dashboards_CreateDashboard_2917274132.rs +++ b/examples/v1_dashboards_CreateDashboard_2917274132.rs @@ -39,6 +39,7 @@ async fn main() { .description(Some("".to_string())) .notify_list(Some(vec![])) .template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_2921337351.rs b/examples/v1_dashboards_CreateDashboard_2921337351.rs index e7db219f8..2f2006d76 100644 --- a/examples/v1_dashboards_CreateDashboard_2921337351.rs +++ b/examples/v1_dashboards_CreateDashboard_2921337351.rs @@ -45,6 +45,7 @@ async fn main() { .description(Some("".to_string())) .notify_list(Some(vec![])) .template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_3066042014.rs b/examples/v1_dashboards_CreateDashboard_3066042014.rs index 3160b77ad..3f3e51a36 100644 --- a/examples/v1_dashboards_CreateDashboard_3066042014.rs +++ b/examples/v1_dashboards_CreateDashboard_3066042014.rs @@ -30,80 +30,8 @@ use datadog_api_client::datadogV1::model::WidgetTime; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::ORDERED, - "Example-Dashboard with new live span time".to_string(), - vec![ - Widget::new( - WidgetDefinition::TimeseriesWidgetDefinition( - Box::new( - TimeseriesWidgetDefinition::new( - vec![ - TimeseriesWidgetRequest::new() - .display_type(WidgetDisplayType::LINE) - .formulas(vec![WidgetFormula::new("query1".to_string())]) - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionEventQueryDefinition( - Box::new( - FormulaAndFunctionEventQueryDefinition::new( - FormulaAndFunctionEventQueryDefinitionCompute::new( - FormulaAndFunctionEventAggregation::COUNT, - ).metric("@ci.queue_time".to_string()), - FormulaAndFunctionEventsDataSource::CI_PIPELINES, - "query1".to_string(), - ) - .group_by(vec![]) - .indexes(vec!["*".to_string()]) - .search( - FormulaAndFunctionEventQueryDefinitionSearch::new( - "ci_level:job".to_string(), - ), - ), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::TIMESERIES) - .style( - WidgetRequestStyle::new() - .line_type(WidgetLineType::SOLID) - .line_width(WidgetLineWidth::NORMAL) - .palette("dog_classic".to_string()), - ) - ], - TimeseriesWidgetDefinitionType::TIMESERIES, - ) - .legend_columns( - vec![ - TimeseriesWidgetLegendColumn::AVG, - TimeseriesWidgetLegendColumn::MIN, - TimeseriesWidgetLegendColumn::MAX, - TimeseriesWidgetLegendColumn::VALUE, - TimeseriesWidgetLegendColumn::SUM - ], - ) - .legend_layout(TimeseriesWidgetLegendLayout::AUTO) - .show_legend(true) - .time( - WidgetTime::WidgetNewLiveSpan( - Box::new( - WidgetNewLiveSpan::new( - WidgetNewLiveSpanType::LIVE, - WidgetLiveSpanUnit::MINUTE, - 8, - ), - ), - ), - ) - .title("".to_string()), - ), - ), - ) - ], - ).reflow_type(DashboardReflowType::AUTO); + let body = Dashboard::new(DashboardLayoutType::ORDERED, "Example-Dashboard with new live span time".to_string(), vec![Widget::new(WidgetDefinition::TimeseriesWidgetDefinition(Box::new(TimeseriesWidgetDefinition::new(vec![TimeseriesWidgetRequest::new().display_type(WidgetDisplayType::LINE).formulas(vec![WidgetFormula::new("query1".to_string(), ),]).queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionEventQueryDefinition(Box::new(FormulaAndFunctionEventQueryDefinition::new(FormulaAndFunctionEventQueryDefinitionCompute::new(FormulaAndFunctionEventAggregation::COUNT, ).metric("@ci.queue_time".to_string()), FormulaAndFunctionEventsDataSource::CI_PIPELINES, "query1".to_string(), ).group_by(vec![]).indexes(vec!["*".to_string(),]).search(FormulaAndFunctionEventQueryDefinitionSearch::new("ci_level:job".to_string(), )))),]).response_format(FormulaAndFunctionResponseFormat::TIMESERIES).style(WidgetRequestStyle::new().line_type(WidgetLineType::SOLID).line_width(WidgetLineWidth::NORMAL).palette("dog_classic".to_string())),], TimeseriesWidgetDefinitionType::TIMESERIES, ).legend_columns(vec![TimeseriesWidgetLegendColumn::AVG,TimeseriesWidgetLegendColumn::MIN,TimeseriesWidgetLegendColumn::MAX,TimeseriesWidgetLegendColumn::VALUE,TimeseriesWidgetLegendColumn::SUM,]).legend_layout(TimeseriesWidgetLegendLayout::AUTO).show_legend(true).time(WidgetTime::WidgetNewLiveSpan(Box::new(WidgetNewLiveSpan::new(WidgetNewLiveSpanType::LIVE, WidgetLiveSpanUnit::MINUTE, 8, )))).title("".to_string()))), ),], ).reflow_type(DashboardReflowType::AUTO); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_3117424216.rs b/examples/v1_dashboards_CreateDashboard_3117424216.rs index 47516524a..280d2738b 100644 --- a/examples/v1_dashboards_CreateDashboard_3117424216.rs +++ b/examples/v1_dashboards_CreateDashboard_3117424216.rs @@ -34,6 +34,7 @@ async fn main() { )), ))], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_3195475781.rs b/examples/v1_dashboards_CreateDashboard_3195475781.rs index dad1042fc..99c1d1972 100644 --- a/examples/v1_dashboards_CreateDashboard_3195475781.rs +++ b/examples/v1_dashboards_CreateDashboard_3195475781.rs @@ -36,6 +36,7 @@ async fn main() { )), ))], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_3250131584.rs b/examples/v1_dashboards_CreateDashboard_3250131584.rs index 73c7f620a..f9ddf939d 100644 --- a/examples/v1_dashboards_CreateDashboard_3250131584.rs +++ b/examples/v1_dashboards_CreateDashboard_3250131584.rs @@ -32,6 +32,7 @@ async fn main() { .description(None) .notify_list(Some(vec![])) .template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_3298564989.rs b/examples/v1_dashboards_CreateDashboard_3298564989.rs index f6e443402..de812d00c 100644 --- a/examples/v1_dashboards_CreateDashboard_3298564989.rs +++ b/examples/v1_dashboards_CreateDashboard_3298564989.rs @@ -59,6 +59,7 @@ async fn main() { )), ))], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_3451918078.rs b/examples/v1_dashboards_CreateDashboard_3451918078.rs index 999b8e7af..4d7c30715 100644 --- a/examples/v1_dashboards_CreateDashboard_3451918078.rs +++ b/examples/v1_dashboards_CreateDashboard_3451918078.rs @@ -29,80 +29,8 @@ use datadog_api_client::datadogV1::model::WidgetTime; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::ORDERED, - "Example-Dashboard with new fixed span time".to_string(), - vec![ - Widget::new( - WidgetDefinition::TimeseriesWidgetDefinition( - Box::new( - TimeseriesWidgetDefinition::new( - vec![ - TimeseriesWidgetRequest::new() - .display_type(WidgetDisplayType::LINE) - .formulas(vec![WidgetFormula::new("query1".to_string())]) - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionEventQueryDefinition( - Box::new( - FormulaAndFunctionEventQueryDefinition::new( - FormulaAndFunctionEventQueryDefinitionCompute::new( - FormulaAndFunctionEventAggregation::COUNT, - ).metric("@ci.queue_time".to_string()), - FormulaAndFunctionEventsDataSource::CI_PIPELINES, - "query1".to_string(), - ) - .group_by(vec![]) - .indexes(vec!["*".to_string()]) - .search( - FormulaAndFunctionEventQueryDefinitionSearch::new( - "ci_level:job".to_string(), - ), - ), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::TIMESERIES) - .style( - WidgetRequestStyle::new() - .line_type(WidgetLineType::SOLID) - .line_width(WidgetLineWidth::NORMAL) - .palette("dog_classic".to_string()), - ) - ], - TimeseriesWidgetDefinitionType::TIMESERIES, - ) - .legend_columns( - vec![ - TimeseriesWidgetLegendColumn::AVG, - TimeseriesWidgetLegendColumn::MIN, - TimeseriesWidgetLegendColumn::MAX, - TimeseriesWidgetLegendColumn::VALUE, - TimeseriesWidgetLegendColumn::SUM - ], - ) - .legend_layout(TimeseriesWidgetLegendLayout::AUTO) - .show_legend(true) - .time( - WidgetTime::WidgetNewFixedSpan( - Box::new( - WidgetNewFixedSpan::new( - 1712080128, - 1712083128, - WidgetNewFixedSpanType::FIXED, - ), - ), - ), - ) - .title("".to_string()), - ), - ), - ) - ], - ).reflow_type(DashboardReflowType::AUTO); + let body = Dashboard::new(DashboardLayoutType::ORDERED, "Example-Dashboard with new fixed span time".to_string(), vec![Widget::new(WidgetDefinition::TimeseriesWidgetDefinition(Box::new(TimeseriesWidgetDefinition::new(vec![TimeseriesWidgetRequest::new().display_type(WidgetDisplayType::LINE).formulas(vec![WidgetFormula::new("query1".to_string(), ),]).queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionEventQueryDefinition(Box::new(FormulaAndFunctionEventQueryDefinition::new(FormulaAndFunctionEventQueryDefinitionCompute::new(FormulaAndFunctionEventAggregation::COUNT, ).metric("@ci.queue_time".to_string()), FormulaAndFunctionEventsDataSource::CI_PIPELINES, "query1".to_string(), ).group_by(vec![]).indexes(vec!["*".to_string(),]).search(FormulaAndFunctionEventQueryDefinitionSearch::new("ci_level:job".to_string(), )))),]).response_format(FormulaAndFunctionResponseFormat::TIMESERIES).style(WidgetRequestStyle::new().line_type(WidgetLineType::SOLID).line_width(WidgetLineWidth::NORMAL).palette("dog_classic".to_string())),], TimeseriesWidgetDefinitionType::TIMESERIES, ).legend_columns(vec![TimeseriesWidgetLegendColumn::AVG,TimeseriesWidgetLegendColumn::MIN,TimeseriesWidgetLegendColumn::MAX,TimeseriesWidgetLegendColumn::VALUE,TimeseriesWidgetLegendColumn::SUM,]).legend_layout(TimeseriesWidgetLegendLayout::AUTO).show_legend(true).time(WidgetTime::WidgetNewFixedSpan(Box::new(WidgetNewFixedSpan::new(1712080128, 1712083128, WidgetNewFixedSpanType::FIXED, )))).title("".to_string()))), ),], ).reflow_type(DashboardReflowType::AUTO); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_3513586382.rs b/examples/v1_dashboards_CreateDashboard_3513586382.rs index 9fd99917e..5adbe49a9 100644 --- a/examples/v1_dashboards_CreateDashboard_3513586382.rs +++ b/examples/v1_dashboards_CreateDashboard_3513586382.rs @@ -72,6 +72,7 @@ async fn main() { .reflow_type(DashboardReflowType::FIXED) .tags(Some(vec![])) .template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_3562282606.rs b/examples/v1_dashboards_CreateDashboard_3562282606.rs index 961113c5f..5c364cf7c 100644 --- a/examples/v1_dashboards_CreateDashboard_3562282606.rs +++ b/examples/v1_dashboards_CreateDashboard_3562282606.rs @@ -1,5 +1,4 @@ -// Create a new dashboard with a change widget using formulas and functions slo -// query +// Create a new dashboard with a change widget using formulas and functions slo query use datadog_api_client::datadog; use datadog_api_client::datadogV1::api_dashboards::DashboardsAPI; use datadog_api_client::datadogV1::model::ChangeWidgetDefinition; @@ -72,6 +71,7 @@ async fn main() { .layout(WidgetLayout::new(2, 4, 0, 0)), ], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_3669695268.rs b/examples/v1_dashboards_CreateDashboard_3669695268.rs index 70e37ba84..f1c4573cf 100644 --- a/examples/v1_dashboards_CreateDashboard_3669695268.rs +++ b/examples/v1_dashboards_CreateDashboard_3669695268.rs @@ -65,6 +65,7 @@ async fn main() { )), ))], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_3777304439.rs b/examples/v1_dashboards_CreateDashboard_3777304439.rs index 1cd4429e9..2ede75a97 100644 --- a/examples/v1_dashboards_CreateDashboard_3777304439.rs +++ b/examples/v1_dashboards_CreateDashboard_3777304439.rs @@ -21,48 +21,8 @@ use datadog_api_client::datadogV1::model::WidgetTime; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::FREE, - "Example-Dashboard".to_string(), - vec![ - Widget::new( - WidgetDefinition::HeatMapWidgetDefinition( - Box::new( - HeatMapWidgetDefinition::new( - vec![ - HeatMapWidgetRequest::new() - .formulas(vec![WidgetFormula::new("query1".to_string())]) - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionMetricQueryDefinition( - Box::new( - FormulaAndFunctionMetricQueryDefinition::new( - FormulaAndFunctionMetricDataSource::METRICS, - "query1".to_string(), - "avg:system.cpu.user{*}".to_string(), - ), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::TIMESERIES) - .style(WidgetStyle::new().palette("dog_classic".to_string())) - ], - HeatMapWidgetDefinitionType::HEATMAP, - ) - .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))) - .title("".to_string()) - .title_align(WidgetTextAlign::LEFT) - .title_size("16".to_string()), - ), - ), - ).layout(WidgetLayout::new(15, 47, 0, 0)) - ], - ) - .notify_list(Some(vec![])) - .template_variables(Some(vec![])); + let body = Dashboard::new(DashboardLayoutType::FREE, "Example-Dashboard".to_string(), vec![Widget::new(WidgetDefinition::HeatMapWidgetDefinition(Box::new(HeatMapWidgetDefinition::new(vec![HeatMapWidgetRequest::new().formulas(vec![WidgetFormula::new("query1".to_string(), ),]).queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionMetricQueryDefinition(Box::new(FormulaAndFunctionMetricQueryDefinition::new(FormulaAndFunctionMetricDataSource::METRICS, "query1".to_string(), "avg:system.cpu.user{*}".to_string(), ))),]).response_format(FormulaAndFunctionResponseFormat::TIMESERIES).style(WidgetStyle::new().palette("dog_classic".to_string())),], HeatMapWidgetDefinitionType::HEATMAP, ).time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))).title("".to_string()).title_align(WidgetTextAlign::LEFT).title_size("16".to_string()))), ).layout(WidgetLayout::new(15, 47, 0, 0, )),], ).notify_list(Some(vec![])).template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_3882428227.rs b/examples/v1_dashboards_CreateDashboard_3882428227.rs index 4ebc0fb55..765ad475d 100644 --- a/examples/v1_dashboards_CreateDashboard_3882428227.rs +++ b/examples/v1_dashboards_CreateDashboard_3882428227.rs @@ -1,5 +1,4 @@ -// Create a distribution widget using a histogram request containing a formulas -// and functions events query +// Create a distribution widget using a histogram request containing a formulas and functions events query use datadog_api_client::datadog; use datadog_api_client::datadogV1::api_dashboards::DashboardsAPI; use datadog_api_client::datadogV1::model::Dashboard; @@ -23,65 +22,8 @@ use datadog_api_client::datadogV1::model::WidgetTextAlign; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::ORDERED, - "Example-Dashboard".to_string(), - vec![ - Widget::new( - WidgetDefinition::DistributionWidgetDefinition( - Box::new( - DistributionWidgetDefinition::new( - vec![ - DistributionWidgetRequest::new() - .query( - DistributionWidgetHistogramRequestQuery - ::FormulaAndFunctionEventQueryDefinition( - Box::new( - FormulaAndFunctionEventQueryDefinition::new( - FormulaAndFunctionEventQueryDefinitionCompute::new( - FormulaAndFunctionEventAggregation::MIN, - ).metric("@duration".to_string()), - FormulaAndFunctionEventsDataSource::EVENTS, - "query1".to_string(), - ) - .group_by(vec![]) - .indexes(vec!["*".to_string()]) - .search( - FormulaAndFunctionEventQueryDefinitionSearch::new( - "".to_string(), - ), - ), - ), - ), - ) - .request_type(DistributionWidgetHistogramRequestType::HISTOGRAM) - ], - DistributionWidgetDefinitionType::DISTRIBUTION, - ) - .show_legend(false) - .title("Events Platform - Request latency HOP".to_string()) - .title_align(WidgetTextAlign::LEFT) - .title_size("16".to_string()) - .xaxis( - DistributionWidgetXAxis::new() - .include_zero(true) - .max("auto".to_string()) - .min("auto".to_string()) - .scale("linear".to_string()), - ) - .yaxis( - DistributionWidgetYAxis::new() - .include_zero(true) - .max("auto".to_string()) - .min("auto".to_string()) - .scale("linear".to_string()), - ), - ), - ), - ).layout(WidgetLayout::new(2, 4, 0, 0)) - ], - ).description(Some("Example-Dashboard".to_string())); + let body = Dashboard::new(DashboardLayoutType::ORDERED, "Example-Dashboard".to_string(), vec![Widget::new(WidgetDefinition::DistributionWidgetDefinition(Box::new(DistributionWidgetDefinition::new(vec![DistributionWidgetRequest::new().query(DistributionWidgetHistogramRequestQuery::FormulaAndFunctionEventQueryDefinition(Box::new(FormulaAndFunctionEventQueryDefinition::new(FormulaAndFunctionEventQueryDefinitionCompute::new(FormulaAndFunctionEventAggregation::MIN, ).metric("@duration".to_string()), FormulaAndFunctionEventsDataSource::EVENTS, "query1".to_string(), ).group_by(vec![]).indexes(vec!["*".to_string(),]).search(FormulaAndFunctionEventQueryDefinitionSearch::new("".to_string(), ))))).request_type(DistributionWidgetHistogramRequestType::HISTOGRAM),], DistributionWidgetDefinitionType::DISTRIBUTION, ).show_legend(false).title("Events Platform - Request latency HOP".to_string()).title_align(WidgetTextAlign::LEFT).title_size("16".to_string()).xaxis(DistributionWidgetXAxis::new().include_zero(true).max("auto".to_string()).min("auto".to_string()).scale("linear".to_string())).yaxis(DistributionWidgetYAxis::new().include_zero(true).max("auto".to_string()).min("auto".to_string()).scale("linear".to_string())))), ).layout(WidgetLayout::new(2, 4, 0, 0, )),], ).description(Some("Example-Dashboard".to_string())); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_3982498788.rs b/examples/v1_dashboards_CreateDashboard_3982498788.rs index caa426d2c..2652361a6 100644 --- a/examples/v1_dashboards_CreateDashboard_3982498788.rs +++ b/examples/v1_dashboards_CreateDashboard_3982498788.rs @@ -15,36 +15,8 @@ use datadog_api_client::datadogV1::model::WidgetRequestStyle; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::ORDERED, - "Example-Dashboard with timeseries widget".to_string(), - vec![ - Widget::new( - WidgetDefinition::TimeseriesWidgetDefinition( - Box::new( - TimeseriesWidgetDefinition::new( - vec![ - TimeseriesWidgetRequest::new() - .display_type(WidgetDisplayType::BARS) - .on_right_yaxis(false) - .q( - "sum:trace.test.errors{env:prod,service:datadog-api-spec} by {resource_name}.as_count()".to_string(), - ) - .style( - WidgetRequestStyle::new() - .line_type(WidgetLineType::SOLID) - .line_width(WidgetLineWidth::NORMAL) - .palette("warm".to_string()), - ) - ], - TimeseriesWidgetDefinitionType::TIMESERIES, - ), - ), - ), - ) - ], - ); + let body = Dashboard::new(DashboardLayoutType::ORDERED, "Example-Dashboard with timeseries widget".to_string(), vec![Widget::new(WidgetDefinition::TimeseriesWidgetDefinition(Box::new(TimeseriesWidgetDefinition::new(vec![TimeseriesWidgetRequest::new().display_type(WidgetDisplayType::BARS).on_right_yaxis(false).q("sum:trace.test.errors{env:prod,service:datadog-api-spec} by {resource_name}.as_count()".to_string()).style(WidgetRequestStyle::new().line_type(WidgetLineType::SOLID).line_width(WidgetLineWidth::NORMAL).palette("warm".to_string())),], TimeseriesWidgetDefinitionType::TIMESERIES, ))), ),], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_4026341408.rs b/examples/v1_dashboards_CreateDashboard_4026341408.rs index 770a2e618..827a2a99f 100644 --- a/examples/v1_dashboards_CreateDashboard_4026341408.rs +++ b/examples/v1_dashboards_CreateDashboard_4026341408.rs @@ -33,6 +33,7 @@ async fn main() { )), ))], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_4076476470.rs b/examples/v1_dashboards_CreateDashboard_4076476470.rs index 3602d03d5..48313c55c 100644 --- a/examples/v1_dashboards_CreateDashboard_4076476470.rs +++ b/examples/v1_dashboards_CreateDashboard_4076476470.rs @@ -33,6 +33,7 @@ async fn main() { )), ))], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_41622531.rs b/examples/v1_dashboards_CreateDashboard_41622531.rs index a3cd4ea9d..27636826a 100644 --- a/examples/v1_dashboards_CreateDashboard_41622531.rs +++ b/examples/v1_dashboards_CreateDashboard_41622531.rs @@ -26,71 +26,8 @@ use datadog_api_client::datadogV1::model::WidgetTime; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::ORDERED, - "Example-Dashboard with formula style".to_string(), - vec![ - Widget::new( - WidgetDefinition::TimeseriesWidgetDefinition( - Box::new( - TimeseriesWidgetDefinition::new( - vec![ - TimeseriesWidgetRequest::new() - .display_type(WidgetDisplayType::LINE) - .formulas( - vec![ - WidgetFormula::new( - "query1".to_string(), - ).style( - WidgetFormulaStyle::new() - .palette("classic".to_string()) - .palette_index(4), - ) - ], - ) - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionMetricQueryDefinition( - Box::new( - FormulaAndFunctionMetricQueryDefinition::new( - FormulaAndFunctionMetricDataSource::METRICS, - "query1".to_string(), - "avg:system.cpu.user{*}".to_string(), - ), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::TIMESERIES) - .style( - WidgetRequestStyle::new() - .line_type(WidgetLineType::SOLID) - .line_width(WidgetLineWidth::NORMAL) - .palette("dog_classic".to_string()), - ) - ], - TimeseriesWidgetDefinitionType::TIMESERIES, - ) - .legend_columns( - vec![ - TimeseriesWidgetLegendColumn::AVG, - TimeseriesWidgetLegendColumn::MIN, - TimeseriesWidgetLegendColumn::MAX, - TimeseriesWidgetLegendColumn::VALUE, - TimeseriesWidgetLegendColumn::SUM - ], - ) - .legend_layout(TimeseriesWidgetLegendLayout::AUTO) - .show_legend(true) - .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))) - .title("styled timeseries".to_string()), - ), - ), - ) - ], - ).reflow_type(DashboardReflowType::AUTO); + let body = Dashboard::new(DashboardLayoutType::ORDERED, "Example-Dashboard with formula style".to_string(), vec![Widget::new(WidgetDefinition::TimeseriesWidgetDefinition(Box::new(TimeseriesWidgetDefinition::new(vec![TimeseriesWidgetRequest::new().display_type(WidgetDisplayType::LINE).formulas(vec![WidgetFormula::new("query1".to_string(), ).style(WidgetFormulaStyle::new().palette("classic".to_string()).palette_index(4)),]).queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionMetricQueryDefinition(Box::new(FormulaAndFunctionMetricQueryDefinition::new(FormulaAndFunctionMetricDataSource::METRICS, "query1".to_string(), "avg:system.cpu.user{*}".to_string(), ))),]).response_format(FormulaAndFunctionResponseFormat::TIMESERIES).style(WidgetRequestStyle::new().line_type(WidgetLineType::SOLID).line_width(WidgetLineWidth::NORMAL).palette("dog_classic".to_string())),], TimeseriesWidgetDefinitionType::TIMESERIES, ).legend_columns(vec![TimeseriesWidgetLegendColumn::AVG,TimeseriesWidgetLegendColumn::MIN,TimeseriesWidgetLegendColumn::MAX,TimeseriesWidgetLegendColumn::VALUE,TimeseriesWidgetLegendColumn::SUM,]).legend_layout(TimeseriesWidgetLegendLayout::AUTO).show_legend(true).time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))).title("styled timeseries".to_string()))), ),], ).reflow_type(DashboardReflowType::AUTO); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_417992286.rs b/examples/v1_dashboards_CreateDashboard_417992286.rs index 7d1c9597d..80496e4d7 100644 --- a/examples/v1_dashboards_CreateDashboard_417992286.rs +++ b/examples/v1_dashboards_CreateDashboard_417992286.rs @@ -22,6 +22,7 @@ async fn main() { .description(Some("".to_string())) .notify_list(Some(vec![])) .template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_4262729673.rs b/examples/v1_dashboards_CreateDashboard_4262729673.rs index 099c03a87..9a7525408 100644 --- a/examples/v1_dashboards_CreateDashboard_4262729673.rs +++ b/examples/v1_dashboards_CreateDashboard_4262729673.rs @@ -29,76 +29,8 @@ use datadog_api_client::datadogV1::model::WidgetTime; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::ORDERED, - "Example-Dashboard with legacy live span time".to_string(), - vec![ - Widget::new( - WidgetDefinition::TimeseriesWidgetDefinition( - Box::new( - TimeseriesWidgetDefinition::new( - vec![ - TimeseriesWidgetRequest::new() - .display_type(WidgetDisplayType::LINE) - .formulas(vec![WidgetFormula::new("query1".to_string())]) - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionEventQueryDefinition( - Box::new( - FormulaAndFunctionEventQueryDefinition::new( - FormulaAndFunctionEventQueryDefinitionCompute::new( - FormulaAndFunctionEventAggregation::COUNT, - ).metric("@ci.queue_time".to_string()), - FormulaAndFunctionEventsDataSource::CI_PIPELINES, - "query1".to_string(), - ) - .group_by(vec![]) - .indexes(vec!["*".to_string()]) - .search( - FormulaAndFunctionEventQueryDefinitionSearch::new( - "ci_level:job".to_string(), - ), - ), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::TIMESERIES) - .style( - WidgetRequestStyle::new() - .line_type(WidgetLineType::SOLID) - .line_width(WidgetLineWidth::NORMAL) - .palette("dog_classic".to_string()), - ) - ], - TimeseriesWidgetDefinitionType::TIMESERIES, - ) - .legend_columns( - vec![ - TimeseriesWidgetLegendColumn::AVG, - TimeseriesWidgetLegendColumn::MIN, - TimeseriesWidgetLegendColumn::MAX, - TimeseriesWidgetLegendColumn::VALUE, - TimeseriesWidgetLegendColumn::SUM - ], - ) - .legend_layout(TimeseriesWidgetLegendLayout::AUTO) - .show_legend(true) - .time( - WidgetTime::WidgetLegacyLiveSpan( - Box::new( - WidgetLegacyLiveSpan::new().live_span(WidgetLiveSpan::PAST_FIVE_MINUTES), - ), - ), - ) - .title("".to_string()), - ), - ), - ) - ], - ).reflow_type(DashboardReflowType::AUTO); + let body = Dashboard::new(DashboardLayoutType::ORDERED, "Example-Dashboard with legacy live span time".to_string(), vec![Widget::new(WidgetDefinition::TimeseriesWidgetDefinition(Box::new(TimeseriesWidgetDefinition::new(vec![TimeseriesWidgetRequest::new().display_type(WidgetDisplayType::LINE).formulas(vec![WidgetFormula::new("query1".to_string(), ),]).queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionEventQueryDefinition(Box::new(FormulaAndFunctionEventQueryDefinition::new(FormulaAndFunctionEventQueryDefinitionCompute::new(FormulaAndFunctionEventAggregation::COUNT, ).metric("@ci.queue_time".to_string()), FormulaAndFunctionEventsDataSource::CI_PIPELINES, "query1".to_string(), ).group_by(vec![]).indexes(vec!["*".to_string(),]).search(FormulaAndFunctionEventQueryDefinitionSearch::new("ci_level:job".to_string(), )))),]).response_format(FormulaAndFunctionResponseFormat::TIMESERIES).style(WidgetRequestStyle::new().line_type(WidgetLineType::SOLID).line_width(WidgetLineWidth::NORMAL).palette("dog_classic".to_string())),], TimeseriesWidgetDefinitionType::TIMESERIES, ).legend_columns(vec![TimeseriesWidgetLegendColumn::AVG,TimeseriesWidgetLegendColumn::MIN,TimeseriesWidgetLegendColumn::MAX,TimeseriesWidgetLegendColumn::VALUE,TimeseriesWidgetLegendColumn::SUM,]).legend_layout(TimeseriesWidgetLegendLayout::AUTO).show_legend(true).time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new().live_span(WidgetLiveSpan::PAST_FIVE_MINUTES)))).title("".to_string()))), ),], ).reflow_type(DashboardReflowType::AUTO); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_578885732.rs b/examples/v1_dashboards_CreateDashboard_578885732.rs index 1ca04e73b..94f05d4cc 100644 --- a/examples/v1_dashboards_CreateDashboard_578885732.rs +++ b/examples/v1_dashboards_CreateDashboard_578885732.rs @@ -27,64 +27,8 @@ use datadog_api_client::datadogV1::model::WidgetTime; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::ORDERED, - "Example-Dashboard".to_string(), - vec![ - Widget::new( - WidgetDefinition::ChangeWidgetDefinition( - Box::new( - ChangeWidgetDefinition::new( - vec![ - ChangeWidgetRequest::new() - .change_type(WidgetChangeType::ABSOLUTE) - .compare_to(WidgetCompareTo::HOUR_BEFORE) - .formulas( - vec![ - WidgetFormula::new("hour_before(query1)".to_string()), - WidgetFormula::new("query1".to_string()) - ], - ) - .increase_good(true) - .order_by(WidgetOrderBy::CHANGE) - .order_dir(WidgetSort::DESCENDING) - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionEventQueryDefinition( - Box::new( - FormulaAndFunctionEventQueryDefinition::new( - FormulaAndFunctionEventQueryDefinitionCompute::new( - FormulaAndFunctionEventAggregation::COUNT, - ), - FormulaAndFunctionEventsDataSource::LOGS, - "query1".to_string(), - ) - .group_by(vec![]) - .indexes(vec!["*".to_string()]) - .search( - FormulaAndFunctionEventQueryDefinitionSearch::new( - "".to_string(), - ), - ), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::SCALAR) - ], - ChangeWidgetDefinitionType::CHANGE, - ) - .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))) - .title("".to_string()) - .title_align(WidgetTextAlign::LEFT) - .title_size("16".to_string()), - ), - ), - ).layout(WidgetLayout::new(4, 4, 0, 0)) - ], - ); + let body = Dashboard::new(DashboardLayoutType::ORDERED, "Example-Dashboard".to_string(), vec![Widget::new(WidgetDefinition::ChangeWidgetDefinition(Box::new(ChangeWidgetDefinition::new(vec![ChangeWidgetRequest::new().change_type(WidgetChangeType::ABSOLUTE).compare_to(WidgetCompareTo::HOUR_BEFORE).formulas(vec![WidgetFormula::new("hour_before(query1)".to_string(), ),WidgetFormula::new("query1".to_string(), ),]).increase_good(true).order_by(WidgetOrderBy::CHANGE).order_dir(WidgetSort::DESCENDING).queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionEventQueryDefinition(Box::new(FormulaAndFunctionEventQueryDefinition::new(FormulaAndFunctionEventQueryDefinitionCompute::new(FormulaAndFunctionEventAggregation::COUNT, ), FormulaAndFunctionEventsDataSource::LOGS, "query1".to_string(), ).group_by(vec![]).indexes(vec!["*".to_string(),]).search(FormulaAndFunctionEventQueryDefinitionSearch::new("".to_string(), )))),]).response_format(FormulaAndFunctionResponseFormat::SCALAR),], ChangeWidgetDefinitionType::CHANGE, ).time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))).title("".to_string()).title_align(WidgetTextAlign::LEFT).title_size("16".to_string()))), ).layout(WidgetLayout::new(4, 4, 0, 0, )),], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_651038379.rs b/examples/v1_dashboards_CreateDashboard_651038379.rs index 5a8b24081..d46b47539 100644 --- a/examples/v1_dashboards_CreateDashboard_651038379.rs +++ b/examples/v1_dashboards_CreateDashboard_651038379.rs @@ -29,6 +29,7 @@ async fn main() { .description(Some("".to_string())) .notify_list(Some(vec![])) .template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_765140092.rs b/examples/v1_dashboards_CreateDashboard_765140092.rs index ec25df87f..253e35c48 100644 --- a/examples/v1_dashboards_CreateDashboard_765140092.rs +++ b/examples/v1_dashboards_CreateDashboard_765140092.rs @@ -24,52 +24,8 @@ use datadog_api_client::datadogV1::model::WidgetTime; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::ORDERED, - "Example-Dashboard with QVW Timeseries Background".to_string(), - vec![ - Widget::new( - WidgetDefinition::QueryValueWidgetDefinition( - Box::new( - QueryValueWidgetDefinition::new( - vec![ - QueryValueWidgetRequest::new() - .formulas(vec![WidgetFormula::new("query1".to_string())]) - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionMetricQueryDefinition( - Box::new( - FormulaAndFunctionMetricQueryDefinition::new( - FormulaAndFunctionMetricDataSource::METRICS, - "query1".to_string(), - "sum:my.cool.count.metric{*}".to_string(), - ).aggregator(FormulaAndFunctionMetricAggregation::PERCENTILE), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::SCALAR) - ], - QueryValueWidgetDefinitionType::QUERY_VALUE, - ) - .autoscale(true) - .precision(2) - .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))) - .timeseries_background( - TimeseriesBackground::new( - TimeseriesBackgroundType::AREA, - ).yaxis(WidgetAxis::new().include_zero(true)), - ) - .title("".to_string()) - .title_align(WidgetTextAlign::LEFT) - .title_size("16".to_string()), - ), - ), - ).layout(WidgetLayout::new(2, 2, 0, 0)) - ], - ); + let body = Dashboard::new(DashboardLayoutType::ORDERED, "Example-Dashboard with QVW Timeseries Background".to_string(), vec![Widget::new(WidgetDefinition::QueryValueWidgetDefinition(Box::new(QueryValueWidgetDefinition::new(vec![QueryValueWidgetRequest::new().formulas(vec![WidgetFormula::new("query1".to_string(), ),]).queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionMetricQueryDefinition(Box::new(FormulaAndFunctionMetricQueryDefinition::new(FormulaAndFunctionMetricDataSource::METRICS, "query1".to_string(), "sum:my.cool.count.metric{*}".to_string(), ).aggregator(FormulaAndFunctionMetricAggregation::PERCENTILE))),]).response_format(FormulaAndFunctionResponseFormat::SCALAR),], QueryValueWidgetDefinitionType::QUERY_VALUE, ).autoscale(true).precision(2).time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))).timeseries_background(TimeseriesBackground::new(TimeseriesBackgroundType::AREA, ).yaxis(WidgetAxis::new().include_zero(true))).title("".to_string()).title_align(WidgetTextAlign::LEFT).title_size("16".to_string()))), ).layout(WidgetLayout::new(2, 2, 0, 0, )),], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_794302680.rs b/examples/v1_dashboards_CreateDashboard_794302680.rs index 1ea631936..387fd4598 100644 --- a/examples/v1_dashboards_CreateDashboard_794302680.rs +++ b/examples/v1_dashboards_CreateDashboard_794302680.rs @@ -26,168 +26,8 @@ use datadog_api_client::datadogV1::model::WidgetTextAlign; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::FREE, - "Example-Dashboard".to_string(), - vec![ - Widget::new( - WidgetDefinition::TableWidgetDefinition( - Box::new( - TableWidgetDefinition::new( - vec![ - TableWidgetRequest::new() - .formulas(vec![]) - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionMetricQueryDefinition( - Box::new( - FormulaAndFunctionMetricQueryDefinition::new( - FormulaAndFunctionMetricDataSource::METRICS, - "query1".to_string(), - "avg:aws.stream.globalaccelerator.processed_bytes_in{*} by {aws_account,acceleratoripaddress}".to_string(), - ).aggregator(FormulaAndFunctionMetricAggregation::AVG), - ), - ), - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionMetricQueryDefinition( - Box::new( - FormulaAndFunctionMetricQueryDefinition::new( - FormulaAndFunctionMetricDataSource::METRICS, - "query2".to_string(), - "avg:aws.stream.globalaccelerator.processed_bytes_out{*} by {aws_account,acceleratoripaddress}".to_string(), - ).aggregator(FormulaAndFunctionMetricAggregation::AVG), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::SCALAR) - .text_formats( - vec![ - vec![ - TableWidgetTextFormatRule::new( - TableWidgetTextFormatMatch::new( - TableWidgetTextFormatMatchType::IS, - "fruit".to_string(), - ), - ) - .palette(TableWidgetTextFormatPalette::WHITE_ON_RED) - .replace( - TableWidgetTextFormatReplace - ::TableWidgetTextFormatReplaceAll( - Box::new( - TableWidgetTextFormatReplaceAll::new( - TableWidgetTextFormatReplaceAllType::ALL, - "vegetable".to_string(), - ), - ), - ), - ), - TableWidgetTextFormatRule::new( - TableWidgetTextFormatMatch::new( - TableWidgetTextFormatMatchType::IS, - "animal".to_string(), - ), - ) - .custom_bg_color("#632ca6".to_string()) - .palette(TableWidgetTextFormatPalette::CUSTOM_BG), - TableWidgetTextFormatRule::new( - TableWidgetTextFormatMatch::new( - TableWidgetTextFormatMatchType::IS, - "robot".to_string(), - ), - ).palette(TableWidgetTextFormatPalette::RED_ON_WHITE), - TableWidgetTextFormatRule::new( - TableWidgetTextFormatMatch::new( - TableWidgetTextFormatMatchType::IS, - "ai".to_string(), - ), - ).palette(TableWidgetTextFormatPalette::YELLOW_ON_WHITE) - ], - vec![ - TableWidgetTextFormatRule::new( - TableWidgetTextFormatMatch::new( - TableWidgetTextFormatMatchType::IS_NOT, - "xyz".to_string(), - ), - ).palette(TableWidgetTextFormatPalette::WHITE_ON_YELLOW) - ], - vec![ - TableWidgetTextFormatRule::new( - TableWidgetTextFormatMatch::new( - TableWidgetTextFormatMatchType::CONTAINS, - "test".to_string(), - ), - ) - .palette(TableWidgetTextFormatPalette::WHITE_ON_GREEN) - .replace( - TableWidgetTextFormatReplace - ::TableWidgetTextFormatReplaceAll( - Box::new( - TableWidgetTextFormatReplaceAll::new( - TableWidgetTextFormatReplaceAllType::ALL, - "vegetable".to_string(), - ), - ), - ), - ) - ], - vec![ - TableWidgetTextFormatRule::new( - TableWidgetTextFormatMatch::new( - TableWidgetTextFormatMatchType::DOES_NOT_CONTAIN, - "blah".to_string(), - ), - ).palette(TableWidgetTextFormatPalette::BLACK_ON_LIGHT_RED) - ], - vec![ - TableWidgetTextFormatRule::new( - TableWidgetTextFormatMatch::new( - TableWidgetTextFormatMatchType::STARTS_WITH, - "abc".to_string(), - ), - ).palette(TableWidgetTextFormatPalette::BLACK_ON_LIGHT_YELLOW) - ], - vec![ - TableWidgetTextFormatRule::new( - TableWidgetTextFormatMatch::new( - TableWidgetTextFormatMatchType::ENDS_WITH, - "xyz".to_string(), - ), - ).palette(TableWidgetTextFormatPalette::BLACK_ON_LIGHT_GREEN), - TableWidgetTextFormatRule::new( - TableWidgetTextFormatMatch::new( - TableWidgetTextFormatMatchType::ENDS_WITH, - "zzz".to_string(), - ), - ).palette(TableWidgetTextFormatPalette::GREEN_ON_WHITE), - TableWidgetTextFormatRule::new( - TableWidgetTextFormatMatch::new( - TableWidgetTextFormatMatchType::IS, - "animal".to_string(), - ), - ) - .custom_fg_color("#632ca6".to_string()) - .palette(TableWidgetTextFormatPalette::CUSTOM_TEXT) - ] - ], - ) - ], - TableWidgetDefinitionType::QUERY_TABLE, - ) - .has_search_bar(TableWidgetHasSearchBar::NEVER) - .title("".to_string()) - .title_align(WidgetTextAlign::LEFT) - .title_size("16".to_string()), - ), - ), - ).layout(WidgetLayout::new(4, 4, 0, 0)) - ], - ) - .description(Some("".to_string())) - .notify_list(Some(vec![])) - .template_variables(Some(vec![])); + let body = Dashboard::new(DashboardLayoutType::FREE, "Example-Dashboard".to_string(), vec![Widget::new(WidgetDefinition::TableWidgetDefinition(Box::new(TableWidgetDefinition::new(vec![TableWidgetRequest::new().formulas(vec![]).queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionMetricQueryDefinition(Box::new(FormulaAndFunctionMetricQueryDefinition::new(FormulaAndFunctionMetricDataSource::METRICS, "query1".to_string(), "avg:aws.stream.globalaccelerator.processed_bytes_in{*} by {aws_account,acceleratoripaddress}".to_string(), ).aggregator(FormulaAndFunctionMetricAggregation::AVG))),FormulaAndFunctionQueryDefinition::FormulaAndFunctionMetricQueryDefinition(Box::new(FormulaAndFunctionMetricQueryDefinition::new(FormulaAndFunctionMetricDataSource::METRICS, "query2".to_string(), "avg:aws.stream.globalaccelerator.processed_bytes_out{*} by {aws_account,acceleratoripaddress}".to_string(), ).aggregator(FormulaAndFunctionMetricAggregation::AVG))),]).response_format(FormulaAndFunctionResponseFormat::SCALAR).text_formats(vec![vec![TableWidgetTextFormatRule::new(TableWidgetTextFormatMatch::new(TableWidgetTextFormatMatchType::IS, "fruit".to_string(), ), ).palette(TableWidgetTextFormatPalette::WHITE_ON_RED).replace(TableWidgetTextFormatReplace::TableWidgetTextFormatReplaceAll(Box::new(TableWidgetTextFormatReplaceAll::new(TableWidgetTextFormatReplaceAllType::ALL, "vegetable".to_string(), )))),TableWidgetTextFormatRule::new(TableWidgetTextFormatMatch::new(TableWidgetTextFormatMatchType::IS, "animal".to_string(), ), ).custom_bg_color("#632ca6".to_string()).palette(TableWidgetTextFormatPalette::CUSTOM_BG),TableWidgetTextFormatRule::new(TableWidgetTextFormatMatch::new(TableWidgetTextFormatMatchType::IS, "robot".to_string(), ), ).palette(TableWidgetTextFormatPalette::RED_ON_WHITE),TableWidgetTextFormatRule::new(TableWidgetTextFormatMatch::new(TableWidgetTextFormatMatchType::IS, "ai".to_string(), ), ).palette(TableWidgetTextFormatPalette::YELLOW_ON_WHITE),],vec![TableWidgetTextFormatRule::new(TableWidgetTextFormatMatch::new(TableWidgetTextFormatMatchType::IS_NOT, "xyz".to_string(), ), ).palette(TableWidgetTextFormatPalette::WHITE_ON_YELLOW),],vec![TableWidgetTextFormatRule::new(TableWidgetTextFormatMatch::new(TableWidgetTextFormatMatchType::CONTAINS, "test".to_string(), ), ).palette(TableWidgetTextFormatPalette::WHITE_ON_GREEN).replace(TableWidgetTextFormatReplace::TableWidgetTextFormatReplaceAll(Box::new(TableWidgetTextFormatReplaceAll::new(TableWidgetTextFormatReplaceAllType::ALL, "vegetable".to_string(), )))),],vec![TableWidgetTextFormatRule::new(TableWidgetTextFormatMatch::new(TableWidgetTextFormatMatchType::DOES_NOT_CONTAIN, "blah".to_string(), ), ).palette(TableWidgetTextFormatPalette::BLACK_ON_LIGHT_RED),],vec![TableWidgetTextFormatRule::new(TableWidgetTextFormatMatch::new(TableWidgetTextFormatMatchType::STARTS_WITH, "abc".to_string(), ), ).palette(TableWidgetTextFormatPalette::BLACK_ON_LIGHT_YELLOW),],vec![TableWidgetTextFormatRule::new(TableWidgetTextFormatMatch::new(TableWidgetTextFormatMatchType::ENDS_WITH, "xyz".to_string(), ), ).palette(TableWidgetTextFormatPalette::BLACK_ON_LIGHT_GREEN),TableWidgetTextFormatRule::new(TableWidgetTextFormatMatch::new(TableWidgetTextFormatMatchType::ENDS_WITH, "zzz".to_string(), ), ).palette(TableWidgetTextFormatPalette::GREEN_ON_WHITE),TableWidgetTextFormatRule::new(TableWidgetTextFormatMatch::new(TableWidgetTextFormatMatchType::IS, "animal".to_string(), ), ).custom_fg_color("#632ca6".to_string()).palette(TableWidgetTextFormatPalette::CUSTOM_TEXT),],]),], TableWidgetDefinitionType::QUERY_TABLE, ).has_search_bar(TableWidgetHasSearchBar::NEVER).title("".to_string()).title_align(WidgetTextAlign::LEFT).title_size("16".to_string()))), ).layout(WidgetLayout::new(4, 4, 0, 0, )),], ).description(Some("".to_string())).notify_list(Some(vec![])).template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_798168180.rs b/examples/v1_dashboards_CreateDashboard_798168180.rs index 539dbd776..7c129e533 100644 --- a/examples/v1_dashboards_CreateDashboard_798168180.rs +++ b/examples/v1_dashboards_CreateDashboard_798168180.rs @@ -18,50 +18,8 @@ use datadog_api_client::datadogV1::model::WidgetTextAlign; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::ORDERED, - "Example-Dashboard".to_string(), - vec![ - Widget::new( - WidgetDefinition::TableWidgetDefinition( - Box::new( - TableWidgetDefinition::new( - vec![ - TableWidgetRequest::new() - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionApmDependencyStatsQueryDefinition( - Box::new( - FormulaAndFunctionApmDependencyStatsQueryDefinition::new( - FormulaAndFunctionApmDependencyStatsDataSource - ::APM_DEPENDENCY_STATS, - "ci".to_string(), - "query1".to_string(), - "cassandra.query".to_string(), - "DELETE FROM monitor_history.monitor_state_change_history WHERE org_id = ? AND monitor_id IN ? AND group = ?".to_string(), - "cassandra".to_string(), - FormulaAndFunctionApmDependencyStatName::AVG_DURATION, - ) - .primary_tag_name("datacenter".to_string()) - .primary_tag_value("edge-eu1.prod.dog".to_string()), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::SCALAR) - ], - TableWidgetDefinitionType::QUERY_TABLE, - ) - .title("".to_string()) - .title_align(WidgetTextAlign::LEFT) - .title_size("16".to_string()), - ), - ), - ).layout(WidgetLayout::new(4, 4, 0, 0)) - ], - ); + let body = Dashboard::new(DashboardLayoutType::ORDERED, "Example-Dashboard".to_string(), vec![Widget::new(WidgetDefinition::TableWidgetDefinition(Box::new(TableWidgetDefinition::new(vec![TableWidgetRequest::new().queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionApmDependencyStatsQueryDefinition(Box::new(FormulaAndFunctionApmDependencyStatsQueryDefinition::new(FormulaAndFunctionApmDependencyStatsDataSource::APM_DEPENDENCY_STATS, "ci".to_string(), "query1".to_string(), "cassandra.query".to_string(), "DELETE FROM monitor_history.monitor_state_change_history WHERE org_id = ? AND monitor_id IN ? AND group = ?".to_string(), "cassandra".to_string(), FormulaAndFunctionApmDependencyStatName::AVG_DURATION, ).primary_tag_name("datacenter".to_string()).primary_tag_value("edge-eu1.prod.dog".to_string()))),]).response_format(FormulaAndFunctionResponseFormat::SCALAR),], TableWidgetDefinitionType::QUERY_TABLE, ).title("".to_string()).title_align(WidgetTextAlign::LEFT).title_size("16".to_string()))), ).layout(WidgetLayout::new(4, 4, 0, 0, )),], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_803346562.rs b/examples/v1_dashboards_CreateDashboard_803346562.rs index b5e4d73f9..9a96374b7 100644 --- a/examples/v1_dashboards_CreateDashboard_803346562.rs +++ b/examples/v1_dashboards_CreateDashboard_803346562.rs @@ -39,6 +39,7 @@ async fn main() { .layout(WidgetLayout::new(4, 4, 0, 0)), ], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_858397694.rs b/examples/v1_dashboards_CreateDashboard_858397694.rs index 9730a9ae8..a9e99689d 100644 --- a/examples/v1_dashboards_CreateDashboard_858397694.rs +++ b/examples/v1_dashboards_CreateDashboard_858397694.rs @@ -39,6 +39,7 @@ async fn main() { ])) .defaults(vec!["my-host".to_string()]) .prefix(Some("host".to_string()))])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_913313564.rs b/examples/v1_dashboards_CreateDashboard_913313564.rs index 905b39c30..eeacd80ed 100644 --- a/examples/v1_dashboards_CreateDashboard_913313564.rs +++ b/examples/v1_dashboards_CreateDashboard_913313564.rs @@ -27,6 +27,7 @@ async fn main() { .description(Some("".to_string())) .notify_list(Some(vec![])) .template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_915214113.rs b/examples/v1_dashboards_CreateDashboard_915214113.rs index ad32a36da..efa6f5549 100644 --- a/examples/v1_dashboards_CreateDashboard_915214113.rs +++ b/examples/v1_dashboards_CreateDashboard_915214113.rs @@ -33,90 +33,8 @@ use datadog_api_client::datadogV1::model::WidgetTime; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::FREE, - "Example-Dashboard".to_string(), - vec![ - Widget::new( - WidgetDefinition::GeomapWidgetDefinition( - Box::new( - GeomapWidgetDefinition::new( - vec![ - GeomapWidgetRequest::new() - .formulas(vec![WidgetFormula::new("query1".to_string())]) - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionEventQueryDefinition( - Box::new( - FormulaAndFunctionEventQueryDefinition::new( - FormulaAndFunctionEventQueryDefinitionCompute::new( - FormulaAndFunctionEventAggregation::COUNT, - ), - FormulaAndFunctionEventsDataSource::RUM, - "query1".to_string(), - ) - .group_by( - vec![ - FormulaAndFunctionEventQueryGroupBy::new( - "@geo.country_iso_code".to_string(), - ) - .limit(250) - .sort( - FormulaAndFunctionEventQueryGroupBySort - ::new( - FormulaAndFunctionEventAggregation - ::COUNT, - ).order(QuerySortOrder::DESC), - ) - ], - ) - .indexes(vec!["*".to_string()]) - .search( - FormulaAndFunctionEventQueryDefinitionSearch::new( - "".to_string(), - ), - ), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::SCALAR) - .sort( - WidgetSortBy::new() - .count(250) - .order_by( - vec![ - WidgetSortOrderBy::WidgetFormulaSort( - Box::new( - WidgetFormulaSort::new( - 0, - WidgetSort::DESCENDING, - FormulaType::FORMULA, - ), - ), - ) - ], - ), - ) - ], - GeomapWidgetDefinitionStyle::new("hostmap_blues".to_string(), false), - GeomapWidgetDefinitionType::GEOMAP, - GeomapWidgetDefinitionView::new("WORLD".to_string()), - ) - .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))) - .title("".to_string()) - .title_align(WidgetTextAlign::LEFT) - .title_size("16".to_string()), - ), - ), - ).layout(WidgetLayout::new(30, 47, 0, 0)) - ], - ) - .description(None) - .notify_list(Some(vec![])) - .template_variables(Some(vec![])); + let body = Dashboard::new(DashboardLayoutType::FREE, "Example-Dashboard".to_string(), vec![Widget::new(WidgetDefinition::GeomapWidgetDefinition(Box::new(GeomapWidgetDefinition::new(vec![GeomapWidgetRequest::new().formulas(vec![WidgetFormula::new("query1".to_string(), ),]).queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionEventQueryDefinition(Box::new(FormulaAndFunctionEventQueryDefinition::new(FormulaAndFunctionEventQueryDefinitionCompute::new(FormulaAndFunctionEventAggregation::COUNT, ), FormulaAndFunctionEventsDataSource::RUM, "query1".to_string(), ).group_by(vec![FormulaAndFunctionEventQueryGroupBy::new("@geo.country_iso_code".to_string(), ).limit(250).sort(FormulaAndFunctionEventQueryGroupBySort::new(FormulaAndFunctionEventAggregation::COUNT, ).order(QuerySortOrder::DESC)),]).indexes(vec!["*".to_string(),]).search(FormulaAndFunctionEventQueryDefinitionSearch::new("".to_string(), )))),]).response_format(FormulaAndFunctionResponseFormat::SCALAR).sort(WidgetSortBy::new().count(250).order_by(vec![WidgetSortOrderBy::WidgetFormulaSort(Box::new(WidgetFormulaSort::new(0, WidgetSort::DESCENDING, FormulaType::FORMULA, ))),])),], GeomapWidgetDefinitionStyle::new("hostmap_blues".to_string(), false, ), GeomapWidgetDefinitionType::GEOMAP, GeomapWidgetDefinitionView::new("WORLD".to_string(), ), ).time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))).title("".to_string()).title_align(WidgetTextAlign::LEFT).title_size("16".to_string()))), ).layout(WidgetLayout::new(30, 47, 0, 0, )),], ).description(None).notify_list(Some(vec![])).template_variables(Some(vec![])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_927141680.rs b/examples/v1_dashboards_CreateDashboard_927141680.rs index d337ac54b..c2b129e83 100644 --- a/examples/v1_dashboards_CreateDashboard_927141680.rs +++ b/examples/v1_dashboards_CreateDashboard_927141680.rs @@ -27,6 +27,7 @@ async fn main() { )), ))], ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreateDashboard_985012506.rs b/examples/v1_dashboards_CreateDashboard_985012506.rs index a24fb2c0c..dae4d14a2 100644 --- a/examples/v1_dashboards_CreateDashboard_985012506.rs +++ b/examples/v1_dashboards_CreateDashboard_985012506.rs @@ -28,70 +28,8 @@ use datadog_api_client::datadogV1::model::WidgetTime; #[tokio::main] async fn main() { - let body = - Dashboard::new( - DashboardLayoutType::ORDERED, - "Example-Dashboard with incident_analytics datasource".to_string(), - vec![ - Widget::new( - WidgetDefinition::TimeseriesWidgetDefinition( - Box::new( - TimeseriesWidgetDefinition::new( - vec![ - TimeseriesWidgetRequest::new() - .display_type(WidgetDisplayType::LINE) - .formulas(vec![WidgetFormula::new("query1".to_string())]) - .queries( - vec![ - FormulaAndFunctionQueryDefinition - ::FormulaAndFunctionEventQueryDefinition( - Box::new( - FormulaAndFunctionEventQueryDefinition::new( - FormulaAndFunctionEventQueryDefinitionCompute::new( - FormulaAndFunctionEventAggregation::COUNT, - ), - FormulaAndFunctionEventsDataSource::INCIDENT_ANALYTICS, - "query1".to_string(), - ) - .group_by(vec![]) - .indexes(vec!["*".to_string()]) - .search( - FormulaAndFunctionEventQueryDefinitionSearch::new( - "test_level:test".to_string(), - ), - ), - ), - ) - ], - ) - .response_format(FormulaAndFunctionResponseFormat::TIMESERIES) - .style( - WidgetRequestStyle::new() - .line_type(WidgetLineType::SOLID) - .line_width(WidgetLineWidth::NORMAL) - .palette("dog_classic".to_string()), - ) - ], - TimeseriesWidgetDefinitionType::TIMESERIES, - ) - .legend_columns( - vec![ - TimeseriesWidgetLegendColumn::AVG, - TimeseriesWidgetLegendColumn::MIN, - TimeseriesWidgetLegendColumn::MAX, - TimeseriesWidgetLegendColumn::VALUE, - TimeseriesWidgetLegendColumn::SUM - ], - ) - .legend_layout(TimeseriesWidgetLegendLayout::AUTO) - .show_legend(true) - .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))) - .title("".to_string()), - ), - ), - ) - ], - ).reflow_type(DashboardReflowType::AUTO); + let body = Dashboard::new(DashboardLayoutType::ORDERED, "Example-Dashboard with incident_analytics datasource".to_string(), vec![Widget::new(WidgetDefinition::TimeseriesWidgetDefinition(Box::new(TimeseriesWidgetDefinition::new(vec![TimeseriesWidgetRequest::new().display_type(WidgetDisplayType::LINE).formulas(vec![WidgetFormula::new("query1".to_string(), ),]).queries(vec![FormulaAndFunctionQueryDefinition::FormulaAndFunctionEventQueryDefinition(Box::new(FormulaAndFunctionEventQueryDefinition::new(FormulaAndFunctionEventQueryDefinitionCompute::new(FormulaAndFunctionEventAggregation::COUNT, ), FormulaAndFunctionEventsDataSource::INCIDENT_ANALYTICS, "query1".to_string(), ).group_by(vec![]).indexes(vec!["*".to_string(),]).search(FormulaAndFunctionEventQueryDefinitionSearch::new("test_level:test".to_string(), )))),]).response_format(FormulaAndFunctionResponseFormat::TIMESERIES).style(WidgetRequestStyle::new().line_type(WidgetLineType::SOLID).line_width(WidgetLineWidth::NORMAL).palette("dog_classic".to_string())),], TimeseriesWidgetDefinitionType::TIMESERIES, ).legend_columns(vec![TimeseriesWidgetLegendColumn::AVG,TimeseriesWidgetLegendColumn::MIN,TimeseriesWidgetLegendColumn::MAX,TimeseriesWidgetLegendColumn::VALUE,TimeseriesWidgetLegendColumn::SUM,]).legend_layout(TimeseriesWidgetLegendLayout::AUTO).show_legend(true).time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new()))).title("".to_string()))), ),], ).reflow_type(DashboardReflowType::AUTO); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_dashboard(body).await; diff --git a/examples/v1_dashboards_CreatePublicDashboard.rs b/examples/v1_dashboards_CreatePublicDashboard.rs index e106025e4..339f9df37 100644 --- a/examples/v1_dashboards_CreatePublicDashboard.rs +++ b/examples/v1_dashboards_CreatePublicDashboard.rs @@ -16,6 +16,7 @@ async fn main() { DashboardGlobalTime::new().live_span(DashboardGlobalTimeLiveSpan::PAST_ONE_HOUR), ) .share_type(Some(DashboardShareType::OPEN)); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.create_public_dashboard(body).await; diff --git a/examples/v1_dashboards_DeleteDashboard.rs b/examples/v1_dashboards_DeleteDashboard.rs index a170de1c2..cdd59692c 100644 --- a/examples/v1_dashboards_DeleteDashboard.rs +++ b/examples/v1_dashboards_DeleteDashboard.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV1::api_dashboards::DashboardsAPI; async fn main() { // there is a valid "dashboard" in the system let dashboard_id = std::env::var("DASHBOARD_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.delete_dashboard(dashboard_id.clone()).await; diff --git a/examples/v1_dashboards_DeleteDashboards.rs b/examples/v1_dashboards_DeleteDashboards.rs index f43b32738..b6620b232 100644 --- a/examples/v1_dashboards_DeleteDashboards.rs +++ b/examples/v1_dashboards_DeleteDashboards.rs @@ -13,6 +13,7 @@ async fn main() { dashboard_id.clone(), DashboardResourceType::DASHBOARD, )]); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.delete_dashboards(body).await; diff --git a/examples/v1_dashboards_DeletePublicDashboardInvitation.rs b/examples/v1_dashboards_DeletePublicDashboardInvitation.rs index 483291e37..e318d2812 100644 --- a/examples/v1_dashboards_DeletePublicDashboardInvitation.rs +++ b/examples/v1_dashboards_DeletePublicDashboardInvitation.rs @@ -17,6 +17,7 @@ async fn main() { DashboardInviteType::PUBLIC_DASHBOARD_INVITATION, )], )); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_dashboards_GetDashboard.rs b/examples/v1_dashboards_GetDashboard.rs index 33970127c..8fe7a2d09 100644 --- a/examples/v1_dashboards_GetDashboard.rs +++ b/examples/v1_dashboards_GetDashboard.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV1::api_dashboards::DashboardsAPI; async fn main() { // there is a valid "dashboard" in the system let dashboard_id = std::env::var("DASHBOARD_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.get_dashboard(dashboard_id.clone()).await; diff --git a/examples/v1_dashboards_GetDashboard_4262333854.rs b/examples/v1_dashboards_GetDashboard_4262333854.rs index aecb69ed7..449609603 100644 --- a/examples/v1_dashboards_GetDashboard_4262333854.rs +++ b/examples/v1_dashboards_GetDashboard_4262333854.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV1::api_dashboards::DashboardsAPI; async fn main() { // there is a valid "dashboard" in the system let dashboard_id = std::env::var("DASHBOARD_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.get_dashboard(dashboard_id.clone()).await; diff --git a/examples/v1_dashboards_GetPublicDashboard.rs b/examples/v1_dashboards_GetPublicDashboard.rs index a3de8fc6e..38b1814d3 100644 --- a/examples/v1_dashboards_GetPublicDashboard.rs +++ b/examples/v1_dashboards_GetPublicDashboard.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV1::api_dashboards::DashboardsAPI; async fn main() { // there is a valid "shared_dashboard" in the system let shared_dashboard_token = std::env::var("SHARED_DASHBOARD_TOKEN").unwrap(); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_dashboards_GetPublicDashboardInvitations.rs b/examples/v1_dashboards_GetPublicDashboardInvitations.rs index c6b67a8ca..3e77f9304 100644 --- a/examples/v1_dashboards_GetPublicDashboardInvitations.rs +++ b/examples/v1_dashboards_GetPublicDashboardInvitations.rs @@ -7,6 +7,7 @@ use datadog_api_client::datadogV1::api_dashboards::GetPublicDashboardInvitations async fn main() { // there is a valid "shared_dashboard" in the system let shared_dashboard_token = std::env::var("SHARED_DASHBOARD_TOKEN").unwrap(); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_dashboards_ListDashboards_1062671515.rs b/examples/v1_dashboards_ListDashboards_1062671515.rs index 1f6ce40e7..f1bb0e43c 100644 --- a/examples/v1_dashboards_ListDashboards_1062671515.rs +++ b/examples/v1_dashboards_ListDashboards_1062671515.rs @@ -12,6 +12,7 @@ async fn main() { let response = api.list_dashboards_with_pagination(ListDashboardsOptionalParams::default().count(2)); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v1_dashboards_RestoreDashboards.rs b/examples/v1_dashboards_RestoreDashboards.rs index b76a43abd..6f6485d9b 100644 --- a/examples/v1_dashboards_RestoreDashboards.rs +++ b/examples/v1_dashboards_RestoreDashboards.rs @@ -13,6 +13,7 @@ async fn main() { dashboard_id.clone(), DashboardResourceType::DASHBOARD, )]); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.restore_dashboards(body).await; diff --git a/examples/v1_dashboards_SendPublicDashboardInvitation.rs b/examples/v1_dashboards_SendPublicDashboardInvitation.rs index 4094bc724..de9d4387a 100644 --- a/examples/v1_dashboards_SendPublicDashboardInvitation.rs +++ b/examples/v1_dashboards_SendPublicDashboardInvitation.rs @@ -20,6 +20,7 @@ async fn main() { ), )), ); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_dashboards_UpdateDashboard.rs b/examples/v1_dashboards_UpdateDashboard.rs index e3432a3f6..abf3b1ee4 100644 --- a/examples/v1_dashboards_UpdateDashboard.rs +++ b/examples/v1_dashboards_UpdateDashboard.rs @@ -36,6 +36,7 @@ async fn main() { ))], ) .description(Some("Updated description".to_string())); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.update_dashboard(dashboard_id.clone(), body).await; diff --git a/examples/v1_dashboards_UpdateDashboard_3454865944.rs b/examples/v1_dashboards_UpdateDashboard_3454865944.rs index 297f39aeb..781b6f207 100644 --- a/examples/v1_dashboards_UpdateDashboard_3454865944.rs +++ b/examples/v1_dashboards_UpdateDashboard_3454865944.rs @@ -37,6 +37,7 @@ async fn main() { ) .description(Some("Updated description".to_string())) .tags(Some(vec!["team:foo".to_string(), "team:bar".to_string()])); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api.update_dashboard(dashboard_id.clone(), body).await; diff --git a/examples/v1_dashboards_UpdatePublicDashboard.rs b/examples/v1_dashboards_UpdatePublicDashboard.rs index 315b07bb1..1fab081b8 100644 --- a/examples/v1_dashboards_UpdatePublicDashboard.rs +++ b/examples/v1_dashboards_UpdatePublicDashboard.rs @@ -16,6 +16,7 @@ async fn main() { )) .share_list(Some(vec![])) .share_type(Some(DashboardShareType::OPEN)); + let configuration = datadog::Configuration::new(); let api = DashboardsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_downtimes_CancelDowntime.rs b/examples/v1_downtimes_CancelDowntime.rs index 521833cda..f36f2578b 100644 --- a/examples/v1_downtimes_CancelDowntime.rs +++ b/examples/v1_downtimes_CancelDowntime.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV1::api_downtimes::DowntimesAPI; async fn main() { // there is a valid "downtime" in the system let downtime_id: i64 = std::env::var("DOWNTIME_ID").unwrap().parse().unwrap(); + let configuration = datadog::Configuration::new(); let api = DowntimesAPI::with_config(configuration); let resp = api.cancel_downtime(downtime_id.clone()).await; diff --git a/examples/v1_downtimes_CancelDowntimesByScope.rs b/examples/v1_downtimes_CancelDowntimesByScope.rs index e6ba9afa7..43f0e901a 100644 --- a/examples/v1_downtimes_CancelDowntimesByScope.rs +++ b/examples/v1_downtimes_CancelDowntimesByScope.rs @@ -8,6 +8,7 @@ async fn main() { // there is a valid "downtime" in the system let downtime_scope_0 = std::env::var("DOWNTIME_SCOPE_0").unwrap(); let body = CancelDowntimesByScopeRequest::new(downtime_scope_0.clone()); + let configuration = datadog::Configuration::new(); let api = DowntimesAPI::with_config(configuration); let resp = api.cancel_downtimes_by_scope(body).await; diff --git a/examples/v1_downtimes_CreateDowntime.rs b/examples/v1_downtimes_CreateDowntime.rs index a53e11176..0d0ebd3dd 100644 --- a/examples/v1_downtimes_CreateDowntime.rs +++ b/examples/v1_downtimes_CreateDowntime.rs @@ -33,6 +33,7 @@ async fn main() { .scope(vec!["test:exampledowntime".to_string()]) .start(1636629071) .timezone("Etc/UTC".to_string()); + let configuration = datadog::Configuration::new(); let api = DowntimesAPI::with_config(configuration); let resp = api.create_downtime(body).await; diff --git a/examples/v1_downtimes_CreateDowntime_1393233946.rs b/examples/v1_downtimes_CreateDowntime_1393233946.rs index ada054a0b..f99d28d20 100644 --- a/examples/v1_downtimes_CreateDowntime_1393233946.rs +++ b/examples/v1_downtimes_CreateDowntime_1393233946.rs @@ -26,6 +26,7 @@ async fn main() { .scope(vec!["*".to_string()]) .start(1636629071) .timezone("Etc/UTC".to_string()); + let configuration = datadog::Configuration::new(); let api = DowntimesAPI::with_config(configuration); let resp = api.create_downtime(body).await; diff --git a/examples/v1_downtimes_CreateDowntime_2908359488.rs b/examples/v1_downtimes_CreateDowntime_2908359488.rs index 978d9de97..8f018d5ec 100644 --- a/examples/v1_downtimes_CreateDowntime_2908359488.rs +++ b/examples/v1_downtimes_CreateDowntime_2908359488.rs @@ -31,6 +31,7 @@ async fn main() { .scope(vec!["*".to_string()]) .start(1636629071) .timezone("Etc/UTC".to_string()); + let configuration = datadog::Configuration::new(); let api = DowntimesAPI::with_config(configuration); let resp = api.create_downtime(body).await; diff --git a/examples/v1_downtimes_CreateDowntime_3059354445.rs b/examples/v1_downtimes_CreateDowntime_3059354445.rs index d64702845..27aaa7fe7 100644 --- a/examples/v1_downtimes_CreateDowntime_3059354445.rs +++ b/examples/v1_downtimes_CreateDowntime_3059354445.rs @@ -23,6 +23,7 @@ async fn main() { .scope(vec!["*".to_string()]) .start(1636629071) .timezone("Etc/UTC".to_string()); + let configuration = datadog::Configuration::new(); let api = DowntimesAPI::with_config(configuration); let resp = api.create_downtime(body).await; diff --git a/examples/v1_downtimes_CreateDowntime_3355644446.rs b/examples/v1_downtimes_CreateDowntime_3355644446.rs index d4f6d91e8..9487de51b 100644 --- a/examples/v1_downtimes_CreateDowntime_3355644446.rs +++ b/examples/v1_downtimes_CreateDowntime_3355644446.rs @@ -13,6 +13,7 @@ async fn main() { .scope(vec!["test:exampledowntime".to_string()]) .start(1636629071) .timezone("Etc/UTC".to_string()); + let configuration = datadog::Configuration::new(); let api = DowntimesAPI::with_config(configuration); let resp = api.create_downtime(body).await; diff --git a/examples/v1_downtimes_GetDowntime.rs b/examples/v1_downtimes_GetDowntime.rs index 018520b79..6c96c432f 100644 --- a/examples/v1_downtimes_GetDowntime.rs +++ b/examples/v1_downtimes_GetDowntime.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV1::api_downtimes::DowntimesAPI; async fn main() { // there is a valid "downtime" in the system let downtime_id: i64 = std::env::var("DOWNTIME_ID").unwrap().parse().unwrap(); + let configuration = datadog::Configuration::new(); let api = DowntimesAPI::with_config(configuration); let resp = api.get_downtime(downtime_id.clone()).await; diff --git a/examples/v1_downtimes_UpdateDowntime.rs b/examples/v1_downtimes_UpdateDowntime.rs index 5f4f72fd9..878383311 100644 --- a/examples/v1_downtimes_UpdateDowntime.rs +++ b/examples/v1_downtimes_UpdateDowntime.rs @@ -18,6 +18,7 @@ async fn main() { NotifyEndState::WARN, ]) .notify_end_types(vec![NotifyEndType::CANCELED, NotifyEndType::EXPIRED]); + let configuration = datadog::Configuration::new(); let api = DowntimesAPI::with_config(configuration); let resp = api.update_downtime(downtime_id.clone(), body).await; diff --git a/examples/v1_events_CreateEvent.rs b/examples/v1_events_CreateEvent.rs index 8990925c4..4821d55eb 100644 --- a/examples/v1_events_CreateEvent.rs +++ b/examples/v1_events_CreateEvent.rs @@ -7,6 +7,7 @@ use datadog_api_client::datadogV1::model::EventCreateRequest; async fn main() { let body = EventCreateRequest::new("A text message.".to_string(), "Example-Event".to_string()) .tags(vec!["test:ExampleEvent".to_string()]); + let configuration = datadog::Configuration::new(); let api = EventsAPI::with_config(configuration); let resp = api.create_event(body).await; diff --git a/examples/v1_events_CreateEvent_19927815.rs b/examples/v1_events_CreateEvent_19927815.rs index 90cb07203..25eef665e 100644 --- a/examples/v1_events_CreateEvent_19927815.rs +++ b/examples/v1_events_CreateEvent_19927815.rs @@ -5,11 +5,8 @@ use datadog_api_client::datadogV1::model::EventCreateRequest; #[tokio::main] async fn main() { - let body = - EventCreateRequest::new( - "A text message.".to_string(), - "Example-Event very very very looooooooong looooooooooooong loooooooooooooooooooooong looooooooooooooooooooooooooong title with 100+ characters".to_string(), - ).tags(vec!["test:ExampleEvent".to_string()]); + let body = EventCreateRequest::new("A text message.".to_string(), "Example-Event very very very looooooooong looooooooooooong loooooooooooooooooooooong looooooooooooooooooooooooooong title with 100+ characters".to_string(), ).tags(vec!["test:ExampleEvent".to_string(),]); + let configuration = datadog::Configuration::new(); let api = EventsAPI::with_config(configuration); let resp = api.create_event(body).await; diff --git a/examples/v1_gcp-integration_CreateGCPIntegration.rs b/examples/v1_gcp-integration_CreateGCPIntegration.rs index 17f0819c8..873215110 100644 --- a/examples/v1_gcp-integration_CreateGCPIntegration.rs +++ b/examples/v1_gcp-integration_CreateGCPIntegration.rs @@ -24,6 +24,7 @@ async fn main() { .resource_collection_enabled(true) .token_uri("https://accounts.google.com/o/oauth2/token".to_string()) .type_("service_account".to_string()); + let configuration = datadog::Configuration::new(); let api = GCPIntegrationAPI::with_config(configuration); let resp = api.create_gcp_integration(body).await; diff --git a/examples/v1_gcp-integration_DeleteGCPIntegration.rs b/examples/v1_gcp-integration_DeleteGCPIntegration.rs index 88ad156a6..abdadaf4b 100644 --- a/examples/v1_gcp-integration_DeleteGCPIntegration.rs +++ b/examples/v1_gcp-integration_DeleteGCPIntegration.rs @@ -9,6 +9,7 @@ async fn main() { .client_email("252bf553ef04b351@example.com".to_string()) .client_id("163662907116366290710".to_string()) .project_id("datadog-apitest".to_string()); + let configuration = datadog::Configuration::new(); let api = GCPIntegrationAPI::with_config(configuration); let resp = api.delete_gcp_integration(body).await; diff --git a/examples/v1_gcp-integration_UpdateGCPIntegration.rs b/examples/v1_gcp-integration_UpdateGCPIntegration.rs index 35323ee8c..20cfa8f4f 100644 --- a/examples/v1_gcp-integration_UpdateGCPIntegration.rs +++ b/examples/v1_gcp-integration_UpdateGCPIntegration.rs @@ -23,6 +23,7 @@ async fn main() { .resource_collection_enabled(true) .token_uri("https://accounts.google.com/o/oauth2/token".to_string()) .type_("service_account".to_string()); + let configuration = datadog::Configuration::new(); let api = GCPIntegrationAPI::with_config(configuration); let resp = api.update_gcp_integration(body).await; diff --git a/examples/v1_gcp-integration_UpdateGCPIntegration_3544259255.rs b/examples/v1_gcp-integration_UpdateGCPIntegration_3544259255.rs index 857e34ffe..ebc007b4c 100644 --- a/examples/v1_gcp-integration_UpdateGCPIntegration_3544259255.rs +++ b/examples/v1_gcp-integration_UpdateGCPIntegration_3544259255.rs @@ -24,6 +24,7 @@ async fn main() { .resource_collection_enabled(true) .token_uri("https://accounts.google.com/o/oauth2/token".to_string()) .type_("service_account".to_string()); + let configuration = datadog::Configuration::new(); let api = GCPIntegrationAPI::with_config(configuration); let resp = api.update_gcp_integration(body).await; diff --git a/examples/v1_hosts_MuteHost.rs b/examples/v1_hosts_MuteHost.rs index 0fc703066..3981294e9 100644 --- a/examples/v1_hosts_MuteHost.rs +++ b/examples/v1_hosts_MuteHost.rs @@ -9,6 +9,7 @@ async fn main() { .end(1579098130) .message("Muting this host for a test!".to_string()) .override_(false); + let configuration = datadog::Configuration::new(); let api = HostsAPI::with_config(configuration); let resp = api.mute_host("host_name".to_string(), body).await; diff --git a/examples/v1_key-management_CreateAPIKey.rs b/examples/v1_key-management_CreateAPIKey.rs index 92dae9cdd..7917f264c 100644 --- a/examples/v1_key-management_CreateAPIKey.rs +++ b/examples/v1_key-management_CreateAPIKey.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV1::model::ApiKey; #[tokio::main] async fn main() { let body = ApiKey::new().name("example user".to_string()); + let configuration = datadog::Configuration::new(); let api = KeyManagementAPI::with_config(configuration); let resp = api.create_api_key(body).await; diff --git a/examples/v1_key-management_CreateApplicationKey.rs b/examples/v1_key-management_CreateApplicationKey.rs index 35fb821f0..4c730a798 100644 --- a/examples/v1_key-management_CreateApplicationKey.rs +++ b/examples/v1_key-management_CreateApplicationKey.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV1::model::ApplicationKey; #[tokio::main] async fn main() { let body = ApplicationKey::new().name("example user".to_string()); + let configuration = datadog::Configuration::new(); let api = KeyManagementAPI::with_config(configuration); let resp = api.create_application_key(body).await; diff --git a/examples/v1_key-management_UpdateAPIKey.rs b/examples/v1_key-management_UpdateAPIKey.rs index 6e9c2d393..9f67da4c3 100644 --- a/examples/v1_key-management_UpdateAPIKey.rs +++ b/examples/v1_key-management_UpdateAPIKey.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV1::model::ApiKey; #[tokio::main] async fn main() { let body = ApiKey::new().name("example user".to_string()); + let configuration = datadog::Configuration::new(); let api = KeyManagementAPI::with_config(configuration); let resp = api.update_api_key("key".to_string(), body).await; diff --git a/examples/v1_key-management_UpdateApplicationKey.rs b/examples/v1_key-management_UpdateApplicationKey.rs index aaeb5d259..c2fed5f51 100644 --- a/examples/v1_key-management_UpdateApplicationKey.rs +++ b/examples/v1_key-management_UpdateApplicationKey.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV1::model::ApplicationKey; #[tokio::main] async fn main() { let body = ApplicationKey::new().name("example user".to_string()); + let configuration = datadog::Configuration::new(); let api = KeyManagementAPI::with_config(configuration); let resp = api.update_application_key("key".to_string(), body).await; diff --git a/examples/v1_logs-indexes_CreateLogsIndex.rs b/examples/v1_logs-indexes_CreateLogsIndex.rs index 1342be54e..4a63031b8 100644 --- a/examples/v1_logs-indexes_CreateLogsIndex.rs +++ b/examples/v1_logs-indexes_CreateLogsIndex.rs @@ -24,6 +24,7 @@ async fn main() { .filter(LogsExclusionFilter::new(1.0).query("*".to_string()))]) .num_flex_logs_retention_days(360) .num_retention_days(15); + let configuration = datadog::Configuration::new(); let api = LogsIndexesAPI::with_config(configuration); let resp = api.create_logs_index(body).await; diff --git a/examples/v1_logs-indexes_UpdateLogsIndex.rs b/examples/v1_logs-indexes_UpdateLogsIndex.rs index 1a890900b..4a55b26b3 100644 --- a/examples/v1_logs-indexes_UpdateLogsIndex.rs +++ b/examples/v1_logs-indexes_UpdateLogsIndex.rs @@ -22,6 +22,7 @@ async fn main() { .filter(LogsExclusionFilter::new(1.0).query("*".to_string()))]) .num_flex_logs_retention_days(360) .num_retention_days(15); + let configuration = datadog::Configuration::new(); let api = LogsIndexesAPI::with_config(configuration); let resp = api.update_logs_index("name".to_string(), body).await; diff --git a/examples/v1_logs-indexes_UpdateLogsIndexOrder.rs b/examples/v1_logs-indexes_UpdateLogsIndexOrder.rs index 5ae52a1e7..c4d612852 100644 --- a/examples/v1_logs-indexes_UpdateLogsIndexOrder.rs +++ b/examples/v1_logs-indexes_UpdateLogsIndexOrder.rs @@ -10,6 +10,7 @@ async fn main() { "payments".to_string(), "web".to_string(), ]); + let configuration = datadog::Configuration::new(); let api = LogsIndexesAPI::with_config(configuration); let resp = api.update_logs_index_order(body).await; diff --git a/examples/v1_logs-pipelines_CreateLogsPipeline.rs b/examples/v1_logs-pipelines_CreateLogsPipeline.rs index 98fbbb202..6781e9792 100644 --- a/examples/v1_logs-pipelines_CreateLogsPipeline.rs +++ b/examples/v1_logs-pipelines_CreateLogsPipeline.rs @@ -32,6 +32,7 @@ rule_name_2 bar .is_enabled(false) .samples(vec![]), ))]); + let configuration = datadog::Configuration::new(); let api = LogsPipelinesAPI::with_config(configuration); let resp = api.create_logs_pipeline(body).await; diff --git a/examples/v1_logs-pipelines_UpdateLogsPipeline.rs b/examples/v1_logs-pipelines_UpdateLogsPipeline.rs index 2fd0a816a..8ca186916 100644 --- a/examples/v1_logs-pipelines_UpdateLogsPipeline.rs +++ b/examples/v1_logs-pipelines_UpdateLogsPipeline.rs @@ -32,6 +32,7 @@ rule_name_2 bar .is_enabled(false) .samples(vec![]), ))]); + let configuration = datadog::Configuration::new(); let api = LogsPipelinesAPI::with_config(configuration); let resp = api diff --git a/examples/v1_logs-pipelines_UpdateLogsPipelineOrder.rs b/examples/v1_logs-pipelines_UpdateLogsPipelineOrder.rs index cf9c601d9..5018a3d4f 100644 --- a/examples/v1_logs-pipelines_UpdateLogsPipelineOrder.rs +++ b/examples/v1_logs-pipelines_UpdateLogsPipelineOrder.rs @@ -10,6 +10,7 @@ async fn main() { "org_ids".to_string(), "products".to_string(), ]); + let configuration = datadog::Configuration::new(); let api = LogsPipelinesAPI::with_config(configuration); let resp = api.update_logs_pipeline_order(body).await; diff --git a/examples/v1_logs_ListLogs.rs b/examples/v1_logs_ListLogs.rs index faa988456..a0a882e04 100644 --- a/examples/v1_logs_ListLogs.rs +++ b/examples/v1_logs_ListLogs.rs @@ -19,6 +19,7 @@ async fn main() { .index("retention-3,retention-15".to_string()) .query("service:web* AND @http.status_code:[200 TO 299]".to_string()) .sort(LogsSort::TIME_ASCENDING); + let configuration = datadog::Configuration::new(); let api = LogsAPI::with_config(configuration); let resp = api.list_logs(body).await; diff --git a/examples/v1_logs_ListLogs_235998668.rs b/examples/v1_logs_ListLogs_235998668.rs index edaac8805..b80d77c52 100644 --- a/examples/v1_logs_ListLogs_235998668.rs +++ b/examples/v1_logs_ListLogs_235998668.rs @@ -22,6 +22,7 @@ async fn main() { .index("main".to_string()) .query("host:Test*".to_string()) .sort(LogsSort::TIME_ASCENDING); + let configuration = datadog::Configuration::new(); let api = LogsAPI::with_config(configuration); let resp = api.list_logs(body).await; diff --git a/examples/v1_logs_SubmitLog.rs b/examples/v1_logs_SubmitLog.rs index 8b9c8a63c..383d48426 100644 --- a/examples/v1_logs_SubmitLog.rs +++ b/examples/v1_logs_SubmitLog.rs @@ -10,6 +10,7 @@ async fn main() { let body = vec![HTTPLogItem::new("Example-Log".to_string()) .ddtags("host:ExampleLog".to_string()) .additional_properties(BTreeMap::from([]))]; + let configuration = datadog::Configuration::new(); let api = LogsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_logs_SubmitLog_1920474053.rs b/examples/v1_logs_SubmitLog_1920474053.rs index 1bf7be72e..5db0bafad 100644 --- a/examples/v1_logs_SubmitLog_1920474053.rs +++ b/examples/v1_logs_SubmitLog_1920474053.rs @@ -11,6 +11,7 @@ async fn main() { let body = vec![HTTPLogItem::new("Example-Log".to_string()) .ddtags("host:ExampleLog".to_string()) .additional_properties(BTreeMap::from([]))]; + let configuration = datadog::Configuration::new(); let api = LogsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_logs_SubmitLog_3418823904.rs b/examples/v1_logs_SubmitLog_3418823904.rs index ed30101e1..c71489f8b 100644 --- a/examples/v1_logs_SubmitLog_3418823904.rs +++ b/examples/v1_logs_SubmitLog_3418823904.rs @@ -1,5 +1,4 @@ -// Send deflate logs returns "Response from server (always 200 empty JSON)." -// response +// Send deflate logs returns "Response from server (always 200 empty JSON)." response use datadog_api_client::datadog; use datadog_api_client::datadogV1::api_logs::LogsAPI; use datadog_api_client::datadogV1::api_logs::SubmitLogOptionalParams; @@ -12,6 +11,7 @@ async fn main() { let body = vec![HTTPLogItem::new("Example-Log".to_string()) .ddtags("host:ExampleLog".to_string()) .additional_properties(BTreeMap::from([]))]; + let configuration = datadog::Configuration::new(); let api = LogsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_metrics_SubmitDistributionPoints.rs b/examples/v1_metrics_SubmitDistributionPoints.rs index 99f6e0764..cb7aa3faa 100644 --- a/examples/v1_metrics_SubmitDistributionPoints.rs +++ b/examples/v1_metrics_SubmitDistributionPoints.rs @@ -15,6 +15,7 @@ async fn main() { DistributionPointItem::DistributionPointData(vec![1.0, 2.0]), ]], )]); + let configuration = datadog::Configuration::new(); let api = MetricsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_metrics_SubmitDistributionPoints_3109558960.rs b/examples/v1_metrics_SubmitDistributionPoints_3109558960.rs index 6660c67da..e51e40ccd 100644 --- a/examples/v1_metrics_SubmitDistributionPoints_3109558960.rs +++ b/examples/v1_metrics_SubmitDistributionPoints_3109558960.rs @@ -16,6 +16,7 @@ async fn main() { DistributionPointItem::DistributionPointData(vec![1.0, 2.0]), ]], )]); + let configuration = datadog::Configuration::new(); let api = MetricsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_metrics_SubmitMetrics.rs b/examples/v1_metrics_SubmitMetrics.rs index aefc63bd7..c048c0baf 100644 --- a/examples/v1_metrics_SubmitMetrics.rs +++ b/examples/v1_metrics_SubmitMetrics.rs @@ -13,6 +13,7 @@ async fn main() { ) .tags(vec!["test:ExampleMetric".to_string()]) .type_("gauge".to_string())]); + let configuration = datadog::Configuration::new(); let api = MetricsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_metrics_SubmitMetrics_2203981258.rs b/examples/v1_metrics_SubmitMetrics_2203981258.rs index cfad700d4..e4077187e 100644 --- a/examples/v1_metrics_SubmitMetrics_2203981258.rs +++ b/examples/v1_metrics_SubmitMetrics_2203981258.rs @@ -14,6 +14,7 @@ async fn main() { ) .tags(vec!["test:ExampleMetric".to_string()]) .type_("gauge".to_string())]); + let configuration = datadog::Configuration::new(); let api = MetricsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_metrics_UpdateMetricMetadata.rs b/examples/v1_metrics_UpdateMetricMetadata.rs index 6fd7bf2fe..32017309b 100644 --- a/examples/v1_metrics_UpdateMetricMetadata.rs +++ b/examples/v1_metrics_UpdateMetricMetadata.rs @@ -9,6 +9,7 @@ async fn main() { .per_unit("second".to_string()) .type_("count".to_string()) .unit("byte".to_string()); + let configuration = datadog::Configuration::new(); let api = MetricsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_monitors_CheckCanDeleteMonitor.rs b/examples/v1_monitors_CheckCanDeleteMonitor.rs index 649bbce39..86a6d356b 100644 --- a/examples/v1_monitors_CheckCanDeleteMonitor.rs +++ b/examples/v1_monitors_CheckCanDeleteMonitor.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV1::api_monitors::MonitorsAPI; async fn main() { // there is a valid "monitor" in the system let monitor_id: i64 = std::env::var("MONITOR_ID").unwrap().parse().unwrap(); + let configuration = datadog::Configuration::new(); let api = MonitorsAPI::with_config(configuration); let resp = api.check_can_delete_monitor(vec![monitor_id.clone()]).await; diff --git a/examples/v1_monitors_CreateMonitor.rs b/examples/v1_monitors_CreateMonitor.rs index f830cbb50..cc1cd1dc2 100644 --- a/examples/v1_monitors_CreateMonitor.rs +++ b/examples/v1_monitors_CreateMonitor.rs @@ -8,16 +8,8 @@ use datadog_api_client::datadogV1::model::MonitorType; async fn main() { // there is a valid "role" in the system let role_data_id = std::env::var("ROLE_DATA_ID").unwrap(); - let body = - Monitor::new( - r#"logs("service:foo AND type:error").index("main").rollup("count").by("source").last("5m") > 2"#.to_string(), - MonitorType::LOG_ALERT, - ) - .message("some message Notify: @hipchat-channel".to_string()) - .name("Example-Monitor".to_string()) - .priority(Some(3)) - .restricted_roles(Some(vec![role_data_id.clone()])) - .tags(vec!["test:examplemonitor".to_string(), "env:ci".to_string()]); + let body = Monitor::new(r#"logs("service:foo AND type:error").index("main").rollup("count").by("source").last("5m") > 2"#.to_string(), MonitorType::LOG_ALERT, ).message("some message Notify: @hipchat-channel".to_string()).name("Example-Monitor".to_string()).priority(Some(3)).restricted_roles(Some(vec![role_data_id.clone(),])).tags(vec!["test:examplemonitor".to_string(),"env:ci".to_string(),]); + let configuration = datadog::Configuration::new(); let api = MonitorsAPI::with_config(configuration); let resp = api.create_monitor(body).await; diff --git a/examples/v1_monitors_CreateMonitor_1539578087.rs b/examples/v1_monitors_CreateMonitor_1539578087.rs index 2e3e4b5a6..33c39b919 100644 --- a/examples/v1_monitors_CreateMonitor_1539578087.rs +++ b/examples/v1_monitors_CreateMonitor_1539578087.rs @@ -25,11 +25,11 @@ async fn main() { .scheduling_options( MonitorOptionsSchedulingOptions::new() .custom_schedule(MonitorOptionsCustomSchedule::new().recurrences(vec![ - MonitorOptionsCustomScheduleRecurrence::new() - .rrule("FREQ=DAILY;INTERVAL=1".to_string()) - .start("2024-10-26T09:13:00".to_string()) - .timezone("America/Los_Angeles".to_string()) - ])) + MonitorOptionsCustomScheduleRecurrence::new() + .rrule("FREQ=DAILY;INTERVAL=1".to_string()) + .start("2024-10-26T09:13:00".to_string()) + .timezone("America/Los_Angeles".to_string()), + ])) .evaluation_window( MonitorOptionsSchedulingOptionsEvaluationWindow::new() .day_starts("04:00".to_string()) @@ -39,6 +39,7 @@ async fn main() { .thresholds(MonitorThresholds::new().critical(0.5 as f64)), ) .tags(vec![]); + let configuration = datadog::Configuration::new(); let api = MonitorsAPI::with_config(configuration); let resp = api.create_monitor(body).await; diff --git a/examples/v1_monitors_CreateMonitor_1969035628.rs b/examples/v1_monitors_CreateMonitor_1969035628.rs index 607486a73..5d16a1f19 100644 --- a/examples/v1_monitors_CreateMonitor_1969035628.rs +++ b/examples/v1_monitors_CreateMonitor_1969035628.rs @@ -14,57 +14,8 @@ use datadog_api_client::datadogV1::model::MonitorType; #[tokio::main] async fn main() { - let body = - Monitor::new( - r#"formula("query1 / query2 * 100").last("15m") >= 0.8"#.to_string(), - MonitorType::CI_TESTS_ALERT, - ) - .message("some message Notify: @hipchat-channel".to_string()) - .name("Example-Monitor".to_string()) - .options( - MonitorOptions::new() - .thresholds(MonitorThresholds::new().critical(0.8 as f64)) - .variables( - vec![ - MonitorFormulaAndFunctionQueryDefinition::MonitorFormulaAndFunctionEventQueryDefinition( - Box::new( - MonitorFormulaAndFunctionEventQueryDefinition::new( - MonitorFormulaAndFunctionEventQueryDefinitionCompute::new( - MonitorFormulaAndFunctionEventAggregation::COUNT, - ), - MonitorFormulaAndFunctionEventsDataSource::CI_TESTS, - "query1".to_string(), - ) - .group_by(vec![]) - .indexes(vec!["*".to_string()]) - .search( - MonitorFormulaAndFunctionEventQueryDefinitionSearch::new( - "@test.status:fail".to_string(), - ), - ), - ), - ), - MonitorFormulaAndFunctionQueryDefinition::MonitorFormulaAndFunctionEventQueryDefinition( - Box::new( - MonitorFormulaAndFunctionEventQueryDefinition::new( - MonitorFormulaAndFunctionEventQueryDefinitionCompute::new( - MonitorFormulaAndFunctionEventAggregation::COUNT, - ), - MonitorFormulaAndFunctionEventsDataSource::CI_TESTS, - "query2".to_string(), - ) - .group_by(vec![]) - .indexes(vec!["*".to_string()]) - .search( - MonitorFormulaAndFunctionEventQueryDefinitionSearch::new("".to_string()), - ), - ), - ) - ], - ), - ) - .priority(Some(3)) - .tags(vec!["test:examplemonitor".to_string(), "env:ci".to_string()]); + let body = Monitor::new(r#"formula("query1 / query2 * 100").last("15m") >= 0.8"#.to_string(), MonitorType::CI_TESTS_ALERT, ).message("some message Notify: @hipchat-channel".to_string()).name("Example-Monitor".to_string()).options(MonitorOptions::new().thresholds(MonitorThresholds::new().critical(0.8 as f64)).variables(vec![MonitorFormulaAndFunctionQueryDefinition::MonitorFormulaAndFunctionEventQueryDefinition(Box::new(MonitorFormulaAndFunctionEventQueryDefinition::new(MonitorFormulaAndFunctionEventQueryDefinitionCompute::new(MonitorFormulaAndFunctionEventAggregation::COUNT, ), MonitorFormulaAndFunctionEventsDataSource::CI_TESTS, "query1".to_string(), ).group_by(vec![]).indexes(vec!["*".to_string(),]).search(MonitorFormulaAndFunctionEventQueryDefinitionSearch::new("@test.status:fail".to_string(), )))),MonitorFormulaAndFunctionQueryDefinition::MonitorFormulaAndFunctionEventQueryDefinition(Box::new(MonitorFormulaAndFunctionEventQueryDefinition::new(MonitorFormulaAndFunctionEventQueryDefinitionCompute::new(MonitorFormulaAndFunctionEventAggregation::COUNT, ), MonitorFormulaAndFunctionEventsDataSource::CI_TESTS, "query2".to_string(), ).group_by(vec![]).indexes(vec!["*".to_string(),]).search(MonitorFormulaAndFunctionEventQueryDefinitionSearch::new("".to_string(), )))),])).priority(Some(3)).tags(vec!["test:examplemonitor".to_string(),"env:ci".to_string(),]); + let configuration = datadog::Configuration::new(); let api = MonitorsAPI::with_config(configuration); let resp = api.create_monitor(body).await; diff --git a/examples/v1_monitors_CreateMonitor_2012680290.rs b/examples/v1_monitors_CreateMonitor_2012680290.rs index 0be0b65fa..c5e37f1eb 100644 --- a/examples/v1_monitors_CreateMonitor_2012680290.rs +++ b/examples/v1_monitors_CreateMonitor_2012680290.rs @@ -27,6 +27,7 @@ async fn main() { ) .thresholds(MonitorThresholds::new().critical(0.5 as f64)), ); + let configuration = datadog::Configuration::new(); let api = MonitorsAPI::with_config(configuration); let resp = api.create_monitor(body).await; diff --git a/examples/v1_monitors_CreateMonitor_2520912138.rs b/examples/v1_monitors_CreateMonitor_2520912138.rs index 4350d6a3e..1a435208c 100644 --- a/examples/v1_monitors_CreateMonitor_2520912138.rs +++ b/examples/v1_monitors_CreateMonitor_2520912138.rs @@ -8,16 +8,8 @@ use datadog_api_client::datadogV1::model::MonitorType; #[tokio::main] async fn main() { - let body = - Monitor::new( - r#"ci-tests("type:test @git.branch:staging* @test.status:fail").rollup("count").by("@test.name").last("5m") >= 1"#.to_string(), - MonitorType::CI_TESTS_ALERT, - ) - .message("some message Notify: @hipchat-channel".to_string()) - .name("Example-Monitor".to_string()) - .options(MonitorOptions::new().thresholds(MonitorThresholds::new().critical(1.0 as f64))) - .priority(Some(3)) - .tags(vec!["test:examplemonitor".to_string(), "env:ci".to_string()]); + let body = Monitor::new(r#"ci-tests("type:test @git.branch:staging* @test.status:fail").rollup("count").by("@test.name").last("5m") >= 1"#.to_string(), MonitorType::CI_TESTS_ALERT, ).message("some message Notify: @hipchat-channel".to_string()).name("Example-Monitor".to_string()).options(MonitorOptions::new().thresholds(MonitorThresholds::new().critical(1.0 as f64))).priority(Some(3)).tags(vec!["test:examplemonitor".to_string(),"env:ci".to_string(),]); + let configuration = datadog::Configuration::new(); let api = MonitorsAPI::with_config(configuration); let resp = api.create_monitor(body).await; diff --git a/examples/v1_monitors_CreateMonitor_3790803616.rs b/examples/v1_monitors_CreateMonitor_3790803616.rs index 56fc46b30..dc8d580c0 100644 --- a/examples/v1_monitors_CreateMonitor_3790803616.rs +++ b/examples/v1_monitors_CreateMonitor_3790803616.rs @@ -8,16 +8,8 @@ use datadog_api_client::datadogV1::model::MonitorType; #[tokio::main] async fn main() { - let body = - Monitor::new( - r#"ci-pipelines("ci_level:pipeline @git.branch:staging* @ci.status:error").rollup("count").by("@git.branch,@ci.pipeline.name").last("5m") >= 1"#.to_string(), - MonitorType::CI_PIPELINES_ALERT, - ) - .message("some message Notify: @hipchat-channel".to_string()) - .name("Example-Monitor".to_string()) - .options(MonitorOptions::new().thresholds(MonitorThresholds::new().critical(1.0 as f64))) - .priority(Some(3)) - .tags(vec!["test:examplemonitor".to_string(), "env:ci".to_string()]); + let body = Monitor::new(r#"ci-pipelines("ci_level:pipeline @git.branch:staging* @ci.status:error").rollup("count").by("@git.branch,@ci.pipeline.name").last("5m") >= 1"#.to_string(), MonitorType::CI_PIPELINES_ALERT, ).message("some message Notify: @hipchat-channel".to_string()).name("Example-Monitor".to_string()).options(MonitorOptions::new().thresholds(MonitorThresholds::new().critical(1.0 as f64))).priority(Some(3)).tags(vec!["test:examplemonitor".to_string(),"env:ci".to_string(),]); + let configuration = datadog::Configuration::new(); let api = MonitorsAPI::with_config(configuration); let resp = api.create_monitor(body).await; diff --git a/examples/v1_monitors_CreateMonitor_3824294658.rs b/examples/v1_monitors_CreateMonitor_3824294658.rs index 4707e2053..5df054234 100644 --- a/examples/v1_monitors_CreateMonitor_3824294658.rs +++ b/examples/v1_monitors_CreateMonitor_3824294658.rs @@ -14,57 +14,8 @@ use datadog_api_client::datadogV1::model::MonitorType; #[tokio::main] async fn main() { - let body = - Monitor::new( - r#"formula("query1 / query2 * 100").last("15m") >= 0.8"#.to_string(), - MonitorType::CI_PIPELINES_ALERT, - ) - .message("some message Notify: @hipchat-channel".to_string()) - .name("Example-Monitor".to_string()) - .options( - MonitorOptions::new() - .thresholds(MonitorThresholds::new().critical(0.8 as f64)) - .variables( - vec![ - MonitorFormulaAndFunctionQueryDefinition::MonitorFormulaAndFunctionEventQueryDefinition( - Box::new( - MonitorFormulaAndFunctionEventQueryDefinition::new( - MonitorFormulaAndFunctionEventQueryDefinitionCompute::new( - MonitorFormulaAndFunctionEventAggregation::COUNT, - ), - MonitorFormulaAndFunctionEventsDataSource::CI_PIPELINES, - "query1".to_string(), - ) - .group_by(vec![]) - .indexes(vec!["*".to_string()]) - .search( - MonitorFormulaAndFunctionEventQueryDefinitionSearch::new( - "@ci.status:error".to_string(), - ), - ), - ), - ), - MonitorFormulaAndFunctionQueryDefinition::MonitorFormulaAndFunctionEventQueryDefinition( - Box::new( - MonitorFormulaAndFunctionEventQueryDefinition::new( - MonitorFormulaAndFunctionEventQueryDefinitionCompute::new( - MonitorFormulaAndFunctionEventAggregation::COUNT, - ), - MonitorFormulaAndFunctionEventsDataSource::CI_PIPELINES, - "query2".to_string(), - ) - .group_by(vec![]) - .indexes(vec!["*".to_string()]) - .search( - MonitorFormulaAndFunctionEventQueryDefinitionSearch::new("".to_string()), - ), - ), - ) - ], - ), - ) - .priority(Some(3)) - .tags(vec!["test:examplemonitor".to_string(), "env:ci".to_string()]); + let body = Monitor::new(r#"formula("query1 / query2 * 100").last("15m") >= 0.8"#.to_string(), MonitorType::CI_PIPELINES_ALERT, ).message("some message Notify: @hipchat-channel".to_string()).name("Example-Monitor".to_string()).options(MonitorOptions::new().thresholds(MonitorThresholds::new().critical(0.8 as f64)).variables(vec![MonitorFormulaAndFunctionQueryDefinition::MonitorFormulaAndFunctionEventQueryDefinition(Box::new(MonitorFormulaAndFunctionEventQueryDefinition::new(MonitorFormulaAndFunctionEventQueryDefinitionCompute::new(MonitorFormulaAndFunctionEventAggregation::COUNT, ), MonitorFormulaAndFunctionEventsDataSource::CI_PIPELINES, "query1".to_string(), ).group_by(vec![]).indexes(vec!["*".to_string(),]).search(MonitorFormulaAndFunctionEventQueryDefinitionSearch::new("@ci.status:error".to_string(), )))),MonitorFormulaAndFunctionQueryDefinition::MonitorFormulaAndFunctionEventQueryDefinition(Box::new(MonitorFormulaAndFunctionEventQueryDefinition::new(MonitorFormulaAndFunctionEventQueryDefinitionCompute::new(MonitorFormulaAndFunctionEventAggregation::COUNT, ), MonitorFormulaAndFunctionEventsDataSource::CI_PIPELINES, "query2".to_string(), ).group_by(vec![]).indexes(vec!["*".to_string(),]).search(MonitorFormulaAndFunctionEventQueryDefinitionSearch::new("".to_string(), )))),])).priority(Some(3)).tags(vec!["test:examplemonitor".to_string(),"env:ci".to_string(),]); + let configuration = datadog::Configuration::new(); let api = MonitorsAPI::with_config(configuration); let resp = api.create_monitor(body).await; diff --git a/examples/v1_monitors_CreateMonitor_3883669300.rs b/examples/v1_monitors_CreateMonitor_3883669300.rs index ed68eb97d..ac3a9be81 100644 --- a/examples/v1_monitors_CreateMonitor_3883669300.rs +++ b/examples/v1_monitors_CreateMonitor_3883669300.rs @@ -14,54 +14,8 @@ use datadog_api_client::datadogV1::model::MonitorType; #[tokio::main] async fn main() { - let body = - Monitor::new(r#"formula("query2 / query1 * 100").last("15m") >= 0.8"#.to_string(), MonitorType::RUM_ALERT) - .message("some message Notify: @hipchat-channel".to_string()) - .name("Example-Monitor".to_string()) - .options( - MonitorOptions::new() - .thresholds(MonitorThresholds::new().critical(0.8 as f64)) - .variables( - vec![ - MonitorFormulaAndFunctionQueryDefinition::MonitorFormulaAndFunctionEventQueryDefinition( - Box::new( - MonitorFormulaAndFunctionEventQueryDefinition::new( - MonitorFormulaAndFunctionEventQueryDefinitionCompute::new( - MonitorFormulaAndFunctionEventAggregation::COUNT, - ), - MonitorFormulaAndFunctionEventsDataSource::RUM, - "query2".to_string(), - ) - .group_by(vec![]) - .indexes(vec!["*".to_string()]) - .search( - MonitorFormulaAndFunctionEventQueryDefinitionSearch::new("".to_string()), - ), - ), - ), - MonitorFormulaAndFunctionQueryDefinition::MonitorFormulaAndFunctionEventQueryDefinition( - Box::new( - MonitorFormulaAndFunctionEventQueryDefinition::new( - MonitorFormulaAndFunctionEventQueryDefinitionCompute::new( - MonitorFormulaAndFunctionEventAggregation::COUNT, - ), - MonitorFormulaAndFunctionEventsDataSource::RUM, - "query1".to_string(), - ) - .group_by(vec![]) - .indexes(vec!["*".to_string()]) - .search( - MonitorFormulaAndFunctionEventQueryDefinitionSearch::new( - "status:error".to_string(), - ), - ), - ), - ) - ], - ), - ) - .priority(Some(3)) - .tags(vec!["test:examplemonitor".to_string(), "env:ci".to_string()]); + let body = Monitor::new(r#"formula("query2 / query1 * 100").last("15m") >= 0.8"#.to_string(), MonitorType::RUM_ALERT, ).message("some message Notify: @hipchat-channel".to_string()).name("Example-Monitor".to_string()).options(MonitorOptions::new().thresholds(MonitorThresholds::new().critical(0.8 as f64)).variables(vec![MonitorFormulaAndFunctionQueryDefinition::MonitorFormulaAndFunctionEventQueryDefinition(Box::new(MonitorFormulaAndFunctionEventQueryDefinition::new(MonitorFormulaAndFunctionEventQueryDefinitionCompute::new(MonitorFormulaAndFunctionEventAggregation::COUNT, ), MonitorFormulaAndFunctionEventsDataSource::RUM, "query2".to_string(), ).group_by(vec![]).indexes(vec!["*".to_string(),]).search(MonitorFormulaAndFunctionEventQueryDefinitionSearch::new("".to_string(), )))),MonitorFormulaAndFunctionQueryDefinition::MonitorFormulaAndFunctionEventQueryDefinition(Box::new(MonitorFormulaAndFunctionEventQueryDefinition::new(MonitorFormulaAndFunctionEventQueryDefinitionCompute::new(MonitorFormulaAndFunctionEventAggregation::COUNT, ), MonitorFormulaAndFunctionEventsDataSource::RUM, "query1".to_string(), ).group_by(vec![]).indexes(vec!["*".to_string(),]).search(MonitorFormulaAndFunctionEventQueryDefinitionSearch::new("status:error".to_string(), )))),])).priority(Some(3)).tags(vec!["test:examplemonitor".to_string(),"env:ci".to_string(),]); + let configuration = datadog::Configuration::new(); let api = MonitorsAPI::with_config(configuration); let resp = api.create_monitor(body).await; diff --git a/examples/v1_monitors_CreateMonitor_440013737.rs b/examples/v1_monitors_CreateMonitor_440013737.rs index ac932e61e..8994c0eb3 100644 --- a/examples/v1_monitors_CreateMonitor_440013737.rs +++ b/examples/v1_monitors_CreateMonitor_440013737.rs @@ -8,16 +8,8 @@ use datadog_api_client::datadogV1::model::MonitorType; #[tokio::main] async fn main() { - let body = - Monitor::new( - r#"error-tracking-rum("service:foo AND @error.source:source").rollup("count").by("@issue.id").last("1h") >= 1"#.to_string(), - MonitorType::ERROR_TRACKING_ALERT, - ) - .message("some message".to_string()) - .name("Example-Monitor".to_string()) - .options(MonitorOptions::new().thresholds(MonitorThresholds::new().critical(1.0 as f64))) - .priority(Some(3)) - .tags(vec!["test:examplemonitor".to_string(), "env:ci".to_string()]); + let body = Monitor::new(r#"error-tracking-rum("service:foo AND @error.source:source").rollup("count").by("@issue.id").last("1h") >= 1"#.to_string(), MonitorType::ERROR_TRACKING_ALERT, ).message("some message".to_string()).name("Example-Monitor".to_string()).options(MonitorOptions::new().thresholds(MonitorThresholds::new().critical(1.0 as f64))).priority(Some(3)).tags(vec!["test:examplemonitor".to_string(),"env:ci".to_string(),]); + let configuration = datadog::Configuration::new(); let api = MonitorsAPI::with_config(configuration); let resp = api.create_monitor(body).await; diff --git a/examples/v1_monitors_DeleteMonitor.rs b/examples/v1_monitors_DeleteMonitor.rs index d0090bb48..9abf89471 100644 --- a/examples/v1_monitors_DeleteMonitor.rs +++ b/examples/v1_monitors_DeleteMonitor.rs @@ -7,6 +7,7 @@ use datadog_api_client::datadogV1::api_monitors::MonitorsAPI; async fn main() { // there is a valid "monitor" in the system let monitor_id: i64 = std::env::var("MONITOR_ID").unwrap().parse().unwrap(); + let configuration = datadog::Configuration::new(); let api = MonitorsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_monitors_GetMonitor.rs b/examples/v1_monitors_GetMonitor.rs index 8838ba929..2306e568e 100644 --- a/examples/v1_monitors_GetMonitor.rs +++ b/examples/v1_monitors_GetMonitor.rs @@ -7,6 +7,7 @@ use datadog_api_client::datadogV1::api_monitors::MonitorsAPI; async fn main() { // there is a valid "monitor" in the system let monitor_id: i64 = std::env::var("MONITOR_ID").unwrap().parse().unwrap(); + let configuration = datadog::Configuration::new(); let api = MonitorsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_monitors_GetMonitor_2200114573.rs b/examples/v1_monitors_GetMonitor_2200114573.rs index 476b8446f..ef9e5f59a 100644 --- a/examples/v1_monitors_GetMonitor_2200114573.rs +++ b/examples/v1_monitors_GetMonitor_2200114573.rs @@ -7,6 +7,7 @@ use datadog_api_client::datadogV1::api_monitors::MonitorsAPI; async fn main() { // there is a valid "monitor" in the system let monitor_id: i64 = std::env::var("MONITOR_ID").unwrap().parse().unwrap(); + let configuration = datadog::Configuration::new(); let api = MonitorsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_monitors_GetMonitor_3691711704.rs b/examples/v1_monitors_GetMonitor_3691711704.rs index ee5209194..7e08894c8 100644 --- a/examples/v1_monitors_GetMonitor_3691711704.rs +++ b/examples/v1_monitors_GetMonitor_3691711704.rs @@ -10,6 +10,7 @@ async fn main() { .unwrap() .parse() .unwrap(); + let configuration = datadog::Configuration::new(); let api = MonitorsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_monitors_ListMonitors_463213563.rs b/examples/v1_monitors_ListMonitors_463213563.rs index 9a6a0f59d..679a58c63 100644 --- a/examples/v1_monitors_ListMonitors_463213563.rs +++ b/examples/v1_monitors_ListMonitors_463213563.rs @@ -12,6 +12,7 @@ async fn main() { let response = api.list_monitors_with_pagination(ListMonitorsOptionalParams::default().page_size(2)); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v1_monitors_UpdateMonitor.rs b/examples/v1_monitors_UpdateMonitor.rs index ba8172a7e..82548acfd 100644 --- a/examples/v1_monitors_UpdateMonitor.rs +++ b/examples/v1_monitors_UpdateMonitor.rs @@ -21,6 +21,7 @@ async fn main() { .timeout_h(None), ) .priority(None); + let configuration = datadog::Configuration::new(); let api = MonitorsAPI::with_config(configuration); let resp = api.update_monitor(monitor_id.clone(), body).await; diff --git a/examples/v1_monitors_ValidateExistingMonitor.rs b/examples/v1_monitors_ValidateExistingMonitor.rs index 81012cbeb..769e39067 100644 --- a/examples/v1_monitors_ValidateExistingMonitor.rs +++ b/examples/v1_monitors_ValidateExistingMonitor.rs @@ -12,33 +12,8 @@ use datadog_api_client::datadogV1::model::OnMissingDataOption; async fn main() { // there is a valid "monitor" in the system let monitor_id: i64 = std::env::var("MONITOR_ID").unwrap().parse().unwrap(); - let body = - Monitor::new( - r#"logs("service:foo AND type:error").index("main").rollup("count").by("source").last("5m") > 2"#.to_string(), - MonitorType::LOG_ALERT, - ) - .message("some message Notify: @hipchat-channel".to_string()) - .name("Example-Monitor".to_string()) - .options( - MonitorOptions::new() - .enable_logs_sample(true) - .escalation_message("the situation has escalated".to_string()) - .evaluation_delay(Some(700)) - .include_tags(true) - .locked(false) - .new_host_delay(Some(600)) - .no_data_timeframe(None) - .notification_preset_name(MonitorOptionsNotificationPresets::HIDE_HANDLES) - .notify_audit(false) - .notify_no_data(false) - .on_missing_data(OnMissingDataOption::SHOW_AND_NOTIFY_NO_DATA) - .renotify_interval(Some(60)) - .require_full_window(true) - .thresholds(MonitorThresholds::new().critical(2.0 as f64).warning(Some(1.0 as f64))) - .timeout_h(Some(24)), - ) - .priority(Some(3)) - .tags(vec!["test:examplemonitor".to_string(), "env:ci".to_string()]); + let body = Monitor::new(r#"logs("service:foo AND type:error").index("main").rollup("count").by("source").last("5m") > 2"#.to_string(), MonitorType::LOG_ALERT, ).message("some message Notify: @hipchat-channel".to_string()).name("Example-Monitor".to_string()).options(MonitorOptions::new().enable_logs_sample(true).escalation_message("the situation has escalated".to_string()).evaluation_delay(Some(700)).include_tags(true).locked(false).new_host_delay(Some(600)).no_data_timeframe(None).notification_preset_name(MonitorOptionsNotificationPresets::HIDE_HANDLES).notify_audit(false).notify_no_data(false).on_missing_data(OnMissingDataOption::SHOW_AND_NOTIFY_NO_DATA).renotify_interval(Some(60)).require_full_window(true).thresholds(MonitorThresholds::new().critical(2.0 as f64).warning(Some(1.0 as f64))).timeout_h(Some(24))).priority(Some(3)).tags(vec!["test:examplemonitor".to_string(),"env:ci".to_string(),]); + let configuration = datadog::Configuration::new(); let api = MonitorsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_monitors_ValidateMonitor.rs b/examples/v1_monitors_ValidateMonitor.rs index 8d5dafd27..7dde1d328 100644 --- a/examples/v1_monitors_ValidateMonitor.rs +++ b/examples/v1_monitors_ValidateMonitor.rs @@ -10,33 +10,8 @@ use datadog_api_client::datadogV1::model::OnMissingDataOption; #[tokio::main] async fn main() { - let body = - Monitor::new( - r#"logs("service:foo AND type:error").index("main").rollup("count").by("source").last("5m") > 2"#.to_string(), - MonitorType::LOG_ALERT, - ) - .message("some message Notify: @hipchat-channel".to_string()) - .name("Example-Monitor".to_string()) - .options( - MonitorOptions::new() - .enable_logs_sample(true) - .escalation_message("the situation has escalated".to_string()) - .evaluation_delay(Some(700)) - .include_tags(true) - .locked(false) - .new_host_delay(Some(600)) - .no_data_timeframe(None) - .notification_preset_name(MonitorOptionsNotificationPresets::HIDE_HANDLES) - .notify_audit(false) - .notify_no_data(false) - .on_missing_data(OnMissingDataOption::SHOW_AND_NOTIFY_NO_DATA) - .renotify_interval(Some(60)) - .require_full_window(true) - .thresholds(MonitorThresholds::new().critical(2.0 as f64).warning(Some(1.0 as f64))) - .timeout_h(Some(24)), - ) - .priority(Some(3)) - .tags(vec!["test:examplemonitor".to_string(), "env:ci".to_string()]); + let body = Monitor::new(r#"logs("service:foo AND type:error").index("main").rollup("count").by("source").last("5m") > 2"#.to_string(), MonitorType::LOG_ALERT, ).message("some message Notify: @hipchat-channel".to_string()).name("Example-Monitor".to_string()).options(MonitorOptions::new().enable_logs_sample(true).escalation_message("the situation has escalated".to_string()).evaluation_delay(Some(700)).include_tags(true).locked(false).new_host_delay(Some(600)).no_data_timeframe(None).notification_preset_name(MonitorOptionsNotificationPresets::HIDE_HANDLES).notify_audit(false).notify_no_data(false).on_missing_data(OnMissingDataOption::SHOW_AND_NOTIFY_NO_DATA).renotify_interval(Some(60)).require_full_window(true).thresholds(MonitorThresholds::new().critical(2.0 as f64).warning(Some(1.0 as f64))).timeout_h(Some(24))).priority(Some(3)).tags(vec!["test:examplemonitor".to_string(),"env:ci".to_string(),]); + let configuration = datadog::Configuration::new(); let api = MonitorsAPI::with_config(configuration); let resp = api.validate_monitor(body).await; diff --git a/examples/v1_monitors_ValidateMonitor_4247196452.rs b/examples/v1_monitors_ValidateMonitor_4247196452.rs index cc56b9f4c..b0639a22a 100644 --- a/examples/v1_monitors_ValidateMonitor_4247196452.rs +++ b/examples/v1_monitors_ValidateMonitor_4247196452.rs @@ -9,34 +9,8 @@ use datadog_api_client::datadogV1::model::OnMissingDataOption; #[tokio::main] async fn main() { - let body = - Monitor::new( - r#"logs("service:foo AND type:error").index("main").rollup("count").by("source,status").last("5m") > 2"#.to_string(), - MonitorType::LOG_ALERT, - ) - .message("some message Notify: @hipchat-channel".to_string()) - .name("Example-Monitor".to_string()) - .options( - MonitorOptions::new() - .enable_logs_sample(true) - .escalation_message("the situation has escalated".to_string()) - .evaluation_delay(Some(700)) - .group_retention_duration("2d".to_string()) - .include_tags(true) - .locked(false) - .new_host_delay(Some(600)) - .no_data_timeframe(None) - .notify_audit(false) - .notify_by(vec!["status".to_string()]) - .notify_no_data(false) - .on_missing_data(OnMissingDataOption::SHOW_AND_NOTIFY_NO_DATA) - .renotify_interval(Some(60)) - .require_full_window(true) - .thresholds(MonitorThresholds::new().critical(2.0 as f64).warning(Some(1.0 as f64))) - .timeout_h(Some(24)), - ) - .priority(Some(3)) - .tags(vec!["test:examplemonitor".to_string(), "env:ci".to_string()]); + let body = Monitor::new(r#"logs("service:foo AND type:error").index("main").rollup("count").by("source,status").last("5m") > 2"#.to_string(), MonitorType::LOG_ALERT, ).message("some message Notify: @hipchat-channel".to_string()).name("Example-Monitor".to_string()).options(MonitorOptions::new().enable_logs_sample(true).escalation_message("the situation has escalated".to_string()).evaluation_delay(Some(700)).group_retention_duration("2d".to_string()).include_tags(true).locked(false).new_host_delay(Some(600)).no_data_timeframe(None).notify_audit(false).notify_by(vec!["status".to_string(),]).notify_no_data(false).on_missing_data(OnMissingDataOption::SHOW_AND_NOTIFY_NO_DATA).renotify_interval(Some(60)).require_full_window(true).thresholds(MonitorThresholds::new().critical(2.0 as f64).warning(Some(1.0 as f64))).timeout_h(Some(24))).priority(Some(3)).tags(vec!["test:examplemonitor".to_string(),"env:ci".to_string(),]); + let configuration = datadog::Configuration::new(); let api = MonitorsAPI::with_config(configuration); let resp = api.validate_monitor(body).await; diff --git a/examples/v1_notebooks_CreateNotebook.rs b/examples/v1_notebooks_CreateNotebook.rs index 15d202488..8f42144be 100644 --- a/examples/v1_notebooks_CreateNotebook.rs +++ b/examples/v1_notebooks_CreateNotebook.rs @@ -83,6 +83,7 @@ y = 6; .status(NotebookStatus::PUBLISHED), NotebookResourceType::NOTEBOOKS, )); + let configuration = datadog::Configuration::new(); let api = NotebooksAPI::with_config(configuration); let resp = api.create_notebook(body).await; diff --git a/examples/v1_notebooks_DeleteNotebook.rs b/examples/v1_notebooks_DeleteNotebook.rs index ad1383746..89ce77fe5 100644 --- a/examples/v1_notebooks_DeleteNotebook.rs +++ b/examples/v1_notebooks_DeleteNotebook.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV1::api_notebooks::NotebooksAPI; async fn main() { // there is a valid "notebook" in the system let notebook_data_id: i64 = std::env::var("NOTEBOOK_DATA_ID").unwrap().parse().unwrap(); + let configuration = datadog::Configuration::new(); let api = NotebooksAPI::with_config(configuration); let resp = api.delete_notebook(notebook_data_id.clone()).await; diff --git a/examples/v1_notebooks_GetNotebook.rs b/examples/v1_notebooks_GetNotebook.rs index 3d12b5423..d48c9d043 100644 --- a/examples/v1_notebooks_GetNotebook.rs +++ b/examples/v1_notebooks_GetNotebook.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV1::api_notebooks::NotebooksAPI; async fn main() { // there is a valid "notebook" in the system let notebook_data_id: i64 = std::env::var("NOTEBOOK_DATA_ID").unwrap().parse().unwrap(); + let configuration = datadog::Configuration::new(); let api = NotebooksAPI::with_config(configuration); let resp = api.get_notebook(notebook_data_id.clone()).await; diff --git a/examples/v1_notebooks_ListNotebooks_788665428.rs b/examples/v1_notebooks_ListNotebooks_788665428.rs index 810ab9121..250a8e098 100644 --- a/examples/v1_notebooks_ListNotebooks_788665428.rs +++ b/examples/v1_notebooks_ListNotebooks_788665428.rs @@ -12,6 +12,7 @@ async fn main() { let response = api.list_notebooks_with_pagination(ListNotebooksOptionalParams::default().count(2)); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v1_notebooks_UpdateNotebook.rs b/examples/v1_notebooks_UpdateNotebook.rs index 545ebc9c7..c93cd1e60 100644 --- a/examples/v1_notebooks_UpdateNotebook.rs +++ b/examples/v1_notebooks_UpdateNotebook.rs @@ -92,6 +92,7 @@ y = 6; .status(NotebookStatus::PUBLISHED), NotebookResourceType::NOTEBOOKS, )); + let configuration = datadog::Configuration::new(); let api = NotebooksAPI::with_config(configuration); let resp = api.update_notebook(notebook_data_id.clone(), body).await; diff --git a/examples/v1_organizations_CreateChildOrg.rs b/examples/v1_organizations_CreateChildOrg.rs index b4efaaaf2..a50e6e06c 100644 --- a/examples/v1_organizations_CreateChildOrg.rs +++ b/examples/v1_organizations_CreateChildOrg.rs @@ -10,6 +10,7 @@ async fn main() { let body = OrganizationCreateBody::new("New child org".to_string()) .billing(OrganizationBilling::new().type_("parent_billing".to_string())) .subscription(OrganizationSubscription::new().type_("pro".to_string())); + let configuration = datadog::Configuration::new(); let api = OrganizationsAPI::with_config(configuration); let resp = api.create_child_org(body).await; diff --git a/examples/v1_organizations_UpdateOrg.rs b/examples/v1_organizations_UpdateOrg.rs index 9ce881a6f..327d191a9 100644 --- a/examples/v1_organizations_UpdateOrg.rs +++ b/examples/v1_organizations_UpdateOrg.rs @@ -39,6 +39,7 @@ async fn main() { ) .subscription(OrganizationSubscription::new().type_("pro".to_string())) .trial(false); + let configuration = datadog::Configuration::new(); let api = OrganizationsAPI::with_config(configuration); let resp = api.update_org("abc123".to_string(), body).await; diff --git a/examples/v1_pagerduty-integration_CreatePagerDutyIntegrationService.rs b/examples/v1_pagerduty-integration_CreatePagerDutyIntegrationService.rs index a5e2df65f..038ebb4b3 100644 --- a/examples/v1_pagerduty-integration_CreatePagerDutyIntegrationService.rs +++ b/examples/v1_pagerduty-integration_CreatePagerDutyIntegrationService.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV1::model::PagerDutyService; #[tokio::main] async fn main() { let body = PagerDutyService::new("".to_string(), "".to_string()); + let configuration = datadog::Configuration::new(); let api = PagerDutyIntegrationAPI::with_config(configuration); let resp = api.create_pager_duty_integration_service(body).await; diff --git a/examples/v1_pagerduty-integration_UpdatePagerDutyIntegrationService.rs b/examples/v1_pagerduty-integration_UpdatePagerDutyIntegrationService.rs index d59283013..8c8526498 100644 --- a/examples/v1_pagerduty-integration_UpdatePagerDutyIntegrationService.rs +++ b/examples/v1_pagerduty-integration_UpdatePagerDutyIntegrationService.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV1::model::PagerDutyServiceKey; #[tokio::main] async fn main() { let body = PagerDutyServiceKey::new("".to_string()); + let configuration = datadog::Configuration::new(); let api = PagerDutyIntegrationAPI::with_config(configuration); let resp = api diff --git a/examples/v1_security-monitoring_AddSecurityMonitoringSignalToIncident.rs b/examples/v1_security-monitoring_AddSecurityMonitoringSignalToIncident.rs index 870eae833..e9965a6ab 100644 --- a/examples/v1_security-monitoring_AddSecurityMonitoringSignalToIncident.rs +++ b/examples/v1_security-monitoring_AddSecurityMonitoringSignalToIncident.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV1::model::AddSignalToIncidentRequest; #[tokio::main] async fn main() { let body = AddSignalToIncidentRequest::new(2609); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api diff --git a/examples/v1_security-monitoring_EditSecurityMonitoringSignalAssignee.rs b/examples/v1_security-monitoring_EditSecurityMonitoringSignalAssignee.rs index 712b93e2b..ced3979f6 100644 --- a/examples/v1_security-monitoring_EditSecurityMonitoringSignalAssignee.rs +++ b/examples/v1_security-monitoring_EditSecurityMonitoringSignalAssignee.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV1::model::SignalAssigneeUpdateRequest; #[tokio::main] async fn main() { let body = SignalAssigneeUpdateRequest::new("773b045d-ccf8-4808-bd3b-955ef6a8c940".to_string()); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api diff --git a/examples/v1_security-monitoring_EditSecurityMonitoringSignalState.rs b/examples/v1_security-monitoring_EditSecurityMonitoringSignalState.rs index 8b0cb5d8f..45c4ffd18 100644 --- a/examples/v1_security-monitoring_EditSecurityMonitoringSignalState.rs +++ b/examples/v1_security-monitoring_EditSecurityMonitoringSignalState.rs @@ -9,6 +9,7 @@ use datadog_api_client::datadogV1::model::SignalTriageState; async fn main() { let body = SignalStateUpdateRequest::new(SignalTriageState::OPEN) .archive_reason(SignalArchiveReason::NONE); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api diff --git a/examples/v1_service-checks_SubmitServiceCheck.rs b/examples/v1_service-checks_SubmitServiceCheck.rs index dfcc23767..d86930de7 100644 --- a/examples/v1_service-checks_SubmitServiceCheck.rs +++ b/examples/v1_service-checks_SubmitServiceCheck.rs @@ -12,6 +12,7 @@ async fn main() { ServiceCheckStatus::OK, vec!["test:ExampleServiceCheck".to_string()], )]; + let configuration = datadog::Configuration::new(); let api = ServiceChecksAPI::with_config(configuration); let resp = api.submit_service_check(body).await; diff --git a/examples/v1_service-level-objective-corrections_CreateSLOCorrection.rs b/examples/v1_service-level-objective-corrections_CreateSLOCorrection.rs index 9ec3d8993..6423b5cf7 100644 --- a/examples/v1_service-level-objective-corrections_CreateSLOCorrection.rs +++ b/examples/v1_service-level-objective-corrections_CreateSLOCorrection.rs @@ -23,6 +23,7 @@ async fn main() { .timezone("UTC".to_string()), ), ); + let configuration = datadog::Configuration::new(); let api = ServiceLevelObjectiveCorrectionsAPI::with_config(configuration); let resp = api.create_slo_correction(body).await; diff --git a/examples/v1_service-level-objective-corrections_CreateSLOCorrection_1326388368.rs b/examples/v1_service-level-objective-corrections_CreateSLOCorrection_1326388368.rs index b24d23d71..ed2db29e9 100644 --- a/examples/v1_service-level-objective-corrections_CreateSLOCorrection_1326388368.rs +++ b/examples/v1_service-level-objective-corrections_CreateSLOCorrection_1326388368.rs @@ -24,6 +24,7 @@ async fn main() { .timezone("UTC".to_string()), ), ); + let configuration = datadog::Configuration::new(); let api = ServiceLevelObjectiveCorrectionsAPI::with_config(configuration); let resp = api.create_slo_correction(body).await; diff --git a/examples/v1_service-level-objective-corrections_GetSLOCorrection.rs b/examples/v1_service-level-objective-corrections_GetSLOCorrection.rs index bb73ddded..1e6c45ccf 100644 --- a/examples/v1_service-level-objective-corrections_GetSLOCorrection.rs +++ b/examples/v1_service-level-objective-corrections_GetSLOCorrection.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV1::api_service_level_objective_corrections::Serv async fn main() { // there is a valid "correction" for "slo" let correction_data_id = std::env::var("CORRECTION_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = ServiceLevelObjectiveCorrectionsAPI::with_config(configuration); let resp = api.get_slo_correction(correction_data_id.clone()).await; diff --git a/examples/v1_service-level-objective-corrections_ListSLOCorrection_2647266873.rs b/examples/v1_service-level-objective-corrections_ListSLOCorrection_2647266873.rs index 71fd6ca93..5e82eb467 100644 --- a/examples/v1_service-level-objective-corrections_ListSLOCorrection_2647266873.rs +++ b/examples/v1_service-level-objective-corrections_ListSLOCorrection_2647266873.rs @@ -12,6 +12,7 @@ async fn main() { let response = api .list_slo_correction_with_pagination(ListSLOCorrectionOptionalParams::default().limit(2)); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v1_service-level-objective-corrections_UpdateSLOCorrection.rs b/examples/v1_service-level-objective-corrections_UpdateSLOCorrection.rs index 75c7af6e7..5f3ee3f7c 100644 --- a/examples/v1_service-level-objective-corrections_UpdateSLOCorrection.rs +++ b/examples/v1_service-level-objective-corrections_UpdateSLOCorrection.rs @@ -23,6 +23,7 @@ async fn main() { ) .type_(SLOCorrectionType::CORRECTION), ); + let configuration = datadog::Configuration::new(); let api = ServiceLevelObjectiveCorrectionsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_service-level-objectives_CreateSLO.rs b/examples/v1_service-level-objectives_CreateSLO.rs index ae06d88f1..23c43a08e 100644 --- a/examples/v1_service-level-objectives_CreateSLO.rs +++ b/examples/v1_service-level-objectives_CreateSLO.rs @@ -28,6 +28,7 @@ async fn main() { .target_threshold(97.0 as f64) .timeframe(SLOTimeframe::SEVEN_DAYS) .warning_threshold(98.0 as f64); + let configuration = datadog::Configuration::new(); let api = ServiceLevelObjectivesAPI::with_config(configuration); let resp = api.create_slo(body).await; diff --git a/examples/v1_service-level-objectives_CreateSLO_3765703239.rs b/examples/v1_service-level-objectives_CreateSLO_3765703239.rs index ce219e177..f50fbe480 100644 --- a/examples/v1_service-level-objectives_CreateSLO_3765703239.rs +++ b/examples/v1_service-level-objectives_CreateSLO_3765703239.rs @@ -48,6 +48,7 @@ async fn main() { .target_threshold(97.0 as f64) .timeframe(SLOTimeframe::SEVEN_DAYS) .warning_threshold(98.0 as f64); + let configuration = datadog::Configuration::new(); let api = ServiceLevelObjectivesAPI::with_config(configuration); let resp = api.create_slo(body).await; diff --git a/examples/v1_service-level-objectives_DeleteSLO.rs b/examples/v1_service-level-objectives_DeleteSLO.rs index 87a26c321..69f29d53d 100644 --- a/examples/v1_service-level-objectives_DeleteSLO.rs +++ b/examples/v1_service-level-objectives_DeleteSLO.rs @@ -7,6 +7,7 @@ use datadog_api_client::datadogV1::api_service_level_objectives::ServiceLevelObj async fn main() { // there is a valid "slo" in the system let slo_data_0_id = std::env::var("SLO_DATA_0_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = ServiceLevelObjectivesAPI::with_config(configuration); let resp = api diff --git a/examples/v1_service-level-objectives_DeleteSLOTimeframeInBulk.rs b/examples/v1_service-level-objectives_DeleteSLOTimeframeInBulk.rs index 7928abe5c..5d4988742 100644 --- a/examples/v1_service-level-objectives_DeleteSLOTimeframeInBulk.rs +++ b/examples/v1_service-level-objectives_DeleteSLOTimeframeInBulk.rs @@ -16,6 +16,7 @@ async fn main() { vec![SLOTimeframe::SEVEN_DAYS, SLOTimeframe::THIRTY_DAYS], ), ]); + let configuration = datadog::Configuration::new(); let api = ServiceLevelObjectivesAPI::with_config(configuration); let resp = api.delete_slo_timeframe_in_bulk(body).await; diff --git a/examples/v1_service-level-objectives_GetSLO.rs b/examples/v1_service-level-objectives_GetSLO.rs index 9479322ab..7ff46ffc4 100644 --- a/examples/v1_service-level-objectives_GetSLO.rs +++ b/examples/v1_service-level-objectives_GetSLO.rs @@ -7,6 +7,7 @@ use datadog_api_client::datadogV1::api_service_level_objectives::ServiceLevelObj async fn main() { // there is a valid "slo" in the system let slo_data_0_id = std::env::var("SLO_DATA_0_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = ServiceLevelObjectivesAPI::with_config(configuration); let resp = api diff --git a/examples/v1_service-level-objectives_GetSLOCorrections.rs b/examples/v1_service-level-objectives_GetSLOCorrections.rs index c6def738e..bc6cadd31 100644 --- a/examples/v1_service-level-objectives_GetSLOCorrections.rs +++ b/examples/v1_service-level-objectives_GetSLOCorrections.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV1::api_service_level_objectives::ServiceLevelObj async fn main() { // there is a valid "slo" in the system let slo_data_0_id = std::env::var("SLO_DATA_0_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = ServiceLevelObjectivesAPI::with_config(configuration); let resp = api.get_slo_corrections(slo_data_0_id.clone()).await; diff --git a/examples/v1_service-level-objectives_GetSLOHistory.rs b/examples/v1_service-level-objectives_GetSLOHistory.rs index 16f4d5309..480d740b9 100644 --- a/examples/v1_service-level-objectives_GetSLOHistory.rs +++ b/examples/v1_service-level-objectives_GetSLOHistory.rs @@ -7,6 +7,7 @@ use datadog_api_client::datadogV1::api_service_level_objectives::ServiceLevelObj async fn main() { // there is a valid "slo" in the system let slo_data_0_id = std::env::var("SLO_DATA_0_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = ServiceLevelObjectivesAPI::with_config(configuration); let resp = api diff --git a/examples/v1_service-level-objectives_ListSLOs.rs b/examples/v1_service-level-objectives_ListSLOs.rs index 68b3f5728..9df9e1bce 100644 --- a/examples/v1_service-level-objectives_ListSLOs.rs +++ b/examples/v1_service-level-objectives_ListSLOs.rs @@ -7,6 +7,7 @@ use datadog_api_client::datadogV1::api_service_level_objectives::ServiceLevelObj async fn main() { // there is a valid "slo" in the system let slo_data_0_id = std::env::var("SLO_DATA_0_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = ServiceLevelObjectivesAPI::with_config(configuration); let resp = api diff --git a/examples/v1_service-level-objectives_ListSLOs_3036942817.rs b/examples/v1_service-level-objectives_ListSLOs_3036942817.rs index 9bc0ee9fa..c72610581 100644 --- a/examples/v1_service-level-objectives_ListSLOs_3036942817.rs +++ b/examples/v1_service-level-objectives_ListSLOs_3036942817.rs @@ -11,6 +11,7 @@ async fn main() { let api = ServiceLevelObjectivesAPI::with_config(configuration); let response = api.list_slos_with_pagination(ListSLOsOptionalParams::default().limit(2)); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v1_service-level-objectives_SearchSLO.rs b/examples/v1_service-level-objectives_SearchSLO.rs index 0d9d9474d..d10bef0dc 100644 --- a/examples/v1_service-level-objectives_SearchSLO.rs +++ b/examples/v1_service-level-objectives_SearchSLO.rs @@ -7,6 +7,7 @@ use datadog_api_client::datadogV1::api_service_level_objectives::ServiceLevelObj async fn main() { // there is a valid "slo" in the system let slo_data_0_name = std::env::var("SLO_DATA_0_NAME").unwrap(); + let configuration = datadog::Configuration::new(); let api = ServiceLevelObjectivesAPI::with_config(configuration); let resp = api diff --git a/examples/v1_service-level-objectives_UpdateSLO.rs b/examples/v1_service-level-objectives_UpdateSLO.rs index 66a055917..25aabbb2f 100644 --- a/examples/v1_service-level-objectives_UpdateSLO.rs +++ b/examples/v1_service-level-objectives_UpdateSLO.rs @@ -24,6 +24,7 @@ async fn main() { .target_threshold(97.0 as f64) .timeframe(SLOTimeframe::SEVEN_DAYS) .warning_threshold(98.0 as f64); + let configuration = datadog::Configuration::new(); let api = ServiceLevelObjectivesAPI::with_config(configuration); let resp = api.update_slo(slo_data_0_id.clone(), body).await; diff --git a/examples/v1_slack-integration_CreateSlackIntegrationChannel.rs b/examples/v1_slack-integration_CreateSlackIntegrationChannel.rs index ecfc36a62..b0fcfa67c 100644 --- a/examples/v1_slack-integration_CreateSlackIntegrationChannel.rs +++ b/examples/v1_slack-integration_CreateSlackIntegrationChannel.rs @@ -15,6 +15,7 @@ async fn main() { .tags(true), ) .name("#general".to_string()); + let configuration = datadog::Configuration::new(); let api = SlackIntegrationAPI::with_config(configuration); let resp = api diff --git a/examples/v1_slack-integration_RemoveSlackIntegrationChannel.rs b/examples/v1_slack-integration_RemoveSlackIntegrationChannel.rs index e5561136c..71e1b732b 100644 --- a/examples/v1_slack-integration_RemoveSlackIntegrationChannel.rs +++ b/examples/v1_slack-integration_RemoveSlackIntegrationChannel.rs @@ -1,5 +1,4 @@ -// Remove a Slack integration channel returns "The channel was removed -// successfully." response +// Remove a Slack integration channel returns "The channel was removed successfully." response use datadog_api_client::datadog; use datadog_api_client::datadogV1::api_slack_integration::SlackIntegrationAPI; diff --git a/examples/v1_slack-integration_UpdateSlackIntegrationChannel.rs b/examples/v1_slack-integration_UpdateSlackIntegrationChannel.rs index e84713c6f..0479056c3 100644 --- a/examples/v1_slack-integration_UpdateSlackIntegrationChannel.rs +++ b/examples/v1_slack-integration_UpdateSlackIntegrationChannel.rs @@ -15,6 +15,7 @@ async fn main() { .tags(true), ) .name("#general".to_string()); + let configuration = datadog::Configuration::new(); let api = SlackIntegrationAPI::with_config(configuration); let resp = api diff --git a/examples/v1_synthetics_CreateGlobalVariable.rs b/examples/v1_synthetics_CreateGlobalVariable.rs index dfbd1d7ba..a47735c43 100644 --- a/examples/v1_synthetics_CreateGlobalVariable.rs +++ b/examples/v1_synthetics_CreateGlobalVariable.rs @@ -37,6 +37,7 @@ async fn main() { .secure(true) .value("value".to_string()), ); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api.create_global_variable(body).await; diff --git a/examples/v1_synthetics_CreateGlobalVariable_1068962881.rs b/examples/v1_synthetics_CreateGlobalVariable_1068962881.rs index 392bffba2..283ec8883 100644 --- a/examples/v1_synthetics_CreateGlobalVariable_1068962881.rs +++ b/examples/v1_synthetics_CreateGlobalVariable_1068962881.rs @@ -28,6 +28,7 @@ async fn main() { .secure(false) .value("".to_string()), ); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api.create_global_variable(body).await; diff --git a/examples/v1_synthetics_CreateGlobalVariable_3298562511.rs b/examples/v1_synthetics_CreateGlobalVariable_3298562511.rs index b1d8e4ab6..46798a3a1 100644 --- a/examples/v1_synthetics_CreateGlobalVariable_3298562511.rs +++ b/examples/v1_synthetics_CreateGlobalVariable_3298562511.rs @@ -11,6 +11,7 @@ async fn main() { vec![], ) .is_fido(true); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api.create_global_variable(body).await; diff --git a/examples/v1_synthetics_CreateGlobalVariable_3397718516.rs b/examples/v1_synthetics_CreateGlobalVariable_3397718516.rs index b60f971fe..f5b0450fa 100644 --- a/examples/v1_synthetics_CreateGlobalVariable_3397718516.rs +++ b/examples/v1_synthetics_CreateGlobalVariable_3397718516.rs @@ -26,6 +26,7 @@ async fn main() { .secure(false) .value("".to_string()), ); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api.create_global_variable(body).await; diff --git a/examples/v1_synthetics_CreatePrivateLocation.rs b/examples/v1_synthetics_CreatePrivateLocation.rs index 601827820..d21ec5169 100644 --- a/examples/v1_synthetics_CreatePrivateLocation.rs +++ b/examples/v1_synthetics_CreatePrivateLocation.rs @@ -16,6 +16,7 @@ async fn main() { .metadata( SyntheticsPrivateLocationMetadata::new().restricted_roles(vec![role_data_id.clone()]), ); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api.create_private_location(body).await; diff --git a/examples/v1_synthetics_CreateSyntheticsAPITest.rs b/examples/v1_synthetics_CreateSyntheticsAPITest.rs index 10382189c..05e5a70f0 100644 --- a/examples/v1_synthetics_CreateSyntheticsAPITest.rs +++ b/examples/v1_synthetics_CreateSyntheticsAPITest.rs @@ -80,6 +80,7 @@ async fn main() { .status(SyntheticsTestPauseStatus::LIVE) .subtype(SyntheticsTestDetailsSubType::HTTP) .tags(vec!["env:production".to_string()]); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api.create_synthetics_api_test(body).await; diff --git a/examples/v1_synthetics_CreateSyntheticsAPITest_1072503741.rs b/examples/v1_synthetics_CreateSyntheticsAPITest_1072503741.rs index f9e988b52..53248be8d 100644 --- a/examples/v1_synthetics_CreateSyntheticsAPITest_1072503741.rs +++ b/examples/v1_synthetics_CreateSyntheticsAPITest_1072503741.rs @@ -45,6 +45,7 @@ async fn main() { ) .subtype(SyntheticsTestDetailsSubType::SSL) .tags(vec!["testing:api".to_string()]); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api.create_synthetics_api_test(body).await; diff --git a/examples/v1_synthetics_CreateSyntheticsAPITest_1241981394.rs b/examples/v1_synthetics_CreateSyntheticsAPITest_1241981394.rs index dbe8b1fd8..1d1e8b665 100644 --- a/examples/v1_synthetics_CreateSyntheticsAPITest_1241981394.rs +++ b/examples/v1_synthetics_CreateSyntheticsAPITest_1241981394.rs @@ -1,5 +1,4 @@ -// Create an API test with a file payload returns "OK - Returns the created test -// details." response +// Create an API test with a file payload returns "OK - Returns the created test details." response use datadog_api_client::datadog; use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI; use datadog_api_client::datadogV1::model::SyntheticsAPITest; @@ -159,6 +158,7 @@ async fn main() { ) .subtype(SyntheticsTestDetailsSubType::HTTP) .tags(vec!["testing:api".to_string()]); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api.create_synthetics_api_test(body).await; diff --git a/examples/v1_synthetics_CreateSyntheticsAPITest_1279271422.rs b/examples/v1_synthetics_CreateSyntheticsAPITest_1279271422.rs index 43662555b..2062e8eb7 100644 --- a/examples/v1_synthetics_CreateSyntheticsAPITest_1279271422.rs +++ b/examples/v1_synthetics_CreateSyntheticsAPITest_1279271422.rs @@ -1,5 +1,4 @@ -// Create an API test with multi subtype returns "OK - Returns the created test -// details." response +// Create an API test with multi subtype returns "OK - Returns the created test details." response use datadog_api_client::datadog; use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI; use datadog_api_client::datadogV1::model::SyntheticsAPIStep; @@ -32,118 +31,8 @@ use std::collections::BTreeMap; #[tokio::main] async fn main() { - let body = - SyntheticsAPITest::new( - SyntheticsAPITestConfig::new() - .config_variables( - vec![ - SyntheticsConfigVariable::new("PROPERTY".to_string(), SyntheticsConfigVariableType::TEXT) - .example("content-type".to_string()) - .pattern("content-type".to_string()) - ], - ) - .steps( - vec![ - SyntheticsAPIStep::SyntheticsAPITestStep( - Box::new( - SyntheticsAPITestStep::new( - vec![ - SyntheticsAssertion::SyntheticsAssertionTarget( - Box::new( - SyntheticsAssertionTarget::new( - SyntheticsAssertionOperator::IS, - Value::from(200), - SyntheticsAssertionType::STATUS_CODE, - ), - ), - ) - ], - "request is sent".to_string(), - SyntheticsTestRequest::new() - .http_version(SyntheticsTestOptionsHTTPVersion::HTTP2) - .method("GET".to_string()) - .timeout(10.0 as f64) - .url("https://datadoghq.com".to_string()), - SyntheticsAPITestStepSubtype::HTTP, - ) - .allow_failure(true) - .exit_if_succeed(true) - .extracted_values( - vec![ - SyntheticsParsingOptions::new() - .field("server".to_string()) - .name("EXTRACTED_VALUE".to_string()) - .parser( - SyntheticsVariableParser::new( - SyntheticsGlobalVariableParserType::RAW, - ), - ) - .secure(true) - .type_(SyntheticsLocalVariableParsingOptionsType::HTTP_HEADER) - ], - ) - .is_critical(true) - .retry(SyntheticsTestOptionsRetry::new().count(5).interval(1000.0 as f64)), - ), - ), - SyntheticsAPIStep::SyntheticsAPIWaitStep( - Box::new( - SyntheticsAPIWaitStep::new("Wait".to_string(), SyntheticsAPIWaitStepSubtype::WAIT, 1), - ), - ), - SyntheticsAPIStep::SyntheticsAPITestStep( - Box::new( - SyntheticsAPITestStep::new( - vec![ - SyntheticsAssertion::SyntheticsAssertionTarget( - Box::new( - SyntheticsAssertionTarget::new( - SyntheticsAssertionOperator::LESS_THAN, - Value::from(1000), - SyntheticsAssertionType::RESPONSE_TIME, - ), - ), - ) - ], - "GRPC CALL".to_string(), - SyntheticsTestRequest::new() - .call_type(SyntheticsTestCallType::UNARY) - .compressed_json_descriptor( - "eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==".to_string(), - ) - .host("grpcbin.test.k6.io".to_string()) - .message("{}".to_string()) - .metadata(BTreeMap::from([])) - .method("Index".to_string()) - .port(SyntheticsTestRequestPort::SyntheticsTestRequestNumericalPort(9000)) - .service("grpcbin.GRPCBin".to_string()), - SyntheticsAPITestStepSubtype::GRPC, - ) - .allow_failure(false) - .extracted_values(vec![]) - .is_critical(true) - .retry(SyntheticsTestOptionsRetry::new().count(0).interval(300.0 as f64)), - ), - ) - ], - ), - vec!["aws:us-east-2".to_string()], - "BDD test payload: synthetics_api_test_multi_step_payload.json".to_string(), - "Example-Synthetic".to_string(), - SyntheticsTestOptions::new() - .accept_self_signed(false) - .allow_insecure(true) - .follow_redirects(true) - .min_failure_duration(10) - .min_location_failed(1) - .monitor_name("Example-Synthetic".to_string()) - .monitor_priority(5) - .retry(SyntheticsTestOptionsRetry::new().count(3).interval(1000.0 as f64)) - .tick_every(60), - SyntheticsAPITestType::API, - ) - .subtype(SyntheticsTestDetailsSubType::MULTI) - .tags(vec!["testing:api".to_string()]); + let body = SyntheticsAPITest::new(SyntheticsAPITestConfig::new().config_variables(vec![SyntheticsConfigVariable::new("PROPERTY".to_string(), SyntheticsConfigVariableType::TEXT, ).example("content-type".to_string()).pattern("content-type".to_string()),]).steps(vec![SyntheticsAPIStep::SyntheticsAPITestStep(Box::new(SyntheticsAPITestStep::new(vec![SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(SyntheticsAssertionTarget::new(SyntheticsAssertionOperator::IS, Value::from(200), SyntheticsAssertionType::STATUS_CODE, ))),], "request is sent".to_string(), SyntheticsTestRequest::new().http_version(SyntheticsTestOptionsHTTPVersion::HTTP2).method("GET".to_string()).timeout(10.0 as f64).url("https://datadoghq.com".to_string()), SyntheticsAPITestStepSubtype::HTTP, ).allow_failure(true).exit_if_succeed(true).extracted_values(vec![SyntheticsParsingOptions::new().field("server".to_string()).name("EXTRACTED_VALUE".to_string()).parser(SyntheticsVariableParser::new(SyntheticsGlobalVariableParserType::RAW, )).secure(true).type_(SyntheticsLocalVariableParsingOptionsType::HTTP_HEADER),]).is_critical(true).retry(SyntheticsTestOptionsRetry::new().count(5).interval(1000.0 as f64)))),SyntheticsAPIStep::SyntheticsAPIWaitStep(Box::new(SyntheticsAPIWaitStep::new("Wait".to_string(), SyntheticsAPIWaitStepSubtype::WAIT, 1, ))),SyntheticsAPIStep::SyntheticsAPITestStep(Box::new(SyntheticsAPITestStep::new(vec![SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(SyntheticsAssertionTarget::new(SyntheticsAssertionOperator::LESS_THAN, Value::from(1000), SyntheticsAssertionType::RESPONSE_TIME, ))),], "GRPC CALL".to_string(), SyntheticsTestRequest::new().call_type(SyntheticsTestCallType::UNARY).compressed_json_descriptor("eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==".to_string()).host("grpcbin.test.k6.io".to_string()).message("{}".to_string()).metadata(BTreeMap::from([])).method("Index".to_string()).port(SyntheticsTestRequestPort::SyntheticsTestRequestNumericalPort(9000)).service("grpcbin.GRPCBin".to_string()), SyntheticsAPITestStepSubtype::GRPC, ).allow_failure(false).extracted_values(vec![]).is_critical(true).retry(SyntheticsTestOptionsRetry::new().count(0).interval(300.0 as f64)))),]), vec!["aws:us-east-2".to_string(),], "BDD test payload: synthetics_api_test_multi_step_payload.json".to_string(), "Example-Synthetic".to_string(), SyntheticsTestOptions::new().accept_self_signed(false).allow_insecure(true).follow_redirects(true).min_failure_duration(10).min_location_failed(1).monitor_name("Example-Synthetic".to_string()).monitor_priority(5).retry(SyntheticsTestOptionsRetry::new().count(3).interval(1000.0 as f64)).tick_every(60), SyntheticsAPITestType::API, ).subtype(SyntheticsTestDetailsSubType::MULTI).tags(vec!["testing:api".to_string(),]); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api.create_synthetics_api_test(body).await; diff --git a/examples/v1_synthetics_CreateSyntheticsAPITest_1402674167.rs b/examples/v1_synthetics_CreateSyntheticsAPITest_1402674167.rs index 2e3385766..811d5de2e 100644 --- a/examples/v1_synthetics_CreateSyntheticsAPITest_1402674167.rs +++ b/examples/v1_synthetics_CreateSyntheticsAPITest_1402674167.rs @@ -1,5 +1,4 @@ -// Create an API GRPC test returns "OK - Returns the created test details." -// response +// Create an API GRPC test returns "OK - Returns the created test details." response use datadog_api_client::datadog; use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI; use datadog_api_client::datadogV1::model::SyntheticsAPITest; @@ -67,6 +66,7 @@ async fn main() { ) .subtype(SyntheticsTestDetailsSubType::GRPC) .tags(vec!["testing:api".to_string()]); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api.create_synthetics_api_test(body).await; diff --git a/examples/v1_synthetics_CreateSyntheticsAPITest_1487281163.rs b/examples/v1_synthetics_CreateSyntheticsAPITest_1487281163.rs index dc0578fda..6648ed742 100644 --- a/examples/v1_synthetics_CreateSyntheticsAPITest_1487281163.rs +++ b/examples/v1_synthetics_CreateSyntheticsAPITest_1487281163.rs @@ -1,5 +1,4 @@ -// Create an API HTTP test returns "OK - Returns the created test details." -// response +// Create an API HTTP test returns "OK - Returns the created test details." response use datadog_api_client::datadog; use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI; use datadog_api_client::datadogV1::model::SyntheticsAPITest; @@ -44,172 +43,8 @@ use std::collections::BTreeMap; #[tokio::main] async fn main() { - let body = - SyntheticsAPITest::new( - SyntheticsAPITestConfig::new() - .assertions( - vec![ - SyntheticsAssertion::SyntheticsAssertionTarget( - Box::new( - SyntheticsAssertionTarget::new( - SyntheticsAssertionOperator::IS, - Value::from("text/html"), - SyntheticsAssertionType::HEADER, - ).property("{{ PROPERTY }}".to_string()), - ), - ), - SyntheticsAssertion::SyntheticsAssertionTarget( - Box::new( - SyntheticsAssertionTarget::new( - SyntheticsAssertionOperator::LESS_THAN, - Value::from(2000), - SyntheticsAssertionType::RESPONSE_TIME, - ).timings_scope(SyntheticsAssertionTimingsScope::WITHOUT_DNS), - ), - ), - SyntheticsAssertion::SyntheticsAssertionJSONPathTarget( - Box::new( - SyntheticsAssertionJSONPathTarget::new( - SyntheticsAssertionJSONPathOperator::VALIDATES_JSON_PATH, - SyntheticsAssertionType::BODY, - ).target( - SyntheticsAssertionJSONPathTargetTarget::new() - .json_path("topKey".to_string()) - .operator("isNot".to_string()) - .target_value(Value::from("0")), - ), - ), - ), - SyntheticsAssertion::SyntheticsAssertionJSONPathTarget( - Box::new( - SyntheticsAssertionJSONPathTarget::new( - SyntheticsAssertionJSONPathOperator::VALIDATES_JSON_PATH, - SyntheticsAssertionType::BODY, - ).target( - SyntheticsAssertionJSONPathTargetTarget::new() - .elements_operator("atLeastOneElementMatches".to_string()) - .json_path("topKey".to_string()) - .operator("isNot".to_string()) - .target_value(Value::from("0")), - ), - ), - ), - SyntheticsAssertion::SyntheticsAssertionJSONSchemaTarget( - Box::new( - SyntheticsAssertionJSONSchemaTarget::new( - SyntheticsAssertionJSONSchemaOperator::VALIDATES_JSON_SCHEMA, - SyntheticsAssertionType::BODY, - ).target( - SyntheticsAssertionJSONSchemaTargetTarget::new() - .json_schema( - r#"{"type": "object", "properties":{"slideshow":{"type":"object"}}}"#.to_string(), - ) - .meta_schema(SyntheticsAssertionJSONSchemaMetaSchema::DRAFT_07), - ), - ), - ), - SyntheticsAssertion::SyntheticsAssertionXPathTarget( - Box::new( - SyntheticsAssertionXPathTarget::new( - SyntheticsAssertionXPathOperator::VALIDATES_X_PATH, - SyntheticsAssertionType::BODY, - ).target( - SyntheticsAssertionXPathTargetTarget::new() - .operator("contains".to_string()) - .target_value(Value::from("0")) - .x_path("target-xpath".to_string()), - ), - ), - ), - SyntheticsAssertion::SyntheticsAssertionBodyHashTarget( - Box::new( - SyntheticsAssertionBodyHashTarget::new( - SyntheticsAssertionBodyHashOperator::MD5, - Value::from("a"), - SyntheticsAssertionBodyHashType::BODY_HASH, - ), - ), - ), - SyntheticsAssertion::SyntheticsAssertionJavascript( - Box::new( - SyntheticsAssertionJavascript::new( - "const hello = 'world';".to_string(), - SyntheticsAssertionJavascriptType::JAVASCRIPT, - ), - ), - ) - ], - ) - .config_variables( - vec![ - SyntheticsConfigVariable::new("PROPERTY".to_string(), SyntheticsConfigVariableType::TEXT) - .example("content-type".to_string()) - .pattern("content-type".to_string()) - ], - ) - .request( - SyntheticsTestRequest::new() - .basic_auth( - SyntheticsBasicAuth::SyntheticsBasicAuthOauthClient( - Box::new( - SyntheticsBasicAuthOauthClient::new( - "https://datadog-token.com".to_string(), - "client-id".to_string(), - "client-secret".to_string(), - SyntheticsBasicAuthOauthTokenApiAuthentication::HEADER, - SyntheticsBasicAuthOauthClientType::OAUTH_CLIENT, - ) - .audience("audience".to_string()) - .resource("resource".to_string()) - .scope("yoyo".to_string()), - ), - ), - ) - .certificate( - SyntheticsTestRequestCertificate::new() - .cert( - SyntheticsTestRequestCertificateItem::new() - .content("cert-content".to_string()) - .filename("cert-filename".to_string()) - .updated_at("2020-10-16T09:23:24.857Z".to_string()), - ) - .key( - SyntheticsTestRequestCertificateItem::new() - .content("key-content".to_string()) - .filename("key-filename".to_string()) - .updated_at("2020-10-16T09:23:24.857Z".to_string()), - ), - ) - .headers(BTreeMap::from([("unique".to_string(), "examplesynthetic".to_string())])) - .method("GET".to_string()) - .persist_cookies(true) - .proxy( - SyntheticsTestRequestProxy::new( - "https://datadoghq.com".to_string(), - ).headers(BTreeMap::from([])), - ) - .timeout(10.0 as f64) - .url("https://datadoghq.com".to_string()), - ) - .variables_from_script(r#"dd.variable.set("FOO", "foo")"#.to_string()), - vec!["aws:us-east-2".to_string()], - "BDD test payload: synthetics_api_http_test_payload.json".to_string(), - "Example-Synthetic".to_string(), - SyntheticsTestOptions::new() - .accept_self_signed(false) - .allow_insecure(true) - .follow_redirects(true) - .http_version(SyntheticsTestOptionsHTTPVersion::HTTP2) - .min_failure_duration(10) - .min_location_failed(1) - .monitor_name("Example-Synthetic".to_string()) - .monitor_priority(5) - .retry(SyntheticsTestOptionsRetry::new().count(3).interval(10.0 as f64)) - .tick_every(60), - SyntheticsAPITestType::API, - ) - .subtype(SyntheticsTestDetailsSubType::HTTP) - .tags(vec!["testing:api".to_string()]); + let body = SyntheticsAPITest::new(SyntheticsAPITestConfig::new().assertions(vec![SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(SyntheticsAssertionTarget::new(SyntheticsAssertionOperator::IS, Value::from("text/html"), SyntheticsAssertionType::HEADER, ).property("{{ PROPERTY }}".to_string()))),SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(SyntheticsAssertionTarget::new(SyntheticsAssertionOperator::LESS_THAN, Value::from(2000), SyntheticsAssertionType::RESPONSE_TIME, ).timings_scope(SyntheticsAssertionTimingsScope::WITHOUT_DNS))),SyntheticsAssertion::SyntheticsAssertionJSONPathTarget(Box::new(SyntheticsAssertionJSONPathTarget::new(SyntheticsAssertionJSONPathOperator::VALIDATES_JSON_PATH, SyntheticsAssertionType::BODY, ).target(SyntheticsAssertionJSONPathTargetTarget::new().json_path("topKey".to_string()).operator("isNot".to_string()).target_value(Value::from("0"))))),SyntheticsAssertion::SyntheticsAssertionJSONPathTarget(Box::new(SyntheticsAssertionJSONPathTarget::new(SyntheticsAssertionJSONPathOperator::VALIDATES_JSON_PATH, SyntheticsAssertionType::BODY, ).target(SyntheticsAssertionJSONPathTargetTarget::new().elements_operator("atLeastOneElementMatches".to_string()).json_path("topKey".to_string()).operator("isNot".to_string()).target_value(Value::from("0"))))),SyntheticsAssertion::SyntheticsAssertionJSONSchemaTarget(Box::new(SyntheticsAssertionJSONSchemaTarget::new(SyntheticsAssertionJSONSchemaOperator::VALIDATES_JSON_SCHEMA, SyntheticsAssertionType::BODY, ).target(SyntheticsAssertionJSONSchemaTargetTarget::new().json_schema(r#"{"type": "object", "properties":{"slideshow":{"type":"object"}}}"#.to_string()).meta_schema(SyntheticsAssertionJSONSchemaMetaSchema::DRAFT_07)))),SyntheticsAssertion::SyntheticsAssertionXPathTarget(Box::new(SyntheticsAssertionXPathTarget::new(SyntheticsAssertionXPathOperator::VALIDATES_X_PATH, SyntheticsAssertionType::BODY, ).target(SyntheticsAssertionXPathTargetTarget::new().operator("contains".to_string()).target_value(Value::from("0")).x_path("target-xpath".to_string())))),SyntheticsAssertion::SyntheticsAssertionBodyHashTarget(Box::new(SyntheticsAssertionBodyHashTarget::new(SyntheticsAssertionBodyHashOperator::MD5, Value::from("a"), SyntheticsAssertionBodyHashType::BODY_HASH, ))),SyntheticsAssertion::SyntheticsAssertionJavascript(Box::new(SyntheticsAssertionJavascript::new("const hello = 'world';".to_string(), SyntheticsAssertionJavascriptType::JAVASCRIPT, ))),]).config_variables(vec![SyntheticsConfigVariable::new("PROPERTY".to_string(), SyntheticsConfigVariableType::TEXT, ).example("content-type".to_string()).pattern("content-type".to_string()),]).request(SyntheticsTestRequest::new().basic_auth(SyntheticsBasicAuth::SyntheticsBasicAuthOauthClient(Box::new(SyntheticsBasicAuthOauthClient::new("https://datadog-token.com".to_string(), "client-id".to_string(), "client-secret".to_string(), SyntheticsBasicAuthOauthTokenApiAuthentication::HEADER, SyntheticsBasicAuthOauthClientType::OAUTH_CLIENT, ).audience("audience".to_string()).resource("resource".to_string()).scope("yoyo".to_string())))).certificate(SyntheticsTestRequestCertificate::new().cert(SyntheticsTestRequestCertificateItem::new().content("cert-content".to_string()).filename("cert-filename".to_string()).updated_at("2020-10-16T09:23:24.857Z".to_string())).key(SyntheticsTestRequestCertificateItem::new().content("key-content".to_string()).filename("key-filename".to_string()).updated_at("2020-10-16T09:23:24.857Z".to_string()))).headers(BTreeMap::from([("unique".to_string(), "examplesynthetic".to_string()),])).method("GET".to_string()).persist_cookies(true).proxy(SyntheticsTestRequestProxy::new("https://datadoghq.com".to_string(), ).headers(BTreeMap::from([]))).timeout(10.0 as f64).url("https://datadoghq.com".to_string())).variables_from_script(r#"dd.variable.set("FOO", "foo")"#.to_string()), vec!["aws:us-east-2".to_string(),], "BDD test payload: synthetics_api_http_test_payload.json".to_string(), "Example-Synthetic".to_string(), SyntheticsTestOptions::new().accept_self_signed(false).allow_insecure(true).follow_redirects(true).http_version(SyntheticsTestOptionsHTTPVersion::HTTP2).min_failure_duration(10).min_location_failed(1).monitor_name("Example-Synthetic".to_string()).monitor_priority(5).retry(SyntheticsTestOptionsRetry::new().count(3).interval(10.0 as f64)).tick_every(60), SyntheticsAPITestType::API, ).subtype(SyntheticsTestDetailsSubType::HTTP).tags(vec!["testing:api".to_string(),]); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api.create_synthetics_api_test(body).await; diff --git a/examples/v1_synthetics_CreateSyntheticsAPITest_1717840259.rs b/examples/v1_synthetics_CreateSyntheticsAPITest_1717840259.rs index 8dee52ac5..92ea896d8 100644 --- a/examples/v1_synthetics_CreateSyntheticsAPITest_1717840259.rs +++ b/examples/v1_synthetics_CreateSyntheticsAPITest_1717840259.rs @@ -1,5 +1,4 @@ -// Create a multi-step api test with every type of basicAuth returns "OK - Returns -// the created test details." response +// Create a multi-step api test with every type of basicAuth returns "OK - Returns the created test details." response use datadog_api_client::datadog; use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI; use datadog_api_client::datadogV1::model::SyntheticsAPIStep; @@ -184,6 +183,7 @@ async fn main() { SyntheticsAPITestType::API, ) .subtype(SyntheticsTestDetailsSubType::MULTI); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api.create_synthetics_api_test(body).await; diff --git a/examples/v1_synthetics_CreateSyntheticsAPITest_1987645492.rs b/examples/v1_synthetics_CreateSyntheticsAPITest_1987645492.rs index f6dcf39ee..3e4a94d20 100644 --- a/examples/v1_synthetics_CreateSyntheticsAPITest_1987645492.rs +++ b/examples/v1_synthetics_CreateSyntheticsAPITest_1987645492.rs @@ -43,172 +43,8 @@ use std::collections::BTreeMap; #[tokio::main] async fn main() { - let body = - SyntheticsAPITest::new( - SyntheticsAPITestConfig::new() - .assertions( - vec![ - SyntheticsAssertion::SyntheticsAssertionTarget( - Box::new( - SyntheticsAssertionTarget::new( - SyntheticsAssertionOperator::IS, - Value::from("text/html"), - SyntheticsAssertionType::HEADER, - ).property("{{ PROPERTY }}".to_string()), - ), - ), - SyntheticsAssertion::SyntheticsAssertionTarget( - Box::new( - SyntheticsAssertionTarget::new( - SyntheticsAssertionOperator::LESS_THAN, - Value::from(2000), - SyntheticsAssertionType::RESPONSE_TIME, - ).timings_scope(SyntheticsAssertionTimingsScope::WITHOUT_DNS), - ), - ), - SyntheticsAssertion::SyntheticsAssertionJSONPathTarget( - Box::new( - SyntheticsAssertionJSONPathTarget::new( - SyntheticsAssertionJSONPathOperator::VALIDATES_JSON_PATH, - SyntheticsAssertionType::BODY, - ).target( - SyntheticsAssertionJSONPathTargetTarget::new() - .json_path("topKey".to_string()) - .operator("isNot".to_string()) - .target_value(Value::from("0")), - ), - ), - ), - SyntheticsAssertion::SyntheticsAssertionJSONPathTarget( - Box::new( - SyntheticsAssertionJSONPathTarget::new( - SyntheticsAssertionJSONPathOperator::VALIDATES_JSON_PATH, - SyntheticsAssertionType::BODY, - ).target( - SyntheticsAssertionJSONPathTargetTarget::new() - .elements_operator("atLeastOneElementMatches".to_string()) - .json_path("topKey".to_string()) - .operator("isNot".to_string()) - .target_value(Value::from("0")), - ), - ), - ), - SyntheticsAssertion::SyntheticsAssertionJSONSchemaTarget( - Box::new( - SyntheticsAssertionJSONSchemaTarget::new( - SyntheticsAssertionJSONSchemaOperator::VALIDATES_JSON_SCHEMA, - SyntheticsAssertionType::BODY, - ).target( - SyntheticsAssertionJSONSchemaTargetTarget::new() - .json_schema( - r#"{"type": "object", "properties":{"slideshow":{"type":"object"}}}"#.to_string(), - ) - .meta_schema(SyntheticsAssertionJSONSchemaMetaSchema::DRAFT_07), - ), - ), - ), - SyntheticsAssertion::SyntheticsAssertionXPathTarget( - Box::new( - SyntheticsAssertionXPathTarget::new( - SyntheticsAssertionXPathOperator::VALIDATES_X_PATH, - SyntheticsAssertionType::BODY, - ).target( - SyntheticsAssertionXPathTargetTarget::new() - .operator("contains".to_string()) - .target_value(Value::from("0")) - .x_path("target-xpath".to_string()), - ), - ), - ), - SyntheticsAssertion::SyntheticsAssertionBodyHashTarget( - Box::new( - SyntheticsAssertionBodyHashTarget::new( - SyntheticsAssertionBodyHashOperator::MD5, - Value::from("a"), - SyntheticsAssertionBodyHashType::BODY_HASH, - ), - ), - ), - SyntheticsAssertion::SyntheticsAssertionJavascript( - Box::new( - SyntheticsAssertionJavascript::new( - "const hello = 'world';".to_string(), - SyntheticsAssertionJavascriptType::JAVASCRIPT, - ), - ), - ) - ], - ) - .config_variables( - vec![ - SyntheticsConfigVariable::new("PROPERTY".to_string(), SyntheticsConfigVariableType::TEXT) - .example("content-type".to_string()) - .pattern("content-type".to_string()) - ], - ) - .request( - SyntheticsTestRequest::new() - .basic_auth( - SyntheticsBasicAuth::SyntheticsBasicAuthOauthClient( - Box::new( - SyntheticsBasicAuthOauthClient::new( - "https://datadog-token.com".to_string(), - "client-id".to_string(), - "client-secret".to_string(), - SyntheticsBasicAuthOauthTokenApiAuthentication::HEADER, - SyntheticsBasicAuthOauthClientType::OAUTH_CLIENT, - ) - .audience("audience".to_string()) - .resource("resource".to_string()) - .scope("yoyo".to_string()), - ), - ), - ) - .certificate( - SyntheticsTestRequestCertificate::new() - .cert( - SyntheticsTestRequestCertificateItem::new() - .content("cert-content".to_string()) - .filename("cert-filename".to_string()) - .updated_at("2020-10-16T09:23:24.857Z".to_string()), - ) - .key( - SyntheticsTestRequestCertificateItem::new() - .content("key-content".to_string()) - .filename("key-filename".to_string()) - .updated_at("2020-10-16T09:23:24.857Z".to_string()), - ), - ) - .headers(BTreeMap::from([("unique".to_string(), "examplesynthetic".to_string())])) - .method("GET".to_string()) - .persist_cookies(true) - .proxy( - SyntheticsTestRequestProxy::new( - "https://datadoghq.com".to_string(), - ).headers(BTreeMap::from([])), - ) - .timeout(10.0 as f64) - .url("https://datadoghq.com".to_string()), - ) - .variables_from_script(r#"dd.variable.set("FOO", "foo")"#.to_string()), - vec!["aws:us-east-2".to_string()], - "BDD test payload: synthetics_api_http_test_payload.json".to_string(), - "Example-Synthetic".to_string(), - SyntheticsTestOptions::new() - .accept_self_signed(false) - .allow_insecure(true) - .follow_redirects(true) - .http_version(SyntheticsTestOptionsHTTPVersion::HTTP2) - .min_failure_duration(10) - .min_location_failed(1) - .monitor_name("Example-Synthetic".to_string()) - .monitor_priority(5) - .retry(SyntheticsTestOptionsRetry::new().count(3).interval(10.0 as f64)) - .tick_every(60), - SyntheticsAPITestType::API, - ) - .subtype(SyntheticsTestDetailsSubType::HTTP) - .tags(vec!["testing:api".to_string()]); + let body = SyntheticsAPITest::new(SyntheticsAPITestConfig::new().assertions(vec![SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(SyntheticsAssertionTarget::new(SyntheticsAssertionOperator::IS, Value::from("text/html"), SyntheticsAssertionType::HEADER, ).property("{{ PROPERTY }}".to_string()))),SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(SyntheticsAssertionTarget::new(SyntheticsAssertionOperator::LESS_THAN, Value::from(2000), SyntheticsAssertionType::RESPONSE_TIME, ).timings_scope(SyntheticsAssertionTimingsScope::WITHOUT_DNS))),SyntheticsAssertion::SyntheticsAssertionJSONPathTarget(Box::new(SyntheticsAssertionJSONPathTarget::new(SyntheticsAssertionJSONPathOperator::VALIDATES_JSON_PATH, SyntheticsAssertionType::BODY, ).target(SyntheticsAssertionJSONPathTargetTarget::new().json_path("topKey".to_string()).operator("isNot".to_string()).target_value(Value::from("0"))))),SyntheticsAssertion::SyntheticsAssertionJSONPathTarget(Box::new(SyntheticsAssertionJSONPathTarget::new(SyntheticsAssertionJSONPathOperator::VALIDATES_JSON_PATH, SyntheticsAssertionType::BODY, ).target(SyntheticsAssertionJSONPathTargetTarget::new().elements_operator("atLeastOneElementMatches".to_string()).json_path("topKey".to_string()).operator("isNot".to_string()).target_value(Value::from("0"))))),SyntheticsAssertion::SyntheticsAssertionJSONSchemaTarget(Box::new(SyntheticsAssertionJSONSchemaTarget::new(SyntheticsAssertionJSONSchemaOperator::VALIDATES_JSON_SCHEMA, SyntheticsAssertionType::BODY, ).target(SyntheticsAssertionJSONSchemaTargetTarget::new().json_schema(r#"{"type": "object", "properties":{"slideshow":{"type":"object"}}}"#.to_string()).meta_schema(SyntheticsAssertionJSONSchemaMetaSchema::DRAFT_07)))),SyntheticsAssertion::SyntheticsAssertionXPathTarget(Box::new(SyntheticsAssertionXPathTarget::new(SyntheticsAssertionXPathOperator::VALIDATES_X_PATH, SyntheticsAssertionType::BODY, ).target(SyntheticsAssertionXPathTargetTarget::new().operator("contains".to_string()).target_value(Value::from("0")).x_path("target-xpath".to_string())))),SyntheticsAssertion::SyntheticsAssertionBodyHashTarget(Box::new(SyntheticsAssertionBodyHashTarget::new(SyntheticsAssertionBodyHashOperator::MD5, Value::from("a"), SyntheticsAssertionBodyHashType::BODY_HASH, ))),SyntheticsAssertion::SyntheticsAssertionJavascript(Box::new(SyntheticsAssertionJavascript::new("const hello = 'world';".to_string(), SyntheticsAssertionJavascriptType::JAVASCRIPT, ))),]).config_variables(vec![SyntheticsConfigVariable::new("PROPERTY".to_string(), SyntheticsConfigVariableType::TEXT, ).example("content-type".to_string()).pattern("content-type".to_string()),]).request(SyntheticsTestRequest::new().basic_auth(SyntheticsBasicAuth::SyntheticsBasicAuthOauthClient(Box::new(SyntheticsBasicAuthOauthClient::new("https://datadog-token.com".to_string(), "client-id".to_string(), "client-secret".to_string(), SyntheticsBasicAuthOauthTokenApiAuthentication::HEADER, SyntheticsBasicAuthOauthClientType::OAUTH_CLIENT, ).audience("audience".to_string()).resource("resource".to_string()).scope("yoyo".to_string())))).certificate(SyntheticsTestRequestCertificate::new().cert(SyntheticsTestRequestCertificateItem::new().content("cert-content".to_string()).filename("cert-filename".to_string()).updated_at("2020-10-16T09:23:24.857Z".to_string())).key(SyntheticsTestRequestCertificateItem::new().content("key-content".to_string()).filename("key-filename".to_string()).updated_at("2020-10-16T09:23:24.857Z".to_string()))).headers(BTreeMap::from([("unique".to_string(), "examplesynthetic".to_string()),])).method("GET".to_string()).persist_cookies(true).proxy(SyntheticsTestRequestProxy::new("https://datadoghq.com".to_string(), ).headers(BTreeMap::from([]))).timeout(10.0 as f64).url("https://datadoghq.com".to_string())).variables_from_script(r#"dd.variable.set("FOO", "foo")"#.to_string()), vec!["aws:us-east-2".to_string(),], "BDD test payload: synthetics_api_http_test_payload.json".to_string(), "Example-Synthetic".to_string(), SyntheticsTestOptions::new().accept_self_signed(false).allow_insecure(true).follow_redirects(true).http_version(SyntheticsTestOptionsHTTPVersion::HTTP2).min_failure_duration(10).min_location_failed(1).monitor_name("Example-Synthetic".to_string()).monitor_priority(5).retry(SyntheticsTestOptionsRetry::new().count(3).interval(10.0 as f64)).tick_every(60), SyntheticsAPITestType::API, ).subtype(SyntheticsTestDetailsSubType::HTTP).tags(vec!["testing:api".to_string(),]); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api.create_synthetics_api_test(body).await; diff --git a/examples/v1_synthetics_CreateSyntheticsAPITest_2472747642.rs b/examples/v1_synthetics_CreateSyntheticsAPITest_2472747642.rs index 48bff2795..2edf08a24 100644 --- a/examples/v1_synthetics_CreateSyntheticsAPITest_2472747642.rs +++ b/examples/v1_synthetics_CreateSyntheticsAPITest_2472747642.rs @@ -1,5 +1,4 @@ -// Create an API test with WEBSOCKET subtype returns "OK - Returns the created -// test details." response +// Create an API test with WEBSOCKET subtype returns "OK - Returns the created test details." response use datadog_api_client::datadog; use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI; use datadog_api_client::datadogV1::model::SyntheticsAPITest; @@ -62,6 +61,7 @@ async fn main() { ) .subtype(SyntheticsTestDetailsSubType::WEBSOCKET) .tags(vec!["testing:api".to_string()]); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api.create_synthetics_api_test(body).await; diff --git a/examples/v1_synthetics_CreateSyntheticsAPITest_3829801148.rs b/examples/v1_synthetics_CreateSyntheticsAPITest_3829801148.rs index 78b238695..e442db7c1 100644 --- a/examples/v1_synthetics_CreateSyntheticsAPITest_3829801148.rs +++ b/examples/v1_synthetics_CreateSyntheticsAPITest_3829801148.rs @@ -1,5 +1,4 @@ -// Create an API test with UDP subtype returns "OK - Returns the created test -// details." response +// Create an API test with UDP subtype returns "OK - Returns the created test details." response use datadog_api_client::datadog; use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI; use datadog_api_client::datadogV1::model::SyntheticsAPITest; @@ -64,6 +63,7 @@ async fn main() { ) .subtype(SyntheticsTestDetailsSubType::UDP) .tags(vec!["testing:api".to_string()]); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api.create_synthetics_api_test(body).await; diff --git a/examples/v1_synthetics_CreateSyntheticsAPITest_960766374.rs b/examples/v1_synthetics_CreateSyntheticsAPITest_960766374.rs index cbf7e19f0..4c2c1138e 100644 --- a/examples/v1_synthetics_CreateSyntheticsAPITest_960766374.rs +++ b/examples/v1_synthetics_CreateSyntheticsAPITest_960766374.rs @@ -1,5 +1,4 @@ -// Create an API HTTP with oauth-rop test returns "OK - Returns the created test -// details." response +// Create an API HTTP with oauth-rop test returns "OK - Returns the created test details." response use datadog_api_client::datadog; use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI; use datadog_api_client::datadogV1::model::SyntheticsAPITest; @@ -37,140 +36,8 @@ use std::collections::BTreeMap; #[tokio::main] async fn main() { - let body = - SyntheticsAPITest::new( - SyntheticsAPITestConfig::new() - .assertions( - vec![ - SyntheticsAssertion::SyntheticsAssertionTarget( - Box::new( - SyntheticsAssertionTarget::new( - SyntheticsAssertionOperator::IS, - Value::from("text/html"), - SyntheticsAssertionType::HEADER, - ).property("{{ PROPERTY }}".to_string()), - ), - ), - SyntheticsAssertion::SyntheticsAssertionTarget( - Box::new( - SyntheticsAssertionTarget::new( - SyntheticsAssertionOperator::LESS_THAN, - Value::from(2000), - SyntheticsAssertionType::RESPONSE_TIME, - ), - ), - ), - SyntheticsAssertion::SyntheticsAssertionJSONPathTarget( - Box::new( - SyntheticsAssertionJSONPathTarget::new( - SyntheticsAssertionJSONPathOperator::VALIDATES_JSON_PATH, - SyntheticsAssertionType::BODY, - ).target( - SyntheticsAssertionJSONPathTargetTarget::new() - .json_path("topKey".to_string()) - .operator("isNot".to_string()) - .target_value(Value::from("0")), - ), - ), - ), - SyntheticsAssertion::SyntheticsAssertionJSONSchemaTarget( - Box::new( - SyntheticsAssertionJSONSchemaTarget::new( - SyntheticsAssertionJSONSchemaOperator::VALIDATES_JSON_SCHEMA, - SyntheticsAssertionType::BODY, - ).target( - SyntheticsAssertionJSONSchemaTargetTarget::new() - .json_schema( - r#"{"type": "object", "properties":{"slideshow":{"type":"object"}}}"#.to_string(), - ) - .meta_schema(SyntheticsAssertionJSONSchemaMetaSchema::DRAFT_07), - ), - ), - ), - SyntheticsAssertion::SyntheticsAssertionXPathTarget( - Box::new( - SyntheticsAssertionXPathTarget::new( - SyntheticsAssertionXPathOperator::VALIDATES_X_PATH, - SyntheticsAssertionType::BODY, - ).target( - SyntheticsAssertionXPathTargetTarget::new() - .operator("contains".to_string()) - .target_value(Value::from("0")) - .x_path("target-xpath".to_string()), - ), - ), - ) - ], - ) - .config_variables( - vec![ - SyntheticsConfigVariable::new("PROPERTY".to_string(), SyntheticsConfigVariableType::TEXT) - .example("content-type".to_string()) - .pattern("content-type".to_string()) - ], - ) - .request( - SyntheticsTestRequest::new() - .basic_auth( - SyntheticsBasicAuth::SyntheticsBasicAuthOauthROP( - Box::new( - SyntheticsBasicAuthOauthROP::new( - "https://datadog-token.com".to_string(), - "oauth-password".to_string(), - SyntheticsBasicAuthOauthTokenApiAuthentication::BODY, - SyntheticsBasicAuthOauthROPType::OAUTH_ROP, - "oauth-usermame".to_string(), - ) - .audience("audience".to_string()) - .client_id("client-id".to_string()) - .client_secret("client-secret".to_string()) - .resource("resource".to_string()) - .scope("yoyo".to_string()), - ), - ), - ) - .certificate( - SyntheticsTestRequestCertificate::new() - .cert( - SyntheticsTestRequestCertificateItem::new() - .content("cert-content".to_string()) - .filename("cert-filename".to_string()) - .updated_at("2020-10-16T09:23:24.857Z".to_string()), - ) - .key( - SyntheticsTestRequestCertificateItem::new() - .content("key-content".to_string()) - .filename("key-filename".to_string()) - .updated_at("2020-10-16T09:23:24.857Z".to_string()), - ), - ) - .headers(BTreeMap::from([("unique".to_string(), "examplesynthetic".to_string())])) - .method("GET".to_string()) - .proxy( - SyntheticsTestRequestProxy::new( - "https://datadoghq.com".to_string(), - ).headers(BTreeMap::from([])), - ) - .timeout(10.0 as f64) - .url("https://datadoghq.com".to_string()), - ), - vec!["aws:us-east-2".to_string()], - "BDD test payload: synthetics_api_http_test_payload.json".to_string(), - "Example-Synthetic".to_string(), - SyntheticsTestOptions::new() - .accept_self_signed(false) - .allow_insecure(true) - .follow_redirects(true) - .min_failure_duration(10) - .min_location_failed(1) - .monitor_name("Example-Synthetic".to_string()) - .monitor_priority(5) - .retry(SyntheticsTestOptionsRetry::new().count(3).interval(10.0 as f64)) - .tick_every(60), - SyntheticsAPITestType::API, - ) - .subtype(SyntheticsTestDetailsSubType::HTTP) - .tags(vec!["testing:api".to_string()]); + let body = SyntheticsAPITest::new(SyntheticsAPITestConfig::new().assertions(vec![SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(SyntheticsAssertionTarget::new(SyntheticsAssertionOperator::IS, Value::from("text/html"), SyntheticsAssertionType::HEADER, ).property("{{ PROPERTY }}".to_string()))),SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(SyntheticsAssertionTarget::new(SyntheticsAssertionOperator::LESS_THAN, Value::from(2000), SyntheticsAssertionType::RESPONSE_TIME, ))),SyntheticsAssertion::SyntheticsAssertionJSONPathTarget(Box::new(SyntheticsAssertionJSONPathTarget::new(SyntheticsAssertionJSONPathOperator::VALIDATES_JSON_PATH, SyntheticsAssertionType::BODY, ).target(SyntheticsAssertionJSONPathTargetTarget::new().json_path("topKey".to_string()).operator("isNot".to_string()).target_value(Value::from("0"))))),SyntheticsAssertion::SyntheticsAssertionJSONSchemaTarget(Box::new(SyntheticsAssertionJSONSchemaTarget::new(SyntheticsAssertionJSONSchemaOperator::VALIDATES_JSON_SCHEMA, SyntheticsAssertionType::BODY, ).target(SyntheticsAssertionJSONSchemaTargetTarget::new().json_schema(r#"{"type": "object", "properties":{"slideshow":{"type":"object"}}}"#.to_string()).meta_schema(SyntheticsAssertionJSONSchemaMetaSchema::DRAFT_07)))),SyntheticsAssertion::SyntheticsAssertionXPathTarget(Box::new(SyntheticsAssertionXPathTarget::new(SyntheticsAssertionXPathOperator::VALIDATES_X_PATH, SyntheticsAssertionType::BODY, ).target(SyntheticsAssertionXPathTargetTarget::new().operator("contains".to_string()).target_value(Value::from("0")).x_path("target-xpath".to_string())))),]).config_variables(vec![SyntheticsConfigVariable::new("PROPERTY".to_string(), SyntheticsConfigVariableType::TEXT, ).example("content-type".to_string()).pattern("content-type".to_string()),]).request(SyntheticsTestRequest::new().basic_auth(SyntheticsBasicAuth::SyntheticsBasicAuthOauthROP(Box::new(SyntheticsBasicAuthOauthROP::new("https://datadog-token.com".to_string(), "oauth-password".to_string(), SyntheticsBasicAuthOauthTokenApiAuthentication::BODY, SyntheticsBasicAuthOauthROPType::OAUTH_ROP, "oauth-usermame".to_string(), ).audience("audience".to_string()).client_id("client-id".to_string()).client_secret("client-secret".to_string()).resource("resource".to_string()).scope("yoyo".to_string())))).certificate(SyntheticsTestRequestCertificate::new().cert(SyntheticsTestRequestCertificateItem::new().content("cert-content".to_string()).filename("cert-filename".to_string()).updated_at("2020-10-16T09:23:24.857Z".to_string())).key(SyntheticsTestRequestCertificateItem::new().content("key-content".to_string()).filename("key-filename".to_string()).updated_at("2020-10-16T09:23:24.857Z".to_string()))).headers(BTreeMap::from([("unique".to_string(), "examplesynthetic".to_string()),])).method("GET".to_string()).proxy(SyntheticsTestRequestProxy::new("https://datadoghq.com".to_string(), ).headers(BTreeMap::from([]))).timeout(10.0 as f64).url("https://datadoghq.com".to_string())), vec!["aws:us-east-2".to_string(),], "BDD test payload: synthetics_api_http_test_payload.json".to_string(), "Example-Synthetic".to_string(), SyntheticsTestOptions::new().accept_self_signed(false).allow_insecure(true).follow_redirects(true).min_failure_duration(10).min_location_failed(1).monitor_name("Example-Synthetic".to_string()).monitor_priority(5).retry(SyntheticsTestOptionsRetry::new().count(3).interval(10.0 as f64)).tick_every(60), SyntheticsAPITestType::API, ).subtype(SyntheticsTestDetailsSubType::HTTP).tags(vec!["testing:api".to_string(),]); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api.create_synthetics_api_test(body).await; diff --git a/examples/v1_synthetics_CreateSyntheticsBrowserTest.rs b/examples/v1_synthetics_CreateSyntheticsBrowserTest.rs index cab559d3e..d9f27d25b 100644 --- a/examples/v1_synthetics_CreateSyntheticsBrowserTest.rs +++ b/examples/v1_synthetics_CreateSyntheticsBrowserTest.rs @@ -70,6 +70,7 @@ async fn main() { .params(BTreeMap::new()) .type_(SyntheticsStepType::REFRESH)]) .tags(vec!["testing:browser".to_string()]); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api.create_synthetics_browser_test(body).await; diff --git a/examples/v1_synthetics_CreateSyntheticsBrowserTest_2932742688.rs b/examples/v1_synthetics_CreateSyntheticsBrowserTest_2932742688.rs index 7f524f521..98a43ec49 100644 --- a/examples/v1_synthetics_CreateSyntheticsBrowserTest_2932742688.rs +++ b/examples/v1_synthetics_CreateSyntheticsBrowserTest_2932742688.rs @@ -71,6 +71,7 @@ async fn main() { .params(BTreeMap::new()) .type_(SyntheticsStepType::REFRESH)]) .tags(vec!["testing:browser".to_string()]); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api.create_synthetics_browser_test(body).await; diff --git a/examples/v1_synthetics_CreateSyntheticsBrowserTest_397420811.rs b/examples/v1_synthetics_CreateSyntheticsBrowserTest_397420811.rs index bb7828ebf..666017dc5 100644 --- a/examples/v1_synthetics_CreateSyntheticsBrowserTest_397420811.rs +++ b/examples/v1_synthetics_CreateSyntheticsBrowserTest_397420811.rs @@ -1,5 +1,4 @@ -// Create a browser test with advanced scheduling options returns "OK - Returns -// the created test details." response +// Create a browser test with advanced scheduling options returns "OK - Returns the created test details." response use datadog_api_client::datadog; use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI; use datadog_api_client::datadogV1::model::SyntheticsBrowserTest; @@ -74,6 +73,7 @@ async fn main() { .params(BTreeMap::new()) .type_(SyntheticsStepType::REFRESH)]) .tags(vec!["testing:browser".to_string()]); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api.create_synthetics_browser_test(body).await; diff --git a/examples/v1_synthetics_CreateSyntheticsMobileTest.rs b/examples/v1_synthetics_CreateSyntheticsMobileTest.rs index 0301c7ff1..16496459f 100644 --- a/examples/v1_synthetics_CreateSyntheticsMobileTest.rs +++ b/examples/v1_synthetics_CreateSyntheticsMobileTest.rs @@ -28,6 +28,7 @@ async fn main() { .message("".to_string()) .status(SyntheticsTestPauseStatus::PAUSED) .steps(vec![]); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api.create_synthetics_mobile_test(body).await; diff --git a/examples/v1_synthetics_DeleteTests.rs b/examples/v1_synthetics_DeleteTests.rs index 67c961d81..ca30ab729 100644 --- a/examples/v1_synthetics_DeleteTests.rs +++ b/examples/v1_synthetics_DeleteTests.rs @@ -9,6 +9,7 @@ async fn main() { let synthetics_api_test_public_id = std::env::var("SYNTHETICS_API_TEST_PUBLIC_ID").unwrap(); let body = SyntheticsDeleteTestsPayload::new().public_ids(vec![synthetics_api_test_public_id.clone()]); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api.delete_tests(body).await; diff --git a/examples/v1_synthetics_EditGlobalVariable.rs b/examples/v1_synthetics_EditGlobalVariable.rs index d713dd316..2c552f27c 100644 --- a/examples/v1_synthetics_EditGlobalVariable.rs +++ b/examples/v1_synthetics_EditGlobalVariable.rs @@ -37,6 +37,7 @@ async fn main() { .secure(true) .value("value".to_string()), ); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_synthetics_FetchUptimes.rs b/examples/v1_synthetics_FetchUptimes.rs index fd42fc06d..f2cef5aae 100644 --- a/examples/v1_synthetics_FetchUptimes.rs +++ b/examples/v1_synthetics_FetchUptimes.rs @@ -7,6 +7,7 @@ use datadog_api_client::datadogV1::model::SyntheticsFetchUptimesPayload; async fn main() { let body = SyntheticsFetchUptimesPayload::new(1726041488, vec!["p8m-9gw-nte".to_string()], 1726055954); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api.fetch_uptimes(body).await; diff --git a/examples/v1_synthetics_GetAPITestResult_1321866518.rs b/examples/v1_synthetics_GetAPITestResult_1321866518.rs index 1590b7bf3..48f36d5cd 100644 --- a/examples/v1_synthetics_GetAPITestResult_1321866518.rs +++ b/examples/v1_synthetics_GetAPITestResult_1321866518.rs @@ -7,10 +7,10 @@ async fn main() { // there is a "synthetics_api_test_with_wrong_dns" in the system let synthetics_api_test_with_wrong_dns_public_id = std::env::var("SYNTHETICS_API_TEST_WITH_WRONG_DNS_PUBLIC_ID").unwrap(); - // the "synthetics_api_test_with_wrong_dns" is triggered let synthetics_api_test_with_wrong_dns_result_results_0_result_id = std::env::var("SYNTHETICS_API_TEST_WITH_WRONG_DNS_RESULT_RESULTS_0_RESULT_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_synthetics_GetMobileTest.rs b/examples/v1_synthetics_GetMobileTest.rs index bdc714c82..b37c7507f 100644 --- a/examples/v1_synthetics_GetMobileTest.rs +++ b/examples/v1_synthetics_GetMobileTest.rs @@ -7,6 +7,7 @@ async fn main() { // there is a valid "synthetics_mobile_test" in the system let synthetics_mobile_test_public_id = std::env::var("SYNTHETICS_MOBILE_TEST_PUBLIC_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_synthetics_ListTests.rs b/examples/v1_synthetics_ListTests.rs index a4235b0b4..376021c83 100644 --- a/examples/v1_synthetics_ListTests.rs +++ b/examples/v1_synthetics_ListTests.rs @@ -1,5 +1,4 @@ -// Get the list of all Synthetic tests returns "OK - Returns the list of all -// Synthetic tests." response +// Get the list of all Synthetic tests returns "OK - Returns the list of all Synthetic tests." response use datadog_api_client::datadog; use datadog_api_client::datadogV1::api_synthetics::ListTestsOptionalParams; use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI; diff --git a/examples/v1_synthetics_ListTests_1938827783.rs b/examples/v1_synthetics_ListTests_1938827783.rs index 2fe667c06..f83ab1b48 100644 --- a/examples/v1_synthetics_ListTests_1938827783.rs +++ b/examples/v1_synthetics_ListTests_1938827783.rs @@ -1,5 +1,4 @@ -// Get the list of all Synthetic tests returns "OK - Returns the list of all -// Synthetic tests." response with pagination +// Get the list of all Synthetic tests returns "OK - Returns the list of all Synthetic tests." response with pagination use datadog_api_client::datadog; use datadog_api_client::datadogV1::api_synthetics::ListTestsOptionalParams; use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI; @@ -12,6 +11,7 @@ async fn main() { let api = SyntheticsAPI::with_config(configuration); let response = api.list_tests_with_pagination(ListTestsOptionalParams::default().page_size(2)); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v1_synthetics_PatchTest.rs b/examples/v1_synthetics_PatchTest.rs index aabc80046..305f923ad 100644 --- a/examples/v1_synthetics_PatchTest.rs +++ b/examples/v1_synthetics_PatchTest.rs @@ -19,6 +19,7 @@ async fn main() { .op(SyntheticsPatchTestOperationName::REMOVE) .path("/config/assertions/0".to_string()), ]); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_synthetics_TriggerCITests.rs b/examples/v1_synthetics_TriggerCITests.rs index d1aa22518..a1928aa95 100644 --- a/examples/v1_synthetics_TriggerCITests.rs +++ b/examples/v1_synthetics_TriggerCITests.rs @@ -31,6 +31,7 @@ async fn main() { .git(SyntheticsCIBatchMetadataGit::new()), ) .retry(SyntheticsTestOptionsRetry::new())]); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api.trigger_ci_tests(body).await; diff --git a/examples/v1_synthetics_TriggerTests.rs b/examples/v1_synthetics_TriggerTests.rs index 9510c3bf6..bb214b2bb 100644 --- a/examples/v1_synthetics_TriggerTests.rs +++ b/examples/v1_synthetics_TriggerTests.rs @@ -11,6 +11,7 @@ async fn main() { let body = SyntheticsTriggerBody::new(vec![SyntheticsTriggerTest::new( synthetics_api_test_public_id.clone(), )]); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api.trigger_tests(body).await; diff --git a/examples/v1_synthetics_UpdateAPITest.rs b/examples/v1_synthetics_UpdateAPITest.rs index 811cbf7d7..8c2572b85 100644 --- a/examples/v1_synthetics_UpdateAPITest.rs +++ b/examples/v1_synthetics_UpdateAPITest.rs @@ -31,103 +31,8 @@ use std::collections::BTreeMap; async fn main() { // there is a valid "synthetics_api_test" in the system let synthetics_api_test_public_id = std::env::var("SYNTHETICS_API_TEST_PUBLIC_ID").unwrap(); - let body = - SyntheticsAPITest::new( - SyntheticsAPITestConfig::new() - .assertions( - vec![ - SyntheticsAssertion::SyntheticsAssertionTarget( - Box::new( - SyntheticsAssertionTarget::new( - SyntheticsAssertionOperator::IS, - Value::from("text/html"), - SyntheticsAssertionType::HEADER, - ).property("{{ PROPERTY }}".to_string()), - ), - ), - SyntheticsAssertion::SyntheticsAssertionTarget( - Box::new( - SyntheticsAssertionTarget::new( - SyntheticsAssertionOperator::LESS_THAN, - Value::from(2000), - SyntheticsAssertionType::RESPONSE_TIME, - ), - ), - ), - SyntheticsAssertion::SyntheticsAssertionJSONPathTarget( - Box::new( - SyntheticsAssertionJSONPathTarget::new( - SyntheticsAssertionJSONPathOperator::VALIDATES_JSON_PATH, - SyntheticsAssertionType::BODY, - ).target( - SyntheticsAssertionJSONPathTargetTarget::new() - .json_path("topKey".to_string()) - .operator("isNot".to_string()) - .target_value(Value::from("0")), - ), - ), - ), - SyntheticsAssertion::SyntheticsAssertionJSONSchemaTarget( - Box::new( - SyntheticsAssertionJSONSchemaTarget::new( - SyntheticsAssertionJSONSchemaOperator::VALIDATES_JSON_SCHEMA, - SyntheticsAssertionType::BODY, - ).target( - SyntheticsAssertionJSONSchemaTargetTarget::new() - .json_schema( - r#"{"type": "object", "properties":{"slideshow":{"type":"object"}}}"#.to_string(), - ) - .meta_schema(SyntheticsAssertionJSONSchemaMetaSchema::DRAFT_07), - ), - ), - ) - ], - ) - .config_variables( - vec![ - SyntheticsConfigVariable::new("PROPERTY".to_string(), SyntheticsConfigVariableType::TEXT) - .example("content-type".to_string()) - .pattern("content-type".to_string()) - ], - ) - .request( - SyntheticsTestRequest::new() - .certificate( - SyntheticsTestRequestCertificate::new() - .cert( - SyntheticsTestRequestCertificateItem::new() - .filename("cert-filename".to_string()) - .updated_at("2020-10-16T09:23:24.857Z".to_string()), - ) - .key( - SyntheticsTestRequestCertificateItem::new() - .filename("key-filename".to_string()) - .updated_at("2020-10-16T09:23:24.857Z".to_string()), - ), - ) - .headers(BTreeMap::from([("unique".to_string(), "examplesynthetic".to_string())])) - .method("GET".to_string()) - .timeout(10.0 as f64) - .url("https://datadoghq.com".to_string()), - ), - vec!["aws:us-east-2".to_string()], - "BDD test payload: synthetics_api_test_payload.json".to_string(), - "Example-Synthetic-updated".to_string(), - SyntheticsTestOptions::new() - .accept_self_signed(false) - .allow_insecure(true) - .follow_redirects(true) - .min_failure_duration(10) - .min_location_failed(1) - .monitor_name("Test-TestSyntheticsAPITestLifecycle-1623076664".to_string()) - .monitor_priority(5) - .retry(SyntheticsTestOptionsRetry::new().count(3).interval(10.0 as f64)) - .tick_every(60), - SyntheticsAPITestType::API, - ) - .status(SyntheticsTestPauseStatus::LIVE) - .subtype(SyntheticsTestDetailsSubType::HTTP) - .tags(vec!["testing:api".to_string()]); + let body = SyntheticsAPITest::new(SyntheticsAPITestConfig::new().assertions(vec![SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(SyntheticsAssertionTarget::new(SyntheticsAssertionOperator::IS, Value::from("text/html"), SyntheticsAssertionType::HEADER, ).property("{{ PROPERTY }}".to_string()))),SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(SyntheticsAssertionTarget::new(SyntheticsAssertionOperator::LESS_THAN, Value::from(2000), SyntheticsAssertionType::RESPONSE_TIME, ))),SyntheticsAssertion::SyntheticsAssertionJSONPathTarget(Box::new(SyntheticsAssertionJSONPathTarget::new(SyntheticsAssertionJSONPathOperator::VALIDATES_JSON_PATH, SyntheticsAssertionType::BODY, ).target(SyntheticsAssertionJSONPathTargetTarget::new().json_path("topKey".to_string()).operator("isNot".to_string()).target_value(Value::from("0"))))),SyntheticsAssertion::SyntheticsAssertionJSONSchemaTarget(Box::new(SyntheticsAssertionJSONSchemaTarget::new(SyntheticsAssertionJSONSchemaOperator::VALIDATES_JSON_SCHEMA, SyntheticsAssertionType::BODY, ).target(SyntheticsAssertionJSONSchemaTargetTarget::new().json_schema(r#"{"type": "object", "properties":{"slideshow":{"type":"object"}}}"#.to_string()).meta_schema(SyntheticsAssertionJSONSchemaMetaSchema::DRAFT_07)))),]).config_variables(vec![SyntheticsConfigVariable::new("PROPERTY".to_string(), SyntheticsConfigVariableType::TEXT, ).example("content-type".to_string()).pattern("content-type".to_string()),]).request(SyntheticsTestRequest::new().certificate(SyntheticsTestRequestCertificate::new().cert(SyntheticsTestRequestCertificateItem::new().filename("cert-filename".to_string()).updated_at("2020-10-16T09:23:24.857Z".to_string())).key(SyntheticsTestRequestCertificateItem::new().filename("key-filename".to_string()).updated_at("2020-10-16T09:23:24.857Z".to_string()))).headers(BTreeMap::from([("unique".to_string(), "examplesynthetic".to_string()),])).method("GET".to_string()).timeout(10.0 as f64).url("https://datadoghq.com".to_string())), vec!["aws:us-east-2".to_string(),], "BDD test payload: synthetics_api_test_payload.json".to_string(), "Example-Synthetic-updated".to_string(), SyntheticsTestOptions::new().accept_self_signed(false).allow_insecure(true).follow_redirects(true).min_failure_duration(10).min_location_failed(1).monitor_name("Test-TestSyntheticsAPITestLifecycle-1623076664".to_string()).monitor_priority(5).retry(SyntheticsTestOptionsRetry::new().count(3).interval(10.0 as f64)).tick_every(60), SyntheticsAPITestType::API, ).status(SyntheticsTestPauseStatus::LIVE).subtype(SyntheticsTestDetailsSubType::HTTP).tags(vec!["testing:api".to_string(),]); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_synthetics_UpdateBrowserTest.rs b/examples/v1_synthetics_UpdateBrowserTest.rs index 1fdb3f430..7bdd5d093 100644 --- a/examples/v1_synthetics_UpdateBrowserTest.rs +++ b/examples/v1_synthetics_UpdateBrowserTest.rs @@ -110,6 +110,7 @@ async fn main() { SyntheticsStep::new().type_(SyntheticsStepType::ASSERT_ELEMENT_CONTENT) ]) .tags(vec!["env:prod".to_string()]); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api.update_browser_test("public_id".to_string(), body).await; diff --git a/examples/v1_synthetics_UpdateMobileTest.rs b/examples/v1_synthetics_UpdateMobileTest.rs index 1737ae9b6..e4d7cfe29 100644 --- a/examples/v1_synthetics_UpdateMobileTest.rs +++ b/examples/v1_synthetics_UpdateMobileTest.rs @@ -31,6 +31,7 @@ async fn main() { .message("".to_string()) .status(SyntheticsTestPauseStatus::PAUSED) .steps(vec![]); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_synthetics_UpdatePrivateLocation.rs b/examples/v1_synthetics_UpdatePrivateLocation.rs index ede748e38..c4be99635 100644 --- a/examples/v1_synthetics_UpdatePrivateLocation.rs +++ b/examples/v1_synthetics_UpdatePrivateLocation.rs @@ -15,6 +15,7 @@ async fn main() { SyntheticsPrivateLocationMetadata::new() .restricted_roles(vec!["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".to_string()]), ); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_synthetics_UpdateTestPauseStatus.rs b/examples/v1_synthetics_UpdateTestPauseStatus.rs index 4771bfcc1..b08c77b82 100644 --- a/examples/v1_synthetics_UpdateTestPauseStatus.rs +++ b/examples/v1_synthetics_UpdateTestPauseStatus.rs @@ -1,5 +1,4 @@ -// Pause or start a test returns "OK - Returns a boolean indicating if the update -// was successful." response +// Pause or start a test returns "OK - Returns a boolean indicating if the update was successful." response use datadog_api_client::datadog; use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI; use datadog_api_client::datadogV1::model::SyntheticsTestPauseStatus; @@ -9,6 +8,7 @@ use datadog_api_client::datadogV1::model::SyntheticsUpdateTestPauseStatusPayload async fn main() { let body = SyntheticsUpdateTestPauseStatusPayload::new().new_status(SyntheticsTestPauseStatus::LIVE); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_tags_CreateHostTags.rs b/examples/v1_tags_CreateHostTags.rs index 57a9d0353..fbfa175a9 100644 --- a/examples/v1_tags_CreateHostTags.rs +++ b/examples/v1_tags_CreateHostTags.rs @@ -9,6 +9,7 @@ async fn main() { let body = HostTags::new() .host("test.host".to_string()) .tags(vec!["environment:production".to_string()]); + let configuration = datadog::Configuration::new(); let api = TagsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_tags_UpdateHostTags.rs b/examples/v1_tags_UpdateHostTags.rs index 7e1c24992..0117fa3ca 100644 --- a/examples/v1_tags_UpdateHostTags.rs +++ b/examples/v1_tags_UpdateHostTags.rs @@ -9,6 +9,7 @@ async fn main() { let body = HostTags::new() .host("test.host".to_string()) .tags(vec!["environment:production".to_string()]); + let configuration = datadog::Configuration::new(); let api = TagsAPI::with_config(configuration); let resp = api diff --git a/examples/v1_usage-metering_GetMonthlyUsageAttribution_3849653599.rs b/examples/v1_usage-metering_GetMonthlyUsageAttribution_3849653599.rs index e1d613f29..eb2da62ab 100644 --- a/examples/v1_usage-metering_GetMonthlyUsageAttribution_3849653599.rs +++ b/examples/v1_usage-metering_GetMonthlyUsageAttribution_3849653599.rs @@ -10,6 +10,7 @@ async fn main() { // there is a valid "monthly_usage_attribution" response let monthly_usage_attribution_metadata_pagination_next_record_id = std::env::var("MONTHLY_USAGE_ATTRIBUTION_METADATA_PAGINATION_NEXT_RECORD_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = UsageMeteringAPI::with_config(configuration); let resp = api diff --git a/examples/v1_users_CreateUser.rs b/examples/v1_users_CreateUser.rs index d698f91f0..9d3663df3 100644 --- a/examples/v1_users_CreateUser.rs +++ b/examples/v1_users_CreateUser.rs @@ -12,6 +12,7 @@ async fn main() { .email("test@datadoghq.com".to_string()) .handle("test@datadoghq.com".to_string()) .name("test user".to_string()); + let configuration = datadog::Configuration::new(); let api = UsersAPI::with_config(configuration); let resp = api.create_user(body).await; diff --git a/examples/v1_users_CreateUser_266604071.rs b/examples/v1_users_CreateUser_266604071.rs index 3ffa62902..a6bc52799 100644 --- a/examples/v1_users_CreateUser_266604071.rs +++ b/examples/v1_users_CreateUser_266604071.rs @@ -11,6 +11,7 @@ async fn main() { .email("test@datadoghq.com".to_string()) .handle("test@datadoghq.com".to_string()) .name("test user".to_string()); + let configuration = datadog::Configuration::new(); let api = UsersAPI::with_config(configuration); let resp = api.create_user(body).await; diff --git a/examples/v1_users_UpdateUser.rs b/examples/v1_users_UpdateUser.rs index f0fb2f91c..ed45642b4 100644 --- a/examples/v1_users_UpdateUser.rs +++ b/examples/v1_users_UpdateUser.rs @@ -12,6 +12,7 @@ async fn main() { .email("test@datadoghq.com".to_string()) .handle("test@datadoghq.com".to_string()) .name("test user".to_string()); + let configuration = datadog::Configuration::new(); let api = UsersAPI::with_config(configuration); let resp = api diff --git a/examples/v1_webhooks-integration_CreateWebhooksIntegration.rs b/examples/v1_webhooks-integration_CreateWebhooksIntegration.rs index c20efe09c..1d6a1dd10 100644 --- a/examples/v1_webhooks-integration_CreateWebhooksIntegration.rs +++ b/examples/v1_webhooks-integration_CreateWebhooksIntegration.rs @@ -9,6 +9,7 @@ async fn main() { "Example-Webhooks-Integration".to_string(), "https://example.com/webhook".to_string(), ); + let configuration = datadog::Configuration::new(); let api = WebhooksIntegrationAPI::with_config(configuration); let resp = api.create_webhooks_integration(body).await; diff --git a/examples/v1_webhooks-integration_CreateWebhooksIntegrationCustomVariable.rs b/examples/v1_webhooks-integration_CreateWebhooksIntegrationCustomVariable.rs index ae437e723..8012c8030 100644 --- a/examples/v1_webhooks-integration_CreateWebhooksIntegrationCustomVariable.rs +++ b/examples/v1_webhooks-integration_CreateWebhooksIntegrationCustomVariable.rs @@ -10,6 +10,7 @@ async fn main() { "EXAMPLEWEBHOOKSINTEGRATION".to_string(), "CUSTOM_VARIABLE_VALUE".to_string(), ); + let configuration = datadog::Configuration::new(); let api = WebhooksIntegrationAPI::with_config(configuration); let resp = api.create_webhooks_integration_custom_variable(body).await; diff --git a/examples/v1_webhooks-integration_DeleteWebhooksIntegration.rs b/examples/v1_webhooks-integration_DeleteWebhooksIntegration.rs index 318dc3038..6ece4ff28 100644 --- a/examples/v1_webhooks-integration_DeleteWebhooksIntegration.rs +++ b/examples/v1_webhooks-integration_DeleteWebhooksIntegration.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV1::api_webhooks_integration::WebhooksIntegration async fn main() { // there is a valid "webhook" in the system let webhook_name = std::env::var("WEBHOOK_NAME").unwrap(); + let configuration = datadog::Configuration::new(); let api = WebhooksIntegrationAPI::with_config(configuration); let resp = api.delete_webhooks_integration(webhook_name.clone()).await; diff --git a/examples/v1_webhooks-integration_DeleteWebhooksIntegrationCustomVariable.rs b/examples/v1_webhooks-integration_DeleteWebhooksIntegrationCustomVariable.rs index 6b78cd87a..1eea7564e 100644 --- a/examples/v1_webhooks-integration_DeleteWebhooksIntegrationCustomVariable.rs +++ b/examples/v1_webhooks-integration_DeleteWebhooksIntegrationCustomVariable.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV1::api_webhooks_integration::WebhooksIntegration async fn main() { // there is a valid "webhook_custom_variable" in the system let webhook_custom_variable_name = std::env::var("WEBHOOK_CUSTOM_VARIABLE_NAME").unwrap(); + let configuration = datadog::Configuration::new(); let api = WebhooksIntegrationAPI::with_config(configuration); let resp = api diff --git a/examples/v1_webhooks-integration_GetWebhooksIntegration.rs b/examples/v1_webhooks-integration_GetWebhooksIntegration.rs index a5e0c0ce4..32f4fc910 100644 --- a/examples/v1_webhooks-integration_GetWebhooksIntegration.rs +++ b/examples/v1_webhooks-integration_GetWebhooksIntegration.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV1::api_webhooks_integration::WebhooksIntegration async fn main() { // there is a valid "webhook" in the system let webhook_name = std::env::var("WEBHOOK_NAME").unwrap(); + let configuration = datadog::Configuration::new(); let api = WebhooksIntegrationAPI::with_config(configuration); let resp = api.get_webhooks_integration(webhook_name.clone()).await; diff --git a/examples/v1_webhooks-integration_UpdateWebhooksIntegration.rs b/examples/v1_webhooks-integration_UpdateWebhooksIntegration.rs index 2166c24af..d22e7e29b 100644 --- a/examples/v1_webhooks-integration_UpdateWebhooksIntegration.rs +++ b/examples/v1_webhooks-integration_UpdateWebhooksIntegration.rs @@ -9,6 +9,7 @@ async fn main() { let webhook_name = std::env::var("WEBHOOK_NAME").unwrap(); let body = WebhooksIntegrationUpdateRequest::new() .url("https://example.com/webhook-updated".to_string()); + let configuration = datadog::Configuration::new(); let api = WebhooksIntegrationAPI::with_config(configuration); let resp = api diff --git a/examples/v1_webhooks-integration_UpdateWebhooksIntegrationCustomVariable.rs b/examples/v1_webhooks-integration_UpdateWebhooksIntegrationCustomVariable.rs index 9209ca3d4..dc27c5073 100644 --- a/examples/v1_webhooks-integration_UpdateWebhooksIntegrationCustomVariable.rs +++ b/examples/v1_webhooks-integration_UpdateWebhooksIntegrationCustomVariable.rs @@ -9,6 +9,7 @@ async fn main() { let webhook_custom_variable_name = std::env::var("WEBHOOK_CUSTOM_VARIABLE_NAME").unwrap(); let body = WebhooksIntegrationCustomVariableUpdateRequest::new().value("variable-updated".to_string()); + let configuration = datadog::Configuration::new(); let api = WebhooksIntegrationAPI::with_config(configuration); let resp = api diff --git a/examples/v2_api-management_DeleteOpenAPI.rs b/examples/v2_api-management_DeleteOpenAPI.rs index 494de177d..ab6a57331 100644 --- a/examples/v2_api-management_DeleteOpenAPI.rs +++ b/examples/v2_api-management_DeleteOpenAPI.rs @@ -7,6 +7,7 @@ async fn main() { // there is a valid "managed_api" in the system let managed_api_data_id = uuid::Uuid::parse_str(&std::env::var("MANAGED_API_DATA_ID").unwrap()) .expect("Invalid UUID"); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.DeleteOpenAPI", true); let api = APIManagementAPI::with_config(configuration); diff --git a/examples/v2_api-management_GetOpenAPI.rs b/examples/v2_api-management_GetOpenAPI.rs index cab03d11f..38f29091e 100644 --- a/examples/v2_api-management_GetOpenAPI.rs +++ b/examples/v2_api-management_GetOpenAPI.rs @@ -7,6 +7,7 @@ async fn main() { // there is a valid "managed_api" in the system let managed_api_data_id = uuid::Uuid::parse_str(&std::env::var("MANAGED_API_DATA_ID").unwrap()) .expect("Invalid UUID"); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.GetOpenAPI", true); let api = APIManagementAPI::with_config(configuration); diff --git a/examples/v2_api-management_UpdateOpenAPI.rs b/examples/v2_api-management_UpdateOpenAPI.rs index bd4eb1568..011e25354 100644 --- a/examples/v2_api-management_UpdateOpenAPI.rs +++ b/examples/v2_api-management_UpdateOpenAPI.rs @@ -9,6 +9,7 @@ async fn main() { // there is a valid "managed_api" in the system let managed_api_data_id = uuid::Uuid::parse_str(&std::env::var("MANAGED_API_DATA_ID").unwrap()) .expect("Invalid UUID"); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.UpdateOpenAPI", true); let api = APIManagementAPI::with_config(configuration); diff --git a/examples/v2_apm-retention-filters_CreateApmRetentionFilter.rs b/examples/v2_apm-retention-filters_CreateApmRetentionFilter.rs index 176bd400e..917949cef 100644 --- a/examples/v2_apm-retention-filters_CreateApmRetentionFilter.rs +++ b/examples/v2_apm-retention-filters_CreateApmRetentionFilter.rs @@ -20,6 +20,7 @@ async fn main() { ), ApmRetentionFilterType::apm_retention_filter, )); + let configuration = datadog::Configuration::new(); let api = APMRetentionFiltersAPI::with_config(configuration); let resp = api.create_apm_retention_filter(body).await; diff --git a/examples/v2_apm-retention-filters_DeleteApmRetentionFilter.rs b/examples/v2_apm-retention-filters_DeleteApmRetentionFilter.rs index ef5b44976..0ab477378 100644 --- a/examples/v2_apm-retention-filters_DeleteApmRetentionFilter.rs +++ b/examples/v2_apm-retention-filters_DeleteApmRetentionFilter.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_apm_retention_filters::APMRetentionFilter async fn main() { // there is a valid "retention_filter" in the system let retention_filter_data_id = std::env::var("RETENTION_FILTER_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = APMRetentionFiltersAPI::with_config(configuration); let resp = api diff --git a/examples/v2_apm-retention-filters_GetApmRetentionFilter.rs b/examples/v2_apm-retention-filters_GetApmRetentionFilter.rs index 79f7ef13e..1d17ae0ab 100644 --- a/examples/v2_apm-retention-filters_GetApmRetentionFilter.rs +++ b/examples/v2_apm-retention-filters_GetApmRetentionFilter.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_apm_retention_filters::APMRetentionFilter async fn main() { // there is a valid "retention_filter" in the system let retention_filter_data_id = std::env::var("RETENTION_FILTER_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = APMRetentionFiltersAPI::with_config(configuration); let resp = api diff --git a/examples/v2_apm-retention-filters_ReorderApmRetentionFilters.rs b/examples/v2_apm-retention-filters_ReorderApmRetentionFilters.rs index 893c017ec..88030bcb4 100644 --- a/examples/v2_apm-retention-filters_ReorderApmRetentionFilters.rs +++ b/examples/v2_apm-retention-filters_ReorderApmRetentionFilters.rs @@ -17,6 +17,7 @@ async fn main() { ApmRetentionFilterType::apm_retention_filter, ), ]); + let configuration = datadog::Configuration::new(); let api = APMRetentionFiltersAPI::with_config(configuration); let resp = api.reorder_apm_retention_filters(body).await; diff --git a/examples/v2_apm-retention-filters_UpdateApmRetentionFilter.rs b/examples/v2_apm-retention-filters_UpdateApmRetentionFilter.rs index 94ec45bad..f7c434729 100644 --- a/examples/v2_apm-retention-filters_UpdateApmRetentionFilter.rs +++ b/examples/v2_apm-retention-filters_UpdateApmRetentionFilter.rs @@ -23,6 +23,7 @@ async fn main() { "test-id".to_string(), ApmRetentionFilterType::apm_retention_filter, )); + let configuration = datadog::Configuration::new(); let api = APMRetentionFiltersAPI::with_config(configuration); let resp = api diff --git a/examples/v2_apps_CreateApp.rs b/examples/v2_apps_CreateApp.rs index 8a7eb8516..bbf0a22b3 100644 --- a/examples/v2_apps_CreateApp.rs +++ b/examples/v2_apps_CreateApp.rs @@ -43,6 +43,7 @@ async fn main() { .root_instance_name("grid0".to_string()), ), ); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.CreateApp", true); let api = AppsAPI::with_config(configuration); diff --git a/examples/v2_apps_DeleteApp.rs b/examples/v2_apps_DeleteApp.rs index 43eb44227..2b321b2b2 100644 --- a/examples/v2_apps_DeleteApp.rs +++ b/examples/v2_apps_DeleteApp.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_apps::AppsAPI; async fn main() { // there is a valid "app" in the system let app_data_id = std::env::var("APP_DATA_ID").unwrap(); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.DeleteApp", true); let api = AppsAPI::with_config(configuration); diff --git a/examples/v2_apps_DeleteApps.rs b/examples/v2_apps_DeleteApps.rs index 59491dd2a..04b1f81f4 100644 --- a/examples/v2_apps_DeleteApps.rs +++ b/examples/v2_apps_DeleteApps.rs @@ -13,6 +13,7 @@ async fn main() { app_data_id.clone(), DeleteAppsRequestDataItemsType::APPDEFINITIONS, )]); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.DeleteApps", true); let api = AppsAPI::with_config(configuration); diff --git a/examples/v2_apps_DeployApp.rs b/examples/v2_apps_DeployApp.rs index f3ddbaa99..e5500a42e 100644 --- a/examples/v2_apps_DeployApp.rs +++ b/examples/v2_apps_DeployApp.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_apps::AppsAPI; async fn main() { // there is a valid "app" in the system let app_data_id = std::env::var("APP_DATA_ID").unwrap(); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.DeployApp", true); let api = AppsAPI::with_config(configuration); diff --git a/examples/v2_apps_DisableApp.rs b/examples/v2_apps_DisableApp.rs index 93345080a..d7ac2b030 100644 --- a/examples/v2_apps_DisableApp.rs +++ b/examples/v2_apps_DisableApp.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_apps::AppsAPI; async fn main() { // there is a valid "app" in the system let app_data_id = std::env::var("APP_DATA_ID").unwrap(); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.DisableApp", true); let api = AppsAPI::with_config(configuration); diff --git a/examples/v2_apps_GetApp.rs b/examples/v2_apps_GetApp.rs index 2ed077e44..d60c0e559 100644 --- a/examples/v2_apps_GetApp.rs +++ b/examples/v2_apps_GetApp.rs @@ -7,6 +7,7 @@ use datadog_api_client::datadogV2::api_apps::GetAppOptionalParams; async fn main() { // there is a valid "app" in the system let app_data_id = std::env::var("APP_DATA_ID").unwrap(); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.GetApp", true); let api = AppsAPI::with_config(configuration); diff --git a/examples/v2_apps_UpdateApp.rs b/examples/v2_apps_UpdateApp.rs index b04fc833a..2fd9e3e1f 100644 --- a/examples/v2_apps_UpdateApp.rs +++ b/examples/v2_apps_UpdateApp.rs @@ -19,6 +19,7 @@ async fn main() { ) .id(app_data_id.clone()), ); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.UpdateApp", true); let api = AppsAPI::with_config(configuration); diff --git a/examples/v2_audit_ListAuditLogs_1275402458.rs b/examples/v2_audit_ListAuditLogs_1275402458.rs index 2a5465cb3..f3e463a98 100644 --- a/examples/v2_audit_ListAuditLogs_1275402458.rs +++ b/examples/v2_audit_ListAuditLogs_1275402458.rs @@ -12,6 +12,7 @@ async fn main() { let response = api.list_audit_logs_with_pagination(ListAuditLogsOptionalParams::default().page_limit(2)); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_audit_SearchAuditLogs.rs b/examples/v2_audit_SearchAuditLogs.rs index c003289fc..f9469e56d 100644 --- a/examples/v2_audit_SearchAuditLogs.rs +++ b/examples/v2_audit_SearchAuditLogs.rs @@ -24,6 +24,7 @@ async fn main() { ) .page(AuditLogsQueryPageOptions::new().limit(25)) .sort(AuditLogsSort::TIMESTAMP_ASCENDING); + let configuration = datadog::Configuration::new(); let api = AuditAPI::with_config(configuration); let resp = api diff --git a/examples/v2_audit_SearchAuditLogs_3215529662.rs b/examples/v2_audit_SearchAuditLogs_3215529662.rs index 6c6e509b0..00da0f33b 100644 --- a/examples/v2_audit_SearchAuditLogs_3215529662.rs +++ b/examples/v2_audit_SearchAuditLogs_3215529662.rs @@ -21,11 +21,13 @@ async fn main() { .options(AuditLogsQueryOptions::new().timezone("GMT".to_string())) .page(AuditLogsQueryPageOptions::new().limit(2)) .sort(AuditLogsSort::TIMESTAMP_ASCENDING); + let configuration = datadog::Configuration::new(); let api = AuditAPI::with_config(configuration); let response = api.search_audit_logs_with_pagination(SearchAuditLogsOptionalParams::default().body(body)); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_authn-mappings_CreateAuthNMapping.rs b/examples/v2_authn-mappings_CreateAuthNMapping.rs index add303926..4d5bc5c55 100644 --- a/examples/v2_authn-mappings_CreateAuthNMapping.rs +++ b/examples/v2_authn-mappings_CreateAuthNMapping.rs @@ -34,6 +34,7 @@ async fn main() { )), ), ); + let configuration = datadog::Configuration::new(); let api = AuthNMappingsAPI::with_config(configuration); let resp = api.create_authn_mapping(body).await; diff --git a/examples/v2_authn-mappings_DeleteAuthNMapping.rs b/examples/v2_authn-mappings_DeleteAuthNMapping.rs index 42c497781..466d4f301 100644 --- a/examples/v2_authn-mappings_DeleteAuthNMapping.rs +++ b/examples/v2_authn-mappings_DeleteAuthNMapping.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_authn_mappings::AuthNMappingsAPI; async fn main() { // there is a valid "authn_mapping" in the system let authn_mapping_data_id = std::env::var("AUTHN_MAPPING_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = AuthNMappingsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_authn-mappings_GetAuthNMapping.rs b/examples/v2_authn-mappings_GetAuthNMapping.rs index 53f4850e3..3671f4ffd 100644 --- a/examples/v2_authn-mappings_GetAuthNMapping.rs +++ b/examples/v2_authn-mappings_GetAuthNMapping.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_authn_mappings::AuthNMappingsAPI; async fn main() { // there is a valid "authn_mapping" in the system let authn_mapping_data_id = std::env::var("AUTHN_MAPPING_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = AuthNMappingsAPI::with_config(configuration); let resp = api.get_authn_mapping(authn_mapping_data_id.clone()).await; diff --git a/examples/v2_authn-mappings_UpdateAuthNMapping.rs b/examples/v2_authn-mappings_UpdateAuthNMapping.rs index d5951b584..a02192b28 100644 --- a/examples/v2_authn-mappings_UpdateAuthNMapping.rs +++ b/examples/v2_authn-mappings_UpdateAuthNMapping.rs @@ -15,7 +15,6 @@ use datadog_api_client::datadogV2::model::RolesType; async fn main() { // there is a valid "authn_mapping" in the system let authn_mapping_data_id = std::env::var("AUTHN_MAPPING_DATA_ID").unwrap(); - // there is a valid "role" in the system let role_data_id = std::env::var("ROLE_DATA_ID").unwrap(); let body = AuthNMappingUpdateRequest::new( @@ -40,6 +39,7 @@ async fn main() { )), ), ); + let configuration = datadog::Configuration::new(); let api = AuthNMappingsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_aws-integration_CreateAWSAccount.rs b/examples/v2_aws-integration_CreateAWSAccount.rs index 340321c69..4c199b307 100644 --- a/examples/v2_aws-integration_CreateAWSAccount.rs +++ b/examples/v2_aws-integration_CreateAWSAccount.rs @@ -55,6 +55,7 @@ async fn main() { .traces_config(AWSTracesConfig::new()), AWSAccountType::ACCOUNT, )); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.CreateAWSAccount", true); let api = AWSIntegrationAPI::with_config(configuration); diff --git a/examples/v2_aws-integration_CreateAWSAccount_1716720881.rs b/examples/v2_aws-integration_CreateAWSAccount_1716720881.rs index 5abbbe927..dffd03e59 100644 --- a/examples/v2_aws-integration_CreateAWSAccount_1716720881.rs +++ b/examples/v2_aws-integration_CreateAWSAccount_1716720881.rs @@ -54,6 +54,7 @@ async fn main() { .traces_config(AWSTracesConfig::new()), AWSAccountType::ACCOUNT, )); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.CreateAWSAccount", true); let api = AWSIntegrationAPI::with_config(configuration); diff --git a/examples/v2_aws-integration_DeleteAWSAccount.rs b/examples/v2_aws-integration_DeleteAWSAccount.rs index 852b9218b..b2686a06a 100644 --- a/examples/v2_aws-integration_DeleteAWSAccount.rs +++ b/examples/v2_aws-integration_DeleteAWSAccount.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_aws_integration::AWSIntegrationAPI; async fn main() { // there is a valid "aws_account_v2" in the system let aws_account_v2_data_id = std::env::var("AWS_ACCOUNT_V2_DATA_ID").unwrap(); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.DeleteAWSAccount", true); let api = AWSIntegrationAPI::with_config(configuration); diff --git a/examples/v2_aws-integration_GetAWSAccount.rs b/examples/v2_aws-integration_GetAWSAccount.rs index 644ca5c98..ae5f6acf7 100644 --- a/examples/v2_aws-integration_GetAWSAccount.rs +++ b/examples/v2_aws-integration_GetAWSAccount.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_aws_integration::AWSIntegrationAPI; async fn main() { // there is a valid "aws_account_v2" in the system let aws_account_v2_data_id = std::env::var("AWS_ACCOUNT_V2_DATA_ID").unwrap(); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.GetAWSAccount", true); let api = AWSIntegrationAPI::with_config(configuration); diff --git a/examples/v2_aws-integration_UpdateAWSAccount.rs b/examples/v2_aws-integration_UpdateAWSAccount.rs index 95099ad9b..370f5dfd9 100644 --- a/examples/v2_aws-integration_UpdateAWSAccount.rs +++ b/examples/v2_aws-integration_UpdateAWSAccount.rs @@ -19,52 +19,8 @@ use datadog_api_client::datadogV2::model::AWSTracesConfig; async fn main() { // there is a valid "aws_account_v2" in the system let aws_account_v2_data_id = std::env::var("AWS_ACCOUNT_V2_DATA_ID").unwrap(); - let body = - AWSAccountUpdateRequest::new( - AWSAccountUpdateRequestData::new( - AWSAccountUpdateRequestAttributes::new("123456789012".to_string()) - .account_tags(Some(vec!["key:value".to_string()])) - .auth_config( - AWSAuthConfig::AWSAuthConfigRole( - Box::new(AWSAuthConfigRole::new("DatadogIntegrationRole".to_string())), - ), - ) - .aws_partition(AWSAccountPartition::AWS) - .logs_config( - AWSLogsConfig - ::new().lambda_forwarder( - AWSLambdaForwarderConfig::new() - .lambdas( - vec![ - "arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder".to_string() - ], - ) - .sources(vec!["s3".to_string()]), - ), - ) - .metrics_config( - AWSMetricsConfig::new() - .automute_enabled(true) - .collect_cloudwatch_alarms(true) - .collect_custom_metrics(true) - .enabled(true) - .tag_filters( - vec![ - AWSNamespaceTagFilter::new() - .namespace("AWS/EC2".to_string()) - .tags(Some(vec!["key:value".to_string()])) - ], - ), - ) - .resources_config( - AWSResourcesConfig::new() - .cloud_security_posture_management_collection(false) - .extended_collection(false), - ) - .traces_config(AWSTracesConfig::new()), - AWSAccountType::ACCOUNT, - ), - ); + let body = AWSAccountUpdateRequest::new(AWSAccountUpdateRequestData::new(AWSAccountUpdateRequestAttributes::new("123456789012".to_string(), ).account_tags(Some(vec!["key:value".to_string(),])).auth_config(AWSAuthConfig::AWSAuthConfigRole(Box::new(AWSAuthConfigRole::new("DatadogIntegrationRole".to_string(), )))).aws_partition(AWSAccountPartition::AWS).logs_config(AWSLogsConfig::new().lambda_forwarder(AWSLambdaForwarderConfig::new().lambdas(vec!["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder".to_string(),]).sources(vec!["s3".to_string(),]))).metrics_config(AWSMetricsConfig::new().automute_enabled(true).collect_cloudwatch_alarms(true).collect_custom_metrics(true).enabled(true).tag_filters(vec![AWSNamespaceTagFilter::new().namespace("AWS/EC2".to_string()).tags(Some(vec!["key:value".to_string(),])),])).resources_config(AWSResourcesConfig::new().cloud_security_posture_management_collection(false).extended_collection(false)).traces_config(AWSTracesConfig::new()), AWSAccountType::ACCOUNT, ), ); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.UpdateAWSAccount", true); let api = AWSIntegrationAPI::with_config(configuration); diff --git a/examples/v2_aws-logs-integration_ListAWSLogsServices.rs b/examples/v2_aws-logs-integration_ListAWSLogsServices.rs index 80aef3080..f02d43639 100644 --- a/examples/v2_aws-logs-integration_ListAWSLogsServices.rs +++ b/examples/v2_aws-logs-integration_ListAWSLogsServices.rs @@ -1,5 +1,4 @@ -// Get list of AWS log ready services returns "AWS Logs Services List object" -// response +// Get list of AWS log ready services returns "AWS Logs Services List object" response use datadog_api_client::datadog; use datadog_api_client::datadogV2::api_aws_logs_integration::AWSLogsIntegrationAPI; diff --git a/examples/v2_case-management_ArchiveCase.rs b/examples/v2_case-management_ArchiveCase.rs index 7c7dde0b9..10ea27a7e 100644 --- a/examples/v2_case-management_ArchiveCase.rs +++ b/examples/v2_case-management_ArchiveCase.rs @@ -10,6 +10,7 @@ async fn main() { // there is a valid "case" in the system let case_id = std::env::var("CASE_ID").unwrap(); let body = CaseEmptyRequest::new(CaseEmpty::new(CaseResourceType::CASE)); + let configuration = datadog::Configuration::new(); let api = CaseManagementAPI::with_config(configuration); let resp = api.archive_case(case_id.clone(), body).await; diff --git a/examples/v2_case-management_AssignCase.rs b/examples/v2_case-management_AssignCase.rs index e978f2177..f3f4e3f37 100644 --- a/examples/v2_case-management_AssignCase.rs +++ b/examples/v2_case-management_AssignCase.rs @@ -10,13 +10,13 @@ use datadog_api_client::datadogV2::model::CaseResourceType; async fn main() { // there is a valid "case" in the system let case_id = std::env::var("CASE_ID").unwrap(); - // there is a valid "user" in the system let user_data_id = std::env::var("USER_DATA_ID").unwrap(); let body = CaseAssignRequest::new(CaseAssign::new( CaseAssignAttributes::new(user_data_id.clone()), CaseResourceType::CASE, )); + let configuration = datadog::Configuration::new(); let api = CaseManagementAPI::with_config(configuration); let resp = api.assign_case(case_id.clone(), body).await; diff --git a/examples/v2_case-management_CreateCase.rs b/examples/v2_case-management_CreateCase.rs index 073f6853b..a2f10d1f6 100644 --- a/examples/v2_case-management_CreateCase.rs +++ b/examples/v2_case-management_CreateCase.rs @@ -38,6 +38,7 @@ async fn main() { )))), ), ); + let configuration = datadog::Configuration::new(); let api = CaseManagementAPI::with_config(configuration); let resp = api.create_case(body).await; diff --git a/examples/v2_case-management_CreateProject.rs b/examples/v2_case-management_CreateProject.rs index 91a594471..9bd5990e2 100644 --- a/examples/v2_case-management_CreateProject.rs +++ b/examples/v2_case-management_CreateProject.rs @@ -12,6 +12,7 @@ async fn main() { ProjectCreateAttributes::new("SEC".to_string(), "Security Investigation".to_string()), ProjectResourceType::PROJECT, )); + let configuration = datadog::Configuration::new(); let api = CaseManagementAPI::with_config(configuration); let resp = api.create_project(body).await; diff --git a/examples/v2_case-management_GetCase.rs b/examples/v2_case-management_GetCase.rs index 4da9caefb..f278fed41 100644 --- a/examples/v2_case-management_GetCase.rs +++ b/examples/v2_case-management_GetCase.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_case_management::CaseManagementAPI; async fn main() { // there is a valid "case" in the system let case_id = std::env::var("CASE_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = CaseManagementAPI::with_config(configuration); let resp = api.get_case(case_id.clone()).await; diff --git a/examples/v2_case-management_SearchCases_3433960044.rs b/examples/v2_case-management_SearchCases_3433960044.rs index 298771abc..1e551d841 100644 --- a/examples/v2_case-management_SearchCases_3433960044.rs +++ b/examples/v2_case-management_SearchCases_3433960044.rs @@ -11,6 +11,7 @@ async fn main() { let api = CaseManagementAPI::with_config(configuration); let response = api.search_cases_with_pagination(SearchCasesOptionalParams::default()); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_case-management_UnarchiveCase.rs b/examples/v2_case-management_UnarchiveCase.rs index 623887410..df63fb2a8 100644 --- a/examples/v2_case-management_UnarchiveCase.rs +++ b/examples/v2_case-management_UnarchiveCase.rs @@ -10,6 +10,7 @@ async fn main() { // there is a valid "case" in the system let case_id = std::env::var("CASE_ID").unwrap(); let body = CaseEmptyRequest::new(CaseEmpty::new(CaseResourceType::CASE)); + let configuration = datadog::Configuration::new(); let api = CaseManagementAPI::with_config(configuration); let resp = api.unarchive_case(case_id.clone(), body).await; diff --git a/examples/v2_case-management_UnassignCase.rs b/examples/v2_case-management_UnassignCase.rs index b5b5b74ae..dee3c19e0 100644 --- a/examples/v2_case-management_UnassignCase.rs +++ b/examples/v2_case-management_UnassignCase.rs @@ -10,6 +10,7 @@ async fn main() { // there is a valid "case" in the system let case_id = std::env::var("CASE_ID").unwrap(); let body = CaseEmptyRequest::new(CaseEmpty::new(CaseResourceType::CASE)); + let configuration = datadog::Configuration::new(); let api = CaseManagementAPI::with_config(configuration); let resp = api.unassign_case(case_id.clone(), body).await; diff --git a/examples/v2_case-management_UpdatePriority.rs b/examples/v2_case-management_UpdatePriority.rs index 1e0e33b14..3b0ea2c96 100644 --- a/examples/v2_case-management_UpdatePriority.rs +++ b/examples/v2_case-management_UpdatePriority.rs @@ -15,6 +15,7 @@ async fn main() { CaseUpdatePriorityAttributes::new(CasePriority::P3), CaseResourceType::CASE, )); + let configuration = datadog::Configuration::new(); let api = CaseManagementAPI::with_config(configuration); let resp = api.update_priority(case_id.clone(), body).await; diff --git a/examples/v2_case-management_UpdateStatus.rs b/examples/v2_case-management_UpdateStatus.rs index d5d8ef9cc..e0bf2e86b 100644 --- a/examples/v2_case-management_UpdateStatus.rs +++ b/examples/v2_case-management_UpdateStatus.rs @@ -15,6 +15,7 @@ async fn main() { CaseUpdateStatusAttributes::new(CaseStatus::IN_PROGRESS), CaseResourceType::CASE, )); + let configuration = datadog::Configuration::new(); let api = CaseManagementAPI::with_config(configuration); let resp = api.update_status(case_id.clone(), body).await; diff --git a/examples/v2_ci-visibility-pipelines_AggregateCIAppPipelineEvents.rs b/examples/v2_ci-visibility-pipelines_AggregateCIAppPipelineEvents.rs index b9f983a1f..237584640 100644 --- a/examples/v2_ci-visibility-pipelines_AggregateCIAppPipelineEvents.rs +++ b/examples/v2_ci-visibility-pipelines_AggregateCIAppPipelineEvents.rs @@ -28,6 +28,7 @@ async fn main() { .limit(10) .total(CIAppGroupByTotal::CIAppGroupByTotalBoolean(false))]) .options(CIAppQueryOptions::new().timezone("GMT".to_string())); + let configuration = datadog::Configuration::new(); let api = CIVisibilityPipelinesAPI::with_config(configuration); let resp = api.aggregate_ci_app_pipeline_events(body).await; diff --git a/examples/v2_ci-visibility-pipelines_CreateCIAppPipelineEvent.rs b/examples/v2_ci-visibility-pipelines_CreateCIAppPipelineEvent.rs index 6ddb0e944..ad6f74fe5 100644 --- a/examples/v2_ci-visibility-pipelines_CreateCIAppPipelineEvent.rs +++ b/examples/v2_ci-visibility-pipelines_CreateCIAppPipelineEvent.rs @@ -47,6 +47,7 @@ async fn main() { )) .type_(CIAppCreatePipelineEventRequestDataType::CIPIPELINE_RESOURCE_REQUEST), ); + let configuration = datadog::Configuration::new(); let api = CIVisibilityPipelinesAPI::with_config(configuration); let resp = api.create_ci_app_pipeline_event(body).await; diff --git a/examples/v2_ci-visibility-pipelines_CreateCIAppPipelineEvent_129899466.rs b/examples/v2_ci-visibility-pipelines_CreateCIAppPipelineEvent_129899466.rs index 5e86f833b..5d08e494c 100644 --- a/examples/v2_ci-visibility-pipelines_CreateCIAppPipelineEvent_129899466.rs +++ b/examples/v2_ci-visibility-pipelines_CreateCIAppPipelineEvent_129899466.rs @@ -36,6 +36,7 @@ async fn main() { )) .type_(CIAppCreatePipelineEventRequestDataType::CIPIPELINE_RESOURCE_REQUEST), ); + let configuration = datadog::Configuration::new(); let api = CIVisibilityPipelinesAPI::with_config(configuration); let resp = api.create_ci_app_pipeline_event(body).await; diff --git a/examples/v2_ci-visibility-pipelines_CreateCIAppPipelineEvent_2341150096.rs b/examples/v2_ci-visibility-pipelines_CreateCIAppPipelineEvent_2341150096.rs index 24a2a8659..c5e460641 100644 --- a/examples/v2_ci-visibility-pipelines_CreateCIAppPipelineEvent_2341150096.rs +++ b/examples/v2_ci-visibility-pipelines_CreateCIAppPipelineEvent_2341150096.rs @@ -44,6 +44,7 @@ async fn main() { )) .type_(CIAppCreatePipelineEventRequestDataType::CIPIPELINE_RESOURCE_REQUEST), ); + let configuration = datadog::Configuration::new(); let api = CIVisibilityPipelinesAPI::with_config(configuration); let resp = api.create_ci_app_pipeline_event(body).await; diff --git a/examples/v2_ci-visibility-pipelines_ListCIAppPipelineEvents_1270618359.rs b/examples/v2_ci-visibility-pipelines_ListCIAppPipelineEvents_1270618359.rs index 07bbc1ee1..22dc71801 100644 --- a/examples/v2_ci-visibility-pipelines_ListCIAppPipelineEvents_1270618359.rs +++ b/examples/v2_ci-visibility-pipelines_ListCIAppPipelineEvents_1270618359.rs @@ -25,6 +25,7 @@ async fn main() { .page_limit(2), ); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_ci-visibility-pipelines_SearchCIAppPipelineEvents.rs b/examples/v2_ci-visibility-pipelines_SearchCIAppPipelineEvents.rs index 9dee9f23c..9c92be573 100644 --- a/examples/v2_ci-visibility-pipelines_SearchCIAppPipelineEvents.rs +++ b/examples/v2_ci-visibility-pipelines_SearchCIAppPipelineEvents.rs @@ -20,6 +20,7 @@ async fn main() { .options(CIAppQueryOptions::new().timezone("GMT".to_string())) .page(CIAppQueryPageOptions::new().limit(5)) .sort(CIAppSort::TIMESTAMP_ASCENDING); + let configuration = datadog::Configuration::new(); let api = CIVisibilityPipelinesAPI::with_config(configuration); let resp = api diff --git a/examples/v2_ci-visibility-pipelines_SearchCIAppPipelineEvents_3246135003.rs b/examples/v2_ci-visibility-pipelines_SearchCIAppPipelineEvents_3246135003.rs index 78d95d5aa..3837df2f5 100644 --- a/examples/v2_ci-visibility-pipelines_SearchCIAppPipelineEvents_3246135003.rs +++ b/examples/v2_ci-visibility-pipelines_SearchCIAppPipelineEvents_3246135003.rs @@ -21,12 +21,14 @@ async fn main() { .options(CIAppQueryOptions::new().timezone("GMT".to_string())) .page(CIAppQueryPageOptions::new().limit(2)) .sort(CIAppSort::TIMESTAMP_ASCENDING); + let configuration = datadog::Configuration::new(); let api = CIVisibilityPipelinesAPI::with_config(configuration); let response = api.search_ci_app_pipeline_events_with_pagination( SearchCIAppPipelineEventsOptionalParams::default().body(body), ); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_ci-visibility-tests_AggregateCIAppTestEvents.rs b/examples/v2_ci-visibility-tests_AggregateCIAppTestEvents.rs index 1ad250b15..abbebbab7 100644 --- a/examples/v2_ci-visibility-tests_AggregateCIAppTestEvents.rs +++ b/examples/v2_ci-visibility-tests_AggregateCIAppTestEvents.rs @@ -29,6 +29,7 @@ async fn main() { .sort(CIAppAggregateSort::new().order(CIAppSortOrder::ASCENDING)) .total(CIAppGroupByTotal::CIAppGroupByTotalBoolean(false))]) .options(CIAppQueryOptions::new().timezone("GMT".to_string())); + let configuration = datadog::Configuration::new(); let api = CIVisibilityTestsAPI::with_config(configuration); let resp = api.aggregate_ci_app_test_events(body).await; diff --git a/examples/v2_ci-visibility-tests_ListCIAppTestEvents_3852605281.rs b/examples/v2_ci-visibility-tests_ListCIAppTestEvents_3852605281.rs index 03121314d..0fde42b2a 100644 --- a/examples/v2_ci-visibility-tests_ListCIAppTestEvents_3852605281.rs +++ b/examples/v2_ci-visibility-tests_ListCIAppTestEvents_3852605281.rs @@ -25,6 +25,7 @@ async fn main() { .page_limit(2), ); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_ci-visibility-tests_SearchCIAppTestEvents.rs b/examples/v2_ci-visibility-tests_SearchCIAppTestEvents.rs index 2aa75bbaf..f36c219c4 100644 --- a/examples/v2_ci-visibility-tests_SearchCIAppTestEvents.rs +++ b/examples/v2_ci-visibility-tests_SearchCIAppTestEvents.rs @@ -20,6 +20,7 @@ async fn main() { .options(CIAppQueryOptions::new().timezone("GMT".to_string())) .page(CIAppQueryPageOptions::new().limit(25)) .sort(CIAppSort::TIMESTAMP_ASCENDING); + let configuration = datadog::Configuration::new(); let api = CIVisibilityTestsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_ci-visibility-tests_SearchCIAppTestEvents_1675695429.rs b/examples/v2_ci-visibility-tests_SearchCIAppTestEvents_1675695429.rs index 5c2df3c82..7c380892d 100644 --- a/examples/v2_ci-visibility-tests_SearchCIAppTestEvents_1675695429.rs +++ b/examples/v2_ci-visibility-tests_SearchCIAppTestEvents_1675695429.rs @@ -20,12 +20,14 @@ async fn main() { ) .page(CIAppQueryPageOptions::new().limit(2)) .sort(CIAppSort::TIMESTAMP_ASCENDING); + let configuration = datadog::Configuration::new(); let api = CIVisibilityTestsAPI::with_config(configuration); let response = api.search_ci_app_test_events_with_pagination( SearchCIAppTestEventsOptionalParams::default().body(body), ); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_cloud-cost-management_CreateCostAWSCURConfig.rs b/examples/v2_cloud-cost-management_CreateCostAWSCURConfig.rs index 7da454682..917b74ac2 100644 --- a/examples/v2_cloud-cost-management_CreateCostAWSCURConfig.rs +++ b/examples/v2_cloud-cost-management_CreateCostAWSCURConfig.rs @@ -18,6 +18,7 @@ async fn main() { .bucket_region("us-east-1".to_string()), AwsCURConfigPostRequestType::AWS_CUR_CONFIG_POST_REQUEST, )); + let configuration = datadog::Configuration::new(); let api = CloudCostManagementAPI::with_config(configuration); let resp = api.create_cost_awscur_config(body).await; diff --git a/examples/v2_cloud-cost-management_CreateCostAzureUCConfigs.rs b/examples/v2_cloud-cost-management_CreateCostAzureUCConfigs.rs index ff1e04a7b..d1f8e2e15 100644 --- a/examples/v2_cloud-cost-management_CreateCostAzureUCConfigs.rs +++ b/examples/v2_cloud-cost-management_CreateCostAzureUCConfigs.rs @@ -30,6 +30,7 @@ async fn main() { .is_enabled(true), AzureUCConfigPostRequestType::AZURE_UC_CONFIG_POST_REQUEST, )); + let configuration = datadog::Configuration::new(); let api = CloudCostManagementAPI::with_config(configuration); let resp = api.create_cost_azure_uc_configs(body).await; diff --git a/examples/v2_cloud-cost-management_UpdateCostAWSCURConfig.rs b/examples/v2_cloud-cost-management_UpdateCostAWSCURConfig.rs index 8418f4cd8..ea161dd4d 100644 --- a/examples/v2_cloud-cost-management_UpdateCostAWSCURConfig.rs +++ b/examples/v2_cloud-cost-management_UpdateCostAWSCURConfig.rs @@ -12,6 +12,7 @@ async fn main() { AwsCURConfigPatchRequestAttributes::new(true), AwsCURConfigPatchRequestType::AWS_CUR_CONFIG_PATCH_REQUEST, )); + let configuration = datadog::Configuration::new(); let api = CloudCostManagementAPI::with_config(configuration); let resp = api.update_cost_awscur_config("100".to_string(), body).await; diff --git a/examples/v2_cloud-cost-management_UpdateCostAzureUCConfigs.rs b/examples/v2_cloud-cost-management_UpdateCostAzureUCConfigs.rs index 0a3538656..5ff0dc05e 100644 --- a/examples/v2_cloud-cost-management_UpdateCostAzureUCConfigs.rs +++ b/examples/v2_cloud-cost-management_UpdateCostAzureUCConfigs.rs @@ -12,6 +12,7 @@ async fn main() { AzureUCConfigPatchRequestAttributes::new(true), AzureUCConfigPatchRequestType::AZURE_UC_CONFIG_PATCH_REQUEST, )); + let configuration = datadog::Configuration::new(); let api = CloudCostManagementAPI::with_config(configuration); let resp = api diff --git a/examples/v2_cloud-cost-management_UploadCustomCostsFile.rs b/examples/v2_cloud-cost-management_UploadCustomCostsFile.rs index c0f3d9542..28009b687 100644 --- a/examples/v2_cloud-cost-management_UploadCustomCostsFile.rs +++ b/examples/v2_cloud-cost-management_UploadCustomCostsFile.rs @@ -11,6 +11,7 @@ async fn main() { .charge_description("Monthly usage charge for my service".to_string()) .charge_period_end("2023-02-28".to_string()) .charge_period_start("2023-02-01".to_string())]; + let configuration = datadog::Configuration::new(); let api = CloudCostManagementAPI::with_config(configuration); let resp = api.upload_custom_costs_file(body).await; diff --git a/examples/v2_cloud-cost-management_UploadCustomCostsFile_4125168396.rs b/examples/v2_cloud-cost-management_UploadCustomCostsFile_4125168396.rs index 7a834f0bf..ef6f57f33 100644 --- a/examples/v2_cloud-cost-management_UploadCustomCostsFile_4125168396.rs +++ b/examples/v2_cloud-cost-management_UploadCustomCostsFile_4125168396.rs @@ -14,6 +14,7 @@ async fn main() { .charge_period_start("2023-05-06".to_string()) .provider_name("my_provider".to_string()) .tags(BTreeMap::from([("key".to_string(), "value".to_string())]))]; + let configuration = datadog::Configuration::new(); let api = CloudCostManagementAPI::with_config(configuration); let resp = api.upload_custom_costs_file(body).await; diff --git a/examples/v2_cloudflare-integration_CreateCloudflareAccount.rs b/examples/v2_cloudflare-integration_CreateCloudflareAccount.rs index 39ea4a4db..727f491b2 100644 --- a/examples/v2_cloudflare-integration_CreateCloudflareAccount.rs +++ b/examples/v2_cloudflare-integration_CreateCloudflareAccount.rs @@ -16,6 +16,7 @@ async fn main() { .email("dev@datadoghq.com".to_string()), CloudflareAccountType::CLOUDFLARE_ACCOUNTS, )); + let configuration = datadog::Configuration::new(); let api = CloudflareIntegrationAPI::with_config(configuration); let resp = api.create_cloudflare_account(body).await; diff --git a/examples/v2_cloudflare-integration_GetCloudflareAccount.rs b/examples/v2_cloudflare-integration_GetCloudflareAccount.rs index b29e2b617..447bbc58a 100644 --- a/examples/v2_cloudflare-integration_GetCloudflareAccount.rs +++ b/examples/v2_cloudflare-integration_GetCloudflareAccount.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_cloudflare_integration::CloudflareIntegra async fn main() { // there is a valid "cloudflare_account" in the system let cloudflare_account_data_id = std::env::var("CLOUDFLARE_ACCOUNT_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = CloudflareIntegrationAPI::with_config(configuration); let resp = api diff --git a/examples/v2_cloudflare-integration_UpdateCloudflareAccount.rs b/examples/v2_cloudflare-integration_UpdateCloudflareAccount.rs index 10cc613b6..3188770bb 100644 --- a/examples/v2_cloudflare-integration_UpdateCloudflareAccount.rs +++ b/examples/v2_cloudflare-integration_UpdateCloudflareAccount.rs @@ -19,6 +19,7 @@ async fn main() { ) .type_(CloudflareAccountType::CLOUDFLARE_ACCOUNTS), ); + let configuration = datadog::Configuration::new(); let api = CloudflareIntegrationAPI::with_config(configuration); let resp = api diff --git a/examples/v2_confluent-cloud_CreateConfluentAccount.rs b/examples/v2_confluent-cloud_CreateConfluentAccount.rs index 9d55d391b..fd14d5d79 100644 --- a/examples/v2_confluent-cloud_CreateConfluentAccount.rs +++ b/examples/v2_confluent-cloud_CreateConfluentAccount.rs @@ -23,6 +23,7 @@ async fn main() { .tags(vec!["myTag".to_string(), "myTag2:myValue".to_string()]), ConfluentAccountType::CONFLUENT_CLOUD_ACCOUNTS, )); + let configuration = datadog::Configuration::new(); let api = ConfluentCloudAPI::with_config(configuration); let resp = api.create_confluent_account(body).await; diff --git a/examples/v2_confluent-cloud_CreateConfluentResource.rs b/examples/v2_confluent-cloud_CreateConfluentResource.rs index 1b9d76e10..14e1d0ec2 100644 --- a/examples/v2_confluent-cloud_CreateConfluentResource.rs +++ b/examples/v2_confluent-cloud_CreateConfluentResource.rs @@ -17,6 +17,7 @@ async fn main() { "exampleconfluentcloud".to_string(), ConfluentResourceType::CONFLUENT_CLOUD_RESOURCES, )); + let configuration = datadog::Configuration::new(); let api = ConfluentCloudAPI::with_config(configuration); let resp = api diff --git a/examples/v2_confluent-cloud_DeleteConfluentAccount.rs b/examples/v2_confluent-cloud_DeleteConfluentAccount.rs index 2c4892a43..972f4cf94 100644 --- a/examples/v2_confluent-cloud_DeleteConfluentAccount.rs +++ b/examples/v2_confluent-cloud_DeleteConfluentAccount.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_confluent_cloud::ConfluentCloudAPI; async fn main() { // there is a valid "confluent_account" in the system let confluent_account_data_id = std::env::var("CONFLUENT_ACCOUNT_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = ConfluentCloudAPI::with_config(configuration); let resp = api diff --git a/examples/v2_confluent-cloud_GetConfluentAccount.rs b/examples/v2_confluent-cloud_GetConfluentAccount.rs index b8536c94c..3e40d458f 100644 --- a/examples/v2_confluent-cloud_GetConfluentAccount.rs +++ b/examples/v2_confluent-cloud_GetConfluentAccount.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_confluent_cloud::ConfluentCloudAPI; async fn main() { // there is a valid "confluent_account" in the system let confluent_account_data_id = std::env::var("CONFLUENT_ACCOUNT_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = ConfluentCloudAPI::with_config(configuration); let resp = api diff --git a/examples/v2_confluent-cloud_UpdateConfluentAccount.rs b/examples/v2_confluent-cloud_UpdateConfluentAccount.rs index 3162f081b..7301b1cde 100644 --- a/examples/v2_confluent-cloud_UpdateConfluentAccount.rs +++ b/examples/v2_confluent-cloud_UpdateConfluentAccount.rs @@ -20,6 +20,7 @@ async fn main() { .tags(vec!["updated_tag:val".to_string()]), ConfluentAccountType::CONFLUENT_CLOUD_ACCOUNTS, )); + let configuration = datadog::Configuration::new(); let api = ConfluentCloudAPI::with_config(configuration); let resp = api diff --git a/examples/v2_confluent-cloud_UpdateConfluentResource.rs b/examples/v2_confluent-cloud_UpdateConfluentResource.rs index 61bce314a..e196b9829 100644 --- a/examples/v2_confluent-cloud_UpdateConfluentResource.rs +++ b/examples/v2_confluent-cloud_UpdateConfluentResource.rs @@ -15,6 +15,7 @@ async fn main() { "resource-id-123".to_string(), ConfluentResourceType::CONFLUENT_CLOUD_RESOURCES, )); + let configuration = datadog::Configuration::new(); let api = ConfluentCloudAPI::with_config(configuration); let resp = api diff --git a/examples/v2_container-images_ListContainerImages_3088586393.rs b/examples/v2_container-images_ListContainerImages_3088586393.rs index 0085b53c0..cd8a59b10 100644 --- a/examples/v2_container-images_ListContainerImages_3088586393.rs +++ b/examples/v2_container-images_ListContainerImages_3088586393.rs @@ -13,6 +13,7 @@ async fn main() { ListContainerImagesOptionalParams::default().page_size(2), ); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_containers_ListContainers_931009654.rs b/examples/v2_containers_ListContainers_931009654.rs index d95146931..016dcc470 100644 --- a/examples/v2_containers_ListContainers_931009654.rs +++ b/examples/v2_containers_ListContainers_931009654.rs @@ -12,6 +12,7 @@ async fn main() { let response = api.list_containers_with_pagination(ListContainersOptionalParams::default().page_size(2)); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_csm-threats_CreateCSMThreatsAgentRule.rs b/examples/v2_csm-threats_CreateCSMThreatsAgentRule.rs index 6d4df010f..b66afb9d1 100644 --- a/examples/v2_csm-threats_CreateCSMThreatsAgentRule.rs +++ b/examples/v2_csm-threats_CreateCSMThreatsAgentRule.rs @@ -20,6 +20,7 @@ async fn main() { CloudWorkloadSecurityAgentRuleType::AGENT_RULE, ), ); + let configuration = datadog::Configuration::new(); let api = CSMThreatsAPI::with_config(configuration); let resp = api.create_csm_threats_agent_rule(body).await; diff --git a/examples/v2_csm-threats_CreateCloudWorkloadSecurityAgentRule.rs b/examples/v2_csm-threats_CreateCloudWorkloadSecurityAgentRule.rs index 180ab76c0..f194dc7a0 100644 --- a/examples/v2_csm-threats_CreateCloudWorkloadSecurityAgentRule.rs +++ b/examples/v2_csm-threats_CreateCloudWorkloadSecurityAgentRule.rs @@ -19,6 +19,7 @@ async fn main() { CloudWorkloadSecurityAgentRuleType::AGENT_RULE, ), ); + let configuration = datadog::Configuration::new(); let api = CSMThreatsAPI::with_config(configuration); let resp = api.create_cloud_workload_security_agent_rule(body).await; diff --git a/examples/v2_csm-threats_DeleteCSMThreatsAgentRule.rs b/examples/v2_csm-threats_DeleteCSMThreatsAgentRule.rs index ea4253761..0afee4fe4 100644 --- a/examples/v2_csm-threats_DeleteCSMThreatsAgentRule.rs +++ b/examples/v2_csm-threats_DeleteCSMThreatsAgentRule.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_csm_threats::CSMThreatsAPI; async fn main() { // there is a valid "agent_rule_rc" in the system let agent_rule_data_id = std::env::var("AGENT_RULE_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = CSMThreatsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_csm-threats_DeleteCloudWorkloadSecurityAgentRule.rs b/examples/v2_csm-threats_DeleteCloudWorkloadSecurityAgentRule.rs index 71d170cc4..a4111a600 100644 --- a/examples/v2_csm-threats_DeleteCloudWorkloadSecurityAgentRule.rs +++ b/examples/v2_csm-threats_DeleteCloudWorkloadSecurityAgentRule.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_csm_threats::CSMThreatsAPI; async fn main() { // there is a valid "agent_rule" in the system let agent_rule_data_id = std::env::var("AGENT_RULE_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = CSMThreatsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_csm-threats_GetCSMThreatsAgentRule.rs b/examples/v2_csm-threats_GetCSMThreatsAgentRule.rs index 03a74c559..09de47318 100644 --- a/examples/v2_csm-threats_GetCSMThreatsAgentRule.rs +++ b/examples/v2_csm-threats_GetCSMThreatsAgentRule.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_csm_threats::CSMThreatsAPI; async fn main() { // there is a valid "agent_rule_rc" in the system let agent_rule_data_id = std::env::var("AGENT_RULE_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = CSMThreatsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_csm-threats_GetCloudWorkloadSecurityAgentRule.rs b/examples/v2_csm-threats_GetCloudWorkloadSecurityAgentRule.rs index 36d888462..d2f3ee6c1 100644 --- a/examples/v2_csm-threats_GetCloudWorkloadSecurityAgentRule.rs +++ b/examples/v2_csm-threats_GetCloudWorkloadSecurityAgentRule.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_csm_threats::CSMThreatsAPI; async fn main() { // there is a valid "agent_rule" in the system let agent_rule_data_id = std::env::var("AGENT_RULE_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = CSMThreatsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_csm-threats_UpdateCSMThreatsAgentRule.rs b/examples/v2_csm-threats_UpdateCSMThreatsAgentRule.rs index c5e02510c..124b73403 100644 --- a/examples/v2_csm-threats_UpdateCSMThreatsAgentRule.rs +++ b/examples/v2_csm-threats_UpdateCSMThreatsAgentRule.rs @@ -20,6 +20,7 @@ async fn main() { ) .id(agent_rule_data_id.clone()), ); + let configuration = datadog::Configuration::new(); let api = CSMThreatsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_csm-threats_UpdateCloudWorkloadSecurityAgentRule.rs b/examples/v2_csm-threats_UpdateCloudWorkloadSecurityAgentRule.rs index e49d12a0d..0616043ac 100644 --- a/examples/v2_csm-threats_UpdateCloudWorkloadSecurityAgentRule.rs +++ b/examples/v2_csm-threats_UpdateCloudWorkloadSecurityAgentRule.rs @@ -20,6 +20,7 @@ async fn main() { ) .id(agent_rule_data_id.clone()), ); + let configuration = datadog::Configuration::new(); let api = CSMThreatsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_dashboard-lists_CreateDashboardListItems.rs b/examples/v2_dashboard-lists_CreateDashboardListItems.rs index 206332860..12f6d12ff 100644 --- a/examples/v2_dashboard-lists_CreateDashboardListItems.rs +++ b/examples/v2_dashboard-lists_CreateDashboardListItems.rs @@ -11,6 +11,7 @@ async fn main() { "q5j-nti-fv6".to_string(), DashboardType::HOST_TIMEBOARD, )]); + let configuration = datadog::Configuration::new(); let api = DashboardListsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_dashboard-lists_CreateDashboardListItems_3995409989.rs b/examples/v2_dashboard-lists_CreateDashboardListItems_3995409989.rs index 52ce410c5..77e135393 100644 --- a/examples/v2_dashboard-lists_CreateDashboardListItems_3995409989.rs +++ b/examples/v2_dashboard-lists_CreateDashboardListItems_3995409989.rs @@ -1,5 +1,4 @@ -// Add custom timeboard dashboard to an existing dashboard list returns "OK" -// response +// Add custom timeboard dashboard to an existing dashboard list returns "OK" response use datadog_api_client::datadog; use datadog_api_client::datadogV2::api_dashboard_lists::DashboardListsAPI; use datadog_api_client::datadogV2::model::DashboardListAddItemsRequest; @@ -10,13 +9,13 @@ use datadog_api_client::datadogV2::model::DashboardType; async fn main() { // there is a valid "dashboard_list" in the system let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap(); - // there is a valid "dashboard" in the system let dashboard_id = std::env::var("DASHBOARD_ID").unwrap(); let body = DashboardListAddItemsRequest::new().dashboards(vec![DashboardListItemRequest::new( dashboard_id.clone(), DashboardType::CUSTOM_TIMEBOARD, )]); + let configuration = datadog::Configuration::new(); let api = DashboardListsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_dashboard-lists_CreateDashboardListItems_825696022.rs b/examples/v2_dashboard-lists_CreateDashboardListItems_825696022.rs index 35e0f8a45..0d91ed3c9 100644 --- a/examples/v2_dashboard-lists_CreateDashboardListItems_825696022.rs +++ b/examples/v2_dashboard-lists_CreateDashboardListItems_825696022.rs @@ -1,5 +1,4 @@ -// Add custom screenboard dashboard to an existing dashboard list returns "OK" -// response +// Add custom screenboard dashboard to an existing dashboard list returns "OK" response use datadog_api_client::datadog; use datadog_api_client::datadogV2::api_dashboard_lists::DashboardListsAPI; use datadog_api_client::datadogV2::model::DashboardListAddItemsRequest; @@ -10,13 +9,13 @@ use datadog_api_client::datadogV2::model::DashboardType; async fn main() { // there is a valid "dashboard_list" in the system let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap(); - // there is a valid "screenboard_dashboard" in the system let screenboard_dashboard_id = std::env::var("SCREENBOARD_DASHBOARD_ID").unwrap(); let body = DashboardListAddItemsRequest::new().dashboards(vec![DashboardListItemRequest::new( screenboard_dashboard_id.clone(), DashboardType::CUSTOM_SCREENBOARD, )]); + let configuration = datadog::Configuration::new(); let api = DashboardListsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_dashboard-lists_DeleteDashboardListItems.rs b/examples/v2_dashboard-lists_DeleteDashboardListItems.rs index 71ffb561d..57682b00f 100644 --- a/examples/v2_dashboard-lists_DeleteDashboardListItems.rs +++ b/examples/v2_dashboard-lists_DeleteDashboardListItems.rs @@ -12,6 +12,7 @@ async fn main() { "q5j-nti-fv6".to_string(), DashboardType::HOST_TIMEBOARD, )]); + let configuration = datadog::Configuration::new(); let api = DashboardListsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_dashboard-lists_DeleteDashboardListItems_2656706656.rs b/examples/v2_dashboard-lists_DeleteDashboardListItems_2656706656.rs index 0dfba9d42..c8682ed11 100644 --- a/examples/v2_dashboard-lists_DeleteDashboardListItems_2656706656.rs +++ b/examples/v2_dashboard-lists_DeleteDashboardListItems_2656706656.rs @@ -1,5 +1,4 @@ -// Delete custom timeboard dashboard from an existing dashboard list returns "OK" -// response +// Delete custom timeboard dashboard from an existing dashboard list returns "OK" response use datadog_api_client::datadog; use datadog_api_client::datadogV2::api_dashboard_lists::DashboardListsAPI; use datadog_api_client::datadogV2::model::DashboardListDeleteItemsRequest; @@ -10,7 +9,6 @@ use datadog_api_client::datadogV2::model::DashboardType; async fn main() { // there is a valid "dashboard_list" in the system let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap(); - // there is a valid "dashboard" in the system let dashboard_id = std::env::var("DASHBOARD_ID").unwrap(); let body = @@ -18,6 +16,7 @@ async fn main() { dashboard_id.clone(), DashboardType::CUSTOM_TIMEBOARD, )]); + let configuration = datadog::Configuration::new(); let api = DashboardListsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_dashboard-lists_DeleteDashboardListItems_3851624753.rs b/examples/v2_dashboard-lists_DeleteDashboardListItems_3851624753.rs index 8a705bee1..45eb9fede 100644 --- a/examples/v2_dashboard-lists_DeleteDashboardListItems_3851624753.rs +++ b/examples/v2_dashboard-lists_DeleteDashboardListItems_3851624753.rs @@ -1,5 +1,4 @@ -// Delete custom screenboard dashboard from an existing dashboard list returns -// "OK" response +// Delete custom screenboard dashboard from an existing dashboard list returns "OK" response use datadog_api_client::datadog; use datadog_api_client::datadogV2::api_dashboard_lists::DashboardListsAPI; use datadog_api_client::datadogV2::model::DashboardListDeleteItemsRequest; @@ -10,7 +9,6 @@ use datadog_api_client::datadogV2::model::DashboardType; async fn main() { // there is a valid "dashboard_list" in the system let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap(); - // there is a valid "screenboard_dashboard" in the system let screenboard_dashboard_id = std::env::var("SCREENBOARD_DASHBOARD_ID").unwrap(); let body = @@ -18,6 +16,7 @@ async fn main() { screenboard_dashboard_id.clone(), DashboardType::CUSTOM_SCREENBOARD, )]); + let configuration = datadog::Configuration::new(); let api = DashboardListsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_dashboard-lists_GetDashboardListItems.rs b/examples/v2_dashboard-lists_GetDashboardListItems.rs index 87de05a13..d4f706670 100644 --- a/examples/v2_dashboard-lists_GetDashboardListItems.rs +++ b/examples/v2_dashboard-lists_GetDashboardListItems.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_dashboard_lists::DashboardListsAPI; async fn main() { // there is a valid "dashboard_list" in the system let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap(); + let configuration = datadog::Configuration::new(); let api = DashboardListsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_dashboard-lists_UpdateDashboardListItems.rs b/examples/v2_dashboard-lists_UpdateDashboardListItems.rs index 19fcf601d..9da58b346 100644 --- a/examples/v2_dashboard-lists_UpdateDashboardListItems.rs +++ b/examples/v2_dashboard-lists_UpdateDashboardListItems.rs @@ -9,7 +9,6 @@ use datadog_api_client::datadogV2::model::DashboardType; async fn main() { // there is a valid "dashboard_list" in the system let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap(); - // there is a valid "screenboard_dashboard" in the system let screenboard_dashboard_id = std::env::var("SCREENBOARD_DASHBOARD_ID").unwrap(); let body = @@ -17,6 +16,7 @@ async fn main() { screenboard_dashboard_id.clone(), DashboardType::CUSTOM_SCREENBOARD, )]); + let configuration = datadog::Configuration::new(); let api = DashboardListsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_data-deletion_CancelDataDeletionRequest.rs b/examples/v2_data-deletion_CancelDataDeletionRequest.rs index 0617e31ae..f042f3833 100644 --- a/examples/v2_data-deletion_CancelDataDeletionRequest.rs +++ b/examples/v2_data-deletion_CancelDataDeletionRequest.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_data_deletion::DataDeletionAPI; async fn main() { // there is a valid "deletion_request" in the system let deletion_request_data_id = std::env::var("DELETION_REQUEST_DATA_ID").unwrap(); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.CancelDataDeletionRequest", true); let api = DataDeletionAPI::with_config(configuration); diff --git a/examples/v2_data-deletion_CreateDataDeletionRequest.rs b/examples/v2_data-deletion_CreateDataDeletionRequest.rs index 9088ff0fe..88cfacac3 100644 --- a/examples/v2_data-deletion_CreateDataDeletionRequest.rs +++ b/examples/v2_data-deletion_CreateDataDeletionRequest.rs @@ -19,6 +19,7 @@ async fn main() { ) .indexes(vec!["test-index".to_string(), "test-index-2".to_string()]), )); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.CreateDataDeletionRequest", true); let api = DataDeletionAPI::with_config(configuration); diff --git a/examples/v2_domain-allowlist_PatchDomainAllowlist.rs b/examples/v2_domain-allowlist_PatchDomainAllowlist.rs index 7f74f225f..b285f191f 100644 --- a/examples/v2_domain-allowlist_PatchDomainAllowlist.rs +++ b/examples/v2_domain-allowlist_PatchDomainAllowlist.rs @@ -15,6 +15,7 @@ async fn main() { .enabled(false), ), ); + let configuration = datadog::Configuration::new(); let api = DomainAllowlistAPI::with_config(configuration); let resp = api.patch_domain_allowlist(body).await; diff --git a/examples/v2_dora-metrics_CreateDORADeployment.rs b/examples/v2_dora-metrics_CreateDORADeployment.rs index 93dce5ac8..a9660153c 100644 --- a/examples/v2_dora-metrics_CreateDORADeployment.rs +++ b/examples/v2_dora-metrics_CreateDORADeployment.rs @@ -20,6 +20,7 @@ async fn main() { )) .version("v1.12.07".to_string()), )); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.CreateDORADeployment", true); let api = DORAMetricsAPI::with_config(configuration); diff --git a/examples/v2_dora-metrics_CreateDORAIncident.rs b/examples/v2_dora-metrics_CreateDORAIncident.rs index a811344f0..ae5f3cca9 100644 --- a/examples/v2_dora-metrics_CreateDORAIncident.rs +++ b/examples/v2_dora-metrics_CreateDORAIncident.rs @@ -21,6 +21,7 @@ async fn main() { .team("backend".to_string()) .version("v1.12.07".to_string()), )); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.CreateDORAIncident", true); let api = DORAMetricsAPI::with_config(configuration); diff --git a/examples/v2_downtimes_CancelDowntime.rs b/examples/v2_downtimes_CancelDowntime.rs index f6401f0e4..a3b6006c7 100644 --- a/examples/v2_downtimes_CancelDowntime.rs +++ b/examples/v2_downtimes_CancelDowntime.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_downtimes::DowntimesAPI; async fn main() { // there is a valid "downtime_v2" in the system let downtime_v2_data_id = std::env::var("DOWNTIME_V2_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = DowntimesAPI::with_config(configuration); let resp = api.cancel_downtime(downtime_v2_data_id.clone()).await; diff --git a/examples/v2_downtimes_CreateDowntime.rs b/examples/v2_downtimes_CreateDowntime.rs index eb25c00f8..921701d27 100644 --- a/examples/v2_downtimes_CreateDowntime.rs +++ b/examples/v2_downtimes_CreateDowntime.rs @@ -27,6 +27,7 @@ async fn main() { ), DowntimeResourceType::DOWNTIME, )); + let configuration = datadog::Configuration::new(); let api = DowntimesAPI::with_config(configuration); let resp = api.create_downtime(body).await; diff --git a/examples/v2_downtimes_GetDowntime.rs b/examples/v2_downtimes_GetDowntime.rs index b06ddf68a..482dfd42d 100644 --- a/examples/v2_downtimes_GetDowntime.rs +++ b/examples/v2_downtimes_GetDowntime.rs @@ -7,6 +7,7 @@ use datadog_api_client::datadogV2::api_downtimes::GetDowntimeOptionalParams; async fn main() { // there is a valid "downtime_v2" in the system let downtime_v2_data_id = std::env::var("DOWNTIME_V2_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = DowntimesAPI::with_config(configuration); let resp = api diff --git a/examples/v2_downtimes_ListDowntimes_805770330.rs b/examples/v2_downtimes_ListDowntimes_805770330.rs index e043e4d0d..802ca0585 100644 --- a/examples/v2_downtimes_ListDowntimes_805770330.rs +++ b/examples/v2_downtimes_ListDowntimes_805770330.rs @@ -12,6 +12,7 @@ async fn main() { let response = api.list_downtimes_with_pagination(ListDowntimesOptionalParams::default().page_limit(2)); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_downtimes_ListMonitorDowntimes_3316718253.rs b/examples/v2_downtimes_ListMonitorDowntimes_3316718253.rs index cdc544fec..e22bd278b 100644 --- a/examples/v2_downtimes_ListMonitorDowntimes_3316718253.rs +++ b/examples/v2_downtimes_ListMonitorDowntimes_3316718253.rs @@ -14,6 +14,7 @@ async fn main() { ListMonitorDowntimesOptionalParams::default(), ); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_downtimes_UpdateDowntime.rs b/examples/v2_downtimes_UpdateDowntime.rs index 431492f26..bcaf04286 100644 --- a/examples/v2_downtimes_UpdateDowntime.rs +++ b/examples/v2_downtimes_UpdateDowntime.rs @@ -15,6 +15,7 @@ async fn main() { downtime_v2_data_id.clone(), DowntimeResourceType::DOWNTIME, )); + let configuration = datadog::Configuration::new(); let api = DowntimesAPI::with_config(configuration); let resp = api.update_downtime(downtime_v2_data_id.clone(), body).await; diff --git a/examples/v2_events_CreateEvent.rs b/examples/v2_events_CreateEvent.rs index e53d0c702..5d236e4b8 100644 --- a/examples/v2_events_CreateEvent.rs +++ b/examples/v2_events_CreateEvent.rs @@ -61,6 +61,7 @@ async fn main() { ) .type_(EventCreateRequestType::EVENT), ); + let configuration = datadog::Configuration::new(); let api = EventsAPI::with_config(configuration); let resp = api.create_event(body).await; diff --git a/examples/v2_events_ListEvents_1527584014.rs b/examples/v2_events_ListEvents_1527584014.rs index 79726b5ae..ff289342e 100644 --- a/examples/v2_events_ListEvents_1527584014.rs +++ b/examples/v2_events_ListEvents_1527584014.rs @@ -16,6 +16,7 @@ async fn main() { .page_limit(2), ); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_events_SearchEvents.rs b/examples/v2_events_SearchEvents.rs index 752acfcc0..8a5e0da78 100644 --- a/examples/v2_events_SearchEvents.rs +++ b/examples/v2_events_SearchEvents.rs @@ -18,6 +18,7 @@ async fn main() { ) .page(EventsRequestPage::new().limit(5)) .sort(EventsSort::TIMESTAMP_ASCENDING); + let configuration = datadog::Configuration::new(); let api = EventsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_events_SearchEvents_3856995058.rs b/examples/v2_events_SearchEvents_3856995058.rs index c86d100c0..dcd9095f7 100644 --- a/examples/v2_events_SearchEvents_3856995058.rs +++ b/examples/v2_events_SearchEvents_3856995058.rs @@ -21,11 +21,13 @@ async fn main() { .options(EventsQueryOptions::new().timezone("GMT".to_string())) .page(EventsRequestPage::new().limit(2)) .sort(EventsSort::TIMESTAMP_ASCENDING); + let configuration = datadog::Configuration::new(); let api = EventsAPI::with_config(configuration); let response = api.search_events_with_pagination(SearchEventsOptionalParams::default().body(body)); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_fastly-integration_CreateFastlyAccount.rs b/examples/v2_fastly-integration_CreateFastlyAccount.rs index d41184a2d..b6c8e39a5 100644 --- a/examples/v2_fastly-integration_CreateFastlyAccount.rs +++ b/examples/v2_fastly-integration_CreateFastlyAccount.rs @@ -16,6 +16,7 @@ async fn main() { .services(vec![]), FastlyAccountType::FASTLY_ACCOUNTS, )); + let configuration = datadog::Configuration::new(); let api = FastlyIntegrationAPI::with_config(configuration); let resp = api.create_fastly_account(body).await; diff --git a/examples/v2_fastly-integration_CreateFastlyService.rs b/examples/v2_fastly-integration_CreateFastlyService.rs index 172e5895e..9f0f975ef 100644 --- a/examples/v2_fastly-integration_CreateFastlyService.rs +++ b/examples/v2_fastly-integration_CreateFastlyService.rs @@ -15,6 +15,7 @@ async fn main() { .tags(vec!["myTag".to_string(), "myTag2:myValue".to_string()]), ), ); + let configuration = datadog::Configuration::new(); let api = FastlyIntegrationAPI::with_config(configuration); let resp = api diff --git a/examples/v2_fastly-integration_GetFastlyAccount.rs b/examples/v2_fastly-integration_GetFastlyAccount.rs index df0184235..9a1e887af 100644 --- a/examples/v2_fastly-integration_GetFastlyAccount.rs +++ b/examples/v2_fastly-integration_GetFastlyAccount.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_fastly_integration::FastlyIntegrationAPI; async fn main() { // there is a valid "fastly_account" in the system let fastly_account_data_id = std::env::var("FASTLY_ACCOUNT_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = FastlyIntegrationAPI::with_config(configuration); let resp = api.get_fastly_account(fastly_account_data_id.clone()).await; diff --git a/examples/v2_fastly-integration_UpdateFastlyAccount.rs b/examples/v2_fastly-integration_UpdateFastlyAccount.rs index 06c504b05..bea31024e 100644 --- a/examples/v2_fastly-integration_UpdateFastlyAccount.rs +++ b/examples/v2_fastly-integration_UpdateFastlyAccount.rs @@ -17,6 +17,7 @@ async fn main() { ) .type_(FastlyAccountType::FASTLY_ACCOUNTS), ); + let configuration = datadog::Configuration::new(); let api = FastlyIntegrationAPI::with_config(configuration); let resp = api diff --git a/examples/v2_fastly-integration_UpdateFastlyService.rs b/examples/v2_fastly-integration_UpdateFastlyService.rs index e0c2699f9..02d3db238 100644 --- a/examples/v2_fastly-integration_UpdateFastlyService.rs +++ b/examples/v2_fastly-integration_UpdateFastlyService.rs @@ -15,6 +15,7 @@ async fn main() { .tags(vec!["myTag".to_string(), "myTag2:myValue".to_string()]), ), ); + let configuration = datadog::Configuration::new(); let api = FastlyIntegrationAPI::with_config(configuration); let resp = api diff --git a/examples/v2_gcp-integration_CreateGCPSTSAccount.rs b/examples/v2_gcp-integration_CreateGCPSTSAccount.rs index b90b41383..c26940853 100644 --- a/examples/v2_gcp-integration_CreateGCPSTSAccount.rs +++ b/examples/v2_gcp-integration_CreateGCPSTSAccount.rs @@ -19,6 +19,7 @@ async fn main() { ) .type_(GCPServiceAccountType::GCP_SERVICE_ACCOUNT), ); + let configuration = datadog::Configuration::new(); let api = GCPIntegrationAPI::with_config(configuration); let resp = api.create_gcpsts_account(body).await; diff --git a/examples/v2_gcp-integration_CreateGCPSTSAccount_109518525.rs b/examples/v2_gcp-integration_CreateGCPSTSAccount_109518525.rs index a4a6e37b0..b3e77fa13 100644 --- a/examples/v2_gcp-integration_CreateGCPSTSAccount_109518525.rs +++ b/examples/v2_gcp-integration_CreateGCPSTSAccount_109518525.rs @@ -1,5 +1,4 @@ -// Create a new entry for your service account with account_tags returns "OK" -// response +// Create a new entry for your service account with account_tags returns "OK" response use datadog_api_client::datadog; use datadog_api_client::datadogV2::api_gcp_integration::GCPIntegrationAPI; use datadog_api_client::datadogV2::model::GCPSTSServiceAccountAttributes; @@ -21,6 +20,7 @@ async fn main() { ) .type_(GCPServiceAccountType::GCP_SERVICE_ACCOUNT), ); + let configuration = datadog::Configuration::new(); let api = GCPIntegrationAPI::with_config(configuration); let resp = api.create_gcpsts_account(body).await; diff --git a/examples/v2_gcp-integration_CreateGCPSTSAccount_130557025.rs b/examples/v2_gcp-integration_CreateGCPSTSAccount_130557025.rs index bd05af7fb..02f7148e4 100644 --- a/examples/v2_gcp-integration_CreateGCPSTSAccount_130557025.rs +++ b/examples/v2_gcp-integration_CreateGCPSTSAccount_130557025.rs @@ -1,5 +1,4 @@ -// Create a new entry for your service account with resource collection enabled -// returns "OK" response +// Create a new entry for your service account with resource collection enabled returns "OK" response use datadog_api_client::datadog; use datadog_api_client::datadogV2::api_gcp_integration::GCPIntegrationAPI; use datadog_api_client::datadogV2::model::GCPSTSServiceAccountAttributes; @@ -21,6 +20,7 @@ async fn main() { ) .type_(GCPServiceAccountType::GCP_SERVICE_ACCOUNT), ); + let configuration = datadog::Configuration::new(); let api = GCPIntegrationAPI::with_config(configuration); let resp = api.create_gcpsts_account(body).await; diff --git a/examples/v2_gcp-integration_CreateGCPSTSAccount_194782945.rs b/examples/v2_gcp-integration_CreateGCPSTSAccount_194782945.rs index 6767c7890..14dbd599d 100644 --- a/examples/v2_gcp-integration_CreateGCPSTSAccount_194782945.rs +++ b/examples/v2_gcp-integration_CreateGCPSTSAccount_194782945.rs @@ -1,5 +1,4 @@ -// Create a new entry for your service account with cloud run revision filters -// enabled returns "OK" response +// Create a new entry for your service account with cloud run revision filters enabled returns "OK" response use datadog_api_client::datadog; use datadog_api_client::datadogV2::api_gcp_integration::GCPIntegrationAPI; use datadog_api_client::datadogV2::model::GCPSTSServiceAccountAttributes; @@ -21,6 +20,7 @@ async fn main() { ) .type_(GCPServiceAccountType::GCP_SERVICE_ACCOUNT), ); + let configuration = datadog::Configuration::new(); let api = GCPIntegrationAPI::with_config(configuration); let resp = api.create_gcpsts_account(body).await; diff --git a/examples/v2_gcp-integration_CreateGCPSTSAccount_2597004741.rs b/examples/v2_gcp-integration_CreateGCPSTSAccount_2597004741.rs index 6febac8fe..b554b740c 100644 --- a/examples/v2_gcp-integration_CreateGCPSTSAccount_2597004741.rs +++ b/examples/v2_gcp-integration_CreateGCPSTSAccount_2597004741.rs @@ -1,5 +1,4 @@ -// Create a new entry for your service account with security command center -// enabled returns "OK" response +// Create a new entry for your service account with security command center enabled returns "OK" response use datadog_api_client::datadog; use datadog_api_client::datadogV2::api_gcp_integration::GCPIntegrationAPI; use datadog_api_client::datadogV2::model::GCPSTSServiceAccountAttributes; @@ -22,6 +21,7 @@ async fn main() { ) .type_(GCPServiceAccountType::GCP_SERVICE_ACCOUNT), ); + let configuration = datadog::Configuration::new(); let api = GCPIntegrationAPI::with_config(configuration); let resp = api.create_gcpsts_account(body).await; diff --git a/examples/v2_gcp-integration_CreateGCPSTSAccount_4235664992.rs b/examples/v2_gcp-integration_CreateGCPSTSAccount_4235664992.rs index 326d3ee2b..b00466120 100644 --- a/examples/v2_gcp-integration_CreateGCPSTSAccount_4235664992.rs +++ b/examples/v2_gcp-integration_CreateGCPSTSAccount_4235664992.rs @@ -1,5 +1,4 @@ -// Create a new entry for your service account with cspm enabled returns "OK" -// response +// Create a new entry for your service account with cspm enabled returns "OK" response use datadog_api_client::datadog; use datadog_api_client::datadogV2::api_gcp_integration::GCPIntegrationAPI; use datadog_api_client::datadogV2::model::GCPSTSServiceAccountAttributes; @@ -22,6 +21,7 @@ async fn main() { ) .type_(GCPServiceAccountType::GCP_SERVICE_ACCOUNT), ); + let configuration = datadog::Configuration::new(); let api = GCPIntegrationAPI::with_config(configuration); let resp = api.create_gcpsts_account(body).await; diff --git a/examples/v2_gcp-integration_MakeGCPSTSDelegate_962598975.rs b/examples/v2_gcp-integration_MakeGCPSTSDelegate_962598975.rs index ddf32e438..b0690034c 100644 --- a/examples/v2_gcp-integration_MakeGCPSTSDelegate_962598975.rs +++ b/examples/v2_gcp-integration_MakeGCPSTSDelegate_962598975.rs @@ -7,6 +7,7 @@ use std::collections::BTreeMap; #[tokio::main] async fn main() { let body = BTreeMap::new(); + let configuration = datadog::Configuration::new(); let api = GCPIntegrationAPI::with_config(configuration); let resp = api diff --git a/examples/v2_gcp-integration_UpdateGCPSTSAccount.rs b/examples/v2_gcp-integration_UpdateGCPSTSAccount.rs index f46a2cd22..990fccab7 100644 --- a/examples/v2_gcp-integration_UpdateGCPSTSAccount.rs +++ b/examples/v2_gcp-integration_UpdateGCPSTSAccount.rs @@ -20,6 +20,7 @@ async fn main() { .id(gcp_sts_account_data_id.clone()) .type_(GCPServiceAccountType::GCP_SERVICE_ACCOUNT), ); + let configuration = datadog::Configuration::new(); let api = GCPIntegrationAPI::with_config(configuration); let resp = api diff --git a/examples/v2_gcp-integration_UpdateGCPSTSAccount_2241994060.rs b/examples/v2_gcp-integration_UpdateGCPSTSAccount_2241994060.rs index 220b45eec..ac1206f12 100644 --- a/examples/v2_gcp-integration_UpdateGCPSTSAccount_2241994060.rs +++ b/examples/v2_gcp-integration_UpdateGCPSTSAccount_2241994060.rs @@ -20,6 +20,7 @@ async fn main() { .id(gcp_sts_account_data_id.clone()) .type_(GCPServiceAccountType::GCP_SERVICE_ACCOUNT), ); + let configuration = datadog::Configuration::new(); let api = GCPIntegrationAPI::with_config(configuration); let resp = api diff --git a/examples/v2_gcp-integration_UpdateGCPSTSAccount_3205636354.rs b/examples/v2_gcp-integration_UpdateGCPSTSAccount_3205636354.rs index 0139c644d..59b03bba3 100644 --- a/examples/v2_gcp-integration_UpdateGCPSTSAccount_3205636354.rs +++ b/examples/v2_gcp-integration_UpdateGCPSTSAccount_3205636354.rs @@ -1,5 +1,4 @@ -// Update STS Service Account returns "OK" response with enable resource -// collection turned on +// Update STS Service Account returns "OK" response with enable resource collection turned on use datadog_api_client::datadog; use datadog_api_client::datadogV2::api_gcp_integration::GCPIntegrationAPI; use datadog_api_client::datadogV2::model::GCPSTSServiceAccountAttributes; @@ -21,6 +20,7 @@ async fn main() { .id(gcp_sts_account_data_id.clone()) .type_(GCPServiceAccountType::GCP_SERVICE_ACCOUNT), ); + let configuration = datadog::Configuration::new(); let api = GCPIntegrationAPI::with_config(configuration); let resp = api diff --git a/examples/v2_incident-services_CreateIncidentService.rs b/examples/v2_incident-services_CreateIncidentService.rs index 64ae8abce..4e27bfb6c 100644 --- a/examples/v2_incident-services_CreateIncidentService.rs +++ b/examples/v2_incident-services_CreateIncidentService.rs @@ -13,6 +13,7 @@ async fn main() { IncidentServiceCreateAttributes::new("Example-Incident-Service".to_string()), ), ); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.CreateIncidentService", true); let api = IncidentServicesAPI::with_config(configuration); diff --git a/examples/v2_incident-services_DeleteIncidentService.rs b/examples/v2_incident-services_DeleteIncidentService.rs index 696721e30..4eb41b517 100644 --- a/examples/v2_incident-services_DeleteIncidentService.rs +++ b/examples/v2_incident-services_DeleteIncidentService.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_incident_services::IncidentServicesAPI; async fn main() { // there is a valid "service" in the system let service_data_id = std::env::var("SERVICE_DATA_ID").unwrap(); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.DeleteIncidentService", true); let api = IncidentServicesAPI::with_config(configuration); diff --git a/examples/v2_incident-services_GetIncidentService.rs b/examples/v2_incident-services_GetIncidentService.rs index bc0dfd5bd..6eb11265d 100644 --- a/examples/v2_incident-services_GetIncidentService.rs +++ b/examples/v2_incident-services_GetIncidentService.rs @@ -7,6 +7,7 @@ use datadog_api_client::datadogV2::api_incident_services::IncidentServicesAPI; async fn main() { // there is a valid "service" in the system let service_data_id = std::env::var("SERVICE_DATA_ID").unwrap(); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.GetIncidentService", true); let api = IncidentServicesAPI::with_config(configuration); diff --git a/examples/v2_incident-services_ListIncidentServices.rs b/examples/v2_incident-services_ListIncidentServices.rs index ae99642fa..2028d6d7e 100644 --- a/examples/v2_incident-services_ListIncidentServices.rs +++ b/examples/v2_incident-services_ListIncidentServices.rs @@ -7,6 +7,7 @@ use datadog_api_client::datadogV2::api_incident_services::ListIncidentServicesOp async fn main() { // there is a valid "service" in the system let service_data_attributes_name = std::env::var("SERVICE_DATA_ATTRIBUTES_NAME").unwrap(); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.ListIncidentServices", true); let api = IncidentServicesAPI::with_config(configuration); diff --git a/examples/v2_incident-services_UpdateIncidentService.rs b/examples/v2_incident-services_UpdateIncidentService.rs index 196227a63..29a9fa33d 100644 --- a/examples/v2_incident-services_UpdateIncidentService.rs +++ b/examples/v2_incident-services_UpdateIncidentService.rs @@ -15,6 +15,7 @@ async fn main() { IncidentServiceUpdateAttributes::new("service name-updated".to_string()), ), ); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.UpdateIncidentService", true); let api = IncidentServicesAPI::with_config(configuration); diff --git a/examples/v2_incident-teams_CreateIncidentTeam.rs b/examples/v2_incident-teams_CreateIncidentTeam.rs index 9e610dc43..64f672732 100644 --- a/examples/v2_incident-teams_CreateIncidentTeam.rs +++ b/examples/v2_incident-teams_CreateIncidentTeam.rs @@ -13,6 +13,7 @@ async fn main() { IncidentTeamCreateAttributes::new("Example-Incident-Team".to_string()), ), ); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.CreateIncidentTeam", true); let api = IncidentTeamsAPI::with_config(configuration); diff --git a/examples/v2_incident-teams_DeleteIncidentTeam.rs b/examples/v2_incident-teams_DeleteIncidentTeam.rs index 2bf61b508..5bb462b98 100644 --- a/examples/v2_incident-teams_DeleteIncidentTeam.rs +++ b/examples/v2_incident-teams_DeleteIncidentTeam.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_incident_teams::IncidentTeamsAPI; async fn main() { // there is a valid "team" in the system let team_data_id = std::env::var("TEAM_DATA_ID").unwrap(); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.DeleteIncidentTeam", true); let api = IncidentTeamsAPI::with_config(configuration); diff --git a/examples/v2_incident-teams_GetIncidentTeam.rs b/examples/v2_incident-teams_GetIncidentTeam.rs index 32117517c..22fe335c1 100644 --- a/examples/v2_incident-teams_GetIncidentTeam.rs +++ b/examples/v2_incident-teams_GetIncidentTeam.rs @@ -7,6 +7,7 @@ use datadog_api_client::datadogV2::api_incident_teams::IncidentTeamsAPI; async fn main() { // there is a valid "team" in the system let team_data_id = std::env::var("TEAM_DATA_ID").unwrap(); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.GetIncidentTeam", true); let api = IncidentTeamsAPI::with_config(configuration); diff --git a/examples/v2_incident-teams_ListIncidentTeams.rs b/examples/v2_incident-teams_ListIncidentTeams.rs index 76614029d..b1d7b8c46 100644 --- a/examples/v2_incident-teams_ListIncidentTeams.rs +++ b/examples/v2_incident-teams_ListIncidentTeams.rs @@ -7,6 +7,7 @@ use datadog_api_client::datadogV2::api_incident_teams::ListIncidentTeamsOptional async fn main() { // there is a valid "team" in the system let team_data_attributes_name = std::env::var("TEAM_DATA_ATTRIBUTES_NAME").unwrap(); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.ListIncidentTeams", true); let api = IncidentTeamsAPI::with_config(configuration); diff --git a/examples/v2_incident-teams_UpdateIncidentTeam.rs b/examples/v2_incident-teams_UpdateIncidentTeam.rs index 78befccd4..9400f293c 100644 --- a/examples/v2_incident-teams_UpdateIncidentTeam.rs +++ b/examples/v2_incident-teams_UpdateIncidentTeam.rs @@ -15,6 +15,7 @@ async fn main() { IncidentTeamUpdateAttributes::new("team name-updated".to_string()), ), ); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.UpdateIncidentTeam", true); let api = IncidentTeamsAPI::with_config(configuration); diff --git a/examples/v2_incidents_CreateIncident.rs b/examples/v2_incidents_CreateIncident.rs index 2e87e1457..42aa03563 100644 --- a/examples/v2_incidents_CreateIncident.rs +++ b/examples/v2_incidents_CreateIncident.rs @@ -39,6 +39,7 @@ async fn main() { ))), ))), ); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.CreateIncident", true); let api = IncidentsAPI::with_config(configuration); diff --git a/examples/v2_incidents_CreateIncidentIntegration.rs b/examples/v2_incidents_CreateIncidentIntegration.rs index af118be3a..43736ca4b 100644 --- a/examples/v2_incidents_CreateIncidentIntegration.rs +++ b/examples/v2_incidents_CreateIncidentIntegration.rs @@ -30,6 +30,7 @@ async fn main() { .incident_id(incident_data_id.clone()), IncidentIntegrationMetadataType::INCIDENT_INTEGRATIONS, )); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.CreateIncidentIntegration", true); let api = IncidentsAPI::with_config(configuration); diff --git a/examples/v2_incidents_CreateIncidentTodo.rs b/examples/v2_incidents_CreateIncidentTodo.rs index bfbf0e951..ff1dd5b3b 100644 --- a/examples/v2_incidents_CreateIncidentTodo.rs +++ b/examples/v2_incidents_CreateIncidentTodo.rs @@ -20,6 +20,7 @@ async fn main() { ), IncidentTodoType::INCIDENT_TODOS, )); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.CreateIncidentTodo", true); let api = IncidentsAPI::with_config(configuration); diff --git a/examples/v2_incidents_CreateIncidentType.rs b/examples/v2_incidents_CreateIncidentType.rs index b2ddbaf11..96a71a7f2 100644 --- a/examples/v2_incidents_CreateIncidentType.rs +++ b/examples/v2_incidents_CreateIncidentType.rs @@ -8,17 +8,8 @@ use datadog_api_client::datadogV2::model::IncidentTypeType; #[tokio::main] async fn main() { - let body = - IncidentTypeCreateRequest::new( - IncidentTypeCreateData::new( - IncidentTypeAttributes::new("Security Incident".to_string()) - .description( - "Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.".to_string(), - ) - .is_default(false), - IncidentTypeType::INCIDENT_TYPES, - ), - ); + let body = IncidentTypeCreateRequest::new(IncidentTypeCreateData::new(IncidentTypeAttributes::new("Security Incident".to_string(), ).description("Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.".to_string()).is_default(false), IncidentTypeType::INCIDENT_TYPES, ), ); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.CreateIncidentType", true); let api = IncidentsAPI::with_config(configuration); diff --git a/examples/v2_incidents_DeleteIncident.rs b/examples/v2_incidents_DeleteIncident.rs index 1052d0e8d..91061248b 100644 --- a/examples/v2_incidents_DeleteIncident.rs +++ b/examples/v2_incidents_DeleteIncident.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_incidents::IncidentsAPI; async fn main() { // there is a valid "incident" in the system let incident_data_id = std::env::var("INCIDENT_DATA_ID").unwrap(); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.DeleteIncident", true); let api = IncidentsAPI::with_config(configuration); diff --git a/examples/v2_incidents_DeleteIncidentIntegration.rs b/examples/v2_incidents_DeleteIncidentIntegration.rs index 092eacdbb..172220ec1 100644 --- a/examples/v2_incidents_DeleteIncidentIntegration.rs +++ b/examples/v2_incidents_DeleteIncidentIntegration.rs @@ -6,10 +6,10 @@ use datadog_api_client::datadogV2::api_incidents::IncidentsAPI; async fn main() { // there is a valid "incident" in the system let incident_data_id = std::env::var("INCIDENT_DATA_ID").unwrap(); - // the "incident" has an "incident_integration_metadata" let incident_integration_metadata_data_id = std::env::var("INCIDENT_INTEGRATION_METADATA_DATA_ID").unwrap(); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.DeleteIncidentIntegration", true); let api = IncidentsAPI::with_config(configuration); diff --git a/examples/v2_incidents_DeleteIncidentTodo.rs b/examples/v2_incidents_DeleteIncidentTodo.rs index eb74fb9bc..d359e9ab7 100644 --- a/examples/v2_incidents_DeleteIncidentTodo.rs +++ b/examples/v2_incidents_DeleteIncidentTodo.rs @@ -6,9 +6,9 @@ use datadog_api_client::datadogV2::api_incidents::IncidentsAPI; async fn main() { // there is a valid "incident" in the system let incident_data_id = std::env::var("INCIDENT_DATA_ID").unwrap(); - // the "incident" has an "incident_todo" let incident_todo_data_id = std::env::var("INCIDENT_TODO_DATA_ID").unwrap(); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.DeleteIncidentTodo", true); let api = IncidentsAPI::with_config(configuration); diff --git a/examples/v2_incidents_DeleteIncidentType.rs b/examples/v2_incidents_DeleteIncidentType.rs index 468c459d2..aed233f31 100644 --- a/examples/v2_incidents_DeleteIncidentType.rs +++ b/examples/v2_incidents_DeleteIncidentType.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_incidents::IncidentsAPI; async fn main() { // there is a valid "incident_type" in the system let incident_type_data_id = std::env::var("INCIDENT_TYPE_DATA_ID").unwrap(); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.DeleteIncidentType", true); let api = IncidentsAPI::with_config(configuration); diff --git a/examples/v2_incidents_GetIncident.rs b/examples/v2_incidents_GetIncident.rs index 7884276ff..f5fd866f3 100644 --- a/examples/v2_incidents_GetIncident.rs +++ b/examples/v2_incidents_GetIncident.rs @@ -7,6 +7,7 @@ use datadog_api_client::datadogV2::api_incidents::IncidentsAPI; async fn main() { // there is a valid "incident" in the system let incident_data_id = std::env::var("INCIDENT_DATA_ID").unwrap(); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.GetIncident", true); let api = IncidentsAPI::with_config(configuration); diff --git a/examples/v2_incidents_GetIncidentIntegration.rs b/examples/v2_incidents_GetIncidentIntegration.rs index 5ffde972d..a6f286e29 100644 --- a/examples/v2_incidents_GetIncidentIntegration.rs +++ b/examples/v2_incidents_GetIncidentIntegration.rs @@ -6,10 +6,10 @@ use datadog_api_client::datadogV2::api_incidents::IncidentsAPI; async fn main() { // there is a valid "incident" in the system let incident_data_id = std::env::var("INCIDENT_DATA_ID").unwrap(); - // the "incident" has an "incident_integration_metadata" let incident_integration_metadata_data_id = std::env::var("INCIDENT_INTEGRATION_METADATA_DATA_ID").unwrap(); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.GetIncidentIntegration", true); let api = IncidentsAPI::with_config(configuration); diff --git a/examples/v2_incidents_GetIncidentTodo.rs b/examples/v2_incidents_GetIncidentTodo.rs index 140824943..3dd144fb9 100644 --- a/examples/v2_incidents_GetIncidentTodo.rs +++ b/examples/v2_incidents_GetIncidentTodo.rs @@ -6,9 +6,9 @@ use datadog_api_client::datadogV2::api_incidents::IncidentsAPI; async fn main() { // there is a valid "incident" in the system let incident_data_id = std::env::var("INCIDENT_DATA_ID").unwrap(); - // the "incident" has an "incident_todo" let incident_todo_data_id = std::env::var("INCIDENT_TODO_DATA_ID").unwrap(); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.GetIncidentTodo", true); let api = IncidentsAPI::with_config(configuration); diff --git a/examples/v2_incidents_ListIncidentAttachments_2457735435.rs b/examples/v2_incidents_ListIncidentAttachments_2457735435.rs index 8ced7b70c..a4761d749 100644 --- a/examples/v2_incidents_ListIncidentAttachments_2457735435.rs +++ b/examples/v2_incidents_ListIncidentAttachments_2457735435.rs @@ -7,6 +7,7 @@ use datadog_api_client::datadogV2::api_incidents::ListIncidentAttachmentsOptiona async fn main() { // there is a valid "incident" in the system let incident_data_id = std::env::var("INCIDENT_DATA_ID").unwrap(); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.ListIncidentAttachments", true); let api = IncidentsAPI::with_config(configuration); diff --git a/examples/v2_incidents_ListIncidentIntegrations.rs b/examples/v2_incidents_ListIncidentIntegrations.rs index 29a561fd2..27e639ffc 100644 --- a/examples/v2_incidents_ListIncidentIntegrations.rs +++ b/examples/v2_incidents_ListIncidentIntegrations.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_incidents::IncidentsAPI; async fn main() { // there is a valid "incident" in the system let incident_data_id = std::env::var("INCIDENT_DATA_ID").unwrap(); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.ListIncidentIntegrations", true); let api = IncidentsAPI::with_config(configuration); diff --git a/examples/v2_incidents_ListIncidentTodos.rs b/examples/v2_incidents_ListIncidentTodos.rs index 4a94c5526..3f34ed24a 100644 --- a/examples/v2_incidents_ListIncidentTodos.rs +++ b/examples/v2_incidents_ListIncidentTodos.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_incidents::IncidentsAPI; async fn main() { // there is a valid "incident" in the system let incident_data_id = std::env::var("INCIDENT_DATA_ID").unwrap(); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.ListIncidentTodos", true); let api = IncidentsAPI::with_config(configuration); diff --git a/examples/v2_incidents_ListIncidents_2665616954.rs b/examples/v2_incidents_ListIncidents_2665616954.rs index 99be0451c..ed002835f 100644 --- a/examples/v2_incidents_ListIncidents_2665616954.rs +++ b/examples/v2_incidents_ListIncidents_2665616954.rs @@ -13,6 +13,7 @@ async fn main() { let response = api.list_incidents_with_pagination(ListIncidentsOptionalParams::default().page_size(2)); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_incidents_SearchIncidents_1931679109.rs b/examples/v2_incidents_SearchIncidents_1931679109.rs index f618c4425..1207e10be 100644 --- a/examples/v2_incidents_SearchIncidents_1931679109.rs +++ b/examples/v2_incidents_SearchIncidents_1931679109.rs @@ -15,6 +15,7 @@ async fn main() { SearchIncidentsOptionalParams::default().page_size(2), ); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_incidents_UpdateIncident.rs b/examples/v2_incidents_UpdateIncident.rs index ddc08b210..971d57169 100644 --- a/examples/v2_incidents_UpdateIncident.rs +++ b/examples/v2_incidents_UpdateIncident.rs @@ -29,6 +29,7 @@ async fn main() { .title("A test incident title-updated".to_string()), ), ); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.UpdateIncident", true); let api = IncidentsAPI::with_config(configuration); diff --git a/examples/v2_incidents_UpdateIncidentAttachments.rs b/examples/v2_incidents_UpdateIncidentAttachments.rs index f4577da9c..ca65f7627 100644 --- a/examples/v2_incidents_UpdateIncidentAttachments.rs +++ b/examples/v2_incidents_UpdateIncidentAttachments.rs @@ -43,6 +43,7 @@ async fn main() { IncidentAttachmentUpdateData::new(IncidentAttachmentType::INCIDENT_ATTACHMENTS) .id("00000000-abcd-0003-0000-000000000000".to_string()), ]); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.UpdateIncidentAttachments", true); let api = IncidentsAPI::with_config(configuration); diff --git a/examples/v2_incidents_UpdateIncidentAttachments_3881702075.rs b/examples/v2_incidents_UpdateIncidentAttachments_3881702075.rs index 7c15570b9..402676764 100644 --- a/examples/v2_incidents_UpdateIncidentAttachments_3881702075.rs +++ b/examples/v2_incidents_UpdateIncidentAttachments_3881702075.rs @@ -28,6 +28,7 @@ async fn main() { ), )), )]); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.UpdateIncidentAttachments", true); let api = IncidentsAPI::with_config(configuration); diff --git a/examples/v2_incidents_UpdateIncidentIntegration.rs b/examples/v2_incidents_UpdateIncidentIntegration.rs index 4a0097ec6..3c6e79eef 100644 --- a/examples/v2_incidents_UpdateIncidentIntegration.rs +++ b/examples/v2_incidents_UpdateIncidentIntegration.rs @@ -13,7 +13,6 @@ use datadog_api_client::datadogV2::model::SlackIntegrationMetadataChannelItem; async fn main() { // there is a valid "incident" in the system let incident_data_id = std::env::var("INCIDENT_DATA_ID").unwrap(); - // the "incident" has an "incident_integration_metadata" let incident_integration_metadata_data_id = std::env::var("INCIDENT_INTEGRATION_METADATA_DATA_ID").unwrap(); @@ -34,6 +33,7 @@ async fn main() { .incident_id(incident_data_id.clone()), IncidentIntegrationMetadataType::INCIDENT_INTEGRATIONS, )); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.UpdateIncidentIntegration", true); let api = IncidentsAPI::with_config(configuration); diff --git a/examples/v2_incidents_UpdateIncidentTodo.rs b/examples/v2_incidents_UpdateIncidentTodo.rs index 1dfbb0dad..0741bdd7f 100644 --- a/examples/v2_incidents_UpdateIncidentTodo.rs +++ b/examples/v2_incidents_UpdateIncidentTodo.rs @@ -11,7 +11,6 @@ use datadog_api_client::datadogV2::model::IncidentTodoType; async fn main() { // there is a valid "incident" in the system let incident_data_id = std::env::var("INCIDENT_DATA_ID").unwrap(); - // the "incident" has an "incident_todo" let incident_todo_data_id = std::env::var("INCIDENT_TODO_DATA_ID").unwrap(); let body = IncidentTodoPatchRequest::new(IncidentTodoPatchData::new( @@ -25,6 +24,7 @@ async fn main() { .due_date(Some("2023-07-10T05:00:00.000000+00:00".to_string())), IncidentTodoType::INCIDENT_TODOS, )); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.UpdateIncidentTodo", true); let api = IncidentsAPI::with_config(configuration); diff --git a/examples/v2_incidents_UpdateIncidentType.rs b/examples/v2_incidents_UpdateIncidentType.rs index ccce5d740..daae82620 100644 --- a/examples/v2_incidents_UpdateIncidentType.rs +++ b/examples/v2_incidents_UpdateIncidentType.rs @@ -15,6 +15,7 @@ async fn main() { incident_type_data_id.clone(), IncidentTypeType::INCIDENT_TYPES, )); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.UpdateIncidentType", true); let api = IncidentsAPI::with_config(configuration); diff --git a/examples/v2_incidents_UpdateIncident_1009194038.rs b/examples/v2_incidents_UpdateIncident_1009194038.rs index bfd8b1e23..3881dcfc8 100644 --- a/examples/v2_incidents_UpdateIncident_1009194038.rs +++ b/examples/v2_incidents_UpdateIncident_1009194038.rs @@ -18,6 +18,7 @@ async fn main() { .commander_user(Some(NullableRelationshipToUser::new(None))), ), ); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.UpdateIncident", true); let api = IncidentsAPI::with_config(configuration); diff --git a/examples/v2_incidents_UpdateIncident_3369341440.rs b/examples/v2_incidents_UpdateIncident_3369341440.rs index 6ba86348c..f2d3eb513 100644 --- a/examples/v2_incidents_UpdateIncident_3369341440.rs +++ b/examples/v2_incidents_UpdateIncident_3369341440.rs @@ -14,7 +14,6 @@ use datadog_api_client::datadogV2::model::UsersType; async fn main() { // there is a valid "incident" in the system let incident_data_id = std::env::var("INCIDENT_DATA_ID").unwrap(); - // there is a valid "user" in the system let user_data_id = std::env::var("USER_DATA_ID").unwrap(); let body = IncidentUpdateRequest::new( @@ -27,6 +26,7 @@ async fn main() { )), ), ); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.UpdateIncident", true); let api = IncidentsAPI::with_config(configuration); diff --git a/examples/v2_ip-allowlist_UpdateIPAllowlist.rs b/examples/v2_ip-allowlist_UpdateIPAllowlist.rs index 05755927c..e5edbe016 100644 --- a/examples/v2_ip-allowlist_UpdateIPAllowlist.rs +++ b/examples/v2_ip-allowlist_UpdateIPAllowlist.rs @@ -25,6 +25,7 @@ async fn main() { )]), ), ); + let configuration = datadog::Configuration::new(); let api = IPAllowlistAPI::with_config(configuration); let resp = api.update_ip_allowlist(body).await; diff --git a/examples/v2_key-management_CreateAPIKey.rs b/examples/v2_key-management_CreateAPIKey.rs index 16759b5ff..87674961c 100644 --- a/examples/v2_key-management_CreateAPIKey.rs +++ b/examples/v2_key-management_CreateAPIKey.rs @@ -12,6 +12,7 @@ async fn main() { APIKeyCreateAttributes::new("Example-Key-Management".to_string()), APIKeysType::API_KEYS, )); + let configuration = datadog::Configuration::new(); let api = KeyManagementAPI::with_config(configuration); let resp = api.create_api_key(body).await; diff --git a/examples/v2_key-management_CreateCurrentUserApplicationKey.rs b/examples/v2_key-management_CreateCurrentUserApplicationKey.rs index dbcd7ab27..b7ec2ec60 100644 --- a/examples/v2_key-management_CreateCurrentUserApplicationKey.rs +++ b/examples/v2_key-management_CreateCurrentUserApplicationKey.rs @@ -12,6 +12,7 @@ async fn main() { ApplicationKeyCreateAttributes::new("Example-Key-Management".to_string()), ApplicationKeysType::APPLICATION_KEYS, )); + let configuration = datadog::Configuration::new(); let api = KeyManagementAPI::with_config(configuration); let resp = api.create_current_user_application_key(body).await; diff --git a/examples/v2_key-management_CreateCurrentUserApplicationKey_3383369233.rs b/examples/v2_key-management_CreateCurrentUserApplicationKey_3383369233.rs index 915b9a2a6..d9763be6b 100644 --- a/examples/v2_key-management_CreateCurrentUserApplicationKey_3383369233.rs +++ b/examples/v2_key-management_CreateCurrentUserApplicationKey_3383369233.rs @@ -1,5 +1,4 @@ -// Create an Application key with scopes for current user returns "Created" -// response +// Create an Application key with scopes for current user returns "Created" response use datadog_api_client::datadog; use datadog_api_client::datadogV2::api_key_management::KeyManagementAPI; use datadog_api_client::datadogV2::model::ApplicationKeyCreateAttributes; @@ -19,6 +18,7 @@ async fn main() { )), ApplicationKeysType::APPLICATION_KEYS, )); + let configuration = datadog::Configuration::new(); let api = KeyManagementAPI::with_config(configuration); let resp = api.create_current_user_application_key(body).await; diff --git a/examples/v2_key-management_DeleteAPIKey.rs b/examples/v2_key-management_DeleteAPIKey.rs index 3dc8fd0cd..03cc962f6 100644 --- a/examples/v2_key-management_DeleteAPIKey.rs +++ b/examples/v2_key-management_DeleteAPIKey.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_key_management::KeyManagementAPI; async fn main() { // there is a valid "api_key" in the system let api_key_data_id = std::env::var("API_KEY_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = KeyManagementAPI::with_config(configuration); let resp = api.delete_api_key(api_key_data_id.clone()).await; diff --git a/examples/v2_key-management_DeleteApplicationKey.rs b/examples/v2_key-management_DeleteApplicationKey.rs index 48b72b124..be0cab5ce 100644 --- a/examples/v2_key-management_DeleteApplicationKey.rs +++ b/examples/v2_key-management_DeleteApplicationKey.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_key_management::KeyManagementAPI; async fn main() { // there is a valid "application_key" in the system let application_key_data_id = std::env::var("APPLICATION_KEY_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = KeyManagementAPI::with_config(configuration); let resp = api diff --git a/examples/v2_key-management_DeleteCurrentUserApplicationKey.rs b/examples/v2_key-management_DeleteCurrentUserApplicationKey.rs index 96ff1fa3c..655c638c5 100644 --- a/examples/v2_key-management_DeleteCurrentUserApplicationKey.rs +++ b/examples/v2_key-management_DeleteCurrentUserApplicationKey.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_key_management::KeyManagementAPI; async fn main() { // there is a valid "application_key" in the system let application_key_data_id = std::env::var("APPLICATION_KEY_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = KeyManagementAPI::with_config(configuration); let resp = api diff --git a/examples/v2_key-management_GetAPIKey.rs b/examples/v2_key-management_GetAPIKey.rs index 56a4b4e43..0f8d15784 100644 --- a/examples/v2_key-management_GetAPIKey.rs +++ b/examples/v2_key-management_GetAPIKey.rs @@ -7,6 +7,7 @@ use datadog_api_client::datadogV2::api_key_management::KeyManagementAPI; async fn main() { // there is a valid "api_key" in the system let api_key_data_id = std::env::var("API_KEY_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = KeyManagementAPI::with_config(configuration); let resp = api diff --git a/examples/v2_key-management_GetApplicationKey.rs b/examples/v2_key-management_GetApplicationKey.rs index b9bf1a8fd..456b0822a 100644 --- a/examples/v2_key-management_GetApplicationKey.rs +++ b/examples/v2_key-management_GetApplicationKey.rs @@ -7,6 +7,7 @@ use datadog_api_client::datadogV2::api_key_management::KeyManagementAPI; async fn main() { // there is a valid "application_key" in the system let application_key_data_id = std::env::var("APPLICATION_KEY_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = KeyManagementAPI::with_config(configuration); let resp = api diff --git a/examples/v2_key-management_ListAPIKeys.rs b/examples/v2_key-management_ListAPIKeys.rs index 3e4729567..3b980076b 100644 --- a/examples/v2_key-management_ListAPIKeys.rs +++ b/examples/v2_key-management_ListAPIKeys.rs @@ -7,6 +7,7 @@ use datadog_api_client::datadogV2::api_key_management::ListAPIKeysOptionalParams async fn main() { // there is a valid "api_key" in the system let api_key_data_attributes_name = std::env::var("API_KEY_DATA_ATTRIBUTES_NAME").unwrap(); + let configuration = datadog::Configuration::new(); let api = KeyManagementAPI::with_config(configuration); let resp = api diff --git a/examples/v2_key-management_UpdateAPIKey.rs b/examples/v2_key-management_UpdateAPIKey.rs index 047b93cc2..27ca3d6ef 100644 --- a/examples/v2_key-management_UpdateAPIKey.rs +++ b/examples/v2_key-management_UpdateAPIKey.rs @@ -15,6 +15,7 @@ async fn main() { api_key_data_id.clone(), APIKeysType::API_KEYS, )); + let configuration = datadog::Configuration::new(); let api = KeyManagementAPI::with_config(configuration); let resp = api.update_api_key(api_key_data_id.clone(), body).await; diff --git a/examples/v2_key-management_UpdateApplicationKey.rs b/examples/v2_key-management_UpdateApplicationKey.rs index 7a81834a5..c6e2a75c7 100644 --- a/examples/v2_key-management_UpdateApplicationKey.rs +++ b/examples/v2_key-management_UpdateApplicationKey.rs @@ -16,6 +16,7 @@ async fn main() { application_key_data_id.clone(), ApplicationKeysType::APPLICATION_KEYS, )); + let configuration = datadog::Configuration::new(); let api = KeyManagementAPI::with_config(configuration); let resp = api diff --git a/examples/v2_key-management_UpdateCurrentUserApplicationKey.rs b/examples/v2_key-management_UpdateCurrentUserApplicationKey.rs index 4e0c3e274..ac5769299 100644 --- a/examples/v2_key-management_UpdateCurrentUserApplicationKey.rs +++ b/examples/v2_key-management_UpdateCurrentUserApplicationKey.rs @@ -16,6 +16,7 @@ async fn main() { application_key_data_id.clone(), ApplicationKeysType::APPLICATION_KEYS, )); + let configuration = datadog::Configuration::new(); let api = KeyManagementAPI::with_config(configuration); let resp = api diff --git a/examples/v2_logs-archives_AddReadRoleToArchive.rs b/examples/v2_logs-archives_AddReadRoleToArchive.rs index 0ac5b4a11..65847d5dc 100644 --- a/examples/v2_logs-archives_AddReadRoleToArchive.rs +++ b/examples/v2_logs-archives_AddReadRoleToArchive.rs @@ -12,6 +12,7 @@ async fn main() { .id("3653d3c6-0c75-11ea-ad28-fb5701eabc7d".to_string()) .type_(RolesType::ROLES), ); + let configuration = datadog::Configuration::new(); let api = LogsArchivesAPI::with_config(configuration); let resp = api diff --git a/examples/v2_logs-archives_CreateLogsArchive.rs b/examples/v2_logs-archives_CreateLogsArchive.rs index 05403bffe..9540301a5 100644 --- a/examples/v2_logs-archives_CreateLogsArchive.rs +++ b/examples/v2_logs-archives_CreateLogsArchive.rs @@ -33,6 +33,7 @@ async fn main() { .rehydration_tags(vec!["team:intake".to_string(), "team:app".to_string()]), ), ); + let configuration = datadog::Configuration::new(); let api = LogsArchivesAPI::with_config(configuration); let resp = api.create_logs_archive(body).await; diff --git a/examples/v2_logs-archives_RemoveRoleFromArchive.rs b/examples/v2_logs-archives_RemoveRoleFromArchive.rs index bad685a23..f9f6202aa 100644 --- a/examples/v2_logs-archives_RemoveRoleFromArchive.rs +++ b/examples/v2_logs-archives_RemoveRoleFromArchive.rs @@ -12,6 +12,7 @@ async fn main() { .id("3653d3c6-0c75-11ea-ad28-fb5701eabc7d".to_string()) .type_(RolesType::ROLES), ); + let configuration = datadog::Configuration::new(); let api = LogsArchivesAPI::with_config(configuration); let resp = api diff --git a/examples/v2_logs-archives_UpdateLogsArchive.rs b/examples/v2_logs-archives_UpdateLogsArchive.rs index d988d45be..42a695442 100644 --- a/examples/v2_logs-archives_UpdateLogsArchive.rs +++ b/examples/v2_logs-archives_UpdateLogsArchive.rs @@ -33,6 +33,7 @@ async fn main() { .rehydration_tags(vec!["team:intake".to_string(), "team:app".to_string()]), ), ); + let configuration = datadog::Configuration::new(); let api = LogsArchivesAPI::with_config(configuration); let resp = api diff --git a/examples/v2_logs-archives_UpdateLogsArchiveOrder.rs b/examples/v2_logs-archives_UpdateLogsArchiveOrder.rs index 1ab993796..dc38d2332 100644 --- a/examples/v2_logs-archives_UpdateLogsArchiveOrder.rs +++ b/examples/v2_logs-archives_UpdateLogsArchiveOrder.rs @@ -16,6 +16,7 @@ async fn main() { ]), LogsArchiveOrderDefinitionType::ARCHIVE_ORDER, )); + let configuration = datadog::Configuration::new(); let api = LogsArchivesAPI::with_config(configuration); let resp = api.update_logs_archive_order(body).await; diff --git a/examples/v2_logs-custom-destinations_CreateLogsCustomDestination.rs b/examples/v2_logs-custom-destinations_CreateLogsCustomDestination.rs index df41999eb..004d11ce7 100644 --- a/examples/v2_logs-custom-destinations_CreateLogsCustomDestination.rs +++ b/examples/v2_logs-custom-destinations_CreateLogsCustomDestination.rs @@ -42,6 +42,7 @@ async fn main() { .query("source:nginx".to_string()), CustomDestinationType::CUSTOM_DESTINATION, )); + let configuration = datadog::Configuration::new(); let api = LogsCustomDestinationsAPI::with_config(configuration); let resp = api.create_logs_custom_destination(body).await; diff --git a/examples/v2_logs-custom-destinations_CreateLogsCustomDestination_1091442807.rs b/examples/v2_logs-custom-destinations_CreateLogsCustomDestination_1091442807.rs index 4eeb840f4..119756d73 100644 --- a/examples/v2_logs-custom-destinations_CreateLogsCustomDestination_1091442807.rs +++ b/examples/v2_logs-custom-destinations_CreateLogsCustomDestination_1091442807.rs @@ -15,38 +15,8 @@ use datadog_api_client::datadogV2::model::CustomDestinationType; #[tokio::main] async fn main() { - let body = - CustomDestinationCreateRequest - ::new().data( - CustomDestinationCreateRequestDefinition::new( - CustomDestinationCreateRequestAttributes::new( - CustomDestinationForwardDestination::CustomDestinationForwardDestinationHttp( - Box::new( - CustomDestinationForwardDestinationHttp::new( - CustomDestinationHttpDestinationAuth::CustomDestinationHttpDestinationAuthCustomHeader( - Box::new( - CustomDestinationHttpDestinationAuthCustomHeader::new( - "MY-AUTHENTICATION-HEADER".to_string(), - "my-secret".to_string(), - CustomDestinationHttpDestinationAuthCustomHeaderType::CUSTOM_HEADER, - ), - ), - ), - "https://example.com".to_string(), - CustomDestinationForwardDestinationHttpType::HTTP, - ), - ), - ), - "Nginx logs".to_string(), - ) - .enabled(false) - .forward_tags(false) - .forward_tags_restriction_list(vec!["datacenter".to_string(), "host".to_string()]) - .forward_tags_restriction_list_type(CustomDestinationAttributeTagsRestrictionListType::ALLOW_LIST) - .query("source:nginx".to_string()), - CustomDestinationType::CUSTOM_DESTINATION, - ), - ); + let body = CustomDestinationCreateRequest::new().data(CustomDestinationCreateRequestDefinition::new(CustomDestinationCreateRequestAttributes::new(CustomDestinationForwardDestination::CustomDestinationForwardDestinationHttp(Box::new(CustomDestinationForwardDestinationHttp::new(CustomDestinationHttpDestinationAuth::CustomDestinationHttpDestinationAuthCustomHeader(Box::new(CustomDestinationHttpDestinationAuthCustomHeader::new("MY-AUTHENTICATION-HEADER".to_string(), "my-secret".to_string(), CustomDestinationHttpDestinationAuthCustomHeaderType::CUSTOM_HEADER, ))), "https://example.com".to_string(), CustomDestinationForwardDestinationHttpType::HTTP, ))), "Nginx logs".to_string(), ).enabled(false).forward_tags(false).forward_tags_restriction_list(vec!["datacenter".to_string(),"host".to_string(),]).forward_tags_restriction_list_type(CustomDestinationAttributeTagsRestrictionListType::ALLOW_LIST).query("source:nginx".to_string()), CustomDestinationType::CUSTOM_DESTINATION, )); + let configuration = datadog::Configuration::new(); let api = LogsCustomDestinationsAPI::with_config(configuration); let resp = api.create_logs_custom_destination(body).await; diff --git a/examples/v2_logs-custom-destinations_CreateLogsCustomDestination_1288180912.rs b/examples/v2_logs-custom-destinations_CreateLogsCustomDestination_1288180912.rs index cdf0b2598..e8b3fb2b3 100644 --- a/examples/v2_logs-custom-destinations_CreateLogsCustomDestination_1288180912.rs +++ b/examples/v2_logs-custom-destinations_CreateLogsCustomDestination_1288180912.rs @@ -33,6 +33,7 @@ async fn main() { .query("source:nginx".to_string()), CustomDestinationType::CUSTOM_DESTINATION, )); + let configuration = datadog::Configuration::new(); let api = LogsCustomDestinationsAPI::with_config(configuration); let resp = api.create_logs_custom_destination(body).await; diff --git a/examples/v2_logs-custom-destinations_CreateLogsCustomDestination_141236188.rs b/examples/v2_logs-custom-destinations_CreateLogsCustomDestination_141236188.rs index 0d1941fb6..69e6f8309 100644 --- a/examples/v2_logs-custom-destinations_CreateLogsCustomDestination_141236188.rs +++ b/examples/v2_logs-custom-destinations_CreateLogsCustomDestination_141236188.rs @@ -41,6 +41,7 @@ async fn main() { .query("source:nginx".to_string()), CustomDestinationType::CUSTOM_DESTINATION, )); + let configuration = datadog::Configuration::new(); let api = LogsCustomDestinationsAPI::with_config(configuration); let resp = api.create_logs_custom_destination(body).await; diff --git a/examples/v2_logs-custom-destinations_CreateLogsCustomDestination_2184123765.rs b/examples/v2_logs-custom-destinations_CreateLogsCustomDestination_2184123765.rs index 65ae9daac..0a90238a3 100644 --- a/examples/v2_logs-custom-destinations_CreateLogsCustomDestination_2184123765.rs +++ b/examples/v2_logs-custom-destinations_CreateLogsCustomDestination_2184123765.rs @@ -42,6 +42,7 @@ async fn main() { .query("source:nginx".to_string()), CustomDestinationType::CUSTOM_DESTINATION, )); + let configuration = datadog::Configuration::new(); let api = LogsCustomDestinationsAPI::with_config(configuration); let resp = api.create_logs_custom_destination(body).await; diff --git a/examples/v2_logs-custom-destinations_DeleteLogsCustomDestination.rs b/examples/v2_logs-custom-destinations_DeleteLogsCustomDestination.rs index 18f691256..61abc248c 100644 --- a/examples/v2_logs-custom-destinations_DeleteLogsCustomDestination.rs +++ b/examples/v2_logs-custom-destinations_DeleteLogsCustomDestination.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_logs_custom_destinations::LogsCustomDesti async fn main() { // there is a valid "custom_destination" in the system let custom_destination_data_id = std::env::var("CUSTOM_DESTINATION_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = LogsCustomDestinationsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_logs-custom-destinations_GetLogsCustomDestination.rs b/examples/v2_logs-custom-destinations_GetLogsCustomDestination.rs index 904579215..4f23219f3 100644 --- a/examples/v2_logs-custom-destinations_GetLogsCustomDestination.rs +++ b/examples/v2_logs-custom-destinations_GetLogsCustomDestination.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_logs_custom_destinations::LogsCustomDesti async fn main() { // there is a valid "custom_destination" in the system let custom_destination_data_id = std::env::var("CUSTOM_DESTINATION_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = LogsCustomDestinationsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_logs-custom-destinations_UpdateLogsCustomDestination.rs b/examples/v2_logs-custom-destinations_UpdateLogsCustomDestination.rs index dfdccbc9c..7d537e8ba 100644 --- a/examples/v2_logs-custom-destinations_UpdateLogsCustomDestination.rs +++ b/examples/v2_logs-custom-destinations_UpdateLogsCustomDestination.rs @@ -27,6 +27,7 @@ async fn main() { .query("source:nginx".to_string()), ), ); + let configuration = datadog::Configuration::new(); let api = LogsCustomDestinationsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_logs-metrics_CreateLogsMetric.rs b/examples/v2_logs-metrics_CreateLogsMetric.rs index a60772d48..95e102a28 100644 --- a/examples/v2_logs-metrics_CreateLogsMetric.rs +++ b/examples/v2_logs-metrics_CreateLogsMetric.rs @@ -19,6 +19,7 @@ async fn main() { "ExampleLogsMetric".to_string(), LogsMetricType::LOGS_METRICS, )); + let configuration = datadog::Configuration::new(); let api = LogsMetricsAPI::with_config(configuration); let resp = api.create_logs_metric(body).await; diff --git a/examples/v2_logs-metrics_DeleteLogsMetric.rs b/examples/v2_logs-metrics_DeleteLogsMetric.rs index cd38231a0..0614377d6 100644 --- a/examples/v2_logs-metrics_DeleteLogsMetric.rs +++ b/examples/v2_logs-metrics_DeleteLogsMetric.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_logs_metrics::LogsMetricsAPI; async fn main() { // there is a valid "logs_metric" in the system let logs_metric_data_id = std::env::var("LOGS_METRIC_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = LogsMetricsAPI::with_config(configuration); let resp = api.delete_logs_metric(logs_metric_data_id.clone()).await; diff --git a/examples/v2_logs-metrics_GetLogsMetric.rs b/examples/v2_logs-metrics_GetLogsMetric.rs index dcc349591..ac33ad2b4 100644 --- a/examples/v2_logs-metrics_GetLogsMetric.rs +++ b/examples/v2_logs-metrics_GetLogsMetric.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_logs_metrics::LogsMetricsAPI; async fn main() { // there is a valid "logs_metric" in the system let logs_metric_data_id = std::env::var("LOGS_METRIC_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = LogsMetricsAPI::with_config(configuration); let resp = api.get_logs_metric(logs_metric_data_id.clone()).await; diff --git a/examples/v2_logs-metrics_UpdateLogsMetric.rs b/examples/v2_logs-metrics_UpdateLogsMetric.rs index 7249ce5f8..5a4e7542d 100644 --- a/examples/v2_logs-metrics_UpdateLogsMetric.rs +++ b/examples/v2_logs-metrics_UpdateLogsMetric.rs @@ -18,6 +18,7 @@ async fn main() { ), LogsMetricType::LOGS_METRICS, )); + let configuration = datadog::Configuration::new(); let api = LogsMetricsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_logs-metrics_UpdateLogsMetric_1901534424.rs b/examples/v2_logs-metrics_UpdateLogsMetric_1901534424.rs index f973e6123..9ae974917 100644 --- a/examples/v2_logs-metrics_UpdateLogsMetric_1901534424.rs +++ b/examples/v2_logs-metrics_UpdateLogsMetric_1901534424.rs @@ -16,6 +16,7 @@ async fn main() { .compute(LogsMetricUpdateCompute::new().include_percentiles(false)), LogsMetricType::LOGS_METRICS, )); + let configuration = datadog::Configuration::new(); let api = LogsMetricsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_logs_AggregateLogs.rs b/examples/v2_logs_AggregateLogs.rs index 0d237b1e9..8a82f5e52 100644 --- a/examples/v2_logs_AggregateLogs.rs +++ b/examples/v2_logs_AggregateLogs.rs @@ -13,6 +13,7 @@ async fn main() { .query("*".to_string()) .to("now".to_string()), ); + let configuration = datadog::Configuration::new(); let api = LogsAPI::with_config(configuration); let resp = api.aggregate_logs(body).await; diff --git a/examples/v2_logs_AggregateLogs_2527007002.rs b/examples/v2_logs_AggregateLogs_2527007002.rs index 97cf7ade8..fed32b1cf 100644 --- a/examples/v2_logs_AggregateLogs_2527007002.rs +++ b/examples/v2_logs_AggregateLogs_2527007002.rs @@ -20,6 +20,7 @@ async fn main() { .query("*".to_string()) .to("now".to_string()), ); + let configuration = datadog::Configuration::new(); let api = LogsAPI::with_config(configuration); let resp = api.aggregate_logs(body).await; diff --git a/examples/v2_logs_AggregateLogs_2955613758.rs b/examples/v2_logs_AggregateLogs_2955613758.rs index acda117ab..a7dea0102 100644 --- a/examples/v2_logs_AggregateLogs_2955613758.rs +++ b/examples/v2_logs_AggregateLogs_2955613758.rs @@ -36,6 +36,7 @@ async fn main() { .order(LogsSortOrder::ASCENDING) .type_(LogsAggregateSortType::MEASURE), )]); + let configuration = datadog::Configuration::new(); let api = LogsAPI::with_config(configuration); let resp = api.aggregate_logs(body).await; diff --git a/examples/v2_logs_ListLogs.rs b/examples/v2_logs_ListLogs.rs index c27790f5e..1e41c1a76 100644 --- a/examples/v2_logs_ListLogs.rs +++ b/examples/v2_logs_ListLogs.rs @@ -11,25 +11,8 @@ use datadog_api_client::datadogV2::model::LogsStorageTier; #[tokio::main] async fn main() { - let body = - LogsListRequest::new() - .filter( - LogsQueryFilter::new() - .from("now-15m".to_string()) - .indexes(vec!["main".to_string(), "web".to_string()]) - .query("service:web* AND @http.status_code:[200 TO 299]".to_string()) - .storage_tier(LogsStorageTier::INDEXES) - .to("now".to_string()), - ) - .options(LogsQueryOptions::new().timezone("GMT".to_string())) - .page( - LogsListRequestPage::new() - .cursor( - "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==".to_string(), - ) - .limit(25), - ) - .sort(LogsSort::TIMESTAMP_ASCENDING); + let body = LogsListRequest::new().filter(LogsQueryFilter::new().from("now-15m".to_string()).indexes(vec!["main".to_string(),"web".to_string(),]).query("service:web* AND @http.status_code:[200 TO 299]".to_string()).storage_tier(LogsStorageTier::INDEXES).to("now".to_string())).options(LogsQueryOptions::new().timezone("GMT".to_string())).page(LogsListRequestPage::new().cursor("eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==".to_string()).limit(25)).sort(LogsSort::TIMESTAMP_ASCENDING); + let configuration = datadog::Configuration::new(); let api = LogsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_logs_ListLogsGet_175182691.rs b/examples/v2_logs_ListLogsGet_175182691.rs index 7361312a1..5f22c9e65 100644 --- a/examples/v2_logs_ListLogsGet_175182691.rs +++ b/examples/v2_logs_ListLogsGet_175182691.rs @@ -11,6 +11,7 @@ async fn main() { let api = LogsAPI::with_config(configuration); let response = api.list_logs_get_with_pagination(ListLogsGetOptionalParams::default()); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_logs_ListLogsGet_738202670.rs b/examples/v2_logs_ListLogsGet_738202670.rs index a7a40604d..1601785d2 100644 --- a/examples/v2_logs_ListLogsGet_738202670.rs +++ b/examples/v2_logs_ListLogsGet_738202670.rs @@ -12,6 +12,7 @@ async fn main() { let response = api.list_logs_get_with_pagination(ListLogsGetOptionalParams::default().page_limit(2)); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_logs_ListLogs_3138392594.rs b/examples/v2_logs_ListLogs_3138392594.rs index b57f9223b..977aca3cb 100644 --- a/examples/v2_logs_ListLogs_3138392594.rs +++ b/examples/v2_logs_ListLogs_3138392594.rs @@ -22,10 +22,12 @@ async fn main() { .options(LogsQueryOptions::new().timezone("GMT".to_string())) .page(LogsListRequestPage::new().limit(2)) .sort(LogsSort::TIMESTAMP_ASCENDING); + let configuration = datadog::Configuration::new(); let api = LogsAPI::with_config(configuration); let response = api.list_logs_with_pagination(ListLogsOptionalParams::default().body(body)); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_logs_ListLogs_3400928236.rs b/examples/v2_logs_ListLogs_3400928236.rs index 06c8ee10b..31ebf8eb7 100644 --- a/examples/v2_logs_ListLogs_3400928236.rs +++ b/examples/v2_logs_ListLogs_3400928236.rs @@ -19,6 +19,7 @@ async fn main() { ) .page(LogsListRequestPage::new().limit(5)) .sort(LogsSort::TIMESTAMP_ASCENDING); + let configuration = datadog::Configuration::new(); let api = LogsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_logs_ListLogs_534975433.rs b/examples/v2_logs_ListLogs_534975433.rs index 6cc613335..94c2c8a8a 100644 --- a/examples/v2_logs_ListLogs_534975433.rs +++ b/examples/v2_logs_ListLogs_534975433.rs @@ -13,29 +13,13 @@ use futures_util::stream::StreamExt; #[tokio::main] async fn main() { - let body = - LogsListRequest::new() - .filter( - LogsQueryFilter::new() - .from("now-15m".to_string()) - .indexes(vec!["main".to_string(), "web".to_string()]) - .query("service:web* AND @http.status_code:[200 TO 299]".to_string()) - .storage_tier(LogsStorageTier::INDEXES) - .to("now".to_string()), - ) - .options(LogsQueryOptions::new().timezone("GMT".to_string())) - .page( - LogsListRequestPage::new() - .cursor( - "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==".to_string(), - ) - .limit(25), - ) - .sort(LogsSort::TIMESTAMP_ASCENDING); + let body = LogsListRequest::new().filter(LogsQueryFilter::new().from("now-15m".to_string()).indexes(vec!["main".to_string(),"web".to_string(),]).query("service:web* AND @http.status_code:[200 TO 299]".to_string()).storage_tier(LogsStorageTier::INDEXES).to("now".to_string())).options(LogsQueryOptions::new().timezone("GMT".to_string())).page(LogsListRequestPage::new().cursor("eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==".to_string()).limit(25)).sort(LogsSort::TIMESTAMP_ASCENDING); + let configuration = datadog::Configuration::new(); let api = LogsAPI::with_config(configuration); let response = api.list_logs_with_pagination(ListLogsOptionalParams::default().body(body)); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_logs_SubmitLog.rs b/examples/v2_logs_SubmitLog.rs index 7b37bd108..71159f6db 100644 --- a/examples/v2_logs_SubmitLog.rs +++ b/examples/v2_logs_SubmitLog.rs @@ -1,5 +1,4 @@ -// Send logs returns "Request accepted for processing (always 202 empty JSON)." -// response +// Send logs returns "Request accepted for processing (always 202 empty JSON)." response use datadog_api_client::datadog; use datadog_api_client::datadogV2::api_logs::LogsAPI; use datadog_api_client::datadogV2::api_logs::SubmitLogOptionalParams; @@ -20,6 +19,7 @@ async fn main() { "status".to_string(), Value::from("info"), )]))]; + let configuration = datadog::Configuration::new(); let api = LogsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_logs_SubmitLog_3496222707.rs b/examples/v2_logs_SubmitLog_3496222707.rs index 7e9bcced4..62a155d4e 100644 --- a/examples/v2_logs_SubmitLog_3496222707.rs +++ b/examples/v2_logs_SubmitLog_3496222707.rs @@ -1,5 +1,4 @@ -// Send gzip logs returns "Request accepted for processing (always 202 empty -// JSON)." response +// Send gzip logs returns "Request accepted for processing (always 202 empty JSON)." response use datadog_api_client::datadog; use datadog_api_client::datadogV2::api_logs::LogsAPI; use datadog_api_client::datadogV2::api_logs::SubmitLogOptionalParams; @@ -17,6 +16,7 @@ async fn main() { .hostname("i-012345678".to_string()) .service("payment".to_string()) .additional_properties(BTreeMap::from([]))]; + let configuration = datadog::Configuration::new(); let api = LogsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_logs_SubmitLog_904601870.rs b/examples/v2_logs_SubmitLog_904601870.rs index 6bb579ddf..74291957d 100644 --- a/examples/v2_logs_SubmitLog_904601870.rs +++ b/examples/v2_logs_SubmitLog_904601870.rs @@ -1,5 +1,4 @@ -// Send deflate logs returns "Request accepted for processing (always 202 empty -// JSON)." response +// Send deflate logs returns "Request accepted for processing (always 202 empty JSON)." response use datadog_api_client::datadog; use datadog_api_client::datadogV2::api_logs::LogsAPI; use datadog_api_client::datadogV2::api_logs::SubmitLogOptionalParams; @@ -17,6 +16,7 @@ async fn main() { .hostname("i-012345678".to_string()) .service("payment".to_string()) .additional_properties(BTreeMap::from([]))]; + let configuration = datadog::Configuration::new(); let api = LogsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_metrics_CreateBulkTagsMetricsConfiguration.rs b/examples/v2_metrics_CreateBulkTagsMetricsConfiguration.rs index ed752b5ee..c3874e255 100644 --- a/examples/v2_metrics_CreateBulkTagsMetricsConfiguration.rs +++ b/examples/v2_metrics_CreateBulkTagsMetricsConfiguration.rs @@ -21,6 +21,7 @@ async fn main() { .tags(vec!["test".to_string(), "examplemetric".to_string()]), ), ); + let configuration = datadog::Configuration::new(); let api = MetricsAPI::with_config(configuration); let resp = api.create_bulk_tags_metrics_configuration(body).await; diff --git a/examples/v2_metrics_CreateTagConfiguration.rs b/examples/v2_metrics_CreateTagConfiguration.rs index 27f08158d..50f9e1fd5 100644 --- a/examples/v2_metrics_CreateTagConfiguration.rs +++ b/examples/v2_metrics_CreateTagConfiguration.rs @@ -19,6 +19,7 @@ async fn main() { vec!["app".to_string(), "datacenter".to_string()], )), ); + let configuration = datadog::Configuration::new(); let api = MetricsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_metrics_DeleteBulkTagsMetricsConfiguration.rs b/examples/v2_metrics_DeleteBulkTagsMetricsConfiguration.rs index 6bd3fc0c7..3ad80508a 100644 --- a/examples/v2_metrics_DeleteBulkTagsMetricsConfiguration.rs +++ b/examples/v2_metrics_DeleteBulkTagsMetricsConfiguration.rs @@ -18,6 +18,7 @@ async fn main() { "bob@example.com".to_string(), ])), ); + let configuration = datadog::Configuration::new(); let api = MetricsAPI::with_config(configuration); let resp = api.delete_bulk_tags_metrics_configuration(body).await; diff --git a/examples/v2_metrics_ListTagConfigurationByName.rs b/examples/v2_metrics_ListTagConfigurationByName.rs index a0eb8bda8..7c22c0f8a 100644 --- a/examples/v2_metrics_ListTagConfigurationByName.rs +++ b/examples/v2_metrics_ListTagConfigurationByName.rs @@ -7,6 +7,7 @@ async fn main() { // there is a valid "metric_tag_configuration" in the system let metric_tag_configuration_data_id = std::env::var("METRIC_TAG_CONFIGURATION_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = MetricsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_metrics_ListTagConfigurations_3969783727.rs b/examples/v2_metrics_ListTagConfigurations_3969783727.rs index edda94b1c..b7b9df1a2 100644 --- a/examples/v2_metrics_ListTagConfigurations_3969783727.rs +++ b/examples/v2_metrics_ListTagConfigurations_3969783727.rs @@ -13,6 +13,7 @@ async fn main() { ListTagConfigurationsOptionalParams::default().page_size(2), ); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_metrics_ListTagsByMetricName.rs b/examples/v2_metrics_ListTagsByMetricName.rs index f197474f3..af0a5c8e7 100644 --- a/examples/v2_metrics_ListTagsByMetricName.rs +++ b/examples/v2_metrics_ListTagsByMetricName.rs @@ -7,6 +7,7 @@ async fn main() { // there is a valid "metric_tag_configuration" in the system let metric_tag_configuration_data_id = std::env::var("METRIC_TAG_CONFIGURATION_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = MetricsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_metrics_QueryScalarData.rs b/examples/v2_metrics_QueryScalarData.rs index 053b5f444..357150ca3 100644 --- a/examples/v2_metrics_QueryScalarData.rs +++ b/examples/v2_metrics_QueryScalarData.rs @@ -31,6 +31,7 @@ async fn main() { .limit(FormulaLimit::new().count(10).order(QuerySortOrder::DESC))]), ScalarFormulaRequestType::SCALAR_REQUEST, )); + let configuration = datadog::Configuration::new(); let api = MetricsAPI::with_config(configuration); let resp = api.query_scalar_data(body).await; diff --git a/examples/v2_metrics_QueryScalarData_3112571352.rs b/examples/v2_metrics_QueryScalarData_3112571352.rs index 67796f7bd..47f526959 100644 --- a/examples/v2_metrics_QueryScalarData_3112571352.rs +++ b/examples/v2_metrics_QueryScalarData_3112571352.rs @@ -32,6 +32,7 @@ async fn main() { .limit(FormulaLimit::new().count(10).order(QuerySortOrder::DESC))]), ScalarFormulaRequestType::SCALAR_REQUEST, )); + let configuration = datadog::Configuration::new(); let api = MetricsAPI::with_config(configuration); let resp = api.query_scalar_data(body).await; diff --git a/examples/v2_metrics_QueryTimeseriesData.rs b/examples/v2_metrics_QueryTimeseriesData.rs index dbcad979c..9736789c1 100644 --- a/examples/v2_metrics_QueryTimeseriesData.rs +++ b/examples/v2_metrics_QueryTimeseriesData.rs @@ -30,6 +30,7 @@ async fn main() { .interval(5000), TimeseriesFormulaRequestType::TIMESERIES_REQUEST, )); + let configuration = datadog::Configuration::new(); let api = MetricsAPI::with_config(configuration); let resp = api.query_timeseries_data(body).await; diff --git a/examples/v2_metrics_QueryTimeseriesData_301142940.rs b/examples/v2_metrics_QueryTimeseriesData_301142940.rs index 23819bff1..ba1930162 100644 --- a/examples/v2_metrics_QueryTimeseriesData_301142940.rs +++ b/examples/v2_metrics_QueryTimeseriesData_301142940.rs @@ -31,6 +31,7 @@ async fn main() { .interval(5000), TimeseriesFormulaRequestType::TIMESERIES_REQUEST, )); + let configuration = datadog::Configuration::new(); let api = MetricsAPI::with_config(configuration); let resp = api.query_timeseries_data(body).await; diff --git a/examples/v2_metrics_SubmitMetrics.rs b/examples/v2_metrics_SubmitMetrics.rs index d169cb144..54d357d60 100644 --- a/examples/v2_metrics_SubmitMetrics.rs +++ b/examples/v2_metrics_SubmitMetrics.rs @@ -18,6 +18,7 @@ async fn main() { .name("dummyhost".to_string()) .type_("host".to_string())]) .type_(MetricIntakeType::UNSPECIFIED)]); + let configuration = datadog::Configuration::new(); let api = MetricsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_metrics_SubmitMetrics_1762007427.rs b/examples/v2_metrics_SubmitMetrics_1762007427.rs index 4d8b08809..d5f4aab84 100644 --- a/examples/v2_metrics_SubmitMetrics_1762007427.rs +++ b/examples/v2_metrics_SubmitMetrics_1762007427.rs @@ -15,6 +15,7 @@ async fn main() { vec![MetricPoint::new().timestamp(1636629071).value(0.7 as f64)], ) .type_(MetricIntakeType::UNSPECIFIED)]); + let configuration = datadog::Configuration::new(); let api = MetricsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_metrics_UpdateTagConfiguration.rs b/examples/v2_metrics_UpdateTagConfiguration.rs index db28acb86..78407b70d 100644 --- a/examples/v2_metrics_UpdateTagConfiguration.rs +++ b/examples/v2_metrics_UpdateTagConfiguration.rs @@ -18,6 +18,7 @@ async fn main() { ) .attributes(MetricTagConfigurationUpdateAttributes::new().tags(vec!["app".to_string()])), ); + let configuration = datadog::Configuration::new(); let api = MetricsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_microsoft-teams-integration_CreateTenantBasedHandle.rs b/examples/v2_microsoft-teams-integration_CreateTenantBasedHandle.rs index feca5d42c..9666d7589 100644 --- a/examples/v2_microsoft-teams-integration_CreateTenantBasedHandle.rs +++ b/examples/v2_microsoft-teams-integration_CreateTenantBasedHandle.rs @@ -19,6 +19,7 @@ async fn main() { MicrosoftTeamsTenantBasedHandleType::TENANT_BASED_HANDLE, ), ); + let configuration = datadog::Configuration::new(); let api = MicrosoftTeamsIntegrationAPI::with_config(configuration); let resp = api.create_tenant_based_handle(body).await; diff --git a/examples/v2_microsoft-teams-integration_CreateTenantBasedHandle_1540689753.rs b/examples/v2_microsoft-teams-integration_CreateTenantBasedHandle_1540689753.rs index 5ece4cca6..ad04589f4 100644 --- a/examples/v2_microsoft-teams-integration_CreateTenantBasedHandle_1540689753.rs +++ b/examples/v2_microsoft-teams-integration_CreateTenantBasedHandle_1540689753.rs @@ -19,6 +19,7 @@ async fn main() { MicrosoftTeamsTenantBasedHandleType::TENANT_BASED_HANDLE, ), ); + let configuration = datadog::Configuration::new(); let api = MicrosoftTeamsIntegrationAPI::with_config(configuration); let resp = api.create_tenant_based_handle(body).await; diff --git a/examples/v2_microsoft-teams-integration_DeleteTenantBasedHandle_377884154.rs b/examples/v2_microsoft-teams-integration_DeleteTenantBasedHandle_377884154.rs index 26aac0ae9..81a6c8903 100644 --- a/examples/v2_microsoft-teams-integration_DeleteTenantBasedHandle_377884154.rs +++ b/examples/v2_microsoft-teams-integration_DeleteTenantBasedHandle_377884154.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_microsoft_teams_integration::MicrosoftTea async fn main() { // there is a valid "tenant_based_handle" in the system let tenant_based_handle_data_id = std::env::var("TENANT_BASED_HANDLE_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = MicrosoftTeamsIntegrationAPI::with_config(configuration); let resp = api diff --git a/examples/v2_microsoft-teams-integration_GetTenantBasedHandle_2883785101.rs b/examples/v2_microsoft-teams-integration_GetTenantBasedHandle_2883785101.rs index 2edfb2ccd..86e9c69c7 100644 --- a/examples/v2_microsoft-teams-integration_GetTenantBasedHandle_2883785101.rs +++ b/examples/v2_microsoft-teams-integration_GetTenantBasedHandle_2883785101.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_microsoft_teams_integration::MicrosoftTea async fn main() { // there is a valid "tenant_based_handle" in the system let tenant_based_handle_data_id = std::env::var("TENANT_BASED_HANDLE_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = MicrosoftTeamsIntegrationAPI::with_config(configuration); let resp = api diff --git a/examples/v2_microsoft-teams-integration_UpdateTenantBasedHandle.rs b/examples/v2_microsoft-teams-integration_UpdateTenantBasedHandle.rs index cc41df21d..4ab1d0bc5 100644 --- a/examples/v2_microsoft-teams-integration_UpdateTenantBasedHandle.rs +++ b/examples/v2_microsoft-teams-integration_UpdateTenantBasedHandle.rs @@ -18,6 +18,7 @@ async fn main() { MicrosoftTeamsTenantBasedHandleType::TENANT_BASED_HANDLE, ), ); + let configuration = datadog::Configuration::new(); let api = MicrosoftTeamsIntegrationAPI::with_config(configuration); let resp = api diff --git a/examples/v2_microsoft-teams-integration_UpdateTenantBasedHandle_419892746.rs b/examples/v2_microsoft-teams-integration_UpdateTenantBasedHandle_419892746.rs index 0402651ce..f2f22cfab 100644 --- a/examples/v2_microsoft-teams-integration_UpdateTenantBasedHandle_419892746.rs +++ b/examples/v2_microsoft-teams-integration_UpdateTenantBasedHandle_419892746.rs @@ -17,6 +17,7 @@ async fn main() { MicrosoftTeamsTenantBasedHandleType::TENANT_BASED_HANDLE, ), ); + let configuration = datadog::Configuration::new(); let api = MicrosoftTeamsIntegrationAPI::with_config(configuration); let resp = api diff --git a/examples/v2_monitors_CreateMonitorConfigPolicy.rs b/examples/v2_monitors_CreateMonitorConfigPolicy.rs index 69223e371..49a008ba4 100644 --- a/examples/v2_monitors_CreateMonitorConfigPolicy.rs +++ b/examples/v2_monitors_CreateMonitorConfigPolicy.rs @@ -24,6 +24,7 @@ async fn main() { ), MonitorConfigPolicyResourceType::MONITOR_CONFIG_POLICY, )); + let configuration = datadog::Configuration::new(); let api = MonitorsAPI::with_config(configuration); let resp = api.create_monitor_config_policy(body).await; diff --git a/examples/v2_monitors_DeleteMonitorConfigPolicy.rs b/examples/v2_monitors_DeleteMonitorConfigPolicy.rs index 4665afa1d..08e81f01a 100644 --- a/examples/v2_monitors_DeleteMonitorConfigPolicy.rs +++ b/examples/v2_monitors_DeleteMonitorConfigPolicy.rs @@ -7,6 +7,7 @@ async fn main() { // there is a valid "monitor_configuration_policy" in the system let monitor_configuration_policy_data_id = std::env::var("MONITOR_CONFIGURATION_POLICY_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = MonitorsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_monitors_GetMonitorConfigPolicy.rs b/examples/v2_monitors_GetMonitorConfigPolicy.rs index c691102b8..fbc4dd18e 100644 --- a/examples/v2_monitors_GetMonitorConfigPolicy.rs +++ b/examples/v2_monitors_GetMonitorConfigPolicy.rs @@ -7,6 +7,7 @@ async fn main() { // there is a valid "monitor_configuration_policy" in the system let monitor_configuration_policy_data_id = std::env::var("MONITOR_CONFIGURATION_POLICY_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = MonitorsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_monitors_UpdateMonitorConfigPolicy.rs b/examples/v2_monitors_UpdateMonitorConfigPolicy.rs index 39dbe5b64..444fc6b69 100644 --- a/examples/v2_monitors_UpdateMonitorConfigPolicy.rs +++ b/examples/v2_monitors_UpdateMonitorConfigPolicy.rs @@ -27,6 +27,7 @@ async fn main() { monitor_configuration_policy_data_id.clone(), MonitorConfigPolicyResourceType::MONITOR_CONFIG_POLICY, )); + let configuration = datadog::Configuration::new(); let api = MonitorsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_network-device-monitoring_UpdateDeviceUserTags.rs b/examples/v2_network-device-monitoring_UpdateDeviceUserTags.rs index cdd86a191..eeb708093 100644 --- a/examples/v2_network-device-monitoring_UpdateDeviceUserTags.rs +++ b/examples/v2_network-device-monitoring_UpdateDeviceUserTags.rs @@ -16,6 +16,7 @@ async fn main() { .id("default_device".to_string()) .type_("tags".to_string()), ); + let configuration = datadog::Configuration::new(); let api = NetworkDeviceMonitoringAPI::with_config(configuration); let resp = api diff --git a/examples/v2_okta-integration_CreateOktaAccount.rs b/examples/v2_okta-integration_CreateOktaAccount.rs index 6d40cb9ab..ec17c9718 100644 --- a/examples/v2_okta-integration_CreateOktaAccount.rs +++ b/examples/v2_okta-integration_CreateOktaAccount.rs @@ -21,6 +21,7 @@ async fn main() { ) .id("f749daaf-682e-4208-a38d-c9b43162c609".to_string()), ); + let configuration = datadog::Configuration::new(); let api = OktaIntegrationAPI::with_config(configuration); let resp = api.create_okta_account(body).await; diff --git a/examples/v2_okta-integration_GetOktaAccount.rs b/examples/v2_okta-integration_GetOktaAccount.rs index 13dc09cd5..93d19b1ca 100644 --- a/examples/v2_okta-integration_GetOktaAccount.rs +++ b/examples/v2_okta-integration_GetOktaAccount.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_okta_integration::OktaIntegrationAPI; async fn main() { // there is a valid "okta_account" in the system let okta_account_data_id = std::env::var("OKTA_ACCOUNT_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = OktaIntegrationAPI::with_config(configuration); let resp = api.get_okta_account(okta_account_data_id.clone()).await; diff --git a/examples/v2_okta-integration_UpdateOktaAccount.rs b/examples/v2_okta-integration_UpdateOktaAccount.rs index 3e7c82060..ed438c1ad 100644 --- a/examples/v2_okta-integration_UpdateOktaAccount.rs +++ b/examples/v2_okta-integration_UpdateOktaAccount.rs @@ -22,6 +22,7 @@ async fn main() { ) .type_(OktaAccountType::OKTA_ACCOUNTS), ); + let configuration = datadog::Configuration::new(); let api = OktaIntegrationAPI::with_config(configuration); let resp = api diff --git a/examples/v2_opsgenie-integration_CreateOpsgenieService.rs b/examples/v2_opsgenie-integration_CreateOpsgenieService.rs index 2edd91811..adbad90b5 100644 --- a/examples/v2_opsgenie-integration_CreateOpsgenieService.rs +++ b/examples/v2_opsgenie-integration_CreateOpsgenieService.rs @@ -17,6 +17,7 @@ async fn main() { ), OpsgenieServiceType::OPSGENIE_SERVICE, )); + let configuration = datadog::Configuration::new(); let api = OpsgenieIntegrationAPI::with_config(configuration); let resp = api.create_opsgenie_service(body).await; diff --git a/examples/v2_opsgenie-integration_DeleteOpsgenieService.rs b/examples/v2_opsgenie-integration_DeleteOpsgenieService.rs index 98565f0dd..a2fbf037e 100644 --- a/examples/v2_opsgenie-integration_DeleteOpsgenieService.rs +++ b/examples/v2_opsgenie-integration_DeleteOpsgenieService.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_opsgenie_integration::OpsgenieIntegration async fn main() { // there is a valid "opsgenie_service" in the system let opsgenie_service_data_id = std::env::var("OPSGENIE_SERVICE_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = OpsgenieIntegrationAPI::with_config(configuration); let resp = api diff --git a/examples/v2_opsgenie-integration_GetOpsgenieService.rs b/examples/v2_opsgenie-integration_GetOpsgenieService.rs index d14d5c669..d3b5d6fce 100644 --- a/examples/v2_opsgenie-integration_GetOpsgenieService.rs +++ b/examples/v2_opsgenie-integration_GetOpsgenieService.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_opsgenie_integration::OpsgenieIntegration async fn main() { // there is a valid "opsgenie_service" in the system let opsgenie_service_data_id = std::env::var("OPSGENIE_SERVICE_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = OpsgenieIntegrationAPI::with_config(configuration); let resp = api diff --git a/examples/v2_opsgenie-integration_UpdateOpsgenieService.rs b/examples/v2_opsgenie-integration_UpdateOpsgenieService.rs index 62c47397f..534f6adce 100644 --- a/examples/v2_opsgenie-integration_UpdateOpsgenieService.rs +++ b/examples/v2_opsgenie-integration_UpdateOpsgenieService.rs @@ -19,6 +19,7 @@ async fn main() { opsgenie_service_data_id.clone(), OpsgenieServiceType::OPSGENIE_SERVICE, )); + let configuration = datadog::Configuration::new(); let api = OpsgenieIntegrationAPI::with_config(configuration); let resp = api diff --git a/examples/v2_organizations_UpdateOrgConfig.rs b/examples/v2_organizations_UpdateOrgConfig.rs index afe000c1a..1e9f77cfb 100644 --- a/examples/v2_organizations_UpdateOrgConfig.rs +++ b/examples/v2_organizations_UpdateOrgConfig.rs @@ -13,6 +13,7 @@ async fn main() { OrgConfigWriteAttributes::new(Value::from("UTC")), OrgConfigType::ORG_CONFIGS, )); + let configuration = datadog::Configuration::new(); let api = OrganizationsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_powerpack_CreatePowerpack.rs b/examples/v2_powerpack_CreatePowerpack.rs index a9e65df8a..041df745a 100644 --- a/examples/v2_powerpack_CreatePowerpack.rs +++ b/examples/v2_powerpack_CreatePowerpack.rs @@ -42,6 +42,7 @@ async fn main() { ) .type_("powerpack".to_string()), ); + let configuration = datadog::Configuration::new(); let api = PowerpackAPI::with_config(configuration); let resp = api.create_powerpack(body).await; diff --git a/examples/v2_powerpack_DeletePowerpack.rs b/examples/v2_powerpack_DeletePowerpack.rs index cf4e3859a..0e26027eb 100644 --- a/examples/v2_powerpack_DeletePowerpack.rs +++ b/examples/v2_powerpack_DeletePowerpack.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_powerpack::PowerpackAPI; async fn main() { // there is a valid "powerpack" in the system let powerpack_data_id = std::env::var("POWERPACK_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = PowerpackAPI::with_config(configuration); let resp = api.delete_powerpack(powerpack_data_id.clone()).await; diff --git a/examples/v2_powerpack_GetPowerpack.rs b/examples/v2_powerpack_GetPowerpack.rs index d407e5c35..9e8c0d798 100644 --- a/examples/v2_powerpack_GetPowerpack.rs +++ b/examples/v2_powerpack_GetPowerpack.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_powerpack::PowerpackAPI; async fn main() { // there is a valid "powerpack" in the system let powerpack_data_id = std::env::var("POWERPACK_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = PowerpackAPI::with_config(configuration); let resp = api.get_powerpack(powerpack_data_id.clone()).await; diff --git a/examples/v2_powerpack_ListPowerpacks_1173755071.rs b/examples/v2_powerpack_ListPowerpacks_1173755071.rs index f2003136f..41d50839f 100644 --- a/examples/v2_powerpack_ListPowerpacks_1173755071.rs +++ b/examples/v2_powerpack_ListPowerpacks_1173755071.rs @@ -12,6 +12,7 @@ async fn main() { let response = api.list_powerpacks_with_pagination(ListPowerpacksOptionalParams::default().page_limit(2)); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_powerpack_UpdatePowerpack.rs b/examples/v2_powerpack_UpdatePowerpack.rs index da1196908..0ace767ed 100644 --- a/examples/v2_powerpack_UpdatePowerpack.rs +++ b/examples/v2_powerpack_UpdatePowerpack.rs @@ -44,6 +44,7 @@ async fn main() { ) .type_("powerpack".to_string()), ); + let configuration = datadog::Configuration::new(); let api = PowerpackAPI::with_config(configuration); let resp = api.update_powerpack(powerpack_data_id.clone(), body).await; diff --git a/examples/v2_processes_ListProcesses_797840471.rs b/examples/v2_processes_ListProcesses_797840471.rs index ff12464ef..10ff031c0 100644 --- a/examples/v2_processes_ListProcesses_797840471.rs +++ b/examples/v2_processes_ListProcesses_797840471.rs @@ -12,6 +12,7 @@ async fn main() { let response = api.list_processes_with_pagination(ListProcessesOptionalParams::default().page_limit(2)); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_restriction-policies_UpdateRestrictionPolicy.rs b/examples/v2_restriction-policies_UpdateRestrictionPolicy.rs index 7b16f12db..d00e854d2 100644 --- a/examples/v2_restriction-policies_UpdateRestrictionPolicy.rs +++ b/examples/v2_restriction-policies_UpdateRestrictionPolicy.rs @@ -19,6 +19,7 @@ async fn main() { "dashboard:test-update".to_string(), RestrictionPolicyType::RESTRICTION_POLICY, )); + let configuration = datadog::Configuration::new(); let api = RestrictionPoliciesAPI::with_config(configuration); let resp = api diff --git a/examples/v2_roles_AddPermissionToRole.rs b/examples/v2_roles_AddPermissionToRole.rs index 913262bd0..e003f8c91 100644 --- a/examples/v2_roles_AddPermissionToRole.rs +++ b/examples/v2_roles_AddPermissionToRole.rs @@ -9,7 +9,6 @@ use datadog_api_client::datadogV2::model::RelationshipToPermissionData; async fn main() { // there is a valid "role" in the system let role_data_id = std::env::var("ROLE_DATA_ID").unwrap(); - // there is a valid "permission" in the system let permission_id = std::env::var("PERMISSION_ID").unwrap(); let body = RelationshipToPermission::new().data( @@ -17,6 +16,7 @@ async fn main() { .id(permission_id.clone()) .type_(PermissionsType::PERMISSIONS), ); + let configuration = datadog::Configuration::new(); let api = RolesAPI::with_config(configuration); let resp = api.add_permission_to_role(role_data_id.clone(), body).await; diff --git a/examples/v2_roles_AddUserToRole.rs b/examples/v2_roles_AddUserToRole.rs index 8095d60bb..595c84c70 100644 --- a/examples/v2_roles_AddUserToRole.rs +++ b/examples/v2_roles_AddUserToRole.rs @@ -9,13 +9,13 @@ use datadog_api_client::datadogV2::model::UsersType; async fn main() { // there is a valid "role" in the system let role_data_id = std::env::var("ROLE_DATA_ID").unwrap(); - // there is a valid "user" in the system let user_data_id = std::env::var("USER_DATA_ID").unwrap(); let body = RelationshipToUser::new(RelationshipToUserData::new( user_data_id.clone(), UsersType::USERS, )); + let configuration = datadog::Configuration::new(); let api = RolesAPI::with_config(configuration); let resp = api.add_user_to_role(role_data_id.clone(), body).await; diff --git a/examples/v2_roles_CloneRole.rs b/examples/v2_roles_CloneRole.rs index c3cac64c5..09d635c38 100644 --- a/examples/v2_roles_CloneRole.rs +++ b/examples/v2_roles_CloneRole.rs @@ -14,6 +14,7 @@ async fn main() { RoleCloneAttributes::new("Example-Role clone".to_string()), RolesType::ROLES, )); + let configuration = datadog::Configuration::new(); let api = RolesAPI::with_config(configuration); let resp = api.clone_role(role_data_id.clone(), body).await; diff --git a/examples/v2_roles_CreateRole.rs b/examples/v2_roles_CreateRole.rs index 1b3a436d9..0fdd60185 100644 --- a/examples/v2_roles_CreateRole.rs +++ b/examples/v2_roles_CreateRole.rs @@ -21,6 +21,7 @@ async fn main() { )) .type_(RolesType::ROLES), ); + let configuration = datadog::Configuration::new(); let api = RolesAPI::with_config(configuration); let resp = api.create_role(body).await; diff --git a/examples/v2_roles_CreateRole_3862893229.rs b/examples/v2_roles_CreateRole_3862893229.rs index d7c481dba..1a3c99e1b 100644 --- a/examples/v2_roles_CreateRole_3862893229.rs +++ b/examples/v2_roles_CreateRole_3862893229.rs @@ -17,14 +17,13 @@ async fn main() { let body = RoleCreateRequest::new( RoleCreateData::new(RoleCreateAttributes::new("Example-Role".to_string())) .relationships(RoleRelationships::new().permissions( - RelationshipToPermissions::new().data(vec![ - RelationshipToPermissionData::new() - .id(permission_id.clone()) - .type_(PermissionsType::PERMISSIONS) - ]), + RelationshipToPermissions::new().data(vec![RelationshipToPermissionData::new() + .id(permission_id.clone()) + .type_(PermissionsType::PERMISSIONS)]), )) .type_(RolesType::ROLES), ); + let configuration = datadog::Configuration::new(); let api = RolesAPI::with_config(configuration); let resp = api.create_role(body).await; diff --git a/examples/v2_roles_DeleteRole.rs b/examples/v2_roles_DeleteRole.rs index 2243a2aeb..d55868f9e 100644 --- a/examples/v2_roles_DeleteRole.rs +++ b/examples/v2_roles_DeleteRole.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_roles::RolesAPI; async fn main() { // there is a valid "role" in the system let role_data_id = std::env::var("ROLE_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = RolesAPI::with_config(configuration); let resp = api.delete_role(role_data_id.clone()).await; diff --git a/examples/v2_roles_GetRole.rs b/examples/v2_roles_GetRole.rs index 2185cd597..bb95c61bd 100644 --- a/examples/v2_roles_GetRole.rs +++ b/examples/v2_roles_GetRole.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_roles::RolesAPI; async fn main() { // there is a valid "role" in the system let role_data_id = std::env::var("ROLE_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = RolesAPI::with_config(configuration); let resp = api.get_role(role_data_id.clone()).await; diff --git a/examples/v2_roles_ListRolePermissions.rs b/examples/v2_roles_ListRolePermissions.rs index b965c5ca5..18e4004e0 100644 --- a/examples/v2_roles_ListRolePermissions.rs +++ b/examples/v2_roles_ListRolePermissions.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_roles::RolesAPI; async fn main() { // there is a valid "role" in the system let role_data_id = std::env::var("ROLE_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = RolesAPI::with_config(configuration); let resp = api.list_role_permissions(role_data_id.clone()).await; diff --git a/examples/v2_roles_ListRoleUsers.rs b/examples/v2_roles_ListRoleUsers.rs index 682e687d9..41a367de9 100644 --- a/examples/v2_roles_ListRoleUsers.rs +++ b/examples/v2_roles_ListRoleUsers.rs @@ -7,6 +7,7 @@ use datadog_api_client::datadogV2::api_roles::RolesAPI; async fn main() { // there is a valid "role" in the system let role_data_id = std::env::var("ROLE_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = RolesAPI::with_config(configuration); let resp = api diff --git a/examples/v2_roles_ListRoles.rs b/examples/v2_roles_ListRoles.rs index 1726b23f5..6f08929e0 100644 --- a/examples/v2_roles_ListRoles.rs +++ b/examples/v2_roles_ListRoles.rs @@ -7,6 +7,7 @@ use datadog_api_client::datadogV2::api_roles::RolesAPI; async fn main() { // there is a valid "role" in the system let role_data_attributes_name = std::env::var("ROLE_DATA_ATTRIBUTES_NAME").unwrap(); + let configuration = datadog::Configuration::new(); let api = RolesAPI::with_config(configuration); let resp = api diff --git a/examples/v2_roles_RemovePermissionFromRole.rs b/examples/v2_roles_RemovePermissionFromRole.rs index b0a155b19..bd478b546 100644 --- a/examples/v2_roles_RemovePermissionFromRole.rs +++ b/examples/v2_roles_RemovePermissionFromRole.rs @@ -9,7 +9,6 @@ use datadog_api_client::datadogV2::model::RelationshipToPermissionData; async fn main() { // there is a valid "role" in the system let role_data_id = std::env::var("ROLE_DATA_ID").unwrap(); - // there is a valid "permission" in the system let permission_id = std::env::var("PERMISSION_ID").unwrap(); let body = RelationshipToPermission::new().data( @@ -17,6 +16,7 @@ async fn main() { .id(permission_id.clone()) .type_(PermissionsType::PERMISSIONS), ); + let configuration = datadog::Configuration::new(); let api = RolesAPI::with_config(configuration); let resp = api diff --git a/examples/v2_roles_RemoveUserFromRole.rs b/examples/v2_roles_RemoveUserFromRole.rs index 101ed87ed..ad834884f 100644 --- a/examples/v2_roles_RemoveUserFromRole.rs +++ b/examples/v2_roles_RemoveUserFromRole.rs @@ -9,13 +9,13 @@ use datadog_api_client::datadogV2::model::UsersType; async fn main() { // there is a valid "role" in the system let role_data_id = std::env::var("ROLE_DATA_ID").unwrap(); - // there is a valid "user" in the system let user_data_id = std::env::var("USER_DATA_ID").unwrap(); let body = RelationshipToUser::new(RelationshipToUserData::new( user_data_id.clone(), UsersType::USERS, )); + let configuration = datadog::Configuration::new(); let api = RolesAPI::with_config(configuration); let resp = api.remove_user_from_role(role_data_id.clone(), body).await; diff --git a/examples/v2_roles_UpdateRole.rs b/examples/v2_roles_UpdateRole.rs index 2e36c16d1..3d6cd7518 100644 --- a/examples/v2_roles_UpdateRole.rs +++ b/examples/v2_roles_UpdateRole.rs @@ -14,7 +14,6 @@ use datadog_api_client::datadogV2::model::RolesType; async fn main() { // there is a valid "role" in the system let role_data_id = std::env::var("ROLE_DATA_ID").unwrap(); - // there is a valid "permission" in the system let permission_id = std::env::var("PERMISSION_ID").unwrap(); let body = RoleUpdateRequest::new( @@ -24,13 +23,12 @@ async fn main() { RolesType::ROLES, ) .relationships(RoleRelationships::new().permissions( - RelationshipToPermissions::new().data(vec![ - RelationshipToPermissionData::new() - .id(permission_id.clone()) - .type_(PermissionsType::PERMISSIONS) - ]), + RelationshipToPermissions::new().data(vec![RelationshipToPermissionData::new() + .id(permission_id.clone()) + .type_(PermissionsType::PERMISSIONS)]), )), ); + let configuration = datadog::Configuration::new(); let api = RolesAPI::with_config(configuration); let resp = api.update_role(role_data_id.clone(), body).await; diff --git a/examples/v2_rum-metrics_CreateRumMetric.rs b/examples/v2_rum-metrics_CreateRumMetric.rs index 46bed4124..63e861f3f 100644 --- a/examples/v2_rum-metrics_CreateRumMetric.rs +++ b/examples/v2_rum-metrics_CreateRumMetric.rs @@ -32,6 +32,7 @@ async fn main() { "rum.sessions.webui.count".to_string(), RumMetricType::RUM_METRICS, )); + let configuration = datadog::Configuration::new(); let api = RumMetricsAPI::with_config(configuration); let resp = api.create_rum_metric(body).await; diff --git a/examples/v2_rum-metrics_DeleteRumMetric.rs b/examples/v2_rum-metrics_DeleteRumMetric.rs index ae011e68b..5d1e3bef9 100644 --- a/examples/v2_rum-metrics_DeleteRumMetric.rs +++ b/examples/v2_rum-metrics_DeleteRumMetric.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_rum_metrics::RumMetricsAPI; async fn main() { // there is a valid "rum_metric" in the system let rum_metric_data_id = std::env::var("RUM_METRIC_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = RumMetricsAPI::with_config(configuration); let resp = api.delete_rum_metric(rum_metric_data_id.clone()).await; diff --git a/examples/v2_rum-metrics_GetRumMetric.rs b/examples/v2_rum-metrics_GetRumMetric.rs index 5c34d2fcd..89bf26f82 100644 --- a/examples/v2_rum-metrics_GetRumMetric.rs +++ b/examples/v2_rum-metrics_GetRumMetric.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_rum_metrics::RumMetricsAPI; async fn main() { // there is a valid "rum_metric" in the system let rum_metric_data_id = std::env::var("RUM_METRIC_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = RumMetricsAPI::with_config(configuration); let resp = api.get_rum_metric(rum_metric_data_id.clone()).await; diff --git a/examples/v2_rum-metrics_UpdateRumMetric.rs b/examples/v2_rum-metrics_UpdateRumMetric.rs index 0f9c56319..615505d23 100644 --- a/examples/v2_rum-metrics_UpdateRumMetric.rs +++ b/examples/v2_rum-metrics_UpdateRumMetric.rs @@ -24,6 +24,7 @@ async fn main() { ) .id(rum_metric_data_id.clone()), ); + let configuration = datadog::Configuration::new(); let api = RumMetricsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_rum_AggregateRUMEvents.rs b/examples/v2_rum_AggregateRUMEvents.rs index f7d2a5c6e..852040be0 100644 --- a/examples/v2_rum_AggregateRUMEvents.rs +++ b/examples/v2_rum_AggregateRUMEvents.rs @@ -28,6 +28,7 @@ async fn main() { .total(RUMGroupByTotal::RUMGroupByTotalBoolean(false))]) .options(RUMQueryOptions::new().timezone("GMT".to_string())) .page(RUMQueryPageOptions::new().limit(25)); + let configuration = datadog::Configuration::new(); let api = RUMAPI::with_config(configuration); let resp = api.aggregate_rum_events(body).await; diff --git a/examples/v2_rum_CreateRUMApplication.rs b/examples/v2_rum_CreateRUMApplication.rs index d434fb961..383cdd2df 100644 --- a/examples/v2_rum_CreateRUMApplication.rs +++ b/examples/v2_rum_CreateRUMApplication.rs @@ -13,6 +13,7 @@ async fn main() { .type_("ios".to_string()), RUMApplicationCreateType::RUM_APPLICATION_CREATE, )); + let configuration = datadog::Configuration::new(); let api = RUMAPI::with_config(configuration); let resp = api.create_rum_application(body).await; diff --git a/examples/v2_rum_DeleteRUMApplication.rs b/examples/v2_rum_DeleteRUMApplication.rs index cef598496..2b072da1d 100644 --- a/examples/v2_rum_DeleteRUMApplication.rs +++ b/examples/v2_rum_DeleteRUMApplication.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_rum::RUMAPI; async fn main() { // there is a valid "rum_application" in the system let rum_application_data_id = std::env::var("RUM_APPLICATION_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = RUMAPI::with_config(configuration); let resp = api diff --git a/examples/v2_rum_GetRUMApplication.rs b/examples/v2_rum_GetRUMApplication.rs index 0c102d8be..29b8d67b9 100644 --- a/examples/v2_rum_GetRUMApplication.rs +++ b/examples/v2_rum_GetRUMApplication.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_rum::RUMAPI; async fn main() { // there is a valid "rum_application" in the system let rum_application_data_id = std::env::var("RUM_APPLICATION_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = RUMAPI::with_config(configuration); let resp = api diff --git a/examples/v2_rum_ListRUMEvents_2680821282.rs b/examples/v2_rum_ListRUMEvents_2680821282.rs index 99923ebe4..01093c30b 100644 --- a/examples/v2_rum_ListRUMEvents_2680821282.rs +++ b/examples/v2_rum_ListRUMEvents_2680821282.rs @@ -12,6 +12,7 @@ async fn main() { let response = api.list_rum_events_with_pagination(ListRUMEventsOptionalParams::default().page_limit(2)); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_rum_SearchRUMEvents.rs b/examples/v2_rum_SearchRUMEvents.rs index bd39df13f..d2a07c8ed 100644 --- a/examples/v2_rum_SearchRUMEvents.rs +++ b/examples/v2_rum_SearchRUMEvents.rs @@ -23,6 +23,7 @@ async fn main() { ) .page(RUMQueryPageOptions::new().limit(25)) .sort(RUMSort::TIMESTAMP_ASCENDING); + let configuration = datadog::Configuration::new(); let api = RUMAPI::with_config(configuration); let resp = api.search_rum_events(body).await; diff --git a/examples/v2_rum_SearchRUMEvents_574690310.rs b/examples/v2_rum_SearchRUMEvents_574690310.rs index 882aa8881..a12542837 100644 --- a/examples/v2_rum_SearchRUMEvents_574690310.rs +++ b/examples/v2_rum_SearchRUMEvents_574690310.rs @@ -25,10 +25,12 @@ async fn main() { ) .page(RUMQueryPageOptions::new().limit(2)) .sort(RUMSort::TIMESTAMP_ASCENDING); + let configuration = datadog::Configuration::new(); let api = RUMAPI::with_config(configuration); let response = api.search_rum_events_with_pagination(body); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_rum_UpdateRUMApplication.rs b/examples/v2_rum_UpdateRUMApplication.rs index cadf66953..fafadb672 100644 --- a/examples/v2_rum_UpdateRUMApplication.rs +++ b/examples/v2_rum_UpdateRUMApplication.rs @@ -21,6 +21,7 @@ async fn main() { .type_("browser".to_string()), ), ); + let configuration = datadog::Configuration::new(); let api = RUMAPI::with_config(configuration); let resp = api diff --git a/examples/v2_security-monitoring_CancelHistoricalJob.rs b/examples/v2_security-monitoring_CancelHistoricalJob.rs index 315f3054c..874a0a52c 100644 --- a/examples/v2_security-monitoring_CancelHistoricalJob.rs +++ b/examples/v2_security-monitoring_CancelHistoricalJob.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_security_monitoring::SecurityMonitoringAP async fn main() { // there is a valid "historical_job" in the system let historical_job_data_id = std::env::var("HISTORICAL_JOB_DATA_ID").unwrap(); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.CancelHistoricalJob", true); configuration.set_unstable_operation_enabled("v2.RunHistoricalJob", true); diff --git a/examples/v2_security-monitoring_ConvertExistingSecurityMonitoringRule.rs b/examples/v2_security-monitoring_ConvertExistingSecurityMonitoringRule.rs index daa7d9bca..229474a7a 100644 --- a/examples/v2_security-monitoring_ConvertExistingSecurityMonitoringRule.rs +++ b/examples/v2_security-monitoring_ConvertExistingSecurityMonitoringRule.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_security_monitoring::SecurityMonitoringAP async fn main() { // there is a valid "security_rule" in the system let security_rule_id = std::env::var("SECURITY_RULE_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api diff --git a/examples/v2_security-monitoring_ConvertJobResultToSignal.rs b/examples/v2_security-monitoring_ConvertJobResultToSignal.rs index 8e062cdb5..08335a9b1 100644 --- a/examples/v2_security-monitoring_ConvertJobResultToSignal.rs +++ b/examples/v2_security-monitoring_ConvertJobResultToSignal.rs @@ -21,6 +21,7 @@ async fn main() { ConvertJobResultsToSignalsDataType::HISTORICALDETECTIONSJOBRESULTSIGNALCONVERSION, ), ); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.ConvertJobResultToSignal", true); let api = SecurityMonitoringAPI::with_config(configuration); diff --git a/examples/v2_security-monitoring_ConvertSecurityMonitoringRuleFromJSONToTerraform.rs b/examples/v2_security-monitoring_ConvertSecurityMonitoringRuleFromJSONToTerraform.rs index 2f749db01..8be1f61f8 100644 --- a/examples/v2_security-monitoring_ConvertSecurityMonitoringRuleFromJSONToTerraform.rs +++ b/examples/v2_security-monitoring_ConvertSecurityMonitoringRuleFromJSONToTerraform.rs @@ -42,6 +42,7 @@ async fn main() { .tags(vec![]) .type_(SecurityMonitoringRuleTypeCreate::LOG_DETECTION), )); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api diff --git a/examples/v2_security-monitoring_CreateSecurityFilter.rs b/examples/v2_security-monitoring_CreateSecurityFilter.rs index b7044b5aa..2d2182f08 100644 --- a/examples/v2_security-monitoring_CreateSecurityFilter.rs +++ b/examples/v2_security-monitoring_CreateSecurityFilter.rs @@ -23,6 +23,7 @@ async fn main() { ), SecurityFilterType::SECURITY_FILTERS, )); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api.create_security_filter(body).await; diff --git a/examples/v2_security-monitoring_CreateSecurityMonitoringRule.rs b/examples/v2_security-monitoring_CreateSecurityMonitoringRule.rs index bbad83755..43d7f5f90 100644 --- a/examples/v2_security-monitoring_CreateSecurityMonitoringRule.rs +++ b/examples/v2_security-monitoring_CreateSecurityMonitoringRule.rs @@ -49,6 +49,7 @@ async fn main() { .tags(vec![]) .type_(SecurityMonitoringRuleTypeCreate::LOG_DETECTION), )); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api.create_security_monitoring_rule(body).await; diff --git a/examples/v2_security-monitoring_CreateSecurityMonitoringRule_1092490364.rs b/examples/v2_security-monitoring_CreateSecurityMonitoringRule_1092490364.rs index 027e30b89..de2f627c8 100644 --- a/examples/v2_security-monitoring_CreateSecurityMonitoringRule_1092490364.rs +++ b/examples/v2_security-monitoring_CreateSecurityMonitoringRule_1092490364.rs @@ -15,27 +15,7 @@ use datadog_api_client::datadogV2::model::SecurityMonitoringRuleSeverity; #[tokio::main] async fn main() { - let body = - SecurityMonitoringRuleCreatePayload::CloudConfigurationRuleCreatePayload( - Box::new( - CloudConfigurationRuleCreatePayload::new( - vec![ - CloudConfigurationRuleCaseCreate::new( - SecurityMonitoringRuleSeverity::INFO, - ).notifications(vec!["channel".to_string()]) - ], - CloudConfigurationRuleComplianceSignalOptions::new() - .user_activation_status(Some(true)) - .user_group_by_fields(Some(vec!["@account_id".to_string()])), - false, - "ddd".to_string(), - "Example-Security-Monitoring_cloud".to_string(), - CloudConfigurationRuleOptions::new( - CloudConfigurationComplianceRuleOptions::new() - .complex_rule(false) - .rego_rule( - CloudConfigurationRegoRule::new( - r#"package datadog + let body = SecurityMonitoringRuleCreatePayload::CloudConfigurationRuleCreatePayload(Box::new(CloudConfigurationRuleCreatePayload::new(vec![CloudConfigurationRuleCaseCreate::new(SecurityMonitoringRuleSeverity::INFO, ).notifications(vec!["channel".to_string(),]),], CloudConfigurationRuleComplianceSignalOptions::new().user_activation_status(Some(true)).user_group_by_fields(Some(vec!["@account_id".to_string(),])), false, "ddd".to_string(), "Example-Security-Monitoring_cloud".to_string(), CloudConfigurationRuleOptions::new(CloudConfigurationComplianceRuleOptions::new().complex_rule(false).rego_rule(CloudConfigurationRegoRule::new(r#"package datadog import data.datadog.output as dd_output @@ -56,27 +36,8 @@ results contains result if { some resource in input.resources[input.main_resource_type] result := dd_output.format(resource, eval(resource)) } -"#.to_string(), - vec!["gcp_compute_disk".to_string()], - ), - ) - .resource_type("gcp_compute_disk".to_string()), - ), - ) - .filters( - vec![ - SecurityMonitoringFilter::new() - .action(SecurityMonitoringFilterAction::REQUIRE) - .query("resource_id:helo*".to_string()), - SecurityMonitoringFilter::new() - .action(SecurityMonitoringFilterAction::SUPPRESS) - .query("control:helo*".to_string()) - ], - ) - .tags(vec!["my:tag".to_string()]) - .type_(CloudConfigurationRuleType::CLOUD_CONFIGURATION), - ), - ); +"#.to_string(), vec!["gcp_compute_disk".to_string(),], )).resource_type("gcp_compute_disk".to_string()), ), ).filters(vec![SecurityMonitoringFilter::new().action(SecurityMonitoringFilterAction::REQUIRE).query("resource_id:helo*".to_string()),SecurityMonitoringFilter::new().action(SecurityMonitoringFilterAction::SUPPRESS).query("control:helo*".to_string()),]).tags(vec!["my:tag".to_string(),]).type_(CloudConfigurationRuleType::CLOUD_CONFIGURATION))); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api.create_security_monitoring_rule(body).await; diff --git a/examples/v2_security-monitoring_CreateSecurityMonitoringRule_3367706049.rs b/examples/v2_security-monitoring_CreateSecurityMonitoringRule_3367706049.rs index b22b6f99a..958f794db 100644 --- a/examples/v2_security-monitoring_CreateSecurityMonitoringRule_3367706049.rs +++ b/examples/v2_security-monitoring_CreateSecurityMonitoringRule_3367706049.rs @@ -1,5 +1,4 @@ -// Create a detection rule with detection method 'third_party' returns "OK" -// response +// Create a detection rule with detection method 'third_party' returns "OK" response use datadog_api_client::datadog; use datadog_api_client::datadogV2::api_security_monitoring::SecurityMonitoringAPI; use datadog_api_client::datadogV2::model::SecurityMonitoringRuleCreatePayload; @@ -55,6 +54,7 @@ async fn main() { ]) .type_(SecurityMonitoringRuleTypeCreate::LOG_DETECTION), )); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api.create_security_monitoring_rule(body).await; diff --git a/examples/v2_security-monitoring_CreateSecurityMonitoringRule_461183901.rs b/examples/v2_security-monitoring_CreateSecurityMonitoringRule_461183901.rs index 1290dd3ce..b16e13591 100644 --- a/examples/v2_security-monitoring_CreateSecurityMonitoringRule_461183901.rs +++ b/examples/v2_security-monitoring_CreateSecurityMonitoringRule_461183901.rs @@ -49,6 +49,7 @@ async fn main() { .tags(vec![]) .type_(SecurityMonitoringRuleTypeCreate::LOG_DETECTION), )); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api.create_security_monitoring_rule(body).await; diff --git a/examples/v2_security-monitoring_CreateSecurityMonitoringRule_498211763.rs b/examples/v2_security-monitoring_CreateSecurityMonitoringRule_498211763.rs index a6c35ad20..10274ad63 100644 --- a/examples/v2_security-monitoring_CreateSecurityMonitoringRule_498211763.rs +++ b/examples/v2_security-monitoring_CreateSecurityMonitoringRule_498211763.rs @@ -42,6 +42,7 @@ async fn main() { .tags(vec![]) .type_(SecurityMonitoringRuleTypeCreate::WORKLOAD_SECURITY), )); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api.create_security_monitoring_rule(body).await; diff --git a/examples/v2_security-monitoring_CreateSecurityMonitoringRule_914562040.rs b/examples/v2_security-monitoring_CreateSecurityMonitoringRule_914562040.rs index 579a5fdfe..64e1b1bb1 100644 --- a/examples/v2_security-monitoring_CreateSecurityMonitoringRule_914562040.rs +++ b/examples/v2_security-monitoring_CreateSecurityMonitoringRule_914562040.rs @@ -17,7 +17,6 @@ use datadog_api_client::datadogV2::model::SecurityMonitoringSignalRuleType; async fn main() { // there is a valid "security_rule" in the system let security_rule_id = std::env::var("SECURITY_RULE_ID").unwrap(); - // there is a valid "security_rule_bis" in the system let security_rule_bis_id = std::env::var("SECURITY_RULE_BIS_ID").unwrap(); let body = @@ -50,6 +49,7 @@ async fn main() { .tags(vec![]) .type_(SecurityMonitoringSignalRuleType::SIGNAL_CORRELATION), )); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api.create_security_monitoring_rule(body).await; diff --git a/examples/v2_security-monitoring_CreateSecurityMonitoringSuppression.rs b/examples/v2_security-monitoring_CreateSecurityMonitoringSuppression.rs index 5d0c4ddc6..547c2e026 100644 --- a/examples/v2_security-monitoring_CreateSecurityMonitoringSuppression.rs +++ b/examples/v2_security-monitoring_CreateSecurityMonitoringSuppression.rs @@ -24,6 +24,7 @@ async fn main() { SecurityMonitoringSuppressionType::SUPPRESSIONS, ), ); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api.create_security_monitoring_suppression(body).await; diff --git a/examples/v2_security-monitoring_CreateSecurityMonitoringSuppression_3192265332.rs b/examples/v2_security-monitoring_CreateSecurityMonitoringSuppression_3192265332.rs index fbefd2480..900d45078 100644 --- a/examples/v2_security-monitoring_CreateSecurityMonitoringSuppression_3192265332.rs +++ b/examples/v2_security-monitoring_CreateSecurityMonitoringSuppression_3192265332.rs @@ -24,6 +24,7 @@ async fn main() { SecurityMonitoringSuppressionType::SUPPRESSIONS, ), ); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api.create_security_monitoring_suppression(body).await; diff --git a/examples/v2_security-monitoring_DeleteSecurityFilter_555029489.rs b/examples/v2_security-monitoring_DeleteSecurityFilter_555029489.rs index 83249a6fd..e4fbc0b0e 100644 --- a/examples/v2_security-monitoring_DeleteSecurityFilter_555029489.rs +++ b/examples/v2_security-monitoring_DeleteSecurityFilter_555029489.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_security_monitoring::SecurityMonitoringAP async fn main() { // there is a valid "security_filter" in the system let security_filter_data_id = std::env::var("SECURITY_FILTER_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api diff --git a/examples/v2_security-monitoring_DeleteSecurityMonitoringRule.rs b/examples/v2_security-monitoring_DeleteSecurityMonitoringRule.rs index ba238fc76..c583e317b 100644 --- a/examples/v2_security-monitoring_DeleteSecurityMonitoringRule.rs +++ b/examples/v2_security-monitoring_DeleteSecurityMonitoringRule.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_security_monitoring::SecurityMonitoringAP async fn main() { // there is a valid "security_rule" in the system let security_rule_id = std::env::var("SECURITY_RULE_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api diff --git a/examples/v2_security-monitoring_DeleteSecurityMonitoringSuppression.rs b/examples/v2_security-monitoring_DeleteSecurityMonitoringSuppression.rs index 50c8feb36..7ce4eda0c 100644 --- a/examples/v2_security-monitoring_DeleteSecurityMonitoringSuppression.rs +++ b/examples/v2_security-monitoring_DeleteSecurityMonitoringSuppression.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_security_monitoring::SecurityMonitoringAP async fn main() { // there is a valid "suppression" in the system let suppression_data_id = std::env::var("SUPPRESSION_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api diff --git a/examples/v2_security-monitoring_EditSecurityMonitoringSignalAssignee.rs b/examples/v2_security-monitoring_EditSecurityMonitoringSignalAssignee.rs index 496e108c9..d61d96a12 100644 --- a/examples/v2_security-monitoring_EditSecurityMonitoringSignalAssignee.rs +++ b/examples/v2_security-monitoring_EditSecurityMonitoringSignalAssignee.rs @@ -15,6 +15,7 @@ async fn main() { ), ), ); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api diff --git a/examples/v2_security-monitoring_EditSecurityMonitoringSignalIncidents.rs b/examples/v2_security-monitoring_EditSecurityMonitoringSignalIncidents.rs index 04aaaa28d..8f13c0583 100644 --- a/examples/v2_security-monitoring_EditSecurityMonitoringSignalIncidents.rs +++ b/examples/v2_security-monitoring_EditSecurityMonitoringSignalIncidents.rs @@ -12,6 +12,7 @@ async fn main() { SecurityMonitoringSignalIncidentsUpdateAttributes::new(vec![2066]), ), ); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api diff --git a/examples/v2_security-monitoring_EditSecurityMonitoringSignalState.rs b/examples/v2_security-monitoring_EditSecurityMonitoringSignalState.rs index 62e8d7ab2..23dc5bf38 100644 --- a/examples/v2_security-monitoring_EditSecurityMonitoringSignalState.rs +++ b/examples/v2_security-monitoring_EditSecurityMonitoringSignalState.rs @@ -15,6 +15,7 @@ async fn main() { .archive_reason(SecurityMonitoringSignalArchiveReason::NONE), ), ); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api diff --git a/examples/v2_security-monitoring_GetFinding.rs b/examples/v2_security-monitoring_GetFinding.rs index b21f1c1d7..5856ea534 100644 --- a/examples/v2_security-monitoring_GetFinding.rs +++ b/examples/v2_security-monitoring_GetFinding.rs @@ -8,13 +8,7 @@ async fn main() { let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.GetFinding", true); let api = SecurityMonitoringAPI::with_config(configuration); - let resp = - api - .get_finding( - "AgAAAYd59gjghzF52gAAAAAAAAAYAAAAAEFZZDU5Z2pnQUFCRTRvV1lFeEo4SlFBQQAAACQAAAAAMDE4NzdhMDEtMDRiYS00NTZlLWFmMzMtNTIxNmNkNjVlNDMz".to_string(), - GetFindingOptionalParams::default(), - ) - .await; + let resp = api.get_finding("AgAAAYd59gjghzF52gAAAAAAAAAYAAAAAEFZZDU5Z2pnQUFCRTRvV1lFeEo4SlFBQQAAACQAAAAAMDE4NzdhMDEtMDRiYS00NTZlLWFmMzMtNTIxNmNkNjVlNDMz".to_string(), GetFindingOptionalParams::default(), ).await; if let Ok(value) = resp { println!("{:#?}", value); } else { diff --git a/examples/v2_security-monitoring_GetHistoricalJob.rs b/examples/v2_security-monitoring_GetHistoricalJob.rs index 022f165d2..1df7abda5 100644 --- a/examples/v2_security-monitoring_GetHistoricalJob.rs +++ b/examples/v2_security-monitoring_GetHistoricalJob.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_security_monitoring::SecurityMonitoringAP async fn main() { // there is a valid "historical_job" in the system let historical_job_data_id = std::env::var("HISTORICAL_JOB_DATA_ID").unwrap(); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.GetHistoricalJob", true); configuration.set_unstable_operation_enabled("v2.RunHistoricalJob", true); diff --git a/examples/v2_security-monitoring_GetSecurityFilter.rs b/examples/v2_security-monitoring_GetSecurityFilter.rs index 19ac44f5c..8c2455b03 100644 --- a/examples/v2_security-monitoring_GetSecurityFilter.rs +++ b/examples/v2_security-monitoring_GetSecurityFilter.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_security_monitoring::SecurityMonitoringAP async fn main() { // there is a valid "security_filter" in the system let security_filter_data_id = std::env::var("SECURITY_FILTER_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api diff --git a/examples/v2_security-monitoring_GetSecurityMonitoringRule.rs b/examples/v2_security-monitoring_GetSecurityMonitoringRule.rs index b81a90e4c..479067a26 100644 --- a/examples/v2_security-monitoring_GetSecurityMonitoringRule.rs +++ b/examples/v2_security-monitoring_GetSecurityMonitoringRule.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_security_monitoring::SecurityMonitoringAP async fn main() { // there is a valid "security_rule" in the system let security_rule_id = std::env::var("SECURITY_RULE_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api diff --git a/examples/v2_security-monitoring_GetSecurityMonitoringRule_3370522281.rs b/examples/v2_security-monitoring_GetSecurityMonitoringRule_3370522281.rs index b2de42b43..e2dcd5068 100644 --- a/examples/v2_security-monitoring_GetSecurityMonitoringRule_3370522281.rs +++ b/examples/v2_security-monitoring_GetSecurityMonitoringRule_3370522281.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_security_monitoring::SecurityMonitoringAP async fn main() { // there is a valid "cloud_configuration_rule" in the system let cloud_configuration_rule_id = std::env::var("CLOUD_CONFIGURATION_RULE_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api diff --git a/examples/v2_security-monitoring_GetSecurityMonitoringSuppression.rs b/examples/v2_security-monitoring_GetSecurityMonitoringSuppression.rs index 4f583d591..495716fb5 100644 --- a/examples/v2_security-monitoring_GetSecurityMonitoringSuppression.rs +++ b/examples/v2_security-monitoring_GetSecurityMonitoringSuppression.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_security_monitoring::SecurityMonitoringAP async fn main() { // there is a valid "suppression" in the system let suppression_data_id = std::env::var("SUPPRESSION_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api diff --git a/examples/v2_security-monitoring_ListFindings_3865842421.rs b/examples/v2_security-monitoring_ListFindings_3865842421.rs index 3716c50c0..8efcdb00f 100644 --- a/examples/v2_security-monitoring_ListFindings_3865842421.rs +++ b/examples/v2_security-monitoring_ListFindings_3865842421.rs @@ -12,6 +12,7 @@ async fn main() { let api = SecurityMonitoringAPI::with_config(configuration); let response = api.list_findings_with_pagination(ListFindingsOptionalParams::default()); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_security-monitoring_ListHistoricalJobs.rs b/examples/v2_security-monitoring_ListHistoricalJobs.rs index 5122fd3d0..8b38093ae 100644 --- a/examples/v2_security-monitoring_ListHistoricalJobs.rs +++ b/examples/v2_security-monitoring_ListHistoricalJobs.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_security_monitoring::SecurityMonitoringAP #[tokio::main] async fn main() { // there is a valid "historical_job" in the system + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.ListHistoricalJobs", true); configuration.set_unstable_operation_enabled("v2.RunHistoricalJob", true); diff --git a/examples/v2_security-monitoring_ListSecurityMonitoringSignals_3960412991.rs b/examples/v2_security-monitoring_ListSecurityMonitoringSignals_3960412991.rs index a0d135cd6..9be762a43 100644 --- a/examples/v2_security-monitoring_ListSecurityMonitoringSignals_3960412991.rs +++ b/examples/v2_security-monitoring_ListSecurityMonitoringSignals_3960412991.rs @@ -13,6 +13,7 @@ async fn main() { ListSecurityMonitoringSignalsOptionalParams::default().page_limit(2), ); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_security-monitoring_MuteFindings.rs b/examples/v2_security-monitoring_MuteFindings.rs index 5e977006b..d183e9384 100644 --- a/examples/v2_security-monitoring_MuteFindings.rs +++ b/examples/v2_security-monitoring_MuteFindings.rs @@ -24,6 +24,7 @@ async fn main() { )]), FindingType::FINDING, )); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.MuteFindings", true); let api = SecurityMonitoringAPI::with_config(configuration); diff --git a/examples/v2_security-monitoring_RunHistoricalJob.rs b/examples/v2_security-monitoring_RunHistoricalJob.rs index 575830af6..44adf2ec3 100644 --- a/examples/v2_security-monitoring_RunHistoricalJob.rs +++ b/examples/v2_security-monitoring_RunHistoricalJob.rs @@ -53,6 +53,7 @@ async fn main() { ) .type_(RunHistoricalJobRequestDataType::HISTORICALDETECTIONSJOBCREATE), ); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.RunHistoricalJob", true); let api = SecurityMonitoringAPI::with_config(configuration); diff --git a/examples/v2_security-monitoring_SearchSecurityMonitoringSignals.rs b/examples/v2_security-monitoring_SearchSecurityMonitoringSignals.rs index ef9c364ae..1dbd27625 100644 --- a/examples/v2_security-monitoring_SearchSecurityMonitoringSignals.rs +++ b/examples/v2_security-monitoring_SearchSecurityMonitoringSignals.rs @@ -10,30 +10,8 @@ use datadog_api_client::datadogV2::model::SecurityMonitoringSignalsSort; #[tokio::main] async fn main() { - let body = - SecurityMonitoringSignalListRequest::new() - .filter( - SecurityMonitoringSignalListRequestFilter::new() - .from( - DateTime::parse_from_rfc3339("2019-01-02T09:42:36.320000+00:00") - .expect("Failed to parse datetime") - .with_timezone(&Utc), - ) - .query("security:attack status:high".to_string()) - .to( - DateTime::parse_from_rfc3339("2019-01-03T09:42:36.320000+00:00") - .expect("Failed to parse datetime") - .with_timezone(&Utc), - ), - ) - .page( - SecurityMonitoringSignalListRequestPage::new() - .cursor( - "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==".to_string(), - ) - .limit(25), - ) - .sort(SecurityMonitoringSignalsSort::TIMESTAMP_ASCENDING); + let body = SecurityMonitoringSignalListRequest::new().filter(SecurityMonitoringSignalListRequestFilter::new().from(DateTime::parse_from_rfc3339("2019-01-02T09:42:36.320000+00:00").expect("Failed to parse datetime").with_timezone(&Utc)).query("security:attack status:high".to_string()).to(DateTime::parse_from_rfc3339("2019-01-03T09:42:36.320000+00:00").expect("Failed to parse datetime").with_timezone(&Utc))).page(SecurityMonitoringSignalListRequestPage::new().cursor("eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==".to_string()).limit(25)).sort(SecurityMonitoringSignalsSort::TIMESTAMP_ASCENDING); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api diff --git a/examples/v2_security-monitoring_SearchSecurityMonitoringSignals_1309350146.rs b/examples/v2_security-monitoring_SearchSecurityMonitoringSignals_1309350146.rs index 3233af19f..61726babc 100644 --- a/examples/v2_security-monitoring_SearchSecurityMonitoringSignals_1309350146.rs +++ b/examples/v2_security-monitoring_SearchSecurityMonitoringSignals_1309350146.rs @@ -27,12 +27,14 @@ async fn main() { ) .page(SecurityMonitoringSignalListRequestPage::new().limit(2)) .sort(SecurityMonitoringSignalsSort::TIMESTAMP_ASCENDING); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let response = api.search_security_monitoring_signals_with_pagination( SearchSecurityMonitoringSignalsOptionalParams::default().body(body), ); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_security-monitoring_TestExistingSecurityMonitoringRule.rs b/examples/v2_security-monitoring_TestExistingSecurityMonitoringRule.rs index 5cb66a7f0..789bc2a63 100644 --- a/examples/v2_security-monitoring_TestExistingSecurityMonitoringRule.rs +++ b/examples/v2_security-monitoring_TestExistingSecurityMonitoringRule.rs @@ -23,6 +23,7 @@ async fn main() { .service("payment".to_string()), ), ]); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api diff --git a/examples/v2_security-monitoring_TestSecurityMonitoringRule.rs b/examples/v2_security-monitoring_TestSecurityMonitoringRule.rs index 7a2f6189e..8281c7ae1 100644 --- a/examples/v2_security-monitoring_TestSecurityMonitoringRule.rs +++ b/examples/v2_security-monitoring_TestSecurityMonitoringRule.rs @@ -64,6 +64,7 @@ async fn main() { ) .service("payment".to_string()), )]); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api.test_security_monitoring_rule(body).await; diff --git a/examples/v2_security-monitoring_UpdateSecurityFilter.rs b/examples/v2_security-monitoring_UpdateSecurityFilter.rs index 692604f61..8cb801aa8 100644 --- a/examples/v2_security-monitoring_UpdateSecurityFilter.rs +++ b/examples/v2_security-monitoring_UpdateSecurityFilter.rs @@ -21,6 +21,7 @@ async fn main() { .version(1), SecurityFilterType::SECURITY_FILTERS, )); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api diff --git a/examples/v2_security-monitoring_UpdateSecurityMonitoringRule.rs b/examples/v2_security-monitoring_UpdateSecurityMonitoringRule.rs index b4a6a6403..0c9d41748 100644 --- a/examples/v2_security-monitoring_UpdateSecurityMonitoringRule.rs +++ b/examples/v2_security-monitoring_UpdateSecurityMonitoringRule.rs @@ -43,6 +43,7 @@ async fn main() { )), ]) .tags(vec![]); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api diff --git a/examples/v2_security-monitoring_UpdateSecurityMonitoringRule_428087276.rs b/examples/v2_security-monitoring_UpdateSecurityMonitoringRule_428087276.rs index c2e3000f6..766753612 100644 --- a/examples/v2_security-monitoring_UpdateSecurityMonitoringRule_428087276.rs +++ b/examples/v2_security-monitoring_UpdateSecurityMonitoringRule_428087276.rs @@ -13,30 +13,7 @@ use datadog_api_client::datadogV2::model::SecurityMonitoringRuleUpdatePayload; async fn main() { // there is a valid "cloud_configuration_rule" in the system let cloud_configuration_rule_id = std::env::var("CLOUD_CONFIGURATION_RULE_ID").unwrap(); - let body = - SecurityMonitoringRuleUpdatePayload::new() - .cases( - vec![ - SecurityMonitoringRuleCase::new() - .notifications(vec![]) - .status(SecurityMonitoringRuleSeverity::INFO) - ], - ) - .compliance_signal_options( - CloudConfigurationRuleComplianceSignalOptions::new() - .user_activation_status(Some(false)) - .user_group_by_fields(Some(vec![])), - ) - .is_enabled(false) - .message("ddd".to_string()) - .name("Example-Security-Monitoring_cloud_updated".to_string()) - .options( - SecurityMonitoringRuleOptions - ::new().compliance_rule_options( - CloudConfigurationComplianceRuleOptions::new() - .rego_rule( - CloudConfigurationRegoRule::new( - r#"package datadog + let body = SecurityMonitoringRuleUpdatePayload::new().cases(vec![SecurityMonitoringRuleCase::new().notifications(vec![]).status(SecurityMonitoringRuleSeverity::INFO),]).compliance_signal_options(CloudConfigurationRuleComplianceSignalOptions::new().user_activation_status(Some(false)).user_group_by_fields(Some(vec![]))).is_enabled(false).message("ddd".to_string()).name("Example-Security-Monitoring_cloud_updated".to_string()).options(SecurityMonitoringRuleOptions::new().compliance_rule_options(CloudConfigurationComplianceRuleOptions::new().rego_rule(CloudConfigurationRegoRule::new(r#"package datadog import data.datadog.output as dd_output @@ -57,14 +34,8 @@ results contains result if { some resource in input.resources[input.main_resource_type] result := dd_output.format(resource, eval(resource)) } -"#.to_string(), - vec!["gcp_compute_disk".to_string()], - ), - ) - .resource_type("gcp_compute_disk".to_string()), - ), - ) - .tags(vec![]); +"#.to_string(), vec!["gcp_compute_disk".to_string(),], )).resource_type("gcp_compute_disk".to_string()))).tags(vec![]); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api diff --git a/examples/v2_security-monitoring_UpdateSecurityMonitoringSuppression.rs b/examples/v2_security-monitoring_UpdateSecurityMonitoringSuppression.rs index d13b2e5ae..7e1540a71 100644 --- a/examples/v2_security-monitoring_UpdateSecurityMonitoringSuppression.rs +++ b/examples/v2_security-monitoring_UpdateSecurityMonitoringSuppression.rs @@ -17,6 +17,7 @@ async fn main() { SecurityMonitoringSuppressionType::SUPPRESSIONS, ), ); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api diff --git a/examples/v2_security-monitoring_ValidateSecurityMonitoringRule.rs b/examples/v2_security-monitoring_ValidateSecurityMonitoringRule.rs index 689f3d904..939c23873 100644 --- a/examples/v2_security-monitoring_ValidateSecurityMonitoringRule.rs +++ b/examples/v2_security-monitoring_ValidateSecurityMonitoringRule.rs @@ -44,6 +44,7 @@ async fn main() { .tags(vec!["env:prod".to_string(), "team:security".to_string()]) .type_(SecurityMonitoringRuleTypeCreate::LOG_DETECTION), )); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api.validate_security_monitoring_rule(body).await; diff --git a/examples/v2_sensitive-data-scanner_CreateScanningGroup.rs b/examples/v2_sensitive-data-scanner_CreateScanningGroup.rs index f7b924d54..abb3bc249 100644 --- a/examples/v2_sensitive-data-scanner_CreateScanningGroup.rs +++ b/examples/v2_sensitive-data-scanner_CreateScanningGroup.rs @@ -18,32 +18,8 @@ use datadog_api_client::datadogV2::model::SensitiveDataScannerRuleData; async fn main() { // a valid "configuration" in the system let configuration_data_id = std::env::var("CONFIGURATION_DATA_ID").unwrap(); - let body = - SensitiveDataScannerGroupCreateRequest::new() - .data( - SensitiveDataScannerGroupCreate::new( - SensitiveDataScannerGroupAttributes::new() - .filter(SensitiveDataScannerFilter::new().query("*".to_string())) - .is_enabled(false) - .name("Example-Sensitive-Data-Scanner".to_string()) - .product_list(vec![SensitiveDataScannerProduct::LOGS]), - SensitiveDataScannerGroupType::SENSITIVE_DATA_SCANNER_GROUP, - ).relationships( - SensitiveDataScannerGroupRelationships::new() - .configuration( - SensitiveDataScannerConfigurationData - ::new().data( - SensitiveDataScannerConfiguration::new() - .id(configuration_data_id.clone()) - .type_( - SensitiveDataScannerConfigurationType::SENSITIVE_DATA_SCANNER_CONFIGURATIONS, - ), - ), - ) - .rules(SensitiveDataScannerRuleData::new().data(vec![])), - ), - ) - .meta(SensitiveDataScannerMetaVersionOnly::new()); + let body = SensitiveDataScannerGroupCreateRequest::new().data(SensitiveDataScannerGroupCreate::new(SensitiveDataScannerGroupAttributes::new().filter(SensitiveDataScannerFilter::new().query("*".to_string())).is_enabled(false).name("Example-Sensitive-Data-Scanner".to_string()).product_list(vec![SensitiveDataScannerProduct::LOGS,]), SensitiveDataScannerGroupType::SENSITIVE_DATA_SCANNER_GROUP, ).relationships(SensitiveDataScannerGroupRelationships::new().configuration(SensitiveDataScannerConfigurationData::new().data(SensitiveDataScannerConfiguration::new().id(configuration_data_id.clone()).type_(SensitiveDataScannerConfigurationType::SENSITIVE_DATA_SCANNER_CONFIGURATIONS))).rules(SensitiveDataScannerRuleData::new().data(vec![])))).meta(SensitiveDataScannerMetaVersionOnly::new()); + let configuration = datadog::Configuration::new(); let api = SensitiveDataScannerAPI::with_config(configuration); let resp = api.create_scanning_group(body).await; diff --git a/examples/v2_sensitive-data-scanner_CreateScanningRule.rs b/examples/v2_sensitive-data-scanner_CreateScanningRule.rs index e41f1a8b6..7fd791687 100644 --- a/examples/v2_sensitive-data-scanner_CreateScanningRule.rs +++ b/examples/v2_sensitive-data-scanner_CreateScanningRule.rs @@ -49,6 +49,7 @@ async fn main() { ), SensitiveDataScannerMetaVersionOnly::new(), ); + let configuration = datadog::Configuration::new(); let api = SensitiveDataScannerAPI::with_config(configuration); let resp = api.create_scanning_rule(body).await; diff --git a/examples/v2_sensitive-data-scanner_DeleteScanningGroup.rs b/examples/v2_sensitive-data-scanner_DeleteScanningGroup.rs index 8fab573a3..4e78b0f97 100644 --- a/examples/v2_sensitive-data-scanner_DeleteScanningGroup.rs +++ b/examples/v2_sensitive-data-scanner_DeleteScanningGroup.rs @@ -10,6 +10,7 @@ async fn main() { let group_data_id = std::env::var("GROUP_DATA_ID").unwrap(); let body = SensitiveDataScannerGroupDeleteRequest::new(SensitiveDataScannerMetaVersionOnly::new()); + let configuration = datadog::Configuration::new(); let api = SensitiveDataScannerAPI::with_config(configuration); let resp = api.delete_scanning_group(group_data_id.clone(), body).await; diff --git a/examples/v2_sensitive-data-scanner_DeleteScanningRule.rs b/examples/v2_sensitive-data-scanner_DeleteScanningRule.rs index ba91397d7..9c3b2c046 100644 --- a/examples/v2_sensitive-data-scanner_DeleteScanningRule.rs +++ b/examples/v2_sensitive-data-scanner_DeleteScanningRule.rs @@ -10,6 +10,7 @@ async fn main() { let rule_data_id = std::env::var("RULE_DATA_ID").unwrap(); let body = SensitiveDataScannerRuleDeleteRequest::new(SensitiveDataScannerMetaVersionOnly::new()); + let configuration = datadog::Configuration::new(); let api = SensitiveDataScannerAPI::with_config(configuration); let resp = api.delete_scanning_rule(rule_data_id.clone(), body).await; diff --git a/examples/v2_sensitive-data-scanner_ReorderScanningGroups.rs b/examples/v2_sensitive-data-scanner_ReorderScanningGroups.rs index f2ac3b2d7..44a4d1431 100644 --- a/examples/v2_sensitive-data-scanner_ReorderScanningGroups.rs +++ b/examples/v2_sensitive-data-scanner_ReorderScanningGroups.rs @@ -14,7 +14,6 @@ use datadog_api_client::datadogV2::model::SensitiveDataScannerReorderConfig; async fn main() { // there is a valid "scanning_group" in the system let group_data_id = std::env::var("GROUP_DATA_ID").unwrap(); - // a valid "configuration" in the system let configuration_data_id = std::env::var("CONFIGURATION_DATA_ID").unwrap(); let body = SensitiveDataScannerConfigRequest::new( @@ -32,6 +31,7 @@ async fn main() { .type_(SensitiveDataScannerConfigurationType::SENSITIVE_DATA_SCANNER_CONFIGURATIONS), SensitiveDataScannerMetaVersionOnly::new(), ); + let configuration = datadog::Configuration::new(); let api = SensitiveDataScannerAPI::with_config(configuration); let resp = api.reorder_scanning_groups(body).await; diff --git a/examples/v2_sensitive-data-scanner_UpdateScanningGroup.rs b/examples/v2_sensitive-data-scanner_UpdateScanningGroup.rs index 7d6bc94cb..9b030abe6 100644 --- a/examples/v2_sensitive-data-scanner_UpdateScanningGroup.rs +++ b/examples/v2_sensitive-data-scanner_UpdateScanningGroup.rs @@ -18,37 +18,10 @@ use datadog_api_client::datadogV2::model::SensitiveDataScannerRuleData; async fn main() { // there is a valid "scanning_group" in the system let group_data_id = std::env::var("GROUP_DATA_ID").unwrap(); - // a valid "configuration" in the system let configuration_data_id = std::env::var("CONFIGURATION_DATA_ID").unwrap(); - let body = - SensitiveDataScannerGroupUpdateRequest::new( - SensitiveDataScannerGroupUpdate::new() - .attributes( - SensitiveDataScannerGroupAttributes::new() - .filter(SensitiveDataScannerFilter::new().query("*".to_string())) - .is_enabled(false) - .name("Example-Sensitive-Data-Scanner".to_string()) - .product_list(vec![SensitiveDataScannerProduct::LOGS]), - ) - .id(group_data_id.clone()) - .relationships( - SensitiveDataScannerGroupRelationships::new() - .configuration( - SensitiveDataScannerConfigurationData - ::new().data( - SensitiveDataScannerConfiguration::new() - .id(configuration_data_id.clone()) - .type_( - SensitiveDataScannerConfigurationType::SENSITIVE_DATA_SCANNER_CONFIGURATIONS, - ), - ), - ) - .rules(SensitiveDataScannerRuleData::new().data(vec![])), - ) - .type_(SensitiveDataScannerGroupType::SENSITIVE_DATA_SCANNER_GROUP), - SensitiveDataScannerMetaVersionOnly::new(), - ); + let body = SensitiveDataScannerGroupUpdateRequest::new(SensitiveDataScannerGroupUpdate::new().attributes(SensitiveDataScannerGroupAttributes::new().filter(SensitiveDataScannerFilter::new().query("*".to_string())).is_enabled(false).name("Example-Sensitive-Data-Scanner".to_string()).product_list(vec![SensitiveDataScannerProduct::LOGS,])).id(group_data_id.clone()).relationships(SensitiveDataScannerGroupRelationships::new().configuration(SensitiveDataScannerConfigurationData::new().data(SensitiveDataScannerConfiguration::new().id(configuration_data_id.clone()).type_(SensitiveDataScannerConfigurationType::SENSITIVE_DATA_SCANNER_CONFIGURATIONS))).rules(SensitiveDataScannerRuleData::new().data(vec![]))).type_(SensitiveDataScannerGroupType::SENSITIVE_DATA_SCANNER_GROUP), SensitiveDataScannerMetaVersionOnly::new(), ); + let configuration = datadog::Configuration::new(); let api = SensitiveDataScannerAPI::with_config(configuration); let resp = api.update_scanning_group(group_data_id.clone(), body).await; diff --git a/examples/v2_sensitive-data-scanner_UpdateScanningRule.rs b/examples/v2_sensitive-data-scanner_UpdateScanningRule.rs index 764805ec6..38b2f331d 100644 --- a/examples/v2_sensitive-data-scanner_UpdateScanningRule.rs +++ b/examples/v2_sensitive-data-scanner_UpdateScanningRule.rs @@ -38,6 +38,7 @@ async fn main() { .type_(SensitiveDataScannerRuleType::SENSITIVE_DATA_SCANNER_RULE), SensitiveDataScannerMetaVersionOnly::new(), ); + let configuration = datadog::Configuration::new(); let api = SensitiveDataScannerAPI::with_config(configuration); let resp = api.update_scanning_rule(rule_data_id.clone(), body).await; diff --git a/examples/v2_service-accounts_CreateServiceAccount.rs b/examples/v2_service-accounts_CreateServiceAccount.rs index 89692c756..6bae92a96 100644 --- a/examples/v2_service-accounts_CreateServiceAccount.rs +++ b/examples/v2_service-accounts_CreateServiceAccount.rs @@ -30,6 +30,7 @@ async fn main() { .type_(RolesType::ROLES)]), )), ); + let configuration = datadog::Configuration::new(); let api = ServiceAccountsAPI::with_config(configuration); let resp = api.create_service_account(body).await; diff --git a/examples/v2_service-accounts_CreateServiceAccountApplicationKey.rs b/examples/v2_service-accounts_CreateServiceAccountApplicationKey.rs index d8e740d80..0e601fcdc 100644 --- a/examples/v2_service-accounts_CreateServiceAccountApplicationKey.rs +++ b/examples/v2_service-accounts_CreateServiceAccountApplicationKey.rs @@ -14,6 +14,7 @@ async fn main() { ApplicationKeyCreateAttributes::new("Example-Service-Account".to_string()), ApplicationKeysType::APPLICATION_KEYS, )); + let configuration = datadog::Configuration::new(); let api = ServiceAccountsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_service-accounts_CreateServiceAccountApplicationKey_3480494373.rs b/examples/v2_service-accounts_CreateServiceAccountApplicationKey_3480494373.rs index f4671ca7b..f8cef5142 100644 --- a/examples/v2_service-accounts_CreateServiceAccountApplicationKey_3480494373.rs +++ b/examples/v2_service-accounts_CreateServiceAccountApplicationKey_3480494373.rs @@ -1,5 +1,4 @@ -// Create an application key with scopes for this service account returns -// "Created" response +// Create an application key with scopes for this service account returns "Created" response use datadog_api_client::datadog; use datadog_api_client::datadogV2::api_service_accounts::ServiceAccountsAPI; use datadog_api_client::datadogV2::model::ApplicationKeyCreateAttributes; @@ -21,6 +20,7 @@ async fn main() { )), ApplicationKeysType::APPLICATION_KEYS, )); + let configuration = datadog::Configuration::new(); let api = ServiceAccountsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_service-accounts_DeleteServiceAccountApplicationKey.rs b/examples/v2_service-accounts_DeleteServiceAccountApplicationKey.rs index 9ccf288d4..f2c1c90f8 100644 --- a/examples/v2_service-accounts_DeleteServiceAccountApplicationKey.rs +++ b/examples/v2_service-accounts_DeleteServiceAccountApplicationKey.rs @@ -6,10 +6,10 @@ use datadog_api_client::datadogV2::api_service_accounts::ServiceAccountsAPI; async fn main() { // there is a valid "service_account_user" in the system let service_account_user_data_id = std::env::var("SERVICE_ACCOUNT_USER_DATA_ID").unwrap(); - // there is a valid "service_account_application_key" for "service_account_user" let service_account_application_key_data_id = std::env::var("SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = ServiceAccountsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_service-accounts_GetServiceAccountApplicationKey.rs b/examples/v2_service-accounts_GetServiceAccountApplicationKey.rs index 007565a83..8eec668c5 100644 --- a/examples/v2_service-accounts_GetServiceAccountApplicationKey.rs +++ b/examples/v2_service-accounts_GetServiceAccountApplicationKey.rs @@ -6,10 +6,10 @@ use datadog_api_client::datadogV2::api_service_accounts::ServiceAccountsAPI; async fn main() { // there is a valid "service_account_user" in the system let service_account_user_data_id = std::env::var("SERVICE_ACCOUNT_USER_DATA_ID").unwrap(); - // there is a valid "service_account_application_key" for "service_account_user" let service_account_application_key_data_id = std::env::var("SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = ServiceAccountsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_service-accounts_ListServiceAccountApplicationKeys.rs b/examples/v2_service-accounts_ListServiceAccountApplicationKeys.rs index 8dd1a23eb..381644309 100644 --- a/examples/v2_service-accounts_ListServiceAccountApplicationKeys.rs +++ b/examples/v2_service-accounts_ListServiceAccountApplicationKeys.rs @@ -7,6 +7,7 @@ use datadog_api_client::datadogV2::api_service_accounts::ServiceAccountsAPI; async fn main() { // there is a valid "service_account_user" in the system let service_account_user_data_id = std::env::var("SERVICE_ACCOUNT_USER_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = ServiceAccountsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_service-accounts_UpdateServiceAccountApplicationKey.rs b/examples/v2_service-accounts_UpdateServiceAccountApplicationKey.rs index a8e294dfa..622d9627d 100644 --- a/examples/v2_service-accounts_UpdateServiceAccountApplicationKey.rs +++ b/examples/v2_service-accounts_UpdateServiceAccountApplicationKey.rs @@ -10,7 +10,6 @@ use datadog_api_client::datadogV2::model::ApplicationKeysType; async fn main() { // there is a valid "service_account_user" in the system let service_account_user_data_id = std::env::var("SERVICE_ACCOUNT_USER_DATA_ID").unwrap(); - // there is a valid "service_account_application_key" for "service_account_user" let service_account_application_key_data_id = std::env::var("SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID").unwrap(); @@ -20,6 +19,7 @@ async fn main() { service_account_application_key_data_id.clone(), ApplicationKeysType::APPLICATION_KEYS, )); + let configuration = datadog::Configuration::new(); let api = ServiceAccountsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_service-definition_CreateOrUpdateServiceDefinitions.rs b/examples/v2_service-definition_CreateOrUpdateServiceDefinitions.rs index 4746142dc..ead412f61 100644 --- a/examples/v2_service-definition_CreateOrUpdateServiceDefinitions.rs +++ b/examples/v2_service-definition_CreateOrUpdateServiceDefinitions.rs @@ -68,6 +68,7 @@ async fn main() { .tier("High".to_string()) .type_(ServiceDefinitionV2Dot2Type::WEB), )); + let configuration = datadog::Configuration::new(); let api = ServiceDefinitionAPI::with_config(configuration); let resp = api.create_or_update_service_definitions(body).await; diff --git a/examples/v2_service-definition_CreateOrUpdateServiceDefinitions_1808735248.rs b/examples/v2_service-definition_CreateOrUpdateServiceDefinitions_1808735248.rs index 24dd6ea5a..b87b0fb3c 100644 --- a/examples/v2_service-definition_CreateOrUpdateServiceDefinitions_1808735248.rs +++ b/examples/v2_service-definition_CreateOrUpdateServiceDefinitions_1808735248.rs @@ -67,6 +67,7 @@ async fn main() { .tags(vec!["my:tag".to_string(), "service:tag".to_string()]) .team("my-team".to_string()), )); + let configuration = datadog::Configuration::new(); let api = ServiceDefinitionAPI::with_config(configuration); let resp = api.create_or_update_service_definitions(body).await; diff --git a/examples/v2_service-definition_CreateOrUpdateServiceDefinitions_2619874414.rs b/examples/v2_service-definition_CreateOrUpdateServiceDefinitions_2619874414.rs index 66474a111..a7e6a4664 100644 --- a/examples/v2_service-definition_CreateOrUpdateServiceDefinitions_2619874414.rs +++ b/examples/v2_service-definition_CreateOrUpdateServiceDefinitions_2619874414.rs @@ -71,6 +71,7 @@ async fn main() { .tags(vec!["my:tag".to_string(), "service:tag".to_string()]) .team("my-team".to_string()), )); + let configuration = datadog::Configuration::new(); let api = ServiceDefinitionAPI::with_config(configuration); let resp = api.create_or_update_service_definitions(body).await; diff --git a/examples/v2_service-definition_CreateOrUpdateServiceDefinitions_2621709423.rs b/examples/v2_service-definition_CreateOrUpdateServiceDefinitions_2621709423.rs index b083b4b14..d38ca6a6f 100644 --- a/examples/v2_service-definition_CreateOrUpdateServiceDefinitions_2621709423.rs +++ b/examples/v2_service-definition_CreateOrUpdateServiceDefinitions_2621709423.rs @@ -64,6 +64,7 @@ async fn main() { .tags(vec!["my:tag".to_string(), "service:tag".to_string()]) .team("my-team".to_string()), )); + let configuration = datadog::Configuration::new(); let api = ServiceDefinitionAPI::with_config(configuration); let resp = api.create_or_update_service_definitions(body).await; diff --git a/examples/v2_service-definition_ListServiceDefinitions_336468013.rs b/examples/v2_service-definition_ListServiceDefinitions_336468013.rs index b2e67753b..508248317 100644 --- a/examples/v2_service-definition_ListServiceDefinitions_336468013.rs +++ b/examples/v2_service-definition_ListServiceDefinitions_336468013.rs @@ -13,6 +13,7 @@ async fn main() { ListServiceDefinitionsOptionalParams::default().page_size(2), ); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_service-level-objectives_CreateSLOReportJob.rs b/examples/v2_service-level-objectives_CreateSLOReportJob.rs index 1d9a77afb..f159583d7 100644 --- a/examples/v2_service-level-objectives_CreateSLOReportJob.rs +++ b/examples/v2_service-level-objectives_CreateSLOReportJob.rs @@ -17,6 +17,7 @@ async fn main() { .interval(SLOReportInterval::MONTHLY) .timezone("America/New_York".to_string()), )); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.CreateSLOReportJob", true); let api = ServiceLevelObjectivesAPI::with_config(configuration); diff --git a/examples/v2_service-level-objectives_GetSLOReportJobStatus.rs b/examples/v2_service-level-objectives_GetSLOReportJobStatus.rs index 0bf45557d..605653684 100644 --- a/examples/v2_service-level-objectives_GetSLOReportJobStatus.rs +++ b/examples/v2_service-level-objectives_GetSLOReportJobStatus.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_service_level_objectives::ServiceLevelObj async fn main() { // there is a valid "report" in the system let report_data_id = std::env::var("REPORT_DATA_ID").unwrap(); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.GetSLOReportJobStatus", true); let api = ServiceLevelObjectivesAPI::with_config(configuration); diff --git a/examples/v2_service-scorecards_CreateScorecardOutcomesBatch.rs b/examples/v2_service-scorecards_CreateScorecardOutcomesBatch.rs index 388d9c6af..e4f3142a7 100644 --- a/examples/v2_service-scorecards_CreateScorecardOutcomesBatch.rs +++ b/examples/v2_service-scorecards_CreateScorecardOutcomesBatch.rs @@ -26,6 +26,7 @@ async fn main() { ) .type_(OutcomesBatchType::BATCHED_OUTCOME), ); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.CreateScorecardOutcomesBatch", true); let api = ServiceScorecardsAPI::with_config(configuration); diff --git a/examples/v2_service-scorecards_CreateScorecardRule.rs b/examples/v2_service-scorecards_CreateScorecardRule.rs index 5462f40a9..1e97b2186 100644 --- a/examples/v2_service-scorecards_CreateScorecardRule.rs +++ b/examples/v2_service-scorecards_CreateScorecardRule.rs @@ -18,6 +18,7 @@ async fn main() { ) .type_(RuleType::RULE), ); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.CreateScorecardRule", true); let api = ServiceScorecardsAPI::with_config(configuration); diff --git a/examples/v2_service-scorecards_DeleteScorecardRule.rs b/examples/v2_service-scorecards_DeleteScorecardRule.rs index 14684437f..473324c74 100644 --- a/examples/v2_service-scorecards_DeleteScorecardRule.rs +++ b/examples/v2_service-scorecards_DeleteScorecardRule.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_service_scorecards::ServiceScorecardsAPI; async fn main() { // there is a valid "create_scorecard_rule" in the system let create_scorecard_rule_data_id = std::env::var("CREATE_SCORECARD_RULE_DATA_ID").unwrap(); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.DeleteScorecardRule", true); let api = ServiceScorecardsAPI::with_config(configuration); diff --git a/examples/v2_service-scorecards_ListScorecardOutcomes_2663454275.rs b/examples/v2_service-scorecards_ListScorecardOutcomes_2663454275.rs index 10b402ce7..0205b57f9 100644 --- a/examples/v2_service-scorecards_ListScorecardOutcomes_2663454275.rs +++ b/examples/v2_service-scorecards_ListScorecardOutcomes_2663454275.rs @@ -17,6 +17,7 @@ async fn main() { .filter_outcome_service_name("my-service".to_string()), ); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_service-scorecards_ListScorecardRules_4057666343.rs b/examples/v2_service-scorecards_ListScorecardRules_4057666343.rs index cf891a310..c03b2c27b 100644 --- a/examples/v2_service-scorecards_ListScorecardRules_4057666343.rs +++ b/examples/v2_service-scorecards_ListScorecardRules_4057666343.rs @@ -17,6 +17,7 @@ async fn main() { .filter_rule_custom(true), ); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_service-scorecards_UpdateScorecardRule.rs b/examples/v2_service-scorecards_UpdateScorecardRule.rs index cead5ce3a..bd3e7e435 100644 --- a/examples/v2_service-scorecards_UpdateScorecardRule.rs +++ b/examples/v2_service-scorecards_UpdateScorecardRule.rs @@ -22,6 +22,7 @@ async fn main() { .scorecard_name(create_scorecard_rule_data_attributes_scorecard_name.clone()), ), ); + let mut configuration = datadog::Configuration::new(); configuration.set_unstable_operation_enabled("v2.UpdateScorecardRule", true); let api = ServiceScorecardsAPI::with_config(configuration); diff --git a/examples/v2_software-catalog_ListCatalogEntity_2305103326.rs b/examples/v2_software-catalog_ListCatalogEntity_2305103326.rs index ded906b16..f8b7a7710 100644 --- a/examples/v2_software-catalog_ListCatalogEntity_2305103326.rs +++ b/examples/v2_software-catalog_ListCatalogEntity_2305103326.rs @@ -12,6 +12,7 @@ async fn main() { let response = api.list_catalog_entity_with_pagination(ListCatalogEntityOptionalParams::default()); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_software-catalog_UpsertCatalogEntity.rs b/examples/v2_software-catalog_UpsertCatalogEntity.rs index f8c8cb157..74a6b827c 100644 --- a/examples/v2_software-catalog_UpsertCatalogEntity.rs +++ b/examples/v2_software-catalog_UpsertCatalogEntity.rs @@ -65,6 +65,7 @@ async fn main() { .languages(vec![]), ), )))); + let configuration = datadog::Configuration::new(); let api = SoftwareCatalogAPI::with_config(configuration); let resp = api.upsert_catalog_entity(body).await; diff --git a/examples/v2_software-catalog_UpsertCatalogEntity_586948155.rs b/examples/v2_software-catalog_UpsertCatalogEntity_586948155.rs index dcea42ef2..447d6db32 100644 --- a/examples/v2_software-catalog_UpsertCatalogEntity_586948155.rs +++ b/examples/v2_software-catalog_UpsertCatalogEntity_586948155.rs @@ -1,5 +1,4 @@ -// Create or update software catalog entity using schema v3 returns "ACCEPTED" -// response +// Create or update software catalog entity using schema v3 returns "ACCEPTED" response use datadog_api_client::datadog; use datadog_api_client::datadogV2::api_software_catalog::SoftwareCatalogAPI; use datadog_api_client::datadogV2::model::EntityV3; @@ -65,6 +64,7 @@ async fn main() { .languages(vec![]), ), )))); + let configuration = datadog::Configuration::new(); let api = SoftwareCatalogAPI::with_config(configuration); let resp = api.upsert_catalog_entity(body).await; diff --git a/examples/v2_spans-metrics_CreateSpansMetric.rs b/examples/v2_spans-metrics_CreateSpansMetric.rs index c4a0d165e..46a35d89e 100644 --- a/examples/v2_spans-metrics_CreateSpansMetric.rs +++ b/examples/v2_spans-metrics_CreateSpansMetric.rs @@ -26,6 +26,7 @@ async fn main() { "ExampleSpansMetric".to_string(), SpansMetricType::SPANS_METRICS, )); + let configuration = datadog::Configuration::new(); let api = SpansMetricsAPI::with_config(configuration); let resp = api.create_spans_metric(body).await; diff --git a/examples/v2_spans-metrics_DeleteSpansMetric.rs b/examples/v2_spans-metrics_DeleteSpansMetric.rs index 5928c15b2..2a869d528 100644 --- a/examples/v2_spans-metrics_DeleteSpansMetric.rs +++ b/examples/v2_spans-metrics_DeleteSpansMetric.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_spans_metrics::SpansMetricsAPI; async fn main() { // there is a valid "spans_metric" in the system let spans_metric_data_id = std::env::var("SPANS_METRIC_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = SpansMetricsAPI::with_config(configuration); let resp = api.delete_spans_metric(spans_metric_data_id.clone()).await; diff --git a/examples/v2_spans-metrics_GetSpansMetric.rs b/examples/v2_spans-metrics_GetSpansMetric.rs index 46745aacf..be67efd26 100644 --- a/examples/v2_spans-metrics_GetSpansMetric.rs +++ b/examples/v2_spans-metrics_GetSpansMetric.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_spans_metrics::SpansMetricsAPI; async fn main() { // there is a valid "spans_metric" in the system let spans_metric_data_id = std::env::var("SPANS_METRIC_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = SpansMetricsAPI::with_config(configuration); let resp = api.get_spans_metric(spans_metric_data_id.clone()).await; diff --git a/examples/v2_spans-metrics_UpdateSpansMetric.rs b/examples/v2_spans-metrics_UpdateSpansMetric.rs index 2392eb5ff..8d99d3441 100644 --- a/examples/v2_spans-metrics_UpdateSpansMetric.rs +++ b/examples/v2_spans-metrics_UpdateSpansMetric.rs @@ -24,6 +24,7 @@ async fn main() { .tag_name("resource_name".to_string())]), SpansMetricType::SPANS_METRICS, )); + let configuration = datadog::Configuration::new(); let api = SpansMetricsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_spans_AggregateSpans.rs b/examples/v2_spans_AggregateSpans.rs index 203d6393c..ec1d2db8c 100644 --- a/examples/v2_spans_AggregateSpans.rs +++ b/examples/v2_spans_AggregateSpans.rs @@ -28,6 +28,7 @@ async fn main() { ) .type_(SpansAggregateRequestType::AGGREGATE_REQUEST), ); + let configuration = datadog::Configuration::new(); let api = SpansAPI::with_config(configuration); let resp = api.aggregate_spans(body).await; diff --git a/examples/v2_spans_ListSpans.rs b/examples/v2_spans_ListSpans.rs index faba72436..f1906007e 100644 --- a/examples/v2_spans_ListSpans.rs +++ b/examples/v2_spans_ListSpans.rs @@ -28,6 +28,7 @@ async fn main() { ) .type_(SpansListRequestType::SEARCH_REQUEST), ); + let configuration = datadog::Configuration::new(); let api = SpansAPI::with_config(configuration); let resp = api.list_spans(body).await; diff --git a/examples/v2_spans_ListSpansGet_1130763422.rs b/examples/v2_spans_ListSpansGet_1130763422.rs index 6a149d96a..621169c8e 100644 --- a/examples/v2_spans_ListSpansGet_1130763422.rs +++ b/examples/v2_spans_ListSpansGet_1130763422.rs @@ -12,6 +12,7 @@ async fn main() { let response = api.list_spans_get_with_pagination(ListSpansGetOptionalParams::default().page_limit(2)); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_spans_ListSpans_3495563906.rs b/examples/v2_spans_ListSpans_3495563906.rs index c8a220244..667d506be 100644 --- a/examples/v2_spans_ListSpans_3495563906.rs +++ b/examples/v2_spans_ListSpans_3495563906.rs @@ -30,10 +30,12 @@ async fn main() { ) .type_(SpansListRequestType::SEARCH_REQUEST), ); + let configuration = datadog::Configuration::new(); let api = SpansAPI::with_config(configuration); let response = api.list_spans_with_pagination(body); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_synthetics_SetOnDemandConcurrencyCap.rs b/examples/v2_synthetics_SetOnDemandConcurrencyCap.rs index 417255558..4817f068d 100644 --- a/examples/v2_synthetics_SetOnDemandConcurrencyCap.rs +++ b/examples/v2_synthetics_SetOnDemandConcurrencyCap.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::model::OnDemandConcurrencyCapAttributes; #[tokio::main] async fn main() { let body = OnDemandConcurrencyCapAttributes::new().on_demand_concurrency_cap(20.0 as f64); + let configuration = datadog::Configuration::new(); let api = SyntheticsAPI::with_config(configuration); let resp = api.set_on_demand_concurrency_cap(body).await; diff --git a/examples/v2_teams_CreateTeam.rs b/examples/v2_teams_CreateTeam.rs index 7d6d4ae7a..92eeb8bce 100644 --- a/examples/v2_teams_CreateTeam.rs +++ b/examples/v2_teams_CreateTeam.rs @@ -20,6 +20,7 @@ async fn main() { ) .relationships(TeamCreateRelationships::new().users(RelationshipToUsers::new(vec![]))), ); + let configuration = datadog::Configuration::new(); let api = TeamsAPI::with_config(configuration); let resp = api.create_team(body).await; diff --git a/examples/v2_teams_CreateTeamLink.rs b/examples/v2_teams_CreateTeamLink.rs index ce9e1f446..06dae5305 100644 --- a/examples/v2_teams_CreateTeamLink.rs +++ b/examples/v2_teams_CreateTeamLink.rs @@ -15,6 +15,7 @@ async fn main() { .position(0), TeamLinkType::TEAM_LINKS, )); + let configuration = datadog::Configuration::new(); let api = TeamsAPI::with_config(configuration); let resp = api.create_team_link(dd_team_data_id.clone(), body).await; diff --git a/examples/v2_teams_CreateTeamMembership.rs b/examples/v2_teams_CreateTeamMembership.rs index f21f33d1b..a3be54dfd 100644 --- a/examples/v2_teams_CreateTeamMembership.rs +++ b/examples/v2_teams_CreateTeamMembership.rs @@ -1,5 +1,4 @@ -// Add a user to a team returns "Represents a user's association to a team" -// response +// Add a user to a team returns "Represents a user's association to a team" response use datadog_api_client::datadog; use datadog_api_client::datadogV2::api_teams::TeamsAPI; use datadog_api_client::datadogV2::model::RelationshipToUserTeamTeam; @@ -36,6 +35,7 @@ async fn main() { )), ), ); + let configuration = datadog::Configuration::new(); let api = TeamsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_teams_CreateTeam_252121814.rs b/examples/v2_teams_CreateTeam_252121814.rs index 9ae2168fc..1b79a8d24 100644 --- a/examples/v2_teams_CreateTeam_252121814.rs +++ b/examples/v2_teams_CreateTeam_252121814.rs @@ -19,6 +19,7 @@ async fn main() { .visible_modules(vec!["m1".to_string(), "m2".to_string()]), TeamType::TEAM, )); + let configuration = datadog::Configuration::new(); let api = TeamsAPI::with_config(configuration); let resp = api.create_team(body).await; diff --git a/examples/v2_teams_DeleteTeam.rs b/examples/v2_teams_DeleteTeam.rs index 20cf49513..d5f9a8f7a 100644 --- a/examples/v2_teams_DeleteTeam.rs +++ b/examples/v2_teams_DeleteTeam.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_teams::TeamsAPI; async fn main() { // there is a valid "dd_team" in the system let dd_team_data_id = std::env::var("DD_TEAM_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = TeamsAPI::with_config(configuration); let resp = api.delete_team(dd_team_data_id.clone()).await; diff --git a/examples/v2_teams_DeleteTeamLink.rs b/examples/v2_teams_DeleteTeamLink.rs index 74c3825d6..282908dba 100644 --- a/examples/v2_teams_DeleteTeamLink.rs +++ b/examples/v2_teams_DeleteTeamLink.rs @@ -6,9 +6,9 @@ use datadog_api_client::datadogV2::api_teams::TeamsAPI; async fn main() { // there is a valid "dd_team" in the system let dd_team_data_id = std::env::var("DD_TEAM_DATA_ID").unwrap(); - // there is a valid "team_link" in the system let team_link_data_id = std::env::var("TEAM_LINK_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = TeamsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_teams_DeleteTeamMembership.rs b/examples/v2_teams_DeleteTeamMembership.rs index f7755f6aa..7f68b545f 100644 --- a/examples/v2_teams_DeleteTeamMembership.rs +++ b/examples/v2_teams_DeleteTeamMembership.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_teams::TeamsAPI; async fn main() { // there is a valid "dd_team" in the system let dd_team_data_id = std::env::var("DD_TEAM_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = TeamsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_teams_GetTeam.rs b/examples/v2_teams_GetTeam.rs index 6221db915..fcdb39118 100644 --- a/examples/v2_teams_GetTeam.rs +++ b/examples/v2_teams_GetTeam.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_teams::TeamsAPI; async fn main() { // there is a valid "dd_team" in the system let dd_team_data_id = std::env::var("DD_TEAM_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = TeamsAPI::with_config(configuration); let resp = api.get_team(dd_team_data_id.clone()).await; diff --git a/examples/v2_teams_GetTeamLink.rs b/examples/v2_teams_GetTeamLink.rs index 6b4c08faa..9e9b8f902 100644 --- a/examples/v2_teams_GetTeamLink.rs +++ b/examples/v2_teams_GetTeamLink.rs @@ -6,9 +6,9 @@ use datadog_api_client::datadogV2::api_teams::TeamsAPI; async fn main() { // there is a valid "dd_team" in the system let dd_team_data_id = std::env::var("DD_TEAM_DATA_ID").unwrap(); - // there is a valid "team_link" in the system let team_link_data_id = std::env::var("TEAM_LINK_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = TeamsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_teams_GetTeamLinks.rs b/examples/v2_teams_GetTeamLinks.rs index 9ce22acae..0597969c5 100644 --- a/examples/v2_teams_GetTeamLinks.rs +++ b/examples/v2_teams_GetTeamLinks.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_teams::TeamsAPI; async fn main() { // there is a valid "dd_team" in the system let dd_team_data_id = std::env::var("DD_TEAM_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = TeamsAPI::with_config(configuration); let resp = api.get_team_links(dd_team_data_id.clone()).await; diff --git a/examples/v2_teams_GetTeamMemberships.rs b/examples/v2_teams_GetTeamMemberships.rs index 62aa07e9a..935c4ff76 100644 --- a/examples/v2_teams_GetTeamMemberships.rs +++ b/examples/v2_teams_GetTeamMemberships.rs @@ -1,5 +1,4 @@ -// Get team memberships returns "Represents a user's association to a team" -// response +// Get team memberships returns "Represents a user's association to a team" response use datadog_api_client::datadog; use datadog_api_client::datadogV2::api_teams::GetTeamMembershipsOptionalParams; use datadog_api_client::datadogV2::api_teams::TeamsAPI; @@ -8,6 +7,7 @@ use datadog_api_client::datadogV2::api_teams::TeamsAPI; async fn main() { // there is a valid "dd_team" in the system let dd_team_data_id = std::env::var("DD_TEAM_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = TeamsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_teams_GetTeamMemberships_3799131168.rs b/examples/v2_teams_GetTeamMemberships_3799131168.rs index 201a91607..27be886c7 100644 --- a/examples/v2_teams_GetTeamMemberships_3799131168.rs +++ b/examples/v2_teams_GetTeamMemberships_3799131168.rs @@ -1,5 +1,4 @@ -// Get team memberships returns "Represents a user's association to a team" -// response with pagination +// Get team memberships returns "Represents a user's association to a team" response with pagination use datadog_api_client::datadog; use datadog_api_client::datadogV2::api_teams::GetTeamMembershipsOptionalParams; use datadog_api_client::datadogV2::api_teams::TeamsAPI; @@ -15,6 +14,7 @@ async fn main() { GetTeamMembershipsOptionalParams::default().page_size(2), ); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_teams_GetTeamPermissionSettings.rs b/examples/v2_teams_GetTeamPermissionSettings.rs index 9ae28b6eb..61a6df720 100644 --- a/examples/v2_teams_GetTeamPermissionSettings.rs +++ b/examples/v2_teams_GetTeamPermissionSettings.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_teams::TeamsAPI; async fn main() { // there is a valid "dd_team" in the system let dd_team_data_id = std::env::var("DD_TEAM_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = TeamsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_teams_GetUserMemberships.rs b/examples/v2_teams_GetUserMemberships.rs index 752cfff75..5a9d8830b 100644 --- a/examples/v2_teams_GetUserMemberships.rs +++ b/examples/v2_teams_GetUserMemberships.rs @@ -1,5 +1,4 @@ -// Get user memberships returns "Represents a user's association to a team" -// response +// Get user memberships returns "Represents a user's association to a team" response use datadog_api_client::datadog; use datadog_api_client::datadogV2::api_teams::TeamsAPI; @@ -7,6 +6,7 @@ use datadog_api_client::datadogV2::api_teams::TeamsAPI; async fn main() { // there is a valid "user" in the system let user_data_id = std::env::var("USER_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = TeamsAPI::with_config(configuration); let resp = api.get_user_memberships(user_data_id.clone()).await; diff --git a/examples/v2_teams_ListTeams_3592098458.rs b/examples/v2_teams_ListTeams_3592098458.rs index a94da444a..5a38311f8 100644 --- a/examples/v2_teams_ListTeams_3592098458.rs +++ b/examples/v2_teams_ListTeams_3592098458.rs @@ -11,6 +11,7 @@ async fn main() { let api = TeamsAPI::with_config(configuration); let response = api.list_teams_with_pagination(ListTeamsOptionalParams::default().page_size(2)); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_teams_UpdateTeam.rs b/examples/v2_teams_UpdateTeam.rs index e0190bc23..e7404bd18 100644 --- a/examples/v2_teams_UpdateTeam.rs +++ b/examples/v2_teams_UpdateTeam.rs @@ -22,6 +22,7 @@ async fn main() { .visible_modules(vec!["m1".to_string(), "m2".to_string()]), TeamType::TEAM, )); + let configuration = datadog::Configuration::new(); let api = TeamsAPI::with_config(configuration); let resp = api.update_team(dd_team_data_id.clone(), body).await; diff --git a/examples/v2_teams_UpdateTeamLink.rs b/examples/v2_teams_UpdateTeamLink.rs index 76faf78df..6c4f0262c 100644 --- a/examples/v2_teams_UpdateTeamLink.rs +++ b/examples/v2_teams_UpdateTeamLink.rs @@ -10,13 +10,13 @@ use datadog_api_client::datadogV2::model::TeamLinkType; async fn main() { // there is a valid "dd_team" in the system let dd_team_data_id = std::env::var("DD_TEAM_DATA_ID").unwrap(); - // there is a valid "team_link" in the system let team_link_data_id = std::env::var("TEAM_LINK_DATA_ID").unwrap(); let body = TeamLinkCreateRequest::new(TeamLinkCreate::new( TeamLinkAttributes::new("New Label".to_string(), "https://example.com".to_string()), TeamLinkType::TEAM_LINKS, )); + let configuration = datadog::Configuration::new(); let api = TeamsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_teams_UpdateTeamMembership.rs b/examples/v2_teams_UpdateTeamMembership.rs index 9ea41dbd6..50db1e2bc 100644 --- a/examples/v2_teams_UpdateTeamMembership.rs +++ b/examples/v2_teams_UpdateTeamMembership.rs @@ -1,5 +1,4 @@ -// Update a user's membership attributes on a team returns "Represents a user's -// association to a team" response +// Update a user's membership attributes on a team returns "Represents a user's association to a team" response use datadog_api_client::datadog; use datadog_api_client::datadogV2::api_teams::TeamsAPI; use datadog_api_client::datadogV2::model::UserTeamAttributes; @@ -14,6 +13,7 @@ async fn main() { UserTeamUpdate::new(UserTeamType::TEAM_MEMBERSHIPS) .attributes(UserTeamAttributes::new().role(Some(UserTeamRole::ADMIN))), ); + let configuration = datadog::Configuration::new(); let api = TeamsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_teams_UpdateTeamPermissionSetting.rs b/examples/v2_teams_UpdateTeamPermissionSetting.rs index 563f4240a..b7bc0d732 100644 --- a/examples/v2_teams_UpdateTeamPermissionSetting.rs +++ b/examples/v2_teams_UpdateTeamPermissionSetting.rs @@ -18,6 +18,7 @@ async fn main() { .value(TeamPermissionSettingValue::ADMINS), ), ); + let configuration = datadog::Configuration::new(); let api = TeamsAPI::with_config(configuration); let resp = api diff --git a/examples/v2_users_CreateUser.rs b/examples/v2_users_CreateUser.rs index 4eac0f343..fd5dfd4ac 100644 --- a/examples/v2_users_CreateUser.rs +++ b/examples/v2_users_CreateUser.rs @@ -13,6 +13,7 @@ async fn main() { .name("Datadog API Client Python".to_string()), UsersType::USERS, )); + let configuration = datadog::Configuration::new(); let api = UsersAPI::with_config(configuration); let resp = api.create_user(body).await; diff --git a/examples/v2_users_DisableUser.rs b/examples/v2_users_DisableUser.rs index 22c5c16f5..310d69bb0 100644 --- a/examples/v2_users_DisableUser.rs +++ b/examples/v2_users_DisableUser.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_users::UsersAPI; async fn main() { // there is a valid "user" in the system let user_data_id = std::env::var("USER_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = UsersAPI::with_config(configuration); let resp = api.disable_user(user_data_id.clone()).await; diff --git a/examples/v2_users_GetInvitation.rs b/examples/v2_users_GetInvitation.rs index fc78edac9..9c2d641b7 100644 --- a/examples/v2_users_GetInvitation.rs +++ b/examples/v2_users_GetInvitation.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_users::UsersAPI; async fn main() { // the "user" has a "user_invitation" let user_invitation_id = std::env::var("USER_INVITATION_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = UsersAPI::with_config(configuration); let resp = api.get_invitation(user_invitation_id.clone()).await; diff --git a/examples/v2_users_GetUser.rs b/examples/v2_users_GetUser.rs index 1961ec699..1c88e7291 100644 --- a/examples/v2_users_GetUser.rs +++ b/examples/v2_users_GetUser.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_users::UsersAPI; async fn main() { // there is a valid "user" in the system let user_data_id = std::env::var("USER_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = UsersAPI::with_config(configuration); let resp = api.get_user(user_data_id.clone()).await; diff --git a/examples/v2_users_ListUserPermissions.rs b/examples/v2_users_ListUserPermissions.rs index 9713cce0d..9848131f7 100644 --- a/examples/v2_users_ListUserPermissions.rs +++ b/examples/v2_users_ListUserPermissions.rs @@ -6,6 +6,7 @@ use datadog_api_client::datadogV2::api_users::UsersAPI; async fn main() { // there is a valid "user" in the system let user_data_id = std::env::var("USER_DATA_ID").unwrap(); + let configuration = datadog::Configuration::new(); let api = UsersAPI::with_config(configuration); let resp = api.list_user_permissions(user_data_id.clone()).await; diff --git a/examples/v2_users_ListUsers.rs b/examples/v2_users_ListUsers.rs index 9e60c2bf1..e5f32d1b9 100644 --- a/examples/v2_users_ListUsers.rs +++ b/examples/v2_users_ListUsers.rs @@ -7,6 +7,7 @@ use datadog_api_client::datadogV2::api_users::UsersAPI; async fn main() { // there is a valid "user" in the system let user_data_attributes_email = std::env::var("USER_DATA_ATTRIBUTES_EMAIL").unwrap(); + let configuration = datadog::Configuration::new(); let api = UsersAPI::with_config(configuration); let resp = api diff --git a/examples/v2_users_ListUsers_4075885358.rs b/examples/v2_users_ListUsers_4075885358.rs index 7508d8189..8ac062881 100644 --- a/examples/v2_users_ListUsers_4075885358.rs +++ b/examples/v2_users_ListUsers_4075885358.rs @@ -11,6 +11,7 @@ async fn main() { let api = UsersAPI::with_config(configuration); let response = api.list_users_with_pagination(ListUsersOptionalParams::default().page_size(2)); pin_mut!(response); + while let Some(resp) = response.next().await { if let Ok(value) = resp { println!("{:#?}", value); diff --git a/examples/v2_users_SendInvitations.rs b/examples/v2_users_SendInvitations.rs index a9b035f23..5527ab46b 100644 --- a/examples/v2_users_SendInvitations.rs +++ b/examples/v2_users_SendInvitations.rs @@ -20,6 +20,7 @@ async fn main() { ))), UserInvitationsType::USER_INVITATIONS, )]); + let configuration = datadog::Configuration::new(); let api = UsersAPI::with_config(configuration); let resp = api.send_invitations(body).await; diff --git a/examples/v2_users_UpdateUser.rs b/examples/v2_users_UpdateUser.rs index 2c5198f2b..cd3b67fc5 100644 --- a/examples/v2_users_UpdateUser.rs +++ b/examples/v2_users_UpdateUser.rs @@ -17,6 +17,7 @@ async fn main() { user_data_id.clone(), UsersType::USERS, )); + let configuration = datadog::Configuration::new(); let api = UsersAPI::with_config(configuration); let resp = api.update_user(user_data_id.clone(), body).await; diff --git a/examples/v2_workflow-automation_CreateWorkflowInstance.rs b/examples/v2_workflow-automation_CreateWorkflowInstance.rs index f9e252885..5423ab141 100644 --- a/examples/v2_workflow-automation_CreateWorkflowInstance.rs +++ b/examples/v2_workflow-automation_CreateWorkflowInstance.rs @@ -12,6 +12,7 @@ async fn main() { WorkflowInstanceCreateRequest::new().meta(WorkflowInstanceCreateMeta::new().payload( BTreeMap::from([("input".to_string(), Value::from("value"))]), )); + let configuration = datadog::Configuration::new(); let api = WorkflowAutomationAPI::with_config(configuration); let resp = api diff --git a/src/datadogV2/api/api_spans.rs b/src/datadogV2/api/api_spans.rs index 23d4ef13b..b1062bf06 100644 --- a/src/datadogV2/api/api_spans.rs +++ b/src/datadogV2/api/api_spans.rs @@ -26,7 +26,7 @@ pub struct ListSpansGetOptionalParams { pub sort: Option, /// List following results with a cursor provided in the previous query. pub page_cursor: Option, - /// Maximum number of spans in the response. + /// Maximum number of spans in the response. Defaults to 10 and allows up to 5000. pub page_limit: Option, } @@ -56,7 +56,7 @@ impl ListSpansGetOptionalParams { self.page_cursor = Some(value); self } - /// Maximum number of spans in the response. + /// Maximum number of spans in the response. Defaults to 10 and allows up to 5000. pub fn page_limit(mut self, value: i32) -> Self { self.page_limit = Some(value); self