diff --git a/.apigentools-info b/.apigentools-info index 4159f0b26ac2..8a9bc3daab92 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-10-10 19:46:03.896755", - "spec_repo_commit": "049920eb" + "regenerated": "2024-10-16 20:44:09.750237", + "spec_repo_commit": "07f56b7b" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-10-10 19:46:04.041839", - "spec_repo_commit": "049920eb" + "regenerated": "2024-10-16 20:44:09.768598", + "spec_repo_commit": "07f56b7b" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index c592c7ff2864..7e513a7e32df 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -84,6 +84,13 @@ components: required: false schema: $ref: '#/components/schemas/APIKeysSort' + AWSAccountConfigIDPathParameter: + description: Unique Datadog ID of the AWS Account Integration Config + in: path + name: aws_account_config_id + required: true + schema: + type: string ApplicationKeyFilterCreatedAtEndParameter: description: Only include application keys created on or before the specified date. @@ -955,6 +962,356 @@ components: type: string x-enum-varnames: - API_KEYS + AWSAccountCreateRequest: + description: AWS Account Create Request body + properties: + data: + $ref: '#/components/schemas/AWSAccountCreateRequestData' + type: object + AWSAccountCreateRequestAttributes: + description: The AWS Account Integration Config to be created + properties: + account_tags: + $ref: '#/components/schemas/AWSAccountTags' + auth_config: + $ref: '#/components/schemas/AWSAuthConfig' + aws_account_id: + $ref: '#/components/schemas/AWSAccountID' + aws_partition: + $ref: '#/components/schemas/AWSAccountPartition' + aws_regions: + $ref: '#/components/schemas/AWSRegions' + logs_config: + $ref: '#/components/schemas/AWSLogsConfig' + metrics_config: + $ref: '#/components/schemas/AWSMetricsConfig' + resources_config: + $ref: '#/components/schemas/AWSResourcesConfig' + traces_config: + $ref: '#/components/schemas/AWSTracesConfig' + required: + - aws_account_id + - aws_partition + - auth_config + type: object + AWSAccountCreateRequestData: + description: AWS Account Create Request data + properties: + attributes: + $ref: '#/components/schemas/AWSAccountCreateRequestAttributes' + type: + $ref: '#/components/schemas/AWSAccountType' + required: + - attributes + type: object + AWSAccountID: + description: AWS Account ID + example: '123456789012' + type: string + AWSAccountPartition: + default: aws + description: AWS Account partition + enum: + - aws + - aws-cn + - aws-us-gov + example: aws + type: string + x-enum-varnames: + - AWS + - AWS_CN + - AWS_US_GOV + AWSAccountPatchRequest: + description: AWS Account Patch Request body + properties: + data: + $ref: '#/components/schemas/AWSAccountPatchRequestData' + type: object + AWSAccountPatchRequestAttributes: + description: The AWS Account Integration Config to be updated + properties: + account_tags: + $ref: '#/components/schemas/AWSAccountTags' + auth_config: + $ref: '#/components/schemas/AWSAuthConfig' + aws_account_id: + $ref: '#/components/schemas/AWSAccountID' + aws_partition: + $ref: '#/components/schemas/AWSAccountPartition' + aws_regions: + $ref: '#/components/schemas/AWSRegions' + logs_config: + $ref: '#/components/schemas/AWSLogsConfig' + metrics_config: + $ref: '#/components/schemas/AWSMetricsConfig' + resources_config: + $ref: '#/components/schemas/AWSResourcesConfig' + traces_config: + $ref: '#/components/schemas/AWSTracesConfig' + required: + - aws_account_id + type: object + AWSAccountPatchRequestData: + description: AWS Account Patch Request data + properties: + attributes: + $ref: '#/components/schemas/AWSAccountPatchRequestAttributes' + id: + $ref: '#/components/schemas/AWSAccountID' + type: + $ref: '#/components/schemas/AWSAccountType' + required: + - attributes + type: object + AWSAccountResponse: + description: AWS Account response body + properties: + data: + $ref: '#/components/schemas/AWSAccountResponseData' + type: object + AWSAccountResponseAttributes: + description: The AWS Account Integration Config + properties: + account_tags: + $ref: '#/components/schemas/AWSAccountTags' + auth_config: + $ref: '#/components/schemas/AWSAuthConfig' + aws_account_id: + $ref: '#/components/schemas/AWSAccountID' + aws_partition: + $ref: '#/components/schemas/AWSAccountPartition' + aws_regions: + $ref: '#/components/schemas/AWSRegions' + created_at: + description: Timestamp of when the account integration was created + format: date-time + readOnly: true + type: string + logs_config: + $ref: '#/components/schemas/AWSLogsConfig' + metrics_config: + $ref: '#/components/schemas/AWSMetricsConfig' + modified_at: + description: Timestamp of when the account integration was updated + format: date-time + readOnly: true + type: string + resources_config: + $ref: '#/components/schemas/AWSResourcesConfig' + traces_config: + $ref: '#/components/schemas/AWSTracesConfig' + required: + - aws_account_id + - aws_partition + - auth_config + type: object + AWSAccountResponseData: + description: AWS Account Response body + properties: + attributes: + $ref: '#/components/schemas/AWSAccountResponseAttributes' + id: + description: Identifier for the response type + example: get_account + type: string + type: + $ref: '#/components/schemas/AWSAccountType' + required: + - attributes + type: object + AWSAccountTags: + description: Tags to apply to all metrics in the account + items: + type: string + nullable: true + type: array + AWSAccountType: + default: account + description: Request or response type + example: account + type: string + AWSAccountsResponse: + description: AWS Accounts response body + properties: + data: + description: List of AWS Account Integration Configs + items: + $ref: '#/components/schemas/AWSAccountResponseData' + type: array + type: object + AWSAuthConfig: + description: AWS Authentication config + oneOf: + - $ref: '#/components/schemas/AWSAuthConfigKeys' + - $ref: '#/components/schemas/AWSAuthConfigRole' + AWSAuthConfigKeys: + description: AWS Authentication config for key-based account + properties: + access_key_id: + description: AWS Access Key ID + example: AKIAIOSFODNN7EXAMPLE + type: string + secret_access_key: + description: AWS Secret Access Key + example: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + minLength: 1 + type: string + writeOnly: true + required: + - access_key_id + type: object + AWSAuthConfigRole: + description: AWS Authentication config for role-based account + properties: + external_id: + description: AWS IAM External ID for associated role + type: string + role_name: + description: AWS IAM Role name + example: DatadogIntegrationRole + maxLength: 576 + minLength: 1 + type: string + required: + - role_name + type: object + AWSLambdaForwarderConfig: + description: AWS Lambda forwarder + properties: + lambdas: + description: List of Datadog Lambda Log Forwarder ARNs + items: + type: string + type: array + sources: + description: List of AWS services that will send logs to the Datadog Lambda + Log Forwarder + items: + example: s3 + type: string + type: array + type: object + AWSLogsConfig: + description: AWS Logs config + properties: + lambda_forwarder: + $ref: '#/components/schemas/AWSLambdaForwarderConfig' + type: object + AWSMetricsConfig: + description: AWS Metrics config + properties: + automute_enabled: + description: Enable EC2 automute for AWS metrics + type: boolean + collect_cloudwatch_alarms: + description: Enable CloudWatch alarms collection + type: boolean + collect_custom_metrics: + description: Enable custom metrics collection + type: boolean + enabled: + description: Enable AWS metrics collection + type: boolean + namespace_filters: + $ref: '#/components/schemas/AWSNamespaceFilters' + tag_filters: + description: AWS Metrics tag filters list + items: + $ref: '#/components/schemas/AWSNamespaceTagFilter' + type: array + type: object + AWSNamespaceFilters: + description: AWS Metrics namespace filters + oneOf: + - $ref: '#/components/schemas/AWSNamespaceFiltersExcludeAll' + - $ref: '#/components/schemas/AWSNamespaceFiltersExcludeOnly' + - $ref: '#/components/schemas/AWSNamespaceFiltersIncludeAll' + - $ref: '#/components/schemas/AWSNamespaceFiltersIncludeOnly' + AWSNamespaceFiltersExcludeAll: + description: Exclude all namespaces + properties: + exclude_all: + description: Exclude all namespaces + example: false + type: boolean + required: + - exclude_all + AWSNamespaceFiltersExcludeOnly: + description: Exclude only these namespaces + properties: + exclude_only: + description: Exclude only these namespaces + example: + - AWS/EC2 + items: + example: AWS/EC2 + type: string + type: array + required: + - exclude_only + AWSNamespaceFiltersIncludeAll: + description: Include all namespaces + properties: + include_all: + description: Include all namespaces + example: false + type: boolean + required: + - include_all + AWSNamespaceFiltersIncludeOnly: + description: Include only these namespaces + properties: + include_only: + description: Include only these namespaces + example: + - AWS/EC2 + items: + example: AWS/EC2 + type: string + type: array + required: + - include_only + AWSNamespaceTagFilter: + description: AWS Metrics tag filters + properties: + namespace: + description: The AWS Namespace to apply the tag filters against + example: AWS/EC2 + type: string + tags: + description: The tags to filter based on + items: + type: string + nullable: true + type: array + type: object + AWSRegions: + description: AWS Regions to collect data from + oneOf: + - $ref: '#/components/schemas/AWSRegionsIncludeAll' + - $ref: '#/components/schemas/AWSRegionsIncludeOnly' + AWSRegionsIncludeAll: + description: Include all regions + properties: + include_all: + description: Include all regions + example: false + type: boolean + required: + - include_all + AWSRegionsIncludeOnly: + description: Include only these regions + properties: + include_only: + description: Include only these regions + example: + - us-east-1 + items: + example: us-east-1 + type: string + type: array + required: + - include_only AWSRelatedAccount: description: AWS related account. properties: @@ -998,6 +1355,26 @@ components: $ref: '#/components/schemas/AWSRelatedAccount' type: array type: object + AWSResourcesConfig: + description: AWS Resources config + properties: + cloud_security_posture_management_collection: + description: Whether Datadog collects cloud security posture management + resources from your AWS account. + example: false + type: boolean + extended_collection: + description: Whether Datadog collects additional attributes and configuration + information about the resources in your AWS account. Required for `cspm_resource_collection`. + example: false + type: boolean + type: object + AWSTracesConfig: + description: AWS Traces config + properties: + xray_services: + $ref: '#/components/schemas/XRayServicesList' + type: object ActiveBillingDimensionsAttributes: description: List of active billing dimensions. properties: @@ -25615,6 +25992,34 @@ components: description: The id of the instance. type: string type: object + XRayServicesIncludeAll: + description: Include all services + properties: + include_all: + description: Include all services + example: false + type: boolean + required: + - include_all + XRayServicesIncludeOnly: + description: Include only these services + nullable: true + properties: + include_only: + description: Include only these services + example: + - AWS/AppSync + items: + example: AWS/AppSync + type: string + type: array + required: + - include_only + XRayServicesList: + description: AWS X-Ray services to collect traces from + oneOf: + - $ref: '#/components/schemas/XRayServicesIncludeAll' + - $ref: '#/components/schemas/XRayServicesIncludeOnly' securitySchemes: AuthZ: description: This API uses OAuth 2 with the implicit grant flow. @@ -30427,6 +30832,162 @@ paths: x-unstable: '**Note**: This endpoint is in public beta. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/integration/aws/accounts: + get: + description: Get a list of AWS Account Integration Configs. + operationId: ListAWSAccounts + parameters: + - example: '123456789012' + in: query + name: aws_account_id + required: false + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AWSAccountsResponse' + description: AWS Accounts List object + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: AWS Integration - Get all account configs + tags: + - AWS Integration + x-unstable: '**Note: This endpoint is in public beta. If you have any feedback, + + contact [Datadog support](https://docs.datadoghq.com/help/).**' + post: + description: Create a new AWS Account Integration Config. + operationId: CreateAWSAccount + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AWSAccountCreateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AWSAccountResponse' + description: AWS Account object + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '409': + $ref: '#/components/responses/ConflictResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: AWS Integration - Create account config + tags: + - AWS Integration + x-codegen-request-body-name: body + x-unstable: '**Note: This endpoint is in public beta. If you have any feedback, + + contact [Datadog support](https://docs.datadoghq.com/help/).**' + /api/v2/integration/aws/accounts/{aws_account_config_id}: + delete: + description: Delete an AWS Account Integration Config + operationId: DeleteAWSAccount + parameters: + - $ref: '#/components/parameters/AWSAccountConfigIDPathParameter' + responses: + '204': + description: No Content + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: AWS Integration - Delete account config + tags: + - AWS Integration + x-unstable: '**Note: This endpoint is in public beta. If you have any feedback, + + contact [Datadog support](https://docs.datadoghq.com/help/).**' + get: + description: Get an AWS Account Integration Config + operationId: GetAWSAccount + parameters: + - $ref: '#/components/parameters/AWSAccountConfigIDPathParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AWSAccountResponse' + description: AWS Account object + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: AWS Integration - Get account config + tags: + - AWS Integration + x-unstable: '**Note: This endpoint is in public beta. If you have any feedback, + + contact [Datadog support](https://docs.datadoghq.com/help/).**' + patch: + description: Update an AWS Account Integration Config + operationId: UpdateAWSAccount + parameters: + - $ref: '#/components/parameters/AWSAccountConfigIDPathParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AWSAccountPatchRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AWSAccountResponse' + description: AWS Account object + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: AWS Integration - Patch account config + tags: + - AWS Integration + x-codegen-request-body-name: body + x-unstable: '**Note: This endpoint is in public beta. If you have any feedback, + + contact [Datadog support](https://docs.datadoghq.com/help/).**' /api/v2/integration/gcp/accounts: get: description: List all GCP STS-enabled service accounts configured in your Datadog @@ -41311,6 +41872,11 @@ tags: description: Find out more at url: https://docs.datadoghq.com/tracing/trace_pipeline/trace_retention/ name: APM Retention Filters +- description: 'Configure your Datadog-AWS integration directly through the Datadog + API. + + For more information, see the [AWS integration page](https://docs.datadoghq.com/integrations/amazon_web_services).' + name: AWS Integration - description: Search your Audit Logs events over HTTP. name: Audit - description: '[The AuthN Mappings API](https://docs.datadoghq.com/account_management/authn_mapping/?tab=example) diff --git a/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Create-account-config-returns-AWS-Account-object-response_631702629/frozen.json b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Create-account-config-returns-AWS-Account-object-response_631702629/frozen.json new file mode 100644 index 000000000000..8ecdf2809cb4 --- /dev/null +++ b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Create-account-config-returns-AWS-Account-object-response_631702629/frozen.json @@ -0,0 +1 @@ +"2024-08-21T20:16:49.547Z" diff --git a/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Create-account-config-returns-AWS-Account-object-response_631702629/recording.har b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Create-account-config-returns-AWS-Account-object-response_631702629/recording.har new file mode 100644 index 000000000000..228800f909fa --- /dev/null +++ b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Create-account-config-returns-AWS-Account-object-response_631702629/recording.har @@ -0,0 +1,109 @@ +{ + "log": { + "_recordingName": "AWS Integration/AWS Integration - Create account config returns \"AWS Account object\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "8064e139e8ef0d01377a9afa92268fdd", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 488, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 575, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"account_tags\":[],\"auth_config\":{\"role_name\":\"test\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_only\":[\"us-east-1\"]},\"logs_config\":{\"lambda_forwarder\":{\"lambdas\":[],\"sources\":[\"s3\"]}},\"metrics_config\":{\"namespace_filters\":{\"include_only\":[\"AWS/EC2\"]},\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":[]}]},\"resources_config\":{},\"traces_config\":{\"xray_services\":{\"include_only\":[\"AWS/AppSync\"]}}},\"id\":\"123456789012\",\"type\":\"account\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/aws/accounts" + }, + "response": { + "bodySize": 734, + "content": { + "mimeType": "application/vnd.api+json", + "size": 734, + "text": "{\"data\":{\"id\":\"7cd9c604-8bc9-4491-8b17-3754d09a0370\",\"type\":\"account\",\"attributes\":{\"account_tags\":null,\"auth_config\":{\"role_name\":\"test\",\"external_id\":\"1c94fa9639fd4266b96ce33e03277ce1\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_only\":[\"us-east-1\"]},\"created_at\":\"2024-08-21T20:16:50.202384947Z\",\"logs_config\":{\"lambda_forwarder\":{\"sources\":[\"s3\"]}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":false,\"collect_cloudwatch_alarms\":false,\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":null}],\"namespace_filters\":{\"include_only\":[\"AWS/EC2\"]}},\"modified_at\":\"2024-08-21T20:16:50.202388738Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":false}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-08-21T20:16:49.745Z", + "time": 493 + }, + { + "_id": "e897b7ca83cb687cd8217ad147c155cd", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 524, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/aws/accounts/123456789012" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "application/vnd.api+json", + "size": 0 + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 504, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2024-08-21T20:16:50.244Z", + "time": 245 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Create-account-config-returns-Bad-Request-response_1465630460/frozen.json b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Create-account-config-returns-Bad-Request-response_1465630460/frozen.json new file mode 100644 index 000000000000..2edce278eaa3 --- /dev/null +++ b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Create-account-config-returns-Bad-Request-response_1465630460/frozen.json @@ -0,0 +1 @@ +"2024-08-21T20:16:50.495Z" diff --git a/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Create-account-config-returns-Bad-Request-response_1465630460/recording.har b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Create-account-config-returns-Bad-Request-response_1465630460/recording.har new file mode 100644 index 000000000000..2767ab50059a --- /dev/null +++ b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Create-account-config-returns-Bad-Request-response_1465630460/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "AWS Integration/AWS Integration - Create account config returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "c665b5534bc5dfe82e97ddba4532059a", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 493, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 575, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"account_tags\":[],\"auth_config\":{\"role_name\":\"test\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws-test\",\"aws_regions\":{\"include_only\":[\"us-east-1\"]},\"logs_config\":{\"lambda_forwarder\":{\"lambdas\":[],\"sources\":[\"s3\"]}},\"metrics_config\":{\"namespace_filters\":{\"include_only\":[\"AWS/EC2\"]},\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":[]}]},\"resources_config\":{},\"traces_config\":{\"xray_services\":{\"include_only\":[\"AWS/AppSync\"]}}},\"id\":\"123456789012\",\"type\":\"account\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/aws/accounts" + }, + "response": { + "bodySize": 77, + "content": { + "mimeType": "application/vnd.api+json", + "size": 77, + "text": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"invalid partition: aws-test\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 524, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2024-08-21T20:16:50.498Z", + "time": 42 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Create-account-with-invalid-aws_partition-returns-400-API-error-response_4119365543/frozen.json b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Create-account-with-invalid-aws_partition-returns-400-API-error-response_4119365543/frozen.json new file mode 100644 index 000000000000..fd3046adf5ea --- /dev/null +++ b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Create-account-with-invalid-aws_partition-returns-400-API-error-response_4119365543/frozen.json @@ -0,0 +1 @@ +"2024-08-09T18:59:51.401Z" diff --git a/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Create-account-with-invalid-aws_partition-returns-400-API-error-response_4119365543/recording.har b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Create-account-with-invalid-aws_partition-returns-400-API-error-response_4119365543/recording.har new file mode 100644 index 000000000000..93a1ad221d0e --- /dev/null +++ b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Create-account-with-invalid-aws_partition-returns-400-API-error-response_4119365543/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "AWS Integration/AWS Integration - Create account with invalid aws_partition returns 400 API error response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "0c09c5ccb49225e73991bad29229e4b3", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 536, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 577, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"aws_account\":{\"account_tags\":[],\"auth_config\":{\"role_name\":\"test\"},\"aws_account_id\":\"172322422800\",\"aws_partition\":\"aws-test\",\"aws_regions\":{\"include_only\":[\"us-east-1\"]},\"logs_config\":{\"lambda_forwarder\":{\"lambdas\":[],\"sources\":[\"s3\"]}},\"metrics_config\":{\"namespace_filters\":{\"exclude_only\":[\"AWS/EC2\"],\"include_only\":[\"AWS/EC2\"]},\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":[]}]},\"resources_config\":{},\"traces_config\":{\"xray_services\":{\"include_only\":[\"AWS/AppSync\"]}}}},\"id\":\"172322422800\",\"type\":\"account\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/aws/accounts" + }, + "response": { + "bodySize": 77, + "content": { + "mimeType": "application/vnd.api+json", + "size": 77, + "text": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"invalid partition: aws-test\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 524, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2024-08-09T18:59:51.604Z", + "time": 311 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Create-account-with-valid-config-returns-AWS-Account-object-response_1363365535/frozen.json b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Create-account-with-valid-config-returns-AWS-Account-object-response_1363365535/frozen.json new file mode 100644 index 000000000000..9add32de62a8 --- /dev/null +++ b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Create-account-with-valid-config-returns-AWS-Account-object-response_1363365535/frozen.json @@ -0,0 +1 @@ +"2024-08-09T18:59:51.926Z" diff --git a/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Create-account-with-valid-config-returns-AWS-Account-object-response_1363365535/recording.har b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Create-account-with-valid-config-returns-AWS-Account-object-response_1363365535/recording.har new file mode 100644 index 000000000000..5a7110cd8923 --- /dev/null +++ b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Create-account-with-valid-config-returns-AWS-Account-object-response_1363365535/recording.har @@ -0,0 +1,109 @@ +{ + "log": { + "_recordingName": "AWS Integration/AWS Integration - Create account with valid config returns \"AWS Account object\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "706b0bfc02591845ad9546af6d4b46bc", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 531, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 577, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"aws_account\":{\"account_tags\":[],\"auth_config\":{\"role_name\":\"test\"},\"aws_account_id\":\"172322422800\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_only\":[\"us-east-1\"]},\"logs_config\":{\"lambda_forwarder\":{\"lambdas\":[],\"sources\":[\"s3\"]}},\"metrics_config\":{\"namespace_filters\":{\"exclude_only\":[\"AWS/EC2\"],\"include_only\":[\"AWS/EC2\"]},\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":[]}]},\"resources_config\":{},\"traces_config\":{\"xray_services\":{\"include_only\":[\"AWS/AppSync\"]}}}},\"id\":\"172322422800\",\"type\":\"account\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/aws/accounts" + }, + "response": { + "bodySize": 702, + "content": { + "mimeType": "application/vnd.api+json", + "size": 702, + "text": "{\"data\":{\"id\":\"create_account\",\"type\":\"account\",\"attributes\":{\"aws_account\":{\"account_tags\":null,\"aws_account_id\":\"172322422800\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_only\":[\"us-east-1\"]},\"auth_config\":{\"role_name\":\"test\",\"external_id\":\"08df61ab19794766a0df51fa344ef31c\"},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":false,\"collect_cloudwatch_alarms\":false,\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":null}],\"namespace_filters\":{\"include_only\":[\"AWS/EC2\"]}},\"logs_config\":{\"lambda_forwarder\":{\"sources\":[\"s3\"]}},\"traces_config\":{\"xray_services\":{\"include_only\":[\"AWS/AppSync\"]}},\"resources_config\":{\"cloud_security_posture_management_collection\":false}}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-08-09T18:59:51.929Z", + "time": 653 + }, + { + "_id": "6d0f8815ff978599d87e667f26b00dc4", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 526, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/aws/accounts/172322422800" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "application/vnd.api+json", + "size": 0 + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 504, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2024-08-09T18:59:52.588Z", + "time": 442 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Delete-account-config-returns-No-Content-response_59897891/frozen.json b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Delete-account-config-returns-No-Content-response_59897891/frozen.json new file mode 100644 index 000000000000..04d3c71a9c25 --- /dev/null +++ b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Delete-account-config-returns-No-Content-response_59897891/frozen.json @@ -0,0 +1 @@ +"2024-08-21T20:16:50.548Z" diff --git a/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Delete-account-config-returns-No-Content-response_59897891/recording.har b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Delete-account-config-returns-No-Content-response_59897891/recording.har new file mode 100644 index 000000000000..05c26d7e65f5 --- /dev/null +++ b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Delete-account-config-returns-No-Content-response_59897891/recording.har @@ -0,0 +1,152 @@ +{ + "log": { + "_recordingName": "AWS Integration/AWS Integration - Delete account config returns \"No Content\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "48bd5fcd9d25198bc2c9cbbbf80395b7", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 656, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 575, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"account_tags\":[\"$KEY:$VALUE\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_only\":[\"us-east-2\",\"us-west-1\"]},\"logs_config\":{},\"metrics_config\":{\"automute_enabled\":true,\"enabled\":false,\"namespace_filters\":{\"exclude_only\":[\"AWS/AutoScaling\",\"AWS/ElasticMapReduce\",\"AWS/SQS\"]},\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":[\"$KEY:$VALUE\"]}]},\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true},\"traces_config\":{\"xray_services\":{\"include_only\":[\"AWS/AppSync\"]}}},\"id\":\"123456789012\",\"type\":\"account\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/aws/accounts" + }, + "response": { + "bodySize": 839, + "content": { + "mimeType": "application/vnd.api+json", + "size": 839, + "text": "{\"data\":{\"id\":\"8d2160c4-bdaa-4ea5-b7f1-409397c37b95\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"$KEY:$VALUE\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"dde1d3976baf4142afe77d6de69f7e0a\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_only\":[\"us-east-2\",\"us-west-1\"]},\"created_at\":\"2024-08-21T20:16:50.894308437Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":false,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":[\"$KEY:$VALUE\"]}],\"namespace_filters\":{\"exclude_only\":[\"AWS/AutoScaling\",\"AWS/ElasticMapReduce\",\"AWS/SQS\"]}},\"modified_at\":\"2024-08-21T20:16:50.894312466Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-08-21T20:16:50.551Z", + "time": 377 + }, + { + "_id": "e897b7ca83cb687cd8217ad147c155cd", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 524, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/aws/accounts/123456789012" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "application/vnd.api+json", + "size": 0 + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 504, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2024-08-21T20:16:50.934Z", + "time": 190 + }, + { + "_id": "e897b7ca83cb687cd8217ad147c155cd", + "_order": 1, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 524, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/aws/accounts/123456789012" + }, + "response": { + "bodySize": 115, + "content": { + "mimeType": "application/vnd.api+json", + "size": 115, + "text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Account not found\",\"detail\":\"AWS account with provided id is not integrated\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2024-08-21T20:16:51.129Z", + "time": 96 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Get-account-config-returns-AWS-Account-object-response_2428408451/frozen.json b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Get-account-config-returns-AWS-Account-object-response_2428408451/frozen.json new file mode 100644 index 000000000000..f09d513d189a --- /dev/null +++ b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Get-account-config-returns-AWS-Account-object-response_2428408451/frozen.json @@ -0,0 +1 @@ +"2024-08-21T20:16:51.232Z" diff --git a/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Get-account-config-returns-AWS-Account-object-response_2428408451/recording.har b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Get-account-config-returns-AWS-Account-object-response_2428408451/recording.har new file mode 100644 index 000000000000..7c260d467458 --- /dev/null +++ b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Get-account-config-returns-AWS-Account-object-response_2428408451/recording.har @@ -0,0 +1,152 @@ +{ + "log": { + "_recordingName": "AWS Integration/AWS Integration - Get account config returns \"AWS Account object\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "48bd5fcd9d25198bc2c9cbbbf80395b7", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 656, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 575, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"account_tags\":[\"$KEY:$VALUE\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_only\":[\"us-east-2\",\"us-west-1\"]},\"logs_config\":{},\"metrics_config\":{\"automute_enabled\":true,\"enabled\":false,\"namespace_filters\":{\"exclude_only\":[\"AWS/AutoScaling\",\"AWS/ElasticMapReduce\",\"AWS/SQS\"]},\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":[\"$KEY:$VALUE\"]}]},\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true},\"traces_config\":{\"xray_services\":{\"include_only\":[\"AWS/AppSync\"]}}},\"id\":\"123456789012\",\"type\":\"account\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/aws/accounts" + }, + "response": { + "bodySize": 839, + "content": { + "mimeType": "application/vnd.api+json", + "size": 839, + "text": "{\"data\":{\"id\":\"c59a664c-db34-477f-8a3c-583598fb2aba\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"$KEY:$VALUE\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"cea32c6830d7418e8d44c1f5b75b5952\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_only\":[\"us-east-2\",\"us-west-1\"]},\"created_at\":\"2024-08-21T20:16:51.577022335Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":false,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":[\"$KEY:$VALUE\"]}],\"namespace_filters\":{\"exclude_only\":[\"AWS/AutoScaling\",\"AWS/ElasticMapReduce\",\"AWS/SQS\"]}},\"modified_at\":\"2024-08-21T20:16:51.577025805Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-08-21T20:16:51.234Z", + "time": 375 + }, + { + "_id": "341b3b3a4fc009aadb33e5a1d944d07e", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 531, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/aws/accounts/123456789012" + }, + "response": { + "bodySize": 833, + "content": { + "mimeType": "application/vnd.api+json", + "size": 833, + "text": "{\"data\":{\"id\":\"c59a664c-db34-477f-8a3c-583598fb2aba\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"$KEY:$VALUE\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"cea32c6830d7418e8d44c1f5b75b5952\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_only\":[\"us-east-2\",\"us-west-1\"]},\"created_at\":\"2024-08-21T20:16:51.577022Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":false,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":[\"$KEY:$VALUE\"]}],\"namespace_filters\":{\"exclude_only\":[\"AWS/AutoScaling\",\"AWS/ElasticMapReduce\",\"AWS/SQS\"]}},\"modified_at\":\"2024-08-21T20:16:51.577026Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-08-21T20:16:51.614Z", + "time": 145 + }, + { + "_id": "e897b7ca83cb687cd8217ad147c155cd", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 524, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/aws/accounts/123456789012" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "application/vnd.api+json", + "size": 0 + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 504, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2024-08-21T20:16:51.763Z", + "time": 189 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Get-all-account-configs-returns-AWS-Accounts-List-object-response_4091556376/frozen.json b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Get-all-account-configs-returns-AWS-Accounts-List-object-response_4091556376/frozen.json new file mode 100644 index 000000000000..36322c55118e --- /dev/null +++ b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Get-all-account-configs-returns-AWS-Accounts-List-object-response_4091556376/frozen.json @@ -0,0 +1 @@ +"2024-08-21T20:16:51.957Z" diff --git a/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Get-all-account-configs-returns-AWS-Accounts-List-object-response_4091556376/recording.har b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Get-all-account-configs-returns-AWS-Accounts-List-object-response_4091556376/recording.har new file mode 100644 index 000000000000..de9eb847a4d0 --- /dev/null +++ b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Get-all-account-configs-returns-AWS-Accounts-List-object-response_4091556376/recording.har @@ -0,0 +1,152 @@ +{ + "log": { + "_recordingName": "AWS Integration/AWS Integration - Get all account configs returns \"AWS Accounts List object\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "48bd5fcd9d25198bc2c9cbbbf80395b7", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 656, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 575, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"account_tags\":[\"$KEY:$VALUE\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_only\":[\"us-east-2\",\"us-west-1\"]},\"logs_config\":{},\"metrics_config\":{\"automute_enabled\":true,\"enabled\":false,\"namespace_filters\":{\"exclude_only\":[\"AWS/AutoScaling\",\"AWS/ElasticMapReduce\",\"AWS/SQS\"]},\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":[\"$KEY:$VALUE\"]}]},\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true},\"traces_config\":{\"xray_services\":{\"include_only\":[\"AWS/AppSync\"]}}},\"id\":\"123456789012\",\"type\":\"account\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/aws/accounts" + }, + "response": { + "bodySize": 838, + "content": { + "mimeType": "application/vnd.api+json", + "size": 838, + "text": "{\"data\":{\"id\":\"7b9eec48-fb24-465b-bebf-e063c87296cc\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"$KEY:$VALUE\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"c3a51b8c3e5147da85b520a33acf1a52\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_only\":[\"us-east-2\",\"us-west-1\"]},\"created_at\":\"2024-08-21T20:16:52.289116699Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":false,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":[\"$KEY:$VALUE\"]}],\"namespace_filters\":{\"exclude_only\":[\"AWS/AutoScaling\",\"AWS/ElasticMapReduce\",\"AWS/SQS\"]}},\"modified_at\":\"2024-08-21T20:16:52.28912346Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-08-21T20:16:51.959Z", + "time": 360 + }, + { + "_id": "101a55f55a26d6165fb48d0451d83d10", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 520, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/aws/accounts" + }, + "response": { + "bodySize": 37715, + "content": { + "mimeType": "application/vnd.api+json", + "size": 37715, + "text": "{\"data\":[{\"id\":\"4b3caadb-530b-4bfc-893e-55e7681fb39a\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723651405\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"32774b5310a047b7b0ee29448c42f399\"},\"aws_account_id\":\"491029950495\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T16:03:27.13777Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T16:03:27.137774Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"99b96f98-0e1f-4940-bc75-f6431b7d8ab1\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723651394\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"13c3066bac474fe5aa2b98fafab7ccbd\"},\"aws_account_id\":\"971029752565\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T16:03:17.022908Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T16:03:17.022913Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"18c92e1a-56b8-4aa6-8e1e-ff482824b3a6\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723651400\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"fe7a101024234b46af4f3b3f07a5a969\"},\"aws_account_id\":\"100551011015\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T16:03:21.773669Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T16:03:21.773674Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"d84eac73-abfe-4c0c-9abb-96f0c081afcf\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723652070\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"768ba133513445ae96dfa439baa694d8\"},\"aws_account_id\":\"575554569949\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T16:14:32.002676Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T16:14:32.00268Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"bab03a9e-7a61-402b-ac1d-51388b3487f7\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723652074\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"116bd1f039ba436cbf14f6858c8725c2\"},\"aws_account_id\":\"489955505155\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T16:14:36.433368Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T16:14:36.433373Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"e69bcc2a-de44-4674-a599-86d5fa2884ab\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723652079\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"28f9c60b14b945a7bb9d74d47d2dd74e\"},\"aws_account_id\":\"535051554910\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T16:14:40.903898Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T16:14:40.903902Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"ab9ee599-8aea-46f6-a8b4-f5407ab80965\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723652325\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"188ef13911894f83991feb3172d13461\"},\"aws_account_id\":\"539810098100\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T16:18:46.625393Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T16:18:46.625397Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"47364fac-c2d2-47d2-99a6-1c625652becc\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723652329\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"b9ae83a208384803b0067d29b213bdc9\"},\"aws_account_id\":\"102985551501\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T16:18:51.141181Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T16:18:51.141185Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"2d5be80a-cfed-4273-94d8-640c845d40dd\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723652334\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"989b30e951f24195ad65dc3c194011d0\"},\"aws_account_id\":\"504997535199\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T16:18:55.653203Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T16:18:55.653208Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"a1f86e4a-c358-4a2c-be55-ab7ad97e4bd8\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723663289\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"84a2faf38d09423384d45f45edf25110\"},\"aws_account_id\":\"544910010251\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:21:32.915998Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:21:32.916003Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"9244eb20-29af-4ccc-abd7-3febcf42825f\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723663296\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"2f94cbf336454bfd9279000d07406314\"},\"aws_account_id\":\"985154499910\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:21:38.524154Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:21:38.52416Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"81233214-e56e-442d-ad5e-d46535c9d8c2\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723663301\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"29ad17858683418cb2a9353676e69760\"},\"aws_account_id\":\"565654100555\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:21:43.183098Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:21:43.183102Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"bb2d69b1-53e4-4b18-937e-f2c9bd7a28a0\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723663351\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"7a72d4f167434063b5a56a762095c1ee\"},\"aws_account_id\":\"985656100100\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:22:34.264824Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:22:34.264829Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"18a6608e-f002-4881-9e38-8f7f23a51847\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723663358\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"ae2d4d1b231f4ac1b3923d42a0a5bab5\"},\"aws_account_id\":\"101975251995\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:22:40.136147Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:22:40.136152Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"7dba8e9b-a140-4ef6-92a3-4c500e4315b3\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723663363\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"79c8da69b177497d9d7400ff599cd81f\"},\"aws_account_id\":\"525257495254\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:22:44.776388Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:22:44.776392Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"02a5f1f5-15ea-48bf-b1e1-4797f0ab5092\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723663978\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"17e16f140c544003a48ab212ccb47483\"},\"aws_account_id\":\"501015050989\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:33:00.639214Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:33:00.639218Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"582c74ee-e938-4a24-8810-d3bcc5840487\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723663983\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"e78952ff022c4449a7e7cc9ad145a611\"},\"aws_account_id\":\"505452565298\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:33:05.436943Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:33:05.436947Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"e40105e8-0e02-44c3-8a7e-586be07ea239\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723663988\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"4e1dbd2df6944274a00bb0abd6ee65c3\"},\"aws_account_id\":\"975157102102\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:33:10.190987Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:33:10.190993Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"87efc664-4d92-4020-b700-40d6d430147e\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723664043\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"e8be3356a0ca497e86dcbff1dcf8a209\"},\"aws_account_id\":\"561001021021\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:34:05.109384Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:34:05.109388Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"850c632b-aa06-4759-9bc8-7325814151aa\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723664048\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"eda6905d589942c3a53911b044e50a2b\"},\"aws_account_id\":\"571005510154\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:34:09.883997Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:34:09.884002Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"d264b0c4-9b3b-487a-9670-5b4dc1dd2b9c\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723664052\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"cb158545233c4ea8b13009e91ca1de95\"},\"aws_account_id\":\"555499100509\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:34:14.198109Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:34:14.198115Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"c674d1c8-3dce-4d44-b124-308c1cacac7a\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723664158\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"aba5477d3579405ebd50f590f2202681\"},\"aws_account_id\":\"574848101100\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:36:00.364727Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:36:00.364732Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"be6360de-5c67-45fb-83de-f5af69362906\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723664163\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"b8e306b6f51946c59b421d0588185f78\"},\"aws_account_id\":\"565555985010\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:36:04.979037Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:36:04.979042Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"d3ddd5a4-29b2-4605-a780-ce5d3fa4b90d\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723664167\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"95e8a93e8c2c4221a57ed3af2e776a53\"},\"aws_account_id\":\"971025210152\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:36:09.458003Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:36:09.458007Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"00c1f28b-2a21-4db6-85eb-0f98fc134948\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723664757\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"e5795d7b7f724bafb01a5c0c91902a88\"},\"aws_account_id\":\"541005597100\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:45:59.09343Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:45:59.093435Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"36733cd1-fbcf-484b-bb4a-213fe5f10402\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723664762\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"d8ae8d56f4f44a7c99521623f50b6e37\"},\"aws_account_id\":\"571015049489\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:46:03.698466Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:46:03.698472Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"20ada868-0e95-4285-af31-d6770a923fb3\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723664767\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"830168aa11d64ba9b69a37927492f706\"},\"aws_account_id\":\"102100974852\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:46:08.942554Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:46:08.942558Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"020f7c35-c18b-468c-81b5-e64c6d68c645\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723664855\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"ae4fc348b0f24fab96bdc1756278321b\"},\"aws_account_id\":\"529756575054\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:47:37.36374Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:47:37.363744Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"bfbef746-4acb-4f5d-befd-f30365b13401\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723664860\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"3b5fe428e2254c9ea9b7ac0537d53ddf\"},\"aws_account_id\":\"494850521014\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:47:41.810189Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:47:41.810194Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"2c72a0ae-7389-4d2c-8433-fb1f4d60fd4a\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723664864\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"685fb54445e24d2297e23d4583ec8569\"},\"aws_account_id\":\"489899484849\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:47:46.137682Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:47:46.137686Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"d4df7e40-ea43-4aa4-bcae-4f69213b1dc5\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723664972\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"4899fbfeceab4d68a45d7e7a754b490a\"},\"aws_account_id\":\"974810010248\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:49:34.412446Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:49:34.412451Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"9ebd8973-a6eb-4cf5-a8db-86525c1b3358\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723664977\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"014a4def58b14526b34ba9988f2b9599\"},\"aws_account_id\":\"525555995354\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:49:39.454533Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:49:39.454537Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"20931833-df77-4107-bd06-4ca650ab5738\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723664982\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"3b2f0e5a390d448b8fb69a2a79cd7980\"},\"aws_account_id\":\"984897101995\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:49:44.033763Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:49:44.033767Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"5c5032e0-c243-4cf5-9f37-02f06cf2bf4b\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723665067\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"0309b2d9353248c693bb3e584b4e547f\"},\"aws_account_id\":\"545710148515\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:51:08.805857Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:51:08.805861Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"573325be-8103-454a-8b56-9db7dbf56a94\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723665071\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"bc0f4a33f3a34554bbdb86618a475651\"},\"aws_account_id\":\"561025410149\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:51:13.310149Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:51:13.310155Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"d1c93b73-3651-4cbf-a103-03015dfde90e\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723665076\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"1dc035bad0ac4697b0a2312eda585003\"},\"aws_account_id\":\"511025299565\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:51:17.799641Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:51:17.799644Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"bc0d994b-0a9d-4d54-b67d-edde2308c5ef\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723665174\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"da807dcbe42b4b48a6ba667fe6879081\"},\"aws_account_id\":\"575357485298\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:52:56.442523Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:52:56.442526Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"6af95f09-a3c0-413e-aae7-c9696aee3220\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723665179\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"c67a53956753472d8a7e298917b4fdd5\"},\"aws_account_id\":\"989753569898\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:53:01.138125Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:53:01.13813Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"f762d066-8447-435e-b733-32663e240a96\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"tf-TestAccIntegrationAwsV2Basic-local-1723665184\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"745bac876e1f4a4db7551dd4a37b5624\"},\"aws_account_id\":\"529852100555\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-08-14T19:53:05.921379Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"namespace_filters\":{\"include_all\":true}},\"modified_at\":\"2024-08-14T19:53:05.921383Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"0f618f7f-a3ab-43a1-a5e8-14356e1357d3\",\"type\":\"account\",\"attributes\":{\"auth_config\":{\"role_name\":\"test\",\"external_id\":\"5305ff8c8ce24a83a67194b4fc1a8162\"},\"aws_account_id\":\"172322422800\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_only\":[\"us-east-1\"]},\"created_at\":\"2024-08-12T17:07:16.174791Z\",\"logs_config\":{\"lambda_forwarder\":{\"sources\":[\"s3\"]}},\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"collect_custom_metrics\":false,\"collect_cloudwatch_alarms\":false,\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":null}],\"namespace_filters\":{\"include_only\":[\"AWS/EC2\"]}},\"modified_at\":\"2024-08-12T17:07:16.174795Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":false}}},{\"id\":\"376856e9-02a4-4257-835a-92ca23bc20fa\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"$KEY:$VALUE\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"7e7aec3d97c44dfcb48d28f5ad456df1\"},\"aws_account_id\":\"172348305100\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_only\":[\"us-east-2\",\"us-west-1\"]},\"created_at\":\"2024-08-12T17:17:31.806768Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":false,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":[\"$KEY:$VALUE\"]}],\"namespace_filters\":{\"exclude_only\":[\"AWS/AutoScaling\",\"AWS/ElasticMapReduce\",\"AWS/SQS\"]}},\"modified_at\":\"2024-08-12T17:17:31.806772Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"73db893a-b32a-4634-a16d-a5fae0d04218\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"$KEY:$VALUE\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"cdd867b8537d44e9bcadcad22d3b9d54\"},\"aws_account_id\":\"172348305200\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_only\":[\"us-east-2\",\"us-west-1\"]},\"created_at\":\"2024-08-12T17:17:33.006843Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":false,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":[\"$KEY:$VALUE\"]}],\"namespace_filters\":{\"exclude_only\":[\"AWS/AutoScaling\",\"AWS/ElasticMapReduce\",\"AWS/SQS\"]}},\"modified_at\":\"2024-08-12T17:17:33.006847Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"735f1e95-77fc-42ad-ab50-dbd709477844\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"$KEY:$VALUE\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"ce5ead92dba74402aaab90088c569a12\"},\"aws_account_id\":\"172348305300\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_only\":[\"us-east-2\",\"us-west-1\"]},\"created_at\":\"2024-08-12T17:17:33.500988Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":false,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":[\"$KEY:$VALUE\"]}],\"namespace_filters\":{\"exclude_only\":[\"AWS/AutoScaling\",\"AWS/ElasticMapReduce\",\"AWS/SQS\"]}},\"modified_at\":\"2024-08-12T17:17:33.500992Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"67c979dc-9614-4444-bbc2-fa19662be682\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"$KEY:$VALUE\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"3a3284531f69454c8c2e91c3257f0be3\"},\"aws_account_id\":\"171092901600\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_only\":[\"us-east-2\",\"us-west-1\",\"eu-west-1\",\"eu-central-1\",\"ap-southeast-1\",\"ap-southeast-2\",\"ap-northeast-1\",\"ap-northeast-2\",\"ap-northeast-3\",\"sa-east-1\",\"ap-south-1\",\"ca-central-1\",\"eu-west-2\",\"eu-west-3\",\"eu-north-1\",\"af-south-1\",\"ap-east-1\",\"ap-south-2\",\"ap-southeast-3\",\"ap-southeast-4\",\"ca-west-1\",\"eu-central-2\",\"eu-south-1\",\"eu-south-2\",\"il-central-1\",\"me-central-1\",\"me-south-1\"]},\"created_at\":\"2024-03-20T10:03:37.258717Z\",\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":[\"$KEY:$VALUE\"]}],\"namespace_filters\":{\"exclude_only\":[\"AWS/AutoScaling\",\"AWS/ElasticMapReduce\",\"AWS/SQS\"]}},\"modified_at\":\"2024-03-20T10:03:38.455814Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":false,\"extended_collection\":true}}},{\"id\":\"95d999f7-54fc-423a-b48f-d41f06de9e94\",\"type\":\"account\",\"attributes\":{\"auth_config\":{\"access_key_id\":\"1011015010051561\"},\"aws_account_id\":\"101101501005\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-04-16T18:25:34.660792Z\",\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"tag_filters\":[],\"namespace_filters\":{\"exclude_only\":[\"AWS/ElasticMapReduce\",\"AWS/SQS\"]}},\"modified_at\":\"2024-04-16T18:25:34.660797Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":false,\"extended_collection\":false}}},{\"id\":\"07e0487c-bc0c-4738-8c17-30af9066beda\",\"type\":\"account\",\"attributes\":{\"auth_config\":{\"access_key_id\":\"4850102521029797\"},\"aws_account_id\":\"485010252102\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_all\":true},\"created_at\":\"2024-04-16T18:25:41.126481Z\",\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"tag_filters\":[],\"namespace_filters\":{\"exclude_only\":[\"AWS/ElasticMapReduce\",\"AWS/SQS\"]}},\"modified_at\":\"2024-04-16T18:25:41.126485Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":false,\"extended_collection\":false}}},{\"id\":\"1b9e7c32-fd8d-4604-9be7-306d90366f21\",\"type\":\"account\",\"attributes\":{\"auth_config\":{\"role_name\":\"datadog-integration-role\",\"external_id\":\"70aed59cbeff4d2a87d7093be5df8813\"},\"aws_account_id\":\"144234234234\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_only\":[\"us-east-1\",\"us-east-2\",\"us-west-1\",\"us-west-2\",\"eu-west-1\",\"eu-central-1\",\"ap-southeast-1\",\"ap-southeast-2\",\"ap-northeast-1\",\"ap-northeast-2\",\"ap-northeast-3\",\"sa-east-1\",\"ap-south-1\",\"ca-central-1\",\"eu-west-2\",\"eu-west-3\",\"eu-north-1\",\"af-south-1\",\"ap-east-1\",\"ap-south-2\",\"ap-southeast-3\",\"ap-southeast-4\",\"ca-west-1\",\"eu-central-2\",\"eu-south-1\",\"eu-south-2\",\"il-central-1\",\"me-central-1\",\"me-south-1\"]},\"created_at\":\"2024-04-24T13:39:30.506151Z\",\"metrics_config\":{\"enabled\":true,\"automute_enabled\":true,\"tag_filters\":[],\"namespace_filters\":{\"exclude_only\":[\"AWS/ElasticMapReduce\",\"AWS/SQS\"]}},\"modified_at\":\"2024-04-24T13:47:18.840472Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"96e45695-2153-4e51-a775-ed8550cde914\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"$KEY:$VALUE\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"53f2e7dd4f4f437d857bdd79f995689e\"},\"aws_account_id\":\"170059471500\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_only\":[\"us-east-2\",\"us-west-1\",\"eu-west-1\",\"eu-central-1\",\"ap-southeast-1\",\"ap-southeast-2\",\"ap-northeast-1\",\"ap-northeast-2\",\"ap-northeast-3\",\"sa-east-1\",\"ap-south-1\",\"ca-central-1\",\"eu-west-2\",\"eu-west-3\",\"eu-north-1\",\"af-south-1\",\"ap-east-1\",\"ap-south-2\",\"ap-southeast-3\",\"ap-southeast-4\",\"ca-west-1\",\"eu-central-2\",\"eu-south-1\",\"eu-south-2\",\"il-central-1\",\"me-central-1\",\"me-south-1\"]},\"created_at\":\"2024-02-29T17:27:01.839658Z\",\"metrics_config\":{\"enabled\":false,\"automute_enabled\":true,\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":[\"$KEY:$VALUE\"]}],\"namespace_filters\":{\"exclude_only\":[\"AWS/AutoScaling\",\"AWS/ElasticMapReduce\",\"AWS/SQS\"]}},\"modified_at\":\"2024-02-29T17:27:01.83966Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"8787bb7a-bc57-4051-9648-808269670c91\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"$KEY:$VALUE\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"e708623c7a494195a653a73cdd0d5718\"},\"aws_account_id\":\"170076337600\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_only\":[\"us-east-2\",\"us-west-1\",\"eu-west-1\",\"eu-central-1\",\"ap-southeast-1\",\"ap-southeast-2\",\"ap-northeast-1\",\"ap-northeast-2\",\"ap-northeast-3\",\"sa-east-1\",\"ap-south-1\",\"ca-central-1\",\"eu-west-2\",\"eu-west-3\",\"eu-north-1\",\"af-south-1\",\"ap-east-1\",\"ap-south-2\",\"ap-southeast-3\",\"ap-southeast-4\",\"ca-west-1\",\"eu-central-2\",\"eu-south-1\",\"eu-south-2\",\"il-central-1\",\"me-central-1\",\"me-south-1\"]},\"created_at\":\"2024-02-29T17:27:03.178839Z\",\"metrics_config\":{\"enabled\":false,\"automute_enabled\":true,\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":[\"$KEY:$VALUE\"]}],\"namespace_filters\":{\"exclude_only\":[\"AWS/AutoScaling\",\"AWS/ElasticMapReduce\",\"AWS/SQS\"]}},\"modified_at\":\"2024-02-29T17:27:03.178841Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}},{\"id\":\"7b9eec48-fb24-465b-bebf-e063c87296cc\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"$KEY:$VALUE\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"c3a51b8c3e5147da85b520a33acf1a52\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_only\":[\"us-east-2\",\"us-west-1\"]},\"created_at\":\"2024-08-21T20:16:52.289117Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":false,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":[\"$KEY:$VALUE\"]}],\"namespace_filters\":{\"exclude_only\":[\"AWS/AutoScaling\",\"AWS/ElasticMapReduce\",\"AWS/SQS\"]}},\"modified_at\":\"2024-08-21T20:16:52.289123Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 532, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-08-21T20:16:52.324Z", + "time": 175 + }, + { + "_id": "e897b7ca83cb687cd8217ad147c155cd", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 524, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/aws/accounts/123456789012" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "application/vnd.api+json", + "size": 0 + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 504, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2024-08-21T20:16:52.505Z", + "time": 220 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Patch-account-config-returns-API-error-response-response_2736697919/frozen.json b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Patch-account-config-returns-API-error-response-response_2736697919/frozen.json new file mode 100644 index 000000000000..698521591704 --- /dev/null +++ b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Patch-account-config-returns-API-error-response-response_2736697919/frozen.json @@ -0,0 +1 @@ +"2024-08-21T20:16:52.731Z" diff --git a/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Patch-account-config-returns-API-error-response-response_2736697919/recording.har b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Patch-account-config-returns-API-error-response-response_2736697919/recording.har new file mode 100644 index 000000000000..88f912b71e5c --- /dev/null +++ b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Patch-account-config-returns-API-error-response-response_2736697919/recording.har @@ -0,0 +1,162 @@ +{ + "log": { + "_recordingName": "AWS Integration/AWS Integration - Patch account config returns \"API error response.\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "48bd5fcd9d25198bc2c9cbbbf80395b7", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 656, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 575, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"account_tags\":[\"$KEY:$VALUE\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_only\":[\"us-east-2\",\"us-west-1\"]},\"logs_config\":{},\"metrics_config\":{\"automute_enabled\":true,\"enabled\":false,\"namespace_filters\":{\"exclude_only\":[\"AWS/AutoScaling\",\"AWS/ElasticMapReduce\",\"AWS/SQS\"]},\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":[\"$KEY:$VALUE\"]}]},\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true},\"traces_config\":{\"xray_services\":{\"include_only\":[\"AWS/AppSync\"]}}},\"id\":\"123456789012\",\"type\":\"account\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/aws/accounts" + }, + "response": { + "bodySize": 839, + "content": { + "mimeType": "application/vnd.api+json", + "size": 839, + "text": "{\"data\":{\"id\":\"b5333e91-03e0-4a3f-9bd6-07e2d83cb85f\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"$KEY:$VALUE\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"aa55eef398064c1ab1937f6f008b7184\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_only\":[\"us-east-2\",\"us-west-1\"]},\"created_at\":\"2024-08-21T20:16:53.079170523Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":false,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":[\"$KEY:$VALUE\"]}],\"namespace_filters\":{\"exclude_only\":[\"AWS/AutoScaling\",\"AWS/ElasticMapReduce\",\"AWS/SQS\"]}},\"modified_at\":\"2024-08-21T20:16:53.079176907Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-08-21T20:16:52.733Z", + "time": 376 + }, + { + "_id": "0662a26424b8e10c2dd2dce946029e48", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 493, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 589, + "httpVersion": "HTTP/1.1", + "method": "PATCH", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"account_tags\":[],\"auth_config\":{\"role_name\":\"test\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws-test\",\"aws_regions\":{\"include_only\":[\"us-east-1\"]},\"logs_config\":{\"lambda_forwarder\":{\"lambdas\":[],\"sources\":[\"s3\"]}},\"metrics_config\":{\"namespace_filters\":{\"include_only\":[\"AWS/EC2\"]},\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":[]}]},\"resources_config\":{},\"traces_config\":{\"xray_services\":{\"include_only\":[\"AWS/AppSync\"]}}},\"id\":\"123456789012\",\"type\":\"account\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/aws/accounts/123456789012" + }, + "response": { + "bodySize": 77, + "content": { + "mimeType": "application/vnd.api+json", + "size": 77, + "text": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"invalid partition: aws-test\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 524, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2024-08-21T20:16:53.114Z", + "time": 41 + }, + { + "_id": "e897b7ca83cb687cd8217ad147c155cd", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 524, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/aws/accounts/123456789012" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "application/vnd.api+json", + "size": 0 + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 504, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2024-08-21T20:16:53.160Z", + "time": 221 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Patch-account-config-returns-AWS-Account-object-response_3256752209/frozen.json b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Patch-account-config-returns-AWS-Account-object-response_3256752209/frozen.json new file mode 100644 index 000000000000..e323c91db31d --- /dev/null +++ b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Patch-account-config-returns-AWS-Account-object-response_3256752209/frozen.json @@ -0,0 +1 @@ +"2024-08-21T20:16:53.385Z" diff --git a/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Patch-account-config-returns-AWS-Account-object-response_3256752209/recording.har b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Patch-account-config-returns-AWS-Account-object-response_3256752209/recording.har new file mode 100644 index 000000000000..1c2f004e7331 --- /dev/null +++ b/cassettes/v2/AWS-Integration_2071210100/AWS-Integration-Patch-account-config-returns-AWS-Account-object-response_3256752209/recording.har @@ -0,0 +1,162 @@ +{ + "log": { + "_recordingName": "AWS Integration/AWS Integration - Patch account config returns \"AWS Account object\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "48bd5fcd9d25198bc2c9cbbbf80395b7", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 656, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 574, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"account_tags\":[\"$KEY:$VALUE\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_only\":[\"us-east-2\",\"us-west-1\"]},\"logs_config\":{},\"metrics_config\":{\"automute_enabled\":true,\"enabled\":false,\"namespace_filters\":{\"exclude_only\":[\"AWS/AutoScaling\",\"AWS/ElasticMapReduce\",\"AWS/SQS\"]},\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":[\"$KEY:$VALUE\"]}]},\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true},\"traces_config\":{\"xray_services\":{\"include_only\":[\"AWS/AppSync\"]}}},\"id\":\"123456789012\",\"type\":\"account\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/aws/accounts" + }, + "response": { + "bodySize": 839, + "content": { + "mimeType": "application/vnd.api+json", + "size": 839, + "text": "{\"data\":{\"id\":\"5fe9d8f3-60e8-4664-b247-487a603b74fb\",\"type\":\"account\",\"attributes\":{\"account_tags\":[\"$KEY:$VALUE\"],\"auth_config\":{\"role_name\":\"DatadogAWSIntegrationRole\",\"external_id\":\"fb5c348a9a774c86b6e2c334cb43b632\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_only\":[\"us-east-2\",\"us-west-1\"]},\"created_at\":\"2024-08-21T20:16:53.732493133Z\",\"logs_config\":{\"lambda_forwarder\":{}},\"metrics_config\":{\"enabled\":false,\"automute_enabled\":true,\"collect_custom_metrics\":true,\"collect_cloudwatch_alarms\":true,\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":[\"$KEY:$VALUE\"]}],\"namespace_filters\":{\"exclude_only\":[\"AWS/AutoScaling\",\"AWS/ElasticMapReduce\",\"AWS/SQS\"]}},\"modified_at\":\"2024-08-21T20:16:53.732498623Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-08-21T20:16:53.388Z", + "time": 385 + }, + { + "_id": "509770321bf5bd31a9add869f7cb9765", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 488, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 588, + "httpVersion": "HTTP/1.1", + "method": "PATCH", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"account_tags\":[],\"auth_config\":{\"role_name\":\"test\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_only\":[\"us-east-1\"]},\"logs_config\":{\"lambda_forwarder\":{\"lambdas\":[],\"sources\":[\"s3\"]}},\"metrics_config\":{\"namespace_filters\":{\"include_only\":[\"AWS/EC2\"]},\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":[]}]},\"resources_config\":{},\"traces_config\":{\"xray_services\":{\"include_only\":[\"AWS/AppSync\"]}}},\"id\":\"123456789012\",\"type\":\"account\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/aws/accounts/123456789012" + }, + "response": { + "bodySize": 758, + "content": { + "mimeType": "application/vnd.api+json", + "size": 758, + "text": "{\"data\":{\"id\":\"5fe9d8f3-60e8-4664-b247-487a603b74fb\",\"type\":\"account\",\"attributes\":{\"account_tags\":null,\"auth_config\":{\"role_name\":\"test\",\"external_id\":\"fb5c348a9a774c86b6e2c334cb43b632\"},\"aws_account_id\":\"123456789012\",\"aws_partition\":\"aws\",\"aws_regions\":{\"include_only\":[\"us-east-1\"]},\"created_at\":\"2024-08-21T20:16:53.732493Z\",\"logs_config\":{\"lambda_forwarder\":{\"sources\":[\"s3\"]}},\"metrics_config\":{\"enabled\":false,\"automute_enabled\":true,\"collect_custom_metrics\":false,\"collect_cloudwatch_alarms\":false,\"tag_filters\":[{\"namespace\":\"AWS/EC2\",\"tags\":null}],\"namespace_filters\":{\"include_only\":[\"AWS/EC2\"]}},\"modified_at\":\"2024-08-21T20:16:54.178225776Z\",\"resources_config\":{\"cloud_security_posture_management_collection\":true,\"extended_collection\":true}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-08-21T20:16:53.778Z", + "time": 430 + }, + { + "_id": "e897b7ca83cb687cd8217ad147c155cd", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/aws/accounts/123456789012" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "application/vnd.api+json", + "size": 0 + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 504, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2024-08-21T20:16:54.227Z", + "time": 174 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/examples/v2/aws-integration/CreateAWSAccount.ts b/examples/v2/aws-integration/CreateAWSAccount.ts new file mode 100644 index 000000000000..dc23025ab40e --- /dev/null +++ b/examples/v2/aws-integration/CreateAWSAccount.ts @@ -0,0 +1,54 @@ +/** + * AWS Integration - Create account config returns "AWS Account object" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.createAWSAccount"] = true; +const apiInstance = new v2.AWSIntegrationApi(configuration); + +const params: v2.AWSIntegrationApiCreateAWSAccountRequest = { + body: { + data: { + attributes: { + accountTags: [], + authConfig: { + accessKeyId: "AKIAIOSFODNN7EXAMPLE", + secretAccessKey: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + }, + awsAccountId: "123456789012", + awsPartition: "aws", + logsConfig: { + lambdaForwarder: { + lambdas: [], + sources: ["s3"], + }, + }, + metricsConfig: { + tagFilters: [ + { + namespace: "AWS/EC2", + tags: [], + }, + ], + }, + resourcesConfig: { + cloudSecurityPostureManagementCollection: false, + extendedCollection: false, + }, + tracesConfig: {}, + }, + type: "account", + }, + }, +}; + +apiInstance + .createAWSAccount(params) + .then((data: v2.AWSAccountResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/aws-integration/DeleteAWSAccount.ts b/examples/v2/aws-integration/DeleteAWSAccount.ts new file mode 100644 index 000000000000..2e4383bff54c --- /dev/null +++ b/examples/v2/aws-integration/DeleteAWSAccount.ts @@ -0,0 +1,22 @@ +/** + * AWS Integration - Delete account config returns "No Content" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.deleteAWSAccount"] = true; +const apiInstance = new v2.AWSIntegrationApi(configuration); + +const params: v2.AWSIntegrationApiDeleteAWSAccountRequest = { + awsAccountConfigId: "aws_account_config_id", +}; + +apiInstance + .deleteAWSAccount(params) + .then((data: any) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/aws-integration/GetAWSAccount.ts b/examples/v2/aws-integration/GetAWSAccount.ts new file mode 100644 index 000000000000..b2c191381652 --- /dev/null +++ b/examples/v2/aws-integration/GetAWSAccount.ts @@ -0,0 +1,22 @@ +/** + * AWS Integration - Get account config returns "AWS Account object" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.getAWSAccount"] = true; +const apiInstance = new v2.AWSIntegrationApi(configuration); + +const params: v2.AWSIntegrationApiGetAWSAccountRequest = { + awsAccountConfigId: "aws_account_config_id", +}; + +apiInstance + .getAWSAccount(params) + .then((data: v2.AWSAccountResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/aws-integration/ListAWSAccounts.ts b/examples/v2/aws-integration/ListAWSAccounts.ts new file mode 100644 index 000000000000..21c9f1be26fd --- /dev/null +++ b/examples/v2/aws-integration/ListAWSAccounts.ts @@ -0,0 +1,18 @@ +/** + * AWS Integration - Get all account configs returns "AWS Accounts List object" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.listAWSAccounts"] = true; +const apiInstance = new v2.AWSIntegrationApi(configuration); + +apiInstance + .listAWSAccounts() + .then((data: v2.AWSAccountsResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/aws-integration/UpdateAWSAccount.ts b/examples/v2/aws-integration/UpdateAWSAccount.ts new file mode 100644 index 000000000000..445f863877cb --- /dev/null +++ b/examples/v2/aws-integration/UpdateAWSAccount.ts @@ -0,0 +1,56 @@ +/** + * AWS Integration - Patch account config returns "AWS Account object" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.updateAWSAccount"] = true; +const apiInstance = new v2.AWSIntegrationApi(configuration); + +const params: v2.AWSIntegrationApiUpdateAWSAccountRequest = { + body: { + data: { + attributes: { + accountTags: [], + authConfig: { + accessKeyId: "AKIAIOSFODNN7EXAMPLE", + secretAccessKey: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + }, + awsAccountId: "123456789012", + awsPartition: "aws", + logsConfig: { + lambdaForwarder: { + lambdas: [], + sources: ["s3"], + }, + }, + metricsConfig: { + tagFilters: [ + { + namespace: "AWS/EC2", + tags: [], + }, + ], + }, + resourcesConfig: { + cloudSecurityPostureManagementCollection: false, + extendedCollection: false, + }, + tracesConfig: {}, + }, + id: "123456789012", + type: "account", + }, + }, + awsAccountConfigId: "aws_account_config_id", +}; + +apiInstance + .updateAWSAccount(params) + .then((data: v2.AWSAccountResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/features/support/scenarios_model_mapping.ts b/features/support/scenarios_model_mapping.ts index 76cefef088bb..237c30b1e918 100644 --- a/features/support/scenarios_model_mapping.ts +++ b/features/support/scenarios_model_mapping.ts @@ -3688,6 +3688,45 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "IncidentTodoResponse", }, + "v2.ListAWSAccounts": { + "awsAccountId": { + "type": "string", + "format": "", + }, + "operationResponseType": "AWSAccountsResponse", + }, + "v2.CreateAWSAccount": { + "body": { + "type": "AWSAccountCreateRequest", + "format": "", + }, + "operationResponseType": "AWSAccountResponse", + }, + "v2.DeleteAWSAccount": { + "awsAccountConfigId": { + "type": "string", + "format": "", + }, + "operationResponseType": "void", + }, + "v2.GetAWSAccount": { + "awsAccountConfigId": { + "type": "string", + "format": "", + }, + "operationResponseType": "AWSAccountResponse", + }, + "v2.UpdateAWSAccount": { + "awsAccountConfigId": { + "type": "string", + "format": "", + }, + "body": { + "type": "AWSAccountPatchRequest", + "format": "", + }, + "operationResponseType": "AWSAccountResponse", + }, "v2.ListGCPSTSAccounts": { "operationResponseType": "GCPSTSServiceAccountsResponse", }, diff --git a/features/v1/aws_integration.feature b/features/v1/aws_integration.feature index 017326abd32f..08c57bbc61eb 100644 --- a/features/v1/aws_integration.feature +++ b/features/v1/aws_integration.feature @@ -9,70 +9,70 @@ Feature: AWS Integration And a valid "appKeyAuth" key in the system And an instance of "AWSIntegration" API - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Create an AWS integration returns "Bad Request" response Given new "CreateAWSAccount" request And body with value {"account_id": "123456789012", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "extended_resource_collection_enabled": true, "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole"} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Create an AWS integration returns "Conflict Error" response Given new "CreateAWSAccount" request And body with value {"account_id": "123456789012", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "extended_resource_collection_enabled": true, "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole"} When the request is sent Then the response status is 409 Conflict Error - @team:DataDog/cloud-integrations + @team:DataDog/aws-integrations Scenario: Create an AWS integration returns "OK" response Given new "CreateAWSAccount" request And body with value {"account_id": "{{ timestamp("now") }}00", "account_specific_namespace_rules": {"auto_scaling": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "extended_resource_collection_enabled": true, "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": false, "role_name": "DatadogAWSIntegrationRole"} When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Create an Amazon EventBridge source returns "Bad Request" response Given new "CreateAWSEventBridgeSource" request And body with value {"account_id": "123456789012", "create_event_bus": true, "event_generator_name": "app-alerts", "region": "us-east-1"} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Create an Amazon EventBridge source returns "OK" response Given new "CreateAWSEventBridgeSource" request And body with value {"account_id": "123456789012", "create_event_bus": true, "event_generator_name": "app-alerts", "region": "us-east-1"} When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Delete a tag filtering entry returns "Bad Request" response Given new "DeleteAWSTagFilter" request And body with value {"account_id": "FAKEAC0FAKEAC2FAKEAC", "namespace": "elb"} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Delete a tag filtering entry returns "OK" response Given new "DeleteAWSTagFilter" request And body with value {"account_id": "FAKEAC0FAKEAC2FAKEAC", "namespace": "elb"} When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Delete an AWS integration returns "Bad Request" response Given new "DeleteAWSAccount" request And body with value {"account_id": "123456789012", "role_name": "DatadogAWSIntegrationRole"} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Delete an AWS integration returns "Conflict Error" response Given new "DeleteAWSAccount" request And body with value {"account_id": "123456789012", "role_name": "DatadogAWSIntegrationRole"} When the request is sent Then the response status is 409 Conflict Error - @team:DataDog/cloud-integrations + @team:DataDog/aws-integrations Scenario: Delete an AWS integration returns "OK" response Given there is a valid "aws_account" in the system And new "DeleteAWSAccount" request @@ -80,107 +80,107 @@ Feature: AWS Integration When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Delete an Amazon EventBridge source returns "Bad Request" response Given new "DeleteAWSEventBridgeSource" request And body with value {"account_id": "123456789012", "event_generator_name": "app-alerts-zyxw3210", "region": "us-east-1"} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Delete an Amazon EventBridge source returns "OK" response Given new "DeleteAWSEventBridgeSource" request And body with value {"account_id": "123456789012", "event_generator_name": "app-alerts-zyxw3210", "region": "us-east-1"} When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Generate a new external ID returns "Bad Request" response Given new "CreateNewAWSExternalID" request And body with value {"account_id": "123456789012", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "extended_resource_collection_enabled": true, "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole"} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Generate a new external ID returns "OK" response Given new "CreateNewAWSExternalID" request And body with value {"account_id": "123456789012", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "extended_resource_collection_enabled": true, "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole"} When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Get all AWS tag filters returns "Bad Request" response Given new "ListAWSTagFilters" request And request contains "account_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Get all AWS tag filters returns "OK" response Given new "ListAWSTagFilters" request And request contains "account_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Get all Amazon EventBridge sources returns "Bad Request" response Given new "ListAWSEventBridgeSources" request When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Get all Amazon EventBridge sources returns "OK" response Given new "ListAWSEventBridgeSources" request When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: List all AWS integrations returns "Bad Request" response Given new "ListAWSAccounts" request When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: List all AWS integrations returns "OK" response Given new "ListAWSAccounts" request When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: List namespace rules returns "OK" response Given new "ListAvailableAWSNamespaces" request When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Set an AWS tag filter returns "Bad Request" response Given new "CreateAWSTagFilter" request And body with value {"account_id": "123456789012", "namespace": "elb", "tag_filter_str": "prod*"} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Set an AWS tag filter returns "OK" response Given new "CreateAWSTagFilter" request And body with value {"account_id": "123456789012", "namespace": "elb", "tag_filter_str": "prod*"} When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Update an AWS integration returns "Bad Request" response Given new "UpdateAWSAccount" request And body with value {"account_id": "123456789012", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "extended_resource_collection_enabled": true, "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole"} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Update an AWS integration returns "Conflict Error" response Given new "UpdateAWSAccount" request And body with value {"account_id": "123456789012", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "extended_resource_collection_enabled": true, "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole"} When the request is sent Then the response status is 409 Conflict Error - @team:DataDog/cloud-integrations + @team:DataDog/aws-integrations Scenario: Update an AWS integration returns "OK" response Given there is a valid "aws_account" in the system And new "UpdateAWSAccount" request diff --git a/features/v1/aws_logs_integration.feature b/features/v1/aws_logs_integration.feature index 5459cbb79478..622d8d7debac 100644 --- a/features/v1/aws_logs_integration.feature +++ b/features/v1/aws_logs_integration.feature @@ -10,89 +10,89 @@ Feature: AWS Logs Integration And a valid "appKeyAuth" key in the system And an instance of "AWSLogsIntegration" API - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Add AWS Log Lambda ARN returns "Bad Request" response Given new "CreateAWSLambdaARN" request And body with value {"account_id": "1234567", "lambda_arn": "arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest"} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Add AWS Log Lambda ARN returns "OK" response Given new "CreateAWSLambdaARN" request And body with value {"account_id": "1234567", "lambda_arn": "arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest"} When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Check permissions for log services returns "Bad Request" response Given new "CheckAWSLogsServicesAsync" request And body with value {"account_id": "1234567", "services": ["s3", "elb", "elbv2", "cloudfront", "redshift", "lambda"]} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Check permissions for log services returns "OK" response Given new "CheckAWSLogsServicesAsync" request And body with value {"account_id": "1234567", "services": ["s3", "elb", "elbv2", "cloudfront", "redshift", "lambda"]} When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Check that an AWS Lambda Function exists returns "Bad Request" response Given new "CheckAWSLogsLambdaAsync" request And body with value {"account_id": "1234567", "lambda_arn": "arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest"} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Check that an AWS Lambda Function exists returns "OK" response Given new "CheckAWSLogsLambdaAsync" request And body with value {"account_id": "1234567", "lambda_arn": "arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest"} When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Delete an AWS Logs integration returns "Bad Request" response Given new "DeleteAWSLambdaARN" request And body with value {"account_id": "1234567", "lambda_arn": "arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest"} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Delete an AWS Logs integration returns "OK" response Given new "DeleteAWSLambdaARN" request And body with value {"account_id": "1234567", "lambda_arn": "arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest"} When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Enable an AWS Logs integration returns "Bad Request" response Given new "EnableAWSLogServices" request And body with value {"account_id": "1234567", "services": ["s3", "elb", "elbv2", "cloudfront", "redshift", "lambda"]} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Enable an AWS Logs integration returns "OK" response Given new "EnableAWSLogServices" request And body with value {"account_id": "1234567", "services": ["s3", "elb", "elbv2", "cloudfront", "redshift", "lambda"]} When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: Get list of AWS log ready services returns "OK" response Given new "ListAWSLogsServices" request When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: List all AWS Logs integrations returns "Bad Request" response Given new "ListAWSLogsIntegrations" request When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/aws-integrations Scenario: List all AWS Logs integrations returns "OK" response Given new "ListAWSLogsIntegrations" request When the request is sent diff --git a/features/v2/aws_integration.feature b/features/v2/aws_integration.feature new file mode 100644 index 000000000000..0523c8ca5cb1 --- /dev/null +++ b/features/v2/aws_integration.feature @@ -0,0 +1,116 @@ +@endpoint(aws-integration) @endpoint(aws-integration-v2) +Feature: AWS Integration + Configure your Datadog-AWS integration directly through the Datadog API. + For more information, see the [AWS integration + page](https://docs.datadoghq.com/integrations/amazon_web_services). + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "AWSIntegration" API + + @generated @skip @team:DataDog/aws-integrations + Scenario: AWS Integration - Create account config returns "AWS Account object" response + Given operation "CreateAWSAccount" enabled + And new "CreateAWSAccount" request + And body with value {"data": {"attributes": {"account_tags": [], "auth_config": {"access_key_id": "AKIAIOSFODNN7EXAMPLE", "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"}, "aws_account_id": "123456789012", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": [], "sources": ["s3"]}}, "metrics_config": {"tag_filters": [{"namespace": "AWS/EC2", "tags": []}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "type": "account"}} + When the request is sent + Then the response status is 200 AWS Account object + + @generated @skip @team:DataDog/aws-integrations + Scenario: AWS Integration - Create account config returns "Bad Request" response + Given operation "CreateAWSAccount" enabled + And new "CreateAWSAccount" request + And body with value {"data": {"attributes": {"account_tags": [], "auth_config": {"access_key_id": "AKIAIOSFODNN7EXAMPLE", "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"}, "aws_account_id": "123456789012", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": [], "sources": ["s3"]}}, "metrics_config": {"tag_filters": [{"namespace": "AWS/EC2", "tags": []}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "type": "account"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/aws-integrations + Scenario: AWS Integration - Create account config returns "Conflict" response + Given operation "CreateAWSAccount" enabled + And new "CreateAWSAccount" request + And body with value {"data": {"attributes": {"account_tags": [], "auth_config": {"access_key_id": "AKIAIOSFODNN7EXAMPLE", "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"}, "aws_account_id": "123456789012", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": [], "sources": ["s3"]}}, "metrics_config": {"tag_filters": [{"namespace": "AWS/EC2", "tags": []}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "type": "account"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:DataDog/aws-integrations + Scenario: AWS Integration - Delete account config returns "Bad Request" response + Given operation "DeleteAWSAccount" enabled + And new "DeleteAWSAccount" request + And request contains "aws_account_config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/aws-integrations + Scenario: AWS Integration - Delete account config returns "No Content" response + Given operation "DeleteAWSAccount" enabled + And new "DeleteAWSAccount" request + And request contains "aws_account_config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/aws-integrations + Scenario: AWS Integration - Delete account config returns "Not Found" response + Given operation "DeleteAWSAccount" enabled + And new "DeleteAWSAccount" request + And request contains "aws_account_config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/aws-integrations + Scenario: AWS Integration - Get account config returns "AWS Account object" response + Given operation "GetAWSAccount" enabled + And new "GetAWSAccount" request + And request contains "aws_account_config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 AWS Account object + + @generated @skip @team:DataDog/aws-integrations + Scenario: AWS Integration - Get account config returns "Bad Request" response + Given operation "GetAWSAccount" enabled + And new "GetAWSAccount" request + And request contains "aws_account_config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/aws-integrations + Scenario: AWS Integration - Get account config returns "Not Found" response + Given operation "GetAWSAccount" enabled + And new "GetAWSAccount" request + And request contains "aws_account_config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/aws-integrations + Scenario: AWS Integration - Get all account configs returns "AWS Accounts List object" response + Given operation "ListAWSAccounts" enabled + And new "ListAWSAccounts" request + When the request is sent + Then the response status is 200 AWS Accounts List object + + @generated @skip @team:DataDog/aws-integrations + Scenario: AWS Integration - Patch account config returns "AWS Account object" response + Given operation "UpdateAWSAccount" enabled + And new "UpdateAWSAccount" request + And request contains "aws_account_config_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"account_tags": [], "auth_config": {"access_key_id": "AKIAIOSFODNN7EXAMPLE", "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"}, "aws_account_id": "123456789012", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": [], "sources": ["s3"]}}, "metrics_config": {"tag_filters": [{"namespace": "AWS/EC2", "tags": []}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "id": "123456789012", "type": "account"}} + When the request is sent + Then the response status is 200 AWS Account object + + @generated @skip @team:DataDog/aws-integrations + Scenario: AWS Integration - Patch account config returns "Bad Request" response + Given operation "UpdateAWSAccount" enabled + And new "UpdateAWSAccount" request + And request contains "aws_account_config_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"account_tags": [], "auth_config": {"access_key_id": "AKIAIOSFODNN7EXAMPLE", "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"}, "aws_account_id": "123456789012", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": [], "sources": ["s3"]}}, "metrics_config": {"tag_filters": [{"namespace": "AWS/EC2", "tags": []}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "id": "123456789012", "type": "account"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/aws-integrations + Scenario: AWS Integration - Patch account config returns "Not Found" response + Given operation "UpdateAWSAccount" enabled + And new "UpdateAWSAccount" request + And request contains "aws_account_config_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"account_tags": [], "auth_config": {"access_key_id": "AKIAIOSFODNN7EXAMPLE", "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"}, "aws_account_id": "123456789012", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": [], "sources": ["s3"]}}, "metrics_config": {"tag_filters": [{"namespace": "AWS/EC2", "tags": []}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "id": "123456789012", "type": "account"}} + When the request is sent + Then the response status is 404 Not Found diff --git a/features/v2/given.json b/features/v2/given.json index efc7bed91b5b..ef15a18b1418 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -200,6 +200,18 @@ "tag": "Incidents", "operationId": "CreateIncidentTodo" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"account\",\n \"attributes\": {\n \"account_tags\": [\n \"test:test\"\n ],\n \"auth_config\": {\n \"role_name\": \"DatadogIntegrationRole\"\n },\n \"aws_account_id\": \"123456789012\",\n \"aws_partition\": \"aws\",\n \"aws_regions\": {\n \"include_only\": [\n \"us-east-1\"\n ]\n },\n \"logs_config\": {\n \"lambda_forwarder\": {\n \"lambdas\": [],\n \"sources\": [\n \"s3\"\n ]\n }\n },\n \"metrics_config\": {\n \"enabled\": true,\n \"automute_enabled\": true,\n \"collect_custom_metrics\": false,\n \"collect_cloudwatch_alarms\": false,\n \"tag_filters\": [\n {\n \"namespace\": \"AWS/EC2\",\n \"tags\": [\n \"test:test\"\n ]\n }\n ],\n \"namespace_filters\": {\n \"include_only\": [\n \"AWS/EC2\"\n ]\n }\n },\n \"resources_config\": {\n \"cloud_security_posture_management_collection\": false,\n \"extended_collection\": false\n },\n \"traces_config\": {\n \"xray_services\": {\n \"include_only\": [\n \"AWS/AppSync\"\n ]\n }\n }\n }\n }\n}" + } + ], + "step": "there is a valid \"aws_account_v2\" in the system", + "key": "aws_account_v2", + "tag": "AWS Integration", + "operationId": "CreateAWSAccount" + }, { "parameters": [ { diff --git a/features/v2/undo.json b/features/v2/undo.json index 62da7c99ef99..524118ff900b 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -745,6 +745,43 @@ "type": "idempotent" } }, + "ListAWSAccounts": { + "tag": "AWS Integration", + "undo": { + "type": "safe" + } + }, + "CreateAWSAccount": { + "tag": "AWS Integration", + "undo": { + "operationId": "DeleteAWSAccount", + "parameters": [ + { + "name": "aws_account_config_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteAWSAccount": { + "tag": "AWS Integration", + "undo": { + "type": "idempotent" + } + }, + "GetAWSAccount": { + "tag": "AWS Integration", + "undo": { + "type": "safe" + } + }, + "UpdateAWSAccount": { + "tag": "AWS Integration", + "undo": { + "type": "idempotent" + } + }, "ListGCPSTSAccounts": { "tag": "GCP Integration", "undo": { diff --git a/packages/datadog-api-client-common/configuration.ts b/packages/datadog-api-client-common/configuration.ts index 86426381a3b3..fd2e12a64637 100644 --- a/packages/datadog-api-client-common/configuration.ts +++ b/packages/datadog-api-client-common/configuration.ts @@ -249,6 +249,11 @@ export function createConfiguration( "v2.updateIncidentAttachments": false, "v2.updateIncidentIntegration": false, "v2.updateIncidentTodo": false, + "v2.createAWSAccount": false, + "v2.deleteAWSAccount": false, + "v2.getAWSAccount": false, + "v2.listAWSAccounts": false, + "v2.updateAWSAccount": false, "v2.queryScalarData": false, "v2.queryTimeseriesData": false, "v2.getFinding": false, diff --git a/packages/datadog-api-client-v2/apis/AWSIntegrationApi.ts b/packages/datadog-api-client-v2/apis/AWSIntegrationApi.ts new file mode 100644 index 000000000000..d1f32c14a5bf --- /dev/null +++ b/packages/datadog-api-client-v2/apis/AWSIntegrationApi.ts @@ -0,0 +1,715 @@ +import { + BaseAPIRequestFactory, + RequiredError, +} from "../../datadog-api-client-common/baseapi"; +import { + Configuration, + applySecurityAuthentication, +} from "../../datadog-api-client-common/configuration"; +import { + RequestContext, + HttpMethod, + ResponseContext, +} from "../../datadog-api-client-common/http/http"; + +import { logger } from "../../../logger"; +import { ObjectSerializer } from "../models/ObjectSerializer"; +import { ApiException } from "../../datadog-api-client-common/exception"; + +import { APIErrorResponse } from "../models/APIErrorResponse"; +import { AWSAccountCreateRequest } from "../models/AWSAccountCreateRequest"; +import { AWSAccountPatchRequest } from "../models/AWSAccountPatchRequest"; +import { AWSAccountResponse } from "../models/AWSAccountResponse"; +import { AWSAccountsResponse } from "../models/AWSAccountsResponse"; + +export class AWSIntegrationApiRequestFactory extends BaseAPIRequestFactory { + public async createAWSAccount( + body: AWSAccountCreateRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'createAWSAccount'"); + if (!_config.unstableOperations["v2.createAWSAccount"]) { + throw new Error("Unstable operation 'createAWSAccount' is disabled"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createAWSAccount"); + } + + // Path Params + const localVarPath = "/api/v2/integration/aws/accounts"; + + // Make Request Context + const requestContext = _config + .getServer("v2.AWSIntegrationApi.createAWSAccount") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "AWSAccountCreateRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async deleteAWSAccount( + awsAccountConfigId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'deleteAWSAccount'"); + if (!_config.unstableOperations["v2.deleteAWSAccount"]) { + throw new Error("Unstable operation 'deleteAWSAccount' is disabled"); + } + + // verify required parameter 'awsAccountConfigId' is not null or undefined + if (awsAccountConfigId === null || awsAccountConfigId === undefined) { + throw new RequiredError("awsAccountConfigId", "deleteAWSAccount"); + } + + // Path Params + const localVarPath = + "/api/v2/integration/aws/accounts/{aws_account_config_id}".replace( + "{aws_account_config_id}", + encodeURIComponent(String(awsAccountConfigId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.AWSIntegrationApi.deleteAWSAccount") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async getAWSAccount( + awsAccountConfigId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'getAWSAccount'"); + if (!_config.unstableOperations["v2.getAWSAccount"]) { + throw new Error("Unstable operation 'getAWSAccount' is disabled"); + } + + // verify required parameter 'awsAccountConfigId' is not null or undefined + if (awsAccountConfigId === null || awsAccountConfigId === undefined) { + throw new RequiredError("awsAccountConfigId", "getAWSAccount"); + } + + // Path Params + const localVarPath = + "/api/v2/integration/aws/accounts/{aws_account_config_id}".replace( + "{aws_account_config_id}", + encodeURIComponent(String(awsAccountConfigId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.AWSIntegrationApi.getAWSAccount") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async listAWSAccounts( + awsAccountId?: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'listAWSAccounts'"); + if (!_config.unstableOperations["v2.listAWSAccounts"]) { + throw new Error("Unstable operation 'listAWSAccounts' is disabled"); + } + + // Path Params + const localVarPath = "/api/v2/integration/aws/accounts"; + + // Make Request Context + const requestContext = _config + .getServer("v2.AWSIntegrationApi.listAWSAccounts") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (awsAccountId !== undefined) { + requestContext.setQueryParam( + "aws_account_id", + ObjectSerializer.serialize(awsAccountId, "string", "") + ); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async updateAWSAccount( + awsAccountConfigId: string, + body: AWSAccountPatchRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'updateAWSAccount'"); + if (!_config.unstableOperations["v2.updateAWSAccount"]) { + throw new Error("Unstable operation 'updateAWSAccount' is disabled"); + } + + // verify required parameter 'awsAccountConfigId' is not null or undefined + if (awsAccountConfigId === null || awsAccountConfigId === undefined) { + throw new RequiredError("awsAccountConfigId", "updateAWSAccount"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateAWSAccount"); + } + + // Path Params + const localVarPath = + "/api/v2/integration/aws/accounts/{aws_account_config_id}".replace( + "{aws_account_config_id}", + encodeURIComponent(String(awsAccountConfigId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.AWSIntegrationApi.updateAWSAccount") + .makeRequestContext(localVarPath, HttpMethod.PATCH); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "AWSAccountPatchRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } +} + +export class AWSIntegrationApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createAWSAccount + * @throws ApiException if the response code was not in [200, 299] + */ + public async createAWSAccount( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: AWSAccountResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AWSAccountResponse" + ) as AWSAccountResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 409 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: AWSAccountResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AWSAccountResponse", + "" + ) as AWSAccountResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteAWSAccount + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteAWSAccount(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 204) { + return; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", + "" + ) as void; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getAWSAccount + * @throws ApiException if the response code was not in [200, 299] + */ + public async getAWSAccount( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: AWSAccountResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AWSAccountResponse" + ) as AWSAccountResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: AWSAccountResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AWSAccountResponse", + "" + ) as AWSAccountResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listAWSAccounts + * @throws ApiException if the response code was not in [200, 299] + */ + public async listAWSAccounts( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: AWSAccountsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AWSAccountsResponse" + ) as AWSAccountsResponse; + return body; + } + if (response.httpStatusCode === 403 || response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: AWSAccountsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AWSAccountsResponse", + "" + ) as AWSAccountsResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateAWSAccount + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateAWSAccount( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: AWSAccountResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AWSAccountResponse" + ) as AWSAccountResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: AWSAccountResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AWSAccountResponse", + "" + ) as AWSAccountResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } +} + +export interface AWSIntegrationApiCreateAWSAccountRequest { + /** + * @type AWSAccountCreateRequest + */ + body: AWSAccountCreateRequest; +} + +export interface AWSIntegrationApiDeleteAWSAccountRequest { + /** + * Unique Datadog ID of the AWS Account Integration Config + * @type string + */ + awsAccountConfigId: string; +} + +export interface AWSIntegrationApiGetAWSAccountRequest { + /** + * Unique Datadog ID of the AWS Account Integration Config + * @type string + */ + awsAccountConfigId: string; +} + +export interface AWSIntegrationApiListAWSAccountsRequest { + /** + * @type string + */ + awsAccountId?: string; +} + +export interface AWSIntegrationApiUpdateAWSAccountRequest { + /** + * Unique Datadog ID of the AWS Account Integration Config + * @type string + */ + awsAccountConfigId: string; + /** + * @type AWSAccountPatchRequest + */ + body: AWSAccountPatchRequest; +} + +export class AWSIntegrationApi { + private requestFactory: AWSIntegrationApiRequestFactory; + private responseProcessor: AWSIntegrationApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: AWSIntegrationApiRequestFactory, + responseProcessor?: AWSIntegrationApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = + requestFactory || new AWSIntegrationApiRequestFactory(configuration); + this.responseProcessor = + responseProcessor || new AWSIntegrationApiResponseProcessor(); + } + + /** + * Create a new AWS Account Integration Config. + * @param param The request object + */ + public createAWSAccount( + param: AWSIntegrationApiCreateAWSAccountRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.createAWSAccount( + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createAWSAccount(responseContext); + }); + }); + } + + /** + * Delete an AWS Account Integration Config + * @param param The request object + */ + public deleteAWSAccount( + param: AWSIntegrationApiDeleteAWSAccountRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.deleteAWSAccount( + param.awsAccountConfigId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteAWSAccount(responseContext); + }); + }); + } + + /** + * Get an AWS Account Integration Config + * @param param The request object + */ + public getAWSAccount( + param: AWSIntegrationApiGetAWSAccountRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.getAWSAccount( + param.awsAccountConfigId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getAWSAccount(responseContext); + }); + }); + } + + /** + * Get a list of AWS Account Integration Configs. + * @param param The request object + */ + public listAWSAccounts( + param: AWSIntegrationApiListAWSAccountsRequest = {}, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.listAWSAccounts( + param.awsAccountId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listAWSAccounts(responseContext); + }); + }); + } + + /** + * Update an AWS Account Integration Config + * @param param The request object + */ + public updateAWSAccount( + param: AWSIntegrationApiUpdateAWSAccountRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.updateAWSAccount( + param.awsAccountConfigId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateAWSAccount(responseContext); + }); + }); + } +} diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index 73ecace25afb..fd1f8d9acc5a 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -16,6 +16,15 @@ export { APMRetentionFiltersApi, } from "./apis/APMRetentionFiltersApi"; +export { + AWSIntegrationApiCreateAWSAccountRequest, + AWSIntegrationApiDeleteAWSAccountRequest, + AWSIntegrationApiGetAWSAccountRequest, + AWSIntegrationApiListAWSAccountsRequest, + AWSIntegrationApiUpdateAWSAccountRequest, + AWSIntegrationApi, +} from "./apis/AWSIntegrationApi"; + export { AuditApiListAuditLogsRequest, AuditApiSearchAuditLogsRequest, @@ -613,6 +622,20 @@ export { AuthNMappingUpdateAttributes } from "./models/AuthNMappingUpdateAttribu export { AuthNMappingUpdateData } from "./models/AuthNMappingUpdateData"; export { AuthNMappingUpdateRelationships } from "./models/AuthNMappingUpdateRelationships"; export { AuthNMappingUpdateRequest } from "./models/AuthNMappingUpdateRequest"; +export { AWSAccountCreateRequest } from "./models/AWSAccountCreateRequest"; +export { AWSAccountCreateRequestAttributes } from "./models/AWSAccountCreateRequestAttributes"; +export { AWSAccountCreateRequestData } from "./models/AWSAccountCreateRequestData"; +export { AWSAccountPartition } from "./models/AWSAccountPartition"; +export { AWSAccountPatchRequest } from "./models/AWSAccountPatchRequest"; +export { AWSAccountPatchRequestAttributes } from "./models/AWSAccountPatchRequestAttributes"; +export { AWSAccountPatchRequestData } from "./models/AWSAccountPatchRequestData"; +export { AWSAccountResponse } from "./models/AWSAccountResponse"; +export { AWSAccountResponseAttributes } from "./models/AWSAccountResponseAttributes"; +export { AWSAccountResponseData } from "./models/AWSAccountResponseData"; +export { AWSAccountsResponse } from "./models/AWSAccountsResponse"; +export { AWSAuthConfig } from "./models/AWSAuthConfig"; +export { AWSAuthConfigKeys } from "./models/AWSAuthConfigKeys"; +export { AWSAuthConfigRole } from "./models/AWSAuthConfigRole"; export { AwsCURConfig } from "./models/AwsCURConfig"; export { AwsCURConfigAttributes } from "./models/AwsCURConfigAttributes"; export { AwsCURConfigPatchData } from "./models/AwsCURConfigPatchData"; @@ -626,10 +649,24 @@ export { AwsCURConfigPostRequestType } from "./models/AwsCURConfigPostRequestTyp export { AwsCURConfigResponse } from "./models/AwsCURConfigResponse"; export { AwsCURConfigsResponse } from "./models/AwsCURConfigsResponse"; export { AwsCURConfigType } from "./models/AwsCURConfigType"; +export { AWSLambdaForwarderConfig } from "./models/AWSLambdaForwarderConfig"; +export { AWSLogsConfig } from "./models/AWSLogsConfig"; +export { AWSMetricsConfig } from "./models/AWSMetricsConfig"; +export { AWSNamespaceFilters } from "./models/AWSNamespaceFilters"; +export { AWSNamespaceFiltersExcludeAll } from "./models/AWSNamespaceFiltersExcludeAll"; +export { AWSNamespaceFiltersExcludeOnly } from "./models/AWSNamespaceFiltersExcludeOnly"; +export { AWSNamespaceFiltersIncludeAll } from "./models/AWSNamespaceFiltersIncludeAll"; +export { AWSNamespaceFiltersIncludeOnly } from "./models/AWSNamespaceFiltersIncludeOnly"; +export { AWSNamespaceTagFilter } from "./models/AWSNamespaceTagFilter"; +export { AWSRegions } from "./models/AWSRegions"; +export { AWSRegionsIncludeAll } from "./models/AWSRegionsIncludeAll"; +export { AWSRegionsIncludeOnly } from "./models/AWSRegionsIncludeOnly"; export { AWSRelatedAccount } from "./models/AWSRelatedAccount"; export { AWSRelatedAccountAttributes } from "./models/AWSRelatedAccountAttributes"; export { AWSRelatedAccountsResponse } from "./models/AWSRelatedAccountsResponse"; export { AWSRelatedAccountType } from "./models/AWSRelatedAccountType"; +export { AWSResourcesConfig } from "./models/AWSResourcesConfig"; +export { AWSTracesConfig } from "./models/AWSTracesConfig"; export { AzureUCConfig } from "./models/AzureUCConfig"; export { AzureUCConfigPair } from "./models/AzureUCConfigPair"; export { AzureUCConfigPairAttributes } from "./models/AzureUCConfigPairAttributes"; @@ -2163,5 +2200,8 @@ export { WorklflowCancelInstanceResponseData } from "./models/WorklflowCancelIns export { WorklflowGetInstanceResponse } from "./models/WorklflowGetInstanceResponse"; export { WorklflowGetInstanceResponseData } from "./models/WorklflowGetInstanceResponseData"; export { WorklflowGetInstanceResponseDataAttributes } from "./models/WorklflowGetInstanceResponseDataAttributes"; +export { XRayServicesIncludeAll } from "./models/XRayServicesIncludeAll"; +export { XRayServicesIncludeOnly } from "./models/XRayServicesIncludeOnly"; +export { XRayServicesList } from "./models/XRayServicesList"; export { ObjectSerializer } from "./models/ObjectSerializer"; diff --git a/packages/datadog-api-client-v2/models/AWSAccountCreateRequest.ts b/packages/datadog-api-client-v2/models/AWSAccountCreateRequest.ts new file mode 100644 index 000000000000..06aecd157881 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSAccountCreateRequest.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AWSAccountCreateRequestData } from "./AWSAccountCreateRequestData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * AWS Account Create Request body + */ +export class AWSAccountCreateRequest { + /** + * AWS Account Create Request data + */ + "data"?: AWSAccountCreateRequestData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "AWSAccountCreateRequestData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSAccountCreateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AWSAccountCreateRequestAttributes.ts b/packages/datadog-api-client-v2/models/AWSAccountCreateRequestAttributes.ts new file mode 100644 index 000000000000..a607cad0ea73 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSAccountCreateRequestAttributes.ts @@ -0,0 +1,126 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AWSAccountPartition } from "./AWSAccountPartition"; +import { AWSAuthConfig } from "./AWSAuthConfig"; +import { AWSLogsConfig } from "./AWSLogsConfig"; +import { AWSMetricsConfig } from "./AWSMetricsConfig"; +import { AWSRegions } from "./AWSRegions"; +import { AWSResourcesConfig } from "./AWSResourcesConfig"; +import { AWSTracesConfig } from "./AWSTracesConfig"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The AWS Account Integration Config to be created + */ +export class AWSAccountCreateRequestAttributes { + /** + * Tags to apply to all metrics in the account + */ + "accountTags"?: Array; + /** + * AWS Authentication config + */ + "authConfig": AWSAuthConfig; + /** + * AWS Account ID + */ + "awsAccountId": string; + /** + * AWS Account partition + */ + "awsPartition": AWSAccountPartition; + /** + * AWS Regions to collect data from + */ + "awsRegions"?: AWSRegions; + /** + * AWS Logs config + */ + "logsConfig"?: AWSLogsConfig; + /** + * AWS Metrics config + */ + "metricsConfig"?: AWSMetricsConfig; + /** + * AWS Resources config + */ + "resourcesConfig"?: AWSResourcesConfig; + /** + * AWS Traces config + */ + "tracesConfig"?: AWSTracesConfig; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + accountTags: { + baseName: "account_tags", + type: "Array", + }, + authConfig: { + baseName: "auth_config", + type: "AWSAuthConfig", + required: true, + }, + awsAccountId: { + baseName: "aws_account_id", + type: "string", + required: true, + }, + awsPartition: { + baseName: "aws_partition", + type: "AWSAccountPartition", + required: true, + }, + awsRegions: { + baseName: "aws_regions", + type: "AWSRegions", + }, + logsConfig: { + baseName: "logs_config", + type: "AWSLogsConfig", + }, + metricsConfig: { + baseName: "metrics_config", + type: "AWSMetricsConfig", + }, + resourcesConfig: { + baseName: "resources_config", + type: "AWSResourcesConfig", + }, + tracesConfig: { + baseName: "traces_config", + type: "AWSTracesConfig", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSAccountCreateRequestAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AWSAccountCreateRequestData.ts b/packages/datadog-api-client-v2/models/AWSAccountCreateRequestData.ts new file mode 100644 index 000000000000..3cd4916ce125 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSAccountCreateRequestData.ts @@ -0,0 +1,62 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AWSAccountCreateRequestAttributes } from "./AWSAccountCreateRequestAttributes"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * AWS Account Create Request data + */ +export class AWSAccountCreateRequestData { + /** + * The AWS Account Integration Config to be created + */ + "attributes": AWSAccountCreateRequestAttributes; + /** + * Request or response type + */ + "type"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "AWSAccountCreateRequestAttributes", + required: true, + }, + type: { + baseName: "type", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSAccountCreateRequestData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AWSAccountPartition.ts b/packages/datadog-api-client-v2/models/AWSAccountPartition.ts new file mode 100644 index 000000000000..dd5a20277894 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSAccountPartition.ts @@ -0,0 +1,20 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * AWS Account partition + */ + +export type AWSAccountPartition = + | typeof AWS + | typeof AWS_CN + | typeof AWS_US_GOV + | UnparsedObject; +export const AWS = "aws"; +export const AWS_CN = "aws-cn"; +export const AWS_US_GOV = "aws-us-gov"; diff --git a/packages/datadog-api-client-v2/models/AWSAccountPatchRequest.ts b/packages/datadog-api-client-v2/models/AWSAccountPatchRequest.ts new file mode 100644 index 000000000000..f6c8ca5e38b8 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSAccountPatchRequest.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AWSAccountPatchRequestData } from "./AWSAccountPatchRequestData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * AWS Account Patch Request body + */ +export class AWSAccountPatchRequest { + /** + * AWS Account Patch Request data + */ + "data"?: AWSAccountPatchRequestData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "AWSAccountPatchRequestData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSAccountPatchRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AWSAccountPatchRequestAttributes.ts b/packages/datadog-api-client-v2/models/AWSAccountPatchRequestAttributes.ts new file mode 100644 index 000000000000..3b5d94b51c63 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSAccountPatchRequestAttributes.ts @@ -0,0 +1,124 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AWSAccountPartition } from "./AWSAccountPartition"; +import { AWSAuthConfig } from "./AWSAuthConfig"; +import { AWSLogsConfig } from "./AWSLogsConfig"; +import { AWSMetricsConfig } from "./AWSMetricsConfig"; +import { AWSRegions } from "./AWSRegions"; +import { AWSResourcesConfig } from "./AWSResourcesConfig"; +import { AWSTracesConfig } from "./AWSTracesConfig"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The AWS Account Integration Config to be updated + */ +export class AWSAccountPatchRequestAttributes { + /** + * Tags to apply to all metrics in the account + */ + "accountTags"?: Array; + /** + * AWS Authentication config + */ + "authConfig"?: AWSAuthConfig; + /** + * AWS Account ID + */ + "awsAccountId": string; + /** + * AWS Account partition + */ + "awsPartition"?: AWSAccountPartition; + /** + * AWS Regions to collect data from + */ + "awsRegions"?: AWSRegions; + /** + * AWS Logs config + */ + "logsConfig"?: AWSLogsConfig; + /** + * AWS Metrics config + */ + "metricsConfig"?: AWSMetricsConfig; + /** + * AWS Resources config + */ + "resourcesConfig"?: AWSResourcesConfig; + /** + * AWS Traces config + */ + "tracesConfig"?: AWSTracesConfig; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + accountTags: { + baseName: "account_tags", + type: "Array", + }, + authConfig: { + baseName: "auth_config", + type: "AWSAuthConfig", + }, + awsAccountId: { + baseName: "aws_account_id", + type: "string", + required: true, + }, + awsPartition: { + baseName: "aws_partition", + type: "AWSAccountPartition", + }, + awsRegions: { + baseName: "aws_regions", + type: "AWSRegions", + }, + logsConfig: { + baseName: "logs_config", + type: "AWSLogsConfig", + }, + metricsConfig: { + baseName: "metrics_config", + type: "AWSMetricsConfig", + }, + resourcesConfig: { + baseName: "resources_config", + type: "AWSResourcesConfig", + }, + tracesConfig: { + baseName: "traces_config", + type: "AWSTracesConfig", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSAccountPatchRequestAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AWSAccountPatchRequestData.ts b/packages/datadog-api-client-v2/models/AWSAccountPatchRequestData.ts new file mode 100644 index 000000000000..a297cb72e8cf --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSAccountPatchRequestData.ts @@ -0,0 +1,70 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AWSAccountPatchRequestAttributes } from "./AWSAccountPatchRequestAttributes"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * AWS Account Patch Request data + */ +export class AWSAccountPatchRequestData { + /** + * The AWS Account Integration Config to be updated + */ + "attributes": AWSAccountPatchRequestAttributes; + /** + * AWS Account ID + */ + "id"?: string; + /** + * Request or response type + */ + "type"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "AWSAccountPatchRequestAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + }, + type: { + baseName: "type", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSAccountPatchRequestData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AWSAccountResponse.ts b/packages/datadog-api-client-v2/models/AWSAccountResponse.ts new file mode 100644 index 000000000000..af52a5159d9e --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSAccountResponse.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AWSAccountResponseData } from "./AWSAccountResponseData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * AWS Account response body + */ +export class AWSAccountResponse { + /** + * AWS Account Response body + */ + "data"?: AWSAccountResponseData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "AWSAccountResponseData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSAccountResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AWSAccountResponseAttributes.ts b/packages/datadog-api-client-v2/models/AWSAccountResponseAttributes.ts new file mode 100644 index 000000000000..f916b90e1b8f --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSAccountResponseAttributes.ts @@ -0,0 +1,144 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AWSAccountPartition } from "./AWSAccountPartition"; +import { AWSAuthConfig } from "./AWSAuthConfig"; +import { AWSLogsConfig } from "./AWSLogsConfig"; +import { AWSMetricsConfig } from "./AWSMetricsConfig"; +import { AWSRegions } from "./AWSRegions"; +import { AWSResourcesConfig } from "./AWSResourcesConfig"; +import { AWSTracesConfig } from "./AWSTracesConfig"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The AWS Account Integration Config + */ +export class AWSAccountResponseAttributes { + /** + * Tags to apply to all metrics in the account + */ + "accountTags"?: Array; + /** + * AWS Authentication config + */ + "authConfig": AWSAuthConfig; + /** + * AWS Account ID + */ + "awsAccountId": string; + /** + * AWS Account partition + */ + "awsPartition": AWSAccountPartition; + /** + * AWS Regions to collect data from + */ + "awsRegions"?: AWSRegions; + /** + * Timestamp of when the account integration was created + */ + "createdAt"?: Date; + /** + * AWS Logs config + */ + "logsConfig"?: AWSLogsConfig; + /** + * AWS Metrics config + */ + "metricsConfig"?: AWSMetricsConfig; + /** + * Timestamp of when the account integration was updated + */ + "modifiedAt"?: Date; + /** + * AWS Resources config + */ + "resourcesConfig"?: AWSResourcesConfig; + /** + * AWS Traces config + */ + "tracesConfig"?: AWSTracesConfig; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + accountTags: { + baseName: "account_tags", + type: "Array", + }, + authConfig: { + baseName: "auth_config", + type: "AWSAuthConfig", + required: true, + }, + awsAccountId: { + baseName: "aws_account_id", + type: "string", + required: true, + }, + awsPartition: { + baseName: "aws_partition", + type: "AWSAccountPartition", + required: true, + }, + awsRegions: { + baseName: "aws_regions", + type: "AWSRegions", + }, + createdAt: { + baseName: "created_at", + type: "Date", + format: "date-time", + }, + logsConfig: { + baseName: "logs_config", + type: "AWSLogsConfig", + }, + metricsConfig: { + baseName: "metrics_config", + type: "AWSMetricsConfig", + }, + modifiedAt: { + baseName: "modified_at", + type: "Date", + format: "date-time", + }, + resourcesConfig: { + baseName: "resources_config", + type: "AWSResourcesConfig", + }, + tracesConfig: { + baseName: "traces_config", + type: "AWSTracesConfig", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSAccountResponseAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AWSAccountResponseData.ts b/packages/datadog-api-client-v2/models/AWSAccountResponseData.ts new file mode 100644 index 000000000000..d94b277ba85e --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSAccountResponseData.ts @@ -0,0 +1,70 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AWSAccountResponseAttributes } from "./AWSAccountResponseAttributes"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * AWS Account Response body + */ +export class AWSAccountResponseData { + /** + * The AWS Account Integration Config + */ + "attributes": AWSAccountResponseAttributes; + /** + * Identifier for the response type + */ + "id"?: string; + /** + * Request or response type + */ + "type"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "AWSAccountResponseAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + }, + type: { + baseName: "type", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSAccountResponseData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AWSAccountsResponse.ts b/packages/datadog-api-client-v2/models/AWSAccountsResponse.ts new file mode 100644 index 000000000000..cb7db561949c --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSAccountsResponse.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AWSAccountResponseData } from "./AWSAccountResponseData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * AWS Accounts response body + */ +export class AWSAccountsResponse { + /** + * List of AWS Account Integration Configs + */ + "data"?: Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSAccountsResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AWSAuthConfig.ts b/packages/datadog-api-client-v2/models/AWSAuthConfig.ts new file mode 100644 index 000000000000..7ee7abb21f51 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSAuthConfig.ts @@ -0,0 +1,18 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AWSAuthConfigKeys } from "./AWSAuthConfigKeys"; +import { AWSAuthConfigRole } from "./AWSAuthConfigRole"; + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * AWS Authentication config + */ + +export type AWSAuthConfig = + | AWSAuthConfigKeys + | AWSAuthConfigRole + | UnparsedObject; diff --git a/packages/datadog-api-client-v2/models/AWSAuthConfigKeys.ts b/packages/datadog-api-client-v2/models/AWSAuthConfigKeys.ts new file mode 100644 index 000000000000..08345cd606b3 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSAuthConfigKeys.ts @@ -0,0 +1,61 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * AWS Authentication config for key-based account + */ +export class AWSAuthConfigKeys { + /** + * AWS Access Key ID + */ + "accessKeyId": string; + /** + * AWS Secret Access Key + */ + "secretAccessKey"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + accessKeyId: { + baseName: "access_key_id", + type: "string", + required: true, + }, + secretAccessKey: { + baseName: "secret_access_key", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSAuthConfigKeys.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AWSAuthConfigRole.ts b/packages/datadog-api-client-v2/models/AWSAuthConfigRole.ts new file mode 100644 index 000000000000..81f604975065 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSAuthConfigRole.ts @@ -0,0 +1,61 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * AWS Authentication config for role-based account + */ +export class AWSAuthConfigRole { + /** + * AWS IAM External ID for associated role + */ + "externalId"?: string; + /** + * AWS IAM Role name + */ + "roleName": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + externalId: { + baseName: "external_id", + type: "string", + }, + roleName: { + baseName: "role_name", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSAuthConfigRole.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AWSLambdaForwarderConfig.ts b/packages/datadog-api-client-v2/models/AWSLambdaForwarderConfig.ts new file mode 100644 index 000000000000..9f555b1b501f --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSLambdaForwarderConfig.ts @@ -0,0 +1,60 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * AWS Lambda forwarder + */ +export class AWSLambdaForwarderConfig { + /** + * List of Datadog Lambda Log Forwarder ARNs + */ + "lambdas"?: Array; + /** + * List of AWS services that will send logs to the Datadog Lambda Log Forwarder + */ + "sources"?: Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + lambdas: { + baseName: "lambdas", + type: "Array", + }, + sources: { + baseName: "sources", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSLambdaForwarderConfig.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AWSLogsConfig.ts b/packages/datadog-api-client-v2/models/AWSLogsConfig.ts new file mode 100644 index 000000000000..f806285b2a37 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSLogsConfig.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AWSLambdaForwarderConfig } from "./AWSLambdaForwarderConfig"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * AWS Logs config + */ +export class AWSLogsConfig { + /** + * AWS Lambda forwarder + */ + "lambdaForwarder"?: AWSLambdaForwarderConfig; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + lambdaForwarder: { + baseName: "lambda_forwarder", + type: "AWSLambdaForwarderConfig", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSLogsConfig.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AWSMetricsConfig.ts b/packages/datadog-api-client-v2/models/AWSMetricsConfig.ts new file mode 100644 index 000000000000..ff96dce12dd6 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSMetricsConfig.ts @@ -0,0 +1,94 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AWSNamespaceFilters } from "./AWSNamespaceFilters"; +import { AWSNamespaceTagFilter } from "./AWSNamespaceTagFilter"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * AWS Metrics config + */ +export class AWSMetricsConfig { + /** + * Enable EC2 automute for AWS metrics + */ + "automuteEnabled"?: boolean; + /** + * Enable CloudWatch alarms collection + */ + "collectCloudwatchAlarms"?: boolean; + /** + * Enable custom metrics collection + */ + "collectCustomMetrics"?: boolean; + /** + * Enable AWS metrics collection + */ + "enabled"?: boolean; + /** + * AWS Metrics namespace filters + */ + "namespaceFilters"?: AWSNamespaceFilters; + /** + * AWS Metrics tag filters list + */ + "tagFilters"?: Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + automuteEnabled: { + baseName: "automute_enabled", + type: "boolean", + }, + collectCloudwatchAlarms: { + baseName: "collect_cloudwatch_alarms", + type: "boolean", + }, + collectCustomMetrics: { + baseName: "collect_custom_metrics", + type: "boolean", + }, + enabled: { + baseName: "enabled", + type: "boolean", + }, + namespaceFilters: { + baseName: "namespace_filters", + type: "AWSNamespaceFilters", + }, + tagFilters: { + baseName: "tag_filters", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSMetricsConfig.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AWSNamespaceFilters.ts b/packages/datadog-api-client-v2/models/AWSNamespaceFilters.ts new file mode 100644 index 000000000000..3272b0d96fcf --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSNamespaceFilters.ts @@ -0,0 +1,22 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AWSNamespaceFiltersExcludeAll } from "./AWSNamespaceFiltersExcludeAll"; +import { AWSNamespaceFiltersExcludeOnly } from "./AWSNamespaceFiltersExcludeOnly"; +import { AWSNamespaceFiltersIncludeAll } from "./AWSNamespaceFiltersIncludeAll"; +import { AWSNamespaceFiltersIncludeOnly } from "./AWSNamespaceFiltersIncludeOnly"; + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * AWS Metrics namespace filters + */ + +export type AWSNamespaceFilters = + | AWSNamespaceFiltersExcludeAll + | AWSNamespaceFiltersExcludeOnly + | AWSNamespaceFiltersIncludeAll + | AWSNamespaceFiltersIncludeOnly + | UnparsedObject; diff --git a/packages/datadog-api-client-v2/models/AWSNamespaceFiltersExcludeAll.ts b/packages/datadog-api-client-v2/models/AWSNamespaceFiltersExcludeAll.ts new file mode 100644 index 000000000000..cf997f6d4ba0 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSNamespaceFiltersExcludeAll.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Exclude all namespaces + */ +export class AWSNamespaceFiltersExcludeAll { + /** + * Exclude all namespaces + */ + "excludeAll": boolean; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + excludeAll: { + baseName: "exclude_all", + type: "boolean", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSNamespaceFiltersExcludeAll.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AWSNamespaceFiltersExcludeOnly.ts b/packages/datadog-api-client-v2/models/AWSNamespaceFiltersExcludeOnly.ts new file mode 100644 index 000000000000..6473f0738b54 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSNamespaceFiltersExcludeOnly.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Exclude only these namespaces + */ +export class AWSNamespaceFiltersExcludeOnly { + /** + * Exclude only these namespaces + */ + "excludeOnly": Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + excludeOnly: { + baseName: "exclude_only", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSNamespaceFiltersExcludeOnly.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AWSNamespaceFiltersIncludeAll.ts b/packages/datadog-api-client-v2/models/AWSNamespaceFiltersIncludeAll.ts new file mode 100644 index 000000000000..c1b513b69838 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSNamespaceFiltersIncludeAll.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Include all namespaces + */ +export class AWSNamespaceFiltersIncludeAll { + /** + * Include all namespaces + */ + "includeAll": boolean; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + includeAll: { + baseName: "include_all", + type: "boolean", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSNamespaceFiltersIncludeAll.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AWSNamespaceFiltersIncludeOnly.ts b/packages/datadog-api-client-v2/models/AWSNamespaceFiltersIncludeOnly.ts new file mode 100644 index 000000000000..546a492b6e2e --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSNamespaceFiltersIncludeOnly.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Include only these namespaces + */ +export class AWSNamespaceFiltersIncludeOnly { + /** + * Include only these namespaces + */ + "includeOnly": Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + includeOnly: { + baseName: "include_only", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSNamespaceFiltersIncludeOnly.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AWSNamespaceTagFilter.ts b/packages/datadog-api-client-v2/models/AWSNamespaceTagFilter.ts new file mode 100644 index 000000000000..8bb7dca40708 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSNamespaceTagFilter.ts @@ -0,0 +1,60 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * AWS Metrics tag filters + */ +export class AWSNamespaceTagFilter { + /** + * The AWS Namespace to apply the tag filters against + */ + "namespace"?: string; + /** + * The tags to filter based on + */ + "tags"?: Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + namespace: { + baseName: "namespace", + type: "string", + }, + tags: { + baseName: "tags", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSNamespaceTagFilter.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AWSRegions.ts b/packages/datadog-api-client-v2/models/AWSRegions.ts new file mode 100644 index 000000000000..85c5ff8cc6bf --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSRegions.ts @@ -0,0 +1,18 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AWSRegionsIncludeAll } from "./AWSRegionsIncludeAll"; +import { AWSRegionsIncludeOnly } from "./AWSRegionsIncludeOnly"; + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * AWS Regions to collect data from + */ + +export type AWSRegions = + | AWSRegionsIncludeAll + | AWSRegionsIncludeOnly + | UnparsedObject; diff --git a/packages/datadog-api-client-v2/models/AWSRegionsIncludeAll.ts b/packages/datadog-api-client-v2/models/AWSRegionsIncludeAll.ts new file mode 100644 index 000000000000..90944341a959 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSRegionsIncludeAll.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Include all regions + */ +export class AWSRegionsIncludeAll { + /** + * Include all regions + */ + "includeAll": boolean; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + includeAll: { + baseName: "include_all", + type: "boolean", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSRegionsIncludeAll.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AWSRegionsIncludeOnly.ts b/packages/datadog-api-client-v2/models/AWSRegionsIncludeOnly.ts new file mode 100644 index 000000000000..d22f49191c12 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSRegionsIncludeOnly.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Include only these regions + */ +export class AWSRegionsIncludeOnly { + /** + * Include only these regions + */ + "includeOnly": Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + includeOnly: { + baseName: "include_only", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSRegionsIncludeOnly.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AWSResourcesConfig.ts b/packages/datadog-api-client-v2/models/AWSResourcesConfig.ts new file mode 100644 index 000000000000..c0a9d2a3d69c --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSResourcesConfig.ts @@ -0,0 +1,60 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * AWS Resources config + */ +export class AWSResourcesConfig { + /** + * Whether Datadog collects cloud security posture management resources from your AWS account. + */ + "cloudSecurityPostureManagementCollection"?: boolean; + /** + * Whether Datadog collects additional attributes and configuration information about the resources in your AWS account. Required for `cspm_resource_collection`. + */ + "extendedCollection"?: boolean; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + cloudSecurityPostureManagementCollection: { + baseName: "cloud_security_posture_management_collection", + type: "boolean", + }, + extendedCollection: { + baseName: "extended_collection", + type: "boolean", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSResourcesConfig.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AWSTracesConfig.ts b/packages/datadog-api-client-v2/models/AWSTracesConfig.ts new file mode 100644 index 000000000000..962ba646d565 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AWSTracesConfig.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { XRayServicesList } from "./XRayServicesList"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * AWS Traces config + */ +export class AWSTracesConfig { + /** + * AWS X-Ray services to collect traces from + */ + "xrayServices"?: XRayServicesList; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + xrayServices: { + baseName: "xray_services", + type: "XRayServicesList", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AWSTracesConfig.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index 097b22314e29..87261fa8c6c2 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -10,9 +10,33 @@ import { APIKeyUpdateRequest } from "./APIKeyUpdateRequest"; import { APIKeysResponse } from "./APIKeysResponse"; import { APIKeysResponseMeta } from "./APIKeysResponseMeta"; import { APIKeysResponseMetaPage } from "./APIKeysResponseMetaPage"; +import { AWSAccountCreateRequest } from "./AWSAccountCreateRequest"; +import { AWSAccountCreateRequestAttributes } from "./AWSAccountCreateRequestAttributes"; +import { AWSAccountCreateRequestData } from "./AWSAccountCreateRequestData"; +import { AWSAccountPatchRequest } from "./AWSAccountPatchRequest"; +import { AWSAccountPatchRequestAttributes } from "./AWSAccountPatchRequestAttributes"; +import { AWSAccountPatchRequestData } from "./AWSAccountPatchRequestData"; +import { AWSAccountResponse } from "./AWSAccountResponse"; +import { AWSAccountResponseAttributes } from "./AWSAccountResponseAttributes"; +import { AWSAccountResponseData } from "./AWSAccountResponseData"; +import { AWSAccountsResponse } from "./AWSAccountsResponse"; +import { AWSAuthConfigKeys } from "./AWSAuthConfigKeys"; +import { AWSAuthConfigRole } from "./AWSAuthConfigRole"; +import { AWSLambdaForwarderConfig } from "./AWSLambdaForwarderConfig"; +import { AWSLogsConfig } from "./AWSLogsConfig"; +import { AWSMetricsConfig } from "./AWSMetricsConfig"; +import { AWSNamespaceFiltersExcludeAll } from "./AWSNamespaceFiltersExcludeAll"; +import { AWSNamespaceFiltersExcludeOnly } from "./AWSNamespaceFiltersExcludeOnly"; +import { AWSNamespaceFiltersIncludeAll } from "./AWSNamespaceFiltersIncludeAll"; +import { AWSNamespaceFiltersIncludeOnly } from "./AWSNamespaceFiltersIncludeOnly"; +import { AWSNamespaceTagFilter } from "./AWSNamespaceTagFilter"; +import { AWSRegionsIncludeAll } from "./AWSRegionsIncludeAll"; +import { AWSRegionsIncludeOnly } from "./AWSRegionsIncludeOnly"; import { AWSRelatedAccount } from "./AWSRelatedAccount"; import { AWSRelatedAccountAttributes } from "./AWSRelatedAccountAttributes"; import { AWSRelatedAccountsResponse } from "./AWSRelatedAccountsResponse"; +import { AWSResourcesConfig } from "./AWSResourcesConfig"; +import { AWSTracesConfig } from "./AWSTracesConfig"; import { ActiveBillingDimensionsAttributes } from "./ActiveBillingDimensionsAttributes"; import { ActiveBillingDimensionsBody } from "./ActiveBillingDimensionsBody"; import { ActiveBillingDimensionsResponse } from "./ActiveBillingDimensionsResponse"; @@ -1253,6 +1277,8 @@ import { WorklflowCancelInstanceResponseData } from "./WorklflowCancelInstanceRe import { WorklflowGetInstanceResponse } from "./WorklflowGetInstanceResponse"; import { WorklflowGetInstanceResponseData } from "./WorklflowGetInstanceResponseData"; import { WorklflowGetInstanceResponseDataAttributes } from "./WorklflowGetInstanceResponseDataAttributes"; +import { XRayServicesIncludeAll } from "./XRayServicesIncludeAll"; +import { XRayServicesIncludeOnly } from "./XRayServicesIncludeOnly"; import { dateFromRFC3339String, dateToRFC3339String, @@ -1292,6 +1318,7 @@ const enumsMap: { [key: string]: any[] } = { "-name", ], APIKeysType: ["api_keys"], + AWSAccountPartition: ["aws", "aws-cn", "aws-us-gov"], AWSRelatedAccountType: ["aws_account"], ActiveBillingDimensionsType: ["billing_dimensions"], ApmRetentionFilterType: ["apm_retention_filter"], @@ -1912,9 +1939,33 @@ const typeMap: { [index: string]: any } = { APIKeysResponse: APIKeysResponse, APIKeysResponseMeta: APIKeysResponseMeta, APIKeysResponseMetaPage: APIKeysResponseMetaPage, + AWSAccountCreateRequest: AWSAccountCreateRequest, + AWSAccountCreateRequestAttributes: AWSAccountCreateRequestAttributes, + AWSAccountCreateRequestData: AWSAccountCreateRequestData, + AWSAccountPatchRequest: AWSAccountPatchRequest, + AWSAccountPatchRequestAttributes: AWSAccountPatchRequestAttributes, + AWSAccountPatchRequestData: AWSAccountPatchRequestData, + AWSAccountResponse: AWSAccountResponse, + AWSAccountResponseAttributes: AWSAccountResponseAttributes, + AWSAccountResponseData: AWSAccountResponseData, + AWSAccountsResponse: AWSAccountsResponse, + AWSAuthConfigKeys: AWSAuthConfigKeys, + AWSAuthConfigRole: AWSAuthConfigRole, + AWSLambdaForwarderConfig: AWSLambdaForwarderConfig, + AWSLogsConfig: AWSLogsConfig, + AWSMetricsConfig: AWSMetricsConfig, + AWSNamespaceFiltersExcludeAll: AWSNamespaceFiltersExcludeAll, + AWSNamespaceFiltersExcludeOnly: AWSNamespaceFiltersExcludeOnly, + AWSNamespaceFiltersIncludeAll: AWSNamespaceFiltersIncludeAll, + AWSNamespaceFiltersIncludeOnly: AWSNamespaceFiltersIncludeOnly, + AWSNamespaceTagFilter: AWSNamespaceTagFilter, + AWSRegionsIncludeAll: AWSRegionsIncludeAll, + AWSRegionsIncludeOnly: AWSRegionsIncludeOnly, AWSRelatedAccount: AWSRelatedAccount, AWSRelatedAccountAttributes: AWSRelatedAccountAttributes, AWSRelatedAccountsResponse: AWSRelatedAccountsResponse, + AWSResourcesConfig: AWSResourcesConfig, + AWSTracesConfig: AWSTracesConfig, ActiveBillingDimensionsAttributes: ActiveBillingDimensionsAttributes, ActiveBillingDimensionsBody: ActiveBillingDimensionsBody, ActiveBillingDimensionsResponse: ActiveBillingDimensionsResponse, @@ -3301,10 +3352,20 @@ const typeMap: { [index: string]: any } = { WorklflowGetInstanceResponseData: WorklflowGetInstanceResponseData, WorklflowGetInstanceResponseDataAttributes: WorklflowGetInstanceResponseDataAttributes, + XRayServicesIncludeAll: XRayServicesIncludeAll, + XRayServicesIncludeOnly: XRayServicesIncludeOnly, }; const oneOfMap: { [index: string]: string[] } = { APIKeyResponseIncludedItem: ["User", "LeakedKey"], + AWSAuthConfig: ["AWSAuthConfigKeys", "AWSAuthConfigRole"], + AWSNamespaceFilters: [ + "AWSNamespaceFiltersExcludeAll", + "AWSNamespaceFiltersExcludeOnly", + "AWSNamespaceFiltersIncludeAll", + "AWSNamespaceFiltersIncludeOnly", + ], + AWSRegions: ["AWSRegionsIncludeAll", "AWSRegionsIncludeOnly"], ApplicationKeyResponseIncludedItem: ["User", "Role", "LeakedKey"], AuthNMappingCreateRelationships: [ "AuthNMappingRelationshipToRole", @@ -3507,6 +3568,7 @@ const oneOfMap: { [index: string]: string[] } = { UpsertCatalogEntityResponseIncludedItem: ["EntityResponseIncludedSchema"], UserResponseIncludedItem: ["Organization", "Permission", "Role"], UserTeamIncluded: ["User", "Team"], + XRayServicesList: ["XRayServicesIncludeAll", "XRayServicesIncludeOnly"], }; export class ObjectSerializer { diff --git a/packages/datadog-api-client-v2/models/XRayServicesIncludeAll.ts b/packages/datadog-api-client-v2/models/XRayServicesIncludeAll.ts new file mode 100644 index 000000000000..5adfcbe63896 --- /dev/null +++ b/packages/datadog-api-client-v2/models/XRayServicesIncludeAll.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Include all services + */ +export class XRayServicesIncludeAll { + /** + * Include all services + */ + "includeAll": boolean; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + includeAll: { + baseName: "include_all", + type: "boolean", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return XRayServicesIncludeAll.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/XRayServicesIncludeOnly.ts b/packages/datadog-api-client-v2/models/XRayServicesIncludeOnly.ts new file mode 100644 index 000000000000..82dad58d0912 --- /dev/null +++ b/packages/datadog-api-client-v2/models/XRayServicesIncludeOnly.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Include only these services + */ +export class XRayServicesIncludeOnly { + /** + * Include only these services + */ + "includeOnly": Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + includeOnly: { + baseName: "include_only", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return XRayServicesIncludeOnly.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/XRayServicesList.ts b/packages/datadog-api-client-v2/models/XRayServicesList.ts new file mode 100644 index 000000000000..dab9024b3fa9 --- /dev/null +++ b/packages/datadog-api-client-v2/models/XRayServicesList.ts @@ -0,0 +1,18 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { XRayServicesIncludeAll } from "./XRayServicesIncludeAll"; +import { XRayServicesIncludeOnly } from "./XRayServicesIncludeOnly"; + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * AWS X-Ray services to collect traces from + */ + +export type XRayServicesList = + | XRayServicesIncludeAll + | XRayServicesIncludeOnly + | UnparsedObject;