diff --git a/.apigentools-info b/.apigentools-info
index 6841a869f7e..c6c91df6430 100644
--- a/.apigentools-info
+++ b/.apigentools-info
@@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
- "regenerated": "2024-11-12 10:03:20.235642",
- "spec_repo_commit": "67b7e114"
+ "regenerated": "2024-11-12 20:16:44.110501",
+ "spec_repo_commit": "9a869b6b"
},
"v2": {
"apigentools_version": "1.6.6",
- "regenerated": "2024-11-12 10:03:20.254391",
- "spec_repo_commit": "67b7e114"
+ "regenerated": "2024-11-12 20:16:44.128994",
+ "spec_repo_commit": "9a869b6b"
}
}
}
\ No newline at end of file
diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index a3a38ebca93..ad1dba70f7c 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.
@@ -983,6 +990,536 @@ components:
type: string
x-enum-varnames:
- API_KEYS
+ AWSAccountConfigID:
+ description: Unique Datadog ID of the AWS Account Integration Config
+ example: 00000000-abcd-0001-0000-000000000000
+ type: string
+ AWSAccountCreateRequest:
+ description: AWS Account Create Request body
+ properties:
+ data:
+ $ref: '#/components/schemas/AWSAccountCreateRequestData'
+ required:
+ - data
+ 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
+ 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
+ AWSAccountResponse:
+ description: AWS Account response body
+ properties:
+ data:
+ $ref: '#/components/schemas/AWSAccountResponseData'
+ required:
+ - data
+ 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
+ type: object
+ AWSAccountResponseData:
+ description: AWS Account Response body
+ properties:
+ attributes:
+ $ref: '#/components/schemas/AWSAccountResponseAttributes'
+ id:
+ $ref: '#/components/schemas/AWSAccountConfigID'
+ type:
+ $ref: '#/components/schemas/AWSAccountType'
+ required:
+ - id
+ - type
+ type: object
+ AWSAccountTags:
+ description: Tags to apply to all metrics in the account
+ items:
+ description: Tag to apply to all metrics in the account
+ example: key:value
+ type: string
+ nullable: true
+ type: array
+ AWSAccountType:
+ default: account
+ description: AWS Account resource type.
+ enum:
+ - account
+ example: account
+ type: string
+ x-enum-varnames:
+ - ACCOUNT
+ AWSAccountUpdateRequest:
+ description: AWS Account Update Request body
+ properties:
+ data:
+ $ref: '#/components/schemas/AWSAccountUpdateRequestData'
+ required:
+ - data
+ type: object
+ AWSAccountUpdateRequestAttributes:
+ 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
+ AWSAccountUpdateRequestData:
+ description: AWS Account Update Request data
+ properties:
+ attributes:
+ $ref: '#/components/schemas/AWSAccountUpdateRequestAttributes'
+ id:
+ $ref: '#/components/schemas/AWSAccountConfigID'
+ type:
+ $ref: '#/components/schemas/AWSAccountType'
+ required:
+ - attributes
+ - type
+ type: object
+ AWSAccountsResponse:
+ description: AWS Accounts response body
+ properties:
+ data:
+ description: List of AWS Account Integration Configs
+ items:
+ $ref: '#/components/schemas/AWSAccountResponseData'
+ type: array
+ required:
+ - data
+ 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:
+ example: arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder
+ 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
+ AWSLogsServicesResponse:
+ description: AWS Logs Services response body
+ properties:
+ data:
+ $ref: '#/components/schemas/AWSLogsServicesResponseData'
+ required:
+ - data
+ type: object
+ AWSLogsServicesResponseAttributes:
+ description: AWS Logs Services response body
+ properties:
+ logs_services:
+ description: List of AWS services that can send logs to Datadog
+ example:
+ - s3
+ items:
+ example: s3
+ type: string
+ type: array
+ required:
+ - logs_services
+ type: object
+ AWSLogsServicesResponseData:
+ description: AWS Logs Services response body
+ properties:
+ attributes:
+ $ref: '#/components/schemas/AWSLogsServicesResponseAttributes'
+ id:
+ default: logs_services
+ description: The `AWSLogsServicesResponseData` `id`.
+ example: logs_services
+ type: string
+ type:
+ $ref: '#/components/schemas/AWSLogsServicesResponseDataType'
+ required:
+ - id
+ - type
+ type: object
+ AWSLogsServicesResponseDataType:
+ default: logs_services
+ description: The `AWSLogsServicesResponseData` `type`.
+ enum:
+ - logs_services
+ example: logs_services
+ type: string
+ x-enum-varnames:
+ - LOGS_SERVICES
+ AWSMetricsConfig:
+ description: AWS Metrics config
+ properties:
+ automute_enabled:
+ description: Enable EC2 automute for AWS metrics
+ example: true
+ type: boolean
+ collect_cloudwatch_alarms:
+ description: Enable CloudWatch alarms collection
+ example: true
+ type: boolean
+ collect_custom_metrics:
+ description: Enable custom metrics collection
+ example: true
+ type: boolean
+ enabled:
+ description: Enable AWS metrics collection
+ example: true
+ 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:
+ example: key:value
+ type: string
+ nullable: true
+ type: array
+ type: object
+ AWSNamespacesResponse:
+ description: AWS Namespaces response body
+ properties:
+ data:
+ $ref: '#/components/schemas/AWSNamespacesResponseData'
+ required:
+ - data
+ type: object
+ AWSNamespacesResponseAttributes:
+ description: AWS Namespaces response body
+ properties:
+ namespaces:
+ description: AWS CloudWatch namespace
+ example:
+ - AWS/ApiGateway
+ items:
+ example: AWS/ApiGateway
+ type: string
+ type: array
+ required:
+ - namespaces
+ type: object
+ AWSNamespacesResponseData:
+ description: AWS Namespaces response body
+ properties:
+ attributes:
+ $ref: '#/components/schemas/AWSNamespacesResponseAttributes'
+ id:
+ default: namespaces
+ description: The `AWSNamespacesResponseData` `id`.
+ example: namespaces
+ type: string
+ type:
+ $ref: '#/components/schemas/AWSNamespacesResponseDataType'
+ required:
+ - id
+ - type
+ type: object
+ AWSNamespacesResponseDataType:
+ default: namespaces
+ description: The `AWSNamespacesResponseData` `type`.
+ enum:
+ - namespaces
+ example: namespaces
+ type: string
+ x-enum-varnames:
+ - NAMESPACES
+ AWSNewExternalIDResponse:
+ description: AWS External ID response body
+ properties:
+ data:
+ $ref: '#/components/schemas/AWSNewExternalIDResponseData'
+ required:
+ - data
+ type: object
+ AWSNewExternalIDResponseAttributes:
+ description: AWS External ID response body
+ properties:
+ external_id:
+ description: AWS IAM External ID for associated role
+ example: acb8f6b8a844443dbb726d07dcb1a870
+ type: string
+ required:
+ - external_id
+ type: object
+ AWSNewExternalIDResponseData:
+ description: AWS External ID response body
+ properties:
+ attributes:
+ $ref: '#/components/schemas/AWSNewExternalIDResponseAttributes'
+ id:
+ default: external_id
+ description: The `AWSNewExternalIDResponseData` `id`.
+ example: external_id
+ type: string
+ type:
+ $ref: '#/components/schemas/AWSNewExternalIDResponseDataType'
+ required:
+ - id
+ - type
+ type: object
+ AWSNewExternalIDResponseDataType:
+ default: external_id
+ description: The `AWSNewExternalIDResponseData` `type`.
+ enum:
+ - external_id
+ example: external_id
+ type: string
+ x-enum-varnames:
+ - EXTERNAL_ID
+ 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
+ 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:
@@ -26567,6 +27104,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.
@@ -31589,6 +32154,244 @@ 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:
+ - description: Optional query filter accounts by AWS Account ID
+ 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'
+ summary: List all AWS integrations
+ tags:
+ - AWS Integration
+ x-permission:
+ operator: OR
+ permissions:
+ - aws_configuration_read
+ 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'
+ summary: Create an AWS integration
+ tags:
+ - AWS Integration
+ x-codegen-request-body-name: body
+ x-permission:
+ operator: OR
+ permissions:
+ - aws_configurations_manage
+ 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'
+ summary: Delete an AWS integration
+ tags:
+ - AWS Integration
+ x-permission:
+ operator: OR
+ permissions:
+ - aws_configurations_manage
+ 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'
+ summary: Get an AWS integration by config ID
+ tags:
+ - AWS Integration
+ x-permission:
+ operator: OR
+ permissions:
+ - aws_configuration_read
+ 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/AWSAccountUpdateRequest'
+ 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'
+ summary: Update an AWS integration
+ tags:
+ - AWS Integration
+ x-codegen-request-body-name: body
+ x-permission:
+ operator: OR
+ permissions:
+ - aws_configuration_edit
+ 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/available_namespaces:
+ get:
+ description: Get a list of available AWS CloudWatch namespaces that can send
+ metrics to Datadog.
+ operationId: ListAWSNamespaces
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AWSNamespacesResponse'
+ description: AWS Namespaces List object
+ '403':
+ $ref: '#/components/responses/ForbiddenResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: List available namespaces
+ tags:
+ - AWS Integration
+ x-permission:
+ operator: OR
+ permissions:
+ - aws_configuration_read
+ 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/generate_new_external_id:
+ post:
+ description: Generate a new external ID for AWS role-based authentication.
+ operationId: CreateNewAWSExternalID
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AWSNewExternalIDResponse'
+ description: AWS External ID object
+ '403':
+ $ref: '#/components/responses/ForbiddenResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Generate a new external ID
+ tags:
+ - AWS Integration
+ x-permission:
+ operator: OR
+ permissions:
+ - aws_configuration_edit
+ 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/logs/services:
+ get:
+ description: Get a list of AWS services that can send logs to Datadog.
+ operationId: ListAWSLogsServices
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AWSLogsServicesResponse'
+ description: AWS Logs Services List object
+ '403':
+ $ref: '#/components/responses/ForbiddenResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Get list of AWS log ready services
+ tags:
+ - AWS Logs Integration
+ x-permission:
+ operator: OR
+ permissions:
+ - aws_configuration_read
+ 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
@@ -42857,6 +43660,18 @@ 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: 'Configure your Datadog-AWS-Logs integration directly through Datadog
+ API.
+
+ For more information, see the [AWS integration page](https://docs.datadoghq.com/integrations/amazon_web_services/#log-collection).'
+ externalDocs:
+ url: https://docs.datadoghq.com/integrations/amazon_web_services/#log-collection
+ name: AWS Logs 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/examples/v2/aws-integration/CreateAWSAccount.java b/examples/v2/aws-integration/CreateAWSAccount.java
new file mode 100644
index 00000000000..d7b9892c73b
--- /dev/null
+++ b/examples/v2/aws-integration/CreateAWSAccount.java
@@ -0,0 +1,80 @@
+// Create an AWS integration returns "AWS Account object" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.AwsIntegrationApi;
+import com.datadog.api.client.v2.model.AWSAccountCreateRequest;
+import com.datadog.api.client.v2.model.AWSAccountCreateRequestAttributes;
+import com.datadog.api.client.v2.model.AWSAccountCreateRequestData;
+import com.datadog.api.client.v2.model.AWSAccountPartition;
+import com.datadog.api.client.v2.model.AWSAccountResponse;
+import com.datadog.api.client.v2.model.AWSAccountType;
+import com.datadog.api.client.v2.model.AWSAuthConfig;
+import com.datadog.api.client.v2.model.AWSAuthConfigKeys;
+import com.datadog.api.client.v2.model.AWSLambdaForwarderConfig;
+import com.datadog.api.client.v2.model.AWSLogsConfig;
+import com.datadog.api.client.v2.model.AWSMetricsConfig;
+import com.datadog.api.client.v2.model.AWSNamespaceTagFilter;
+import com.datadog.api.client.v2.model.AWSResourcesConfig;
+import com.datadog.api.client.v2.model.AWSTracesConfig;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.createAWSAccount", true);
+ AwsIntegrationApi apiInstance = new AwsIntegrationApi(defaultClient);
+
+ AWSAccountCreateRequest body =
+ new AWSAccountCreateRequest()
+ .data(
+ new AWSAccountCreateRequestData()
+ .attributes(
+ new AWSAccountCreateRequestAttributes()
+ .accountTags(Collections.singletonList("key:value"))
+ .authConfig(
+ new AWSAuthConfig(
+ new AWSAuthConfigKeys()
+ .accessKeyId("AKIAIOSFODNN7EXAMPLE")
+ .secretAccessKey(
+ "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY")))
+ .awsAccountId("123456789012")
+ .awsPartition(AWSAccountPartition.AWS)
+ .logsConfig(
+ new AWSLogsConfig()
+ .lambdaForwarder(
+ new AWSLambdaForwarderConfig()
+ .lambdas(
+ Collections.singletonList(
+ "arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"))
+ .sources(Collections.singletonList("s3"))))
+ .metricsConfig(
+ new AWSMetricsConfig()
+ .automuteEnabled(true)
+ .collectCloudwatchAlarms(true)
+ .collectCustomMetrics(true)
+ .enabled(true)
+ .tagFilters(
+ Collections.singletonList(
+ new AWSNamespaceTagFilter()
+ .namespace("AWS/EC2")
+ .tags(Collections.singletonList("key:value")))))
+ .resourcesConfig(
+ new AWSResourcesConfig()
+ .cloudSecurityPostureManagementCollection(false)
+ .extendedCollection(false))
+ .tracesConfig(new AWSTracesConfig()))
+ .type(AWSAccountType.ACCOUNT));
+
+ try {
+ AWSAccountResponse result = apiInstance.createAWSAccount(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling AwsIntegrationApi#createAWSAccount");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/aws-integration/CreateAWSAccount_1716720881.java b/examples/v2/aws-integration/CreateAWSAccount_1716720881.java
new file mode 100644
index 00000000000..3c80753aed5
--- /dev/null
+++ b/examples/v2/aws-integration/CreateAWSAccount_1716720881.java
@@ -0,0 +1,77 @@
+// Create an AWS account returns "AWS Account object" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.AwsIntegrationApi;
+import com.datadog.api.client.v2.model.AWSAccountCreateRequest;
+import com.datadog.api.client.v2.model.AWSAccountCreateRequestAttributes;
+import com.datadog.api.client.v2.model.AWSAccountCreateRequestData;
+import com.datadog.api.client.v2.model.AWSAccountPartition;
+import com.datadog.api.client.v2.model.AWSAccountResponse;
+import com.datadog.api.client.v2.model.AWSAccountType;
+import com.datadog.api.client.v2.model.AWSAuthConfig;
+import com.datadog.api.client.v2.model.AWSAuthConfigRole;
+import com.datadog.api.client.v2.model.AWSLambdaForwarderConfig;
+import com.datadog.api.client.v2.model.AWSLogsConfig;
+import com.datadog.api.client.v2.model.AWSMetricsConfig;
+import com.datadog.api.client.v2.model.AWSNamespaceTagFilter;
+import com.datadog.api.client.v2.model.AWSResourcesConfig;
+import com.datadog.api.client.v2.model.AWSTracesConfig;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.createAWSAccount", true);
+ AwsIntegrationApi apiInstance = new AwsIntegrationApi(defaultClient);
+
+ AWSAccountCreateRequest body =
+ new AWSAccountCreateRequest()
+ .data(
+ new AWSAccountCreateRequestData()
+ .attributes(
+ new AWSAccountCreateRequestAttributes()
+ .accountTags(Collections.singletonList("key:value"))
+ .authConfig(
+ new AWSAuthConfig(
+ new AWSAuthConfigRole().roleName("DatadogIntegrationRole")))
+ .awsAccountId("123456789012")
+ .awsPartition(AWSAccountPartition.AWS)
+ .logsConfig(
+ new AWSLogsConfig()
+ .lambdaForwarder(
+ new AWSLambdaForwarderConfig()
+ .lambdas(
+ Collections.singletonList(
+ "arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"))
+ .sources(Collections.singletonList("s3"))))
+ .metricsConfig(
+ new AWSMetricsConfig()
+ .automuteEnabled(true)
+ .collectCloudwatchAlarms(true)
+ .collectCustomMetrics(true)
+ .enabled(true)
+ .tagFilters(
+ Collections.singletonList(
+ new AWSNamespaceTagFilter()
+ .namespace("AWS/EC2")
+ .tags(Collections.singletonList("key:value")))))
+ .resourcesConfig(
+ new AWSResourcesConfig()
+ .cloudSecurityPostureManagementCollection(false)
+ .extendedCollection(false))
+ .tracesConfig(new AWSTracesConfig()))
+ .type(AWSAccountType.ACCOUNT));
+
+ try {
+ AWSAccountResponse result = apiInstance.createAWSAccount(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling AwsIntegrationApi#createAWSAccount");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/aws-integration/CreateNewAWSExternalID.java b/examples/v2/aws-integration/CreateNewAWSExternalID.java
new file mode 100644
index 00000000000..f67211e5ed9
--- /dev/null
+++ b/examples/v2/aws-integration/CreateNewAWSExternalID.java
@@ -0,0 +1,25 @@
+// Generate a new external ID returns "AWS External ID object" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.AwsIntegrationApi;
+import com.datadog.api.client.v2.model.AWSNewExternalIDResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.createNewAWSExternalID", true);
+ AwsIntegrationApi apiInstance = new AwsIntegrationApi(defaultClient);
+
+ try {
+ AWSNewExternalIDResponse result = apiInstance.createNewAWSExternalID();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling AwsIntegrationApi#createNewAWSExternalID");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/aws-integration/CreateNewAWSExternalID_364713854.java b/examples/v2/aws-integration/CreateNewAWSExternalID_364713854.java
new file mode 100644
index 00000000000..975598f3430
--- /dev/null
+++ b/examples/v2/aws-integration/CreateNewAWSExternalID_364713854.java
@@ -0,0 +1,25 @@
+// Generate new external ID returns "AWS External ID object" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.AwsIntegrationApi;
+import com.datadog.api.client.v2.model.AWSNewExternalIDResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.createNewAWSExternalID", true);
+ AwsIntegrationApi apiInstance = new AwsIntegrationApi(defaultClient);
+
+ try {
+ AWSNewExternalIDResponse result = apiInstance.createNewAWSExternalID();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling AwsIntegrationApi#createNewAWSExternalID");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/aws-integration/DeleteAWSAccount.java b/examples/v2/aws-integration/DeleteAWSAccount.java
new file mode 100644
index 00000000000..b2797ab97c3
--- /dev/null
+++ b/examples/v2/aws-integration/DeleteAWSAccount.java
@@ -0,0 +1,26 @@
+// Delete an AWS integration returns "No Content" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.AwsIntegrationApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.deleteAWSAccount", true);
+ AwsIntegrationApi apiInstance = new AwsIntegrationApi(defaultClient);
+
+ // there is a valid "aws_account_v2" in the system
+ String AWS_ACCOUNT_V2_DATA_ID = System.getenv("AWS_ACCOUNT_V2_DATA_ID");
+
+ try {
+ apiInstance.deleteAWSAccount(AWS_ACCOUNT_V2_DATA_ID);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling AwsIntegrationApi#deleteAWSAccount");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/aws-integration/GetAWSAccount.java b/examples/v2/aws-integration/GetAWSAccount.java
new file mode 100644
index 00000000000..bd3fccc67df
--- /dev/null
+++ b/examples/v2/aws-integration/GetAWSAccount.java
@@ -0,0 +1,28 @@
+// Get an AWS integration by config ID returns "AWS Account object" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.AwsIntegrationApi;
+import com.datadog.api.client.v2.model.AWSAccountResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.getAWSAccount", true);
+ AwsIntegrationApi apiInstance = new AwsIntegrationApi(defaultClient);
+
+ // there is a valid "aws_account_v2" in the system
+ String AWS_ACCOUNT_V2_DATA_ID = System.getenv("AWS_ACCOUNT_V2_DATA_ID");
+
+ try {
+ AWSAccountResponse result = apiInstance.getAWSAccount(AWS_ACCOUNT_V2_DATA_ID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling AwsIntegrationApi#getAWSAccount");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/aws-integration/ListAWSAccounts.java b/examples/v2/aws-integration/ListAWSAccounts.java
new file mode 100644
index 00000000000..9e0ef915841
--- /dev/null
+++ b/examples/v2/aws-integration/ListAWSAccounts.java
@@ -0,0 +1,25 @@
+// List all AWS integrations returns "AWS Accounts List object" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.AwsIntegrationApi;
+import com.datadog.api.client.v2.model.AWSAccountsResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.listAWSAccounts", true);
+ AwsIntegrationApi apiInstance = new AwsIntegrationApi(defaultClient);
+
+ try {
+ AWSAccountsResponse result = apiInstance.listAWSAccounts();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling AwsIntegrationApi#listAWSAccounts");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/aws-integration/ListAWSNamespaces.java b/examples/v2/aws-integration/ListAWSNamespaces.java
new file mode 100644
index 00000000000..8c8a84abaa8
--- /dev/null
+++ b/examples/v2/aws-integration/ListAWSNamespaces.java
@@ -0,0 +1,25 @@
+// List available namespaces returns "AWS Namespaces List object" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.AwsIntegrationApi;
+import com.datadog.api.client.v2.model.AWSNamespacesResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.listAWSNamespaces", true);
+ AwsIntegrationApi apiInstance = new AwsIntegrationApi(defaultClient);
+
+ try {
+ AWSNamespacesResponse result = apiInstance.listAWSNamespaces();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling AwsIntegrationApi#listAWSNamespaces");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/aws-integration/ListAWSNamespaces_3031307873.java b/examples/v2/aws-integration/ListAWSNamespaces_3031307873.java
new file mode 100644
index 00000000000..796119cc50d
--- /dev/null
+++ b/examples/v2/aws-integration/ListAWSNamespaces_3031307873.java
@@ -0,0 +1,25 @@
+// List namespaces returns "AWS Namespaces List object" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.AwsIntegrationApi;
+import com.datadog.api.client.v2.model.AWSNamespacesResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.listAWSNamespaces", true);
+ AwsIntegrationApi apiInstance = new AwsIntegrationApi(defaultClient);
+
+ try {
+ AWSNamespacesResponse result = apiInstance.listAWSNamespaces();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling AwsIntegrationApi#listAWSNamespaces");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/aws-integration/UpdateAWSAccount.java b/examples/v2/aws-integration/UpdateAWSAccount.java
new file mode 100644
index 00000000000..8eaa1a87ce5
--- /dev/null
+++ b/examples/v2/aws-integration/UpdateAWSAccount.java
@@ -0,0 +1,80 @@
+// Update an AWS integration returns "AWS Account object" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.AwsIntegrationApi;
+import com.datadog.api.client.v2.model.AWSAccountPartition;
+import com.datadog.api.client.v2.model.AWSAccountResponse;
+import com.datadog.api.client.v2.model.AWSAccountType;
+import com.datadog.api.client.v2.model.AWSAccountUpdateRequest;
+import com.datadog.api.client.v2.model.AWSAccountUpdateRequestAttributes;
+import com.datadog.api.client.v2.model.AWSAccountUpdateRequestData;
+import com.datadog.api.client.v2.model.AWSAuthConfig;
+import com.datadog.api.client.v2.model.AWSAuthConfigRole;
+import com.datadog.api.client.v2.model.AWSLambdaForwarderConfig;
+import com.datadog.api.client.v2.model.AWSLogsConfig;
+import com.datadog.api.client.v2.model.AWSMetricsConfig;
+import com.datadog.api.client.v2.model.AWSNamespaceTagFilter;
+import com.datadog.api.client.v2.model.AWSResourcesConfig;
+import com.datadog.api.client.v2.model.AWSTracesConfig;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.updateAWSAccount", true);
+ AwsIntegrationApi apiInstance = new AwsIntegrationApi(defaultClient);
+
+ // there is a valid "aws_account_v2" in the system
+ String AWS_ACCOUNT_V2_DATA_ID = System.getenv("AWS_ACCOUNT_V2_DATA_ID");
+
+ AWSAccountUpdateRequest body =
+ new AWSAccountUpdateRequest()
+ .data(
+ new AWSAccountUpdateRequestData()
+ .attributes(
+ new AWSAccountUpdateRequestAttributes()
+ .accountTags(Collections.singletonList("key:value"))
+ .authConfig(
+ new AWSAuthConfig(
+ new AWSAuthConfigRole().roleName("DatadogIntegrationRole")))
+ .awsAccountId("123456789012")
+ .awsPartition(AWSAccountPartition.AWS)
+ .logsConfig(
+ new AWSLogsConfig()
+ .lambdaForwarder(
+ new AWSLambdaForwarderConfig()
+ .lambdas(
+ Collections.singletonList(
+ "arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"))
+ .sources(Collections.singletonList("s3"))))
+ .metricsConfig(
+ new AWSMetricsConfig()
+ .automuteEnabled(true)
+ .collectCloudwatchAlarms(true)
+ .collectCustomMetrics(true)
+ .enabled(true)
+ .tagFilters(
+ Collections.singletonList(
+ new AWSNamespaceTagFilter()
+ .namespace("AWS/EC2")
+ .tags(Collections.singletonList("key:value")))))
+ .resourcesConfig(
+ new AWSResourcesConfig()
+ .cloudSecurityPostureManagementCollection(false)
+ .extendedCollection(false))
+ .tracesConfig(new AWSTracesConfig()))
+ .type(AWSAccountType.ACCOUNT));
+
+ try {
+ AWSAccountResponse result = apiInstance.updateAWSAccount(AWS_ACCOUNT_V2_DATA_ID, body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling AwsIntegrationApi#updateAWSAccount");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/aws-logs-integration/ListAWSLogsServices.java b/examples/v2/aws-logs-integration/ListAWSLogsServices.java
new file mode 100644
index 00000000000..4cfbe95e1ec
--- /dev/null
+++ b/examples/v2/aws-logs-integration/ListAWSLogsServices.java
@@ -0,0 +1,25 @@
+// Get list of AWS log ready services returns "AWS Logs Services List object" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.AwsLogsIntegrationApi;
+import com.datadog.api.client.v2.model.AWSLogsServicesResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.listAWSLogsServices", true);
+ AwsLogsIntegrationApi apiInstance = new AwsLogsIntegrationApi(defaultClient);
+
+ try {
+ AWSLogsServicesResponse result = apiInstance.listAWSLogsServices();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling AwsLogsIntegrationApi#listAWSLogsServices");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java
index 146b7d871ea..950c663b0bb 100644
--- a/src/main/java/com/datadog/api/client/ApiClient.java
+++ b/src/main/java/com/datadog/api/client/ApiClient.java
@@ -400,6 +400,14 @@ public class ApiClient {
put("v2.updateIncidentIntegration", false);
put("v2.updateIncidentTodo", false);
put("v2.updateIncidentType", false);
+ put("v2.createAWSAccount", false);
+ put("v2.createNewAWSExternalID", false);
+ put("v2.deleteAWSAccount", false);
+ put("v2.getAWSAccount", false);
+ put("v2.listAWSAccounts", false);
+ put("v2.listAWSNamespaces", false);
+ put("v2.updateAWSAccount", false);
+ put("v2.listAWSLogsServices", false);
put("v2.cancelHistoricalJob", false);
put("v2.convertJobResultToSignal", false);
put("v2.deleteHistoricalJob", false);
diff --git a/src/main/java/com/datadog/api/client/v2/api/AwsIntegrationApi.java b/src/main/java/com/datadog/api/client/v2/api/AwsIntegrationApi.java
new file mode 100644
index 00000000000..0d61867588f
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/api/AwsIntegrationApi.java
@@ -0,0 +1,1134 @@
+package com.datadog.api.client.v2.api;
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.ApiResponse;
+import com.datadog.api.client.Pair;
+import com.datadog.api.client.v2.model.AWSAccountCreateRequest;
+import com.datadog.api.client.v2.model.AWSAccountResponse;
+import com.datadog.api.client.v2.model.AWSAccountUpdateRequest;
+import com.datadog.api.client.v2.model.AWSAccountsResponse;
+import com.datadog.api.client.v2.model.AWSNamespacesResponse;
+import com.datadog.api.client.v2.model.AWSNewExternalIDResponse;
+import jakarta.ws.rs.client.Invocation;
+import jakarta.ws.rs.core.GenericType;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.CompletableFuture;
+
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AwsIntegrationApi {
+ private ApiClient apiClient;
+
+ public AwsIntegrationApi() {
+ this(ApiClient.getDefaultApiClient());
+ }
+
+ public AwsIntegrationApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Get the API client.
+ *
+ * @return API client
+ */
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ /**
+ * Set the API client.
+ *
+ * @param apiClient an instance of API client
+ */
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Create an AWS integration.
+ *
+ *
See {@link #createAWSAccountWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return AWSAccountResponse
+ * @throws ApiException if fails to make API call
+ */
+ public AWSAccountResponse createAWSAccount(AWSAccountCreateRequest body) throws ApiException {
+ return createAWSAccountWithHttpInfo(body).getData();
+ }
+
+ /**
+ * Create an AWS integration.
+ *
+ *
See {@link #createAWSAccountWithHttpInfoAsync}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<AWSAccountResponse>
+ */
+ public CompletableFuture createAWSAccountAsync(AWSAccountCreateRequest body) {
+ return createAWSAccountWithHttpInfoAsync(body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Create a new AWS Account Integration Config.
+ *
+ * @param body (required)
+ * @return ApiResponse<AWSAccountResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * Status Code | Description | Response Headers |
+ * 200 | AWS Account object | - |
+ * 400 | Bad Request | - |
+ * 403 | Forbidden | - |
+ * 409 | Conflict | - |
+ * 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse createAWSAccountWithHttpInfo(AWSAccountCreateRequest body)
+ throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "createAWSAccount";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling createAWSAccount");
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/integration/aws/accounts";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.AwsIntegrationApi.createAWSAccount",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create an AWS integration.
+ *
+ * See {@link #createAWSAccountWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<AWSAccountResponse>>
+ */
+ public CompletableFuture> createAWSAccountWithHttpInfoAsync(
+ AWSAccountCreateRequest body) {
+ // Check if unstable operation is enabled
+ String operationId = "createAWSAccount";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'body' when calling createAWSAccount"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/integration/aws/accounts";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.AwsIntegrationApi.createAWSAccount",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Generate a new external ID.
+ *
+ * See {@link #createNewAWSExternalIDWithHttpInfo}.
+ *
+ * @return AWSNewExternalIDResponse
+ * @throws ApiException if fails to make API call
+ */
+ public AWSNewExternalIDResponse createNewAWSExternalID() throws ApiException {
+ return createNewAWSExternalIDWithHttpInfo().getData();
+ }
+
+ /**
+ * Generate a new external ID.
+ *
+ *
See {@link #createNewAWSExternalIDWithHttpInfoAsync}.
+ *
+ * @return CompletableFuture<AWSNewExternalIDResponse>
+ */
+ public CompletableFuture createNewAWSExternalIDAsync() {
+ return createNewAWSExternalIDWithHttpInfoAsync()
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Generate a new external ID for AWS role-based authentication.
+ *
+ * @return ApiResponse<AWSNewExternalIDResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * Status Code | Description | Response Headers |
+ * 200 | AWS External ID object | - |
+ * 403 | Forbidden | - |
+ * 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse createNewAWSExternalIDWithHttpInfo()
+ throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "createNewAWSExternalID";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = null;
+ // create path and map variables
+ String localVarPath = "/api/v2/integration/aws/generate_new_external_id";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.AwsIntegrationApi.createNewAWSExternalID",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Generate a new external ID.
+ *
+ * See {@link #createNewAWSExternalIDWithHttpInfo}.
+ *
+ * @return CompletableFuture<ApiResponse<AWSNewExternalIDResponse>>
+ */
+ public CompletableFuture>
+ createNewAWSExternalIDWithHttpInfoAsync() {
+ // Check if unstable operation is enabled
+ String operationId = "createNewAWSExternalID";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = null;
+ // create path and map variables
+ String localVarPath = "/api/v2/integration/aws/generate_new_external_id";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.AwsIntegrationApi.createNewAWSExternalID",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Delete an AWS integration.
+ *
+ * See {@link #deleteAWSAccountWithHttpInfo}.
+ *
+ * @param awsAccountConfigId Unique Datadog ID of the AWS Account Integration Config (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteAWSAccount(String awsAccountConfigId) throws ApiException {
+ deleteAWSAccountWithHttpInfo(awsAccountConfigId);
+ }
+
+ /**
+ * Delete an AWS integration.
+ *
+ *
See {@link #deleteAWSAccountWithHttpInfoAsync}.
+ *
+ * @param awsAccountConfigId Unique Datadog ID of the AWS Account Integration Config (required)
+ * @return CompletableFuture
+ */
+ public CompletableFuture deleteAWSAccountAsync(String awsAccountConfigId) {
+ return deleteAWSAccountWithHttpInfoAsync(awsAccountConfigId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Delete an AWS Account Integration Config
+ *
+ * @param awsAccountConfigId Unique Datadog ID of the AWS Account Integration Config (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * Status Code | Description | Response Headers |
+ * 204 | No Content | - |
+ * 400 | Bad Request | - |
+ * 403 | Forbidden | - |
+ * 404 | Not Found | - |
+ * 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse deleteAWSAccountWithHttpInfo(String awsAccountConfigId)
+ throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "deleteAWSAccount";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'awsAccountConfigId' is set
+ if (awsAccountConfigId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'awsAccountConfigId' when calling deleteAWSAccount");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/integration/aws/accounts/{aws_account_config_id}"
+ .replaceAll(
+ "\\{" + "aws_account_config_id" + "\\}",
+ apiClient.escapeString(awsAccountConfigId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.AwsIntegrationApi.deleteAWSAccount",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Delete an AWS integration.
+ *
+ * See {@link #deleteAWSAccountWithHttpInfo}.
+ *
+ * @param awsAccountConfigId Unique Datadog ID of the AWS Account Integration Config (required)
+ * @return CompletableFuture<ApiResponse<Void>>
+ */
+ public CompletableFuture> deleteAWSAccountWithHttpInfoAsync(
+ String awsAccountConfigId) {
+ // Check if unstable operation is enabled
+ String operationId = "deleteAWSAccount";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'awsAccountConfigId' is set
+ if (awsAccountConfigId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'awsAccountConfigId' when calling deleteAWSAccount"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/integration/aws/accounts/{aws_account_config_id}"
+ .replaceAll(
+ "\\{" + "aws_account_config_id" + "\\}",
+ apiClient.escapeString(awsAccountConfigId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.AwsIntegrationApi.deleteAWSAccount",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Get an AWS integration by config ID.
+ *
+ * See {@link #getAWSAccountWithHttpInfo}.
+ *
+ * @param awsAccountConfigId Unique Datadog ID of the AWS Account Integration Config (required)
+ * @return AWSAccountResponse
+ * @throws ApiException if fails to make API call
+ */
+ public AWSAccountResponse getAWSAccount(String awsAccountConfigId) throws ApiException {
+ return getAWSAccountWithHttpInfo(awsAccountConfigId).getData();
+ }
+
+ /**
+ * Get an AWS integration by config ID.
+ *
+ *
See {@link #getAWSAccountWithHttpInfoAsync}.
+ *
+ * @param awsAccountConfigId Unique Datadog ID of the AWS Account Integration Config (required)
+ * @return CompletableFuture<AWSAccountResponse>
+ */
+ public CompletableFuture getAWSAccountAsync(String awsAccountConfigId) {
+ return getAWSAccountWithHttpInfoAsync(awsAccountConfigId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get an AWS Account Integration Config
+ *
+ * @param awsAccountConfigId Unique Datadog ID of the AWS Account Integration Config (required)
+ * @return ApiResponse<AWSAccountResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * Status Code | Description | Response Headers |
+ * 200 | AWS Account object | - |
+ * 400 | Bad Request | - |
+ * 403 | Forbidden | - |
+ * 404 | Not Found | - |
+ * 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse getAWSAccountWithHttpInfo(String awsAccountConfigId)
+ throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "getAWSAccount";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'awsAccountConfigId' is set
+ if (awsAccountConfigId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'awsAccountConfigId' when calling getAWSAccount");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/integration/aws/accounts/{aws_account_config_id}"
+ .replaceAll(
+ "\\{" + "aws_account_config_id" + "\\}",
+ apiClient.escapeString(awsAccountConfigId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.AwsIntegrationApi.getAWSAccount",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get an AWS integration by config ID.
+ *
+ * See {@link #getAWSAccountWithHttpInfo}.
+ *
+ * @param awsAccountConfigId Unique Datadog ID of the AWS Account Integration Config (required)
+ * @return CompletableFuture<ApiResponse<AWSAccountResponse>>
+ */
+ public CompletableFuture> getAWSAccountWithHttpInfoAsync(
+ String awsAccountConfigId) {
+ // Check if unstable operation is enabled
+ String operationId = "getAWSAccount";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'awsAccountConfigId' is set
+ if (awsAccountConfigId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'awsAccountConfigId' when calling getAWSAccount"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/integration/aws/accounts/{aws_account_config_id}"
+ .replaceAll(
+ "\\{" + "aws_account_config_id" + "\\}",
+ apiClient.escapeString(awsAccountConfigId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.AwsIntegrationApi.getAWSAccount",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /** Manage optional parameters to listAWSAccounts. */
+ public static class ListAWSAccountsOptionalParameters {
+ private String awsAccountId;
+
+ /**
+ * Set awsAccountId.
+ *
+ * @param awsAccountId Optional query filter accounts by AWS Account ID (optional)
+ * @return ListAWSAccountsOptionalParameters
+ */
+ public ListAWSAccountsOptionalParameters awsAccountId(String awsAccountId) {
+ this.awsAccountId = awsAccountId;
+ return this;
+ }
+ }
+
+ /**
+ * List all AWS integrations.
+ *
+ * See {@link #listAWSAccountsWithHttpInfo}.
+ *
+ * @return AWSAccountsResponse
+ * @throws ApiException if fails to make API call
+ */
+ public AWSAccountsResponse listAWSAccounts() throws ApiException {
+ return listAWSAccountsWithHttpInfo(new ListAWSAccountsOptionalParameters()).getData();
+ }
+
+ /**
+ * List all AWS integrations.
+ *
+ *
See {@link #listAWSAccountsWithHttpInfoAsync}.
+ *
+ * @return CompletableFuture<AWSAccountsResponse>
+ */
+ public CompletableFuture listAWSAccountsAsync() {
+ return listAWSAccountsWithHttpInfoAsync(new ListAWSAccountsOptionalParameters())
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * List all AWS integrations.
+ *
+ * See {@link #listAWSAccountsWithHttpInfo}.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return AWSAccountsResponse
+ * @throws ApiException if fails to make API call
+ */
+ public AWSAccountsResponse listAWSAccounts(ListAWSAccountsOptionalParameters parameters)
+ throws ApiException {
+ return listAWSAccountsWithHttpInfo(parameters).getData();
+ }
+
+ /**
+ * List all AWS integrations.
+ *
+ *
See {@link #listAWSAccountsWithHttpInfoAsync}.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<AWSAccountsResponse>
+ */
+ public CompletableFuture listAWSAccountsAsync(
+ ListAWSAccountsOptionalParameters parameters) {
+ return listAWSAccountsWithHttpInfoAsync(parameters)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get a list of AWS Account Integration Configs.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return ApiResponse<AWSAccountsResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * Status Code | Description | Response Headers |
+ * 200 | AWS Accounts List object | - |
+ * 403 | Forbidden | - |
+ * 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse listAWSAccountsWithHttpInfo(
+ ListAWSAccountsOptionalParameters parameters) throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "listAWSAccounts";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = null;
+ String awsAccountId = parameters.awsAccountId;
+ // create path and map variables
+ String localVarPath = "/api/v2/integration/aws/accounts";
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "aws_account_id", awsAccountId));
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.AwsIntegrationApi.listAWSAccounts",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * List all AWS integrations.
+ *
+ * See {@link #listAWSAccountsWithHttpInfo}.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<ApiResponse<AWSAccountsResponse>>
+ */
+ public CompletableFuture> listAWSAccountsWithHttpInfoAsync(
+ ListAWSAccountsOptionalParameters parameters) {
+ // Check if unstable operation is enabled
+ String operationId = "listAWSAccounts";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = null;
+ String awsAccountId = parameters.awsAccountId;
+ // create path and map variables
+ String localVarPath = "/api/v2/integration/aws/accounts";
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "aws_account_id", awsAccountId));
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.AwsIntegrationApi.listAWSAccounts",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * List available namespaces.
+ *
+ * See {@link #listAWSNamespacesWithHttpInfo}.
+ *
+ * @return AWSNamespacesResponse
+ * @throws ApiException if fails to make API call
+ */
+ public AWSNamespacesResponse listAWSNamespaces() throws ApiException {
+ return listAWSNamespacesWithHttpInfo().getData();
+ }
+
+ /**
+ * List available namespaces.
+ *
+ *
See {@link #listAWSNamespacesWithHttpInfoAsync}.
+ *
+ * @return CompletableFuture<AWSNamespacesResponse>
+ */
+ public CompletableFuture listAWSNamespacesAsync() {
+ return listAWSNamespacesWithHttpInfoAsync()
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get a list of available AWS CloudWatch namespaces that can send metrics to Datadog.
+ *
+ * @return ApiResponse<AWSNamespacesResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * Status Code | Description | Response Headers |
+ * 200 | AWS Namespaces List object | - |
+ * 403 | Forbidden | - |
+ * 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse listAWSNamespacesWithHttpInfo() throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "listAWSNamespaces";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = null;
+ // create path and map variables
+ String localVarPath = "/api/v2/integration/aws/available_namespaces";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.AwsIntegrationApi.listAWSNamespaces",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * List available namespaces.
+ *
+ * See {@link #listAWSNamespacesWithHttpInfo}.
+ *
+ * @return CompletableFuture<ApiResponse<AWSNamespacesResponse>>
+ */
+ public CompletableFuture>
+ listAWSNamespacesWithHttpInfoAsync() {
+ // Check if unstable operation is enabled
+ String operationId = "listAWSNamespaces";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = null;
+ // create path and map variables
+ String localVarPath = "/api/v2/integration/aws/available_namespaces";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.AwsIntegrationApi.listAWSNamespaces",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Update an AWS integration.
+ *
+ * See {@link #updateAWSAccountWithHttpInfo}.
+ *
+ * @param awsAccountConfigId Unique Datadog ID of the AWS Account Integration Config (required)
+ * @param body (required)
+ * @return AWSAccountResponse
+ * @throws ApiException if fails to make API call
+ */
+ public AWSAccountResponse updateAWSAccount(
+ String awsAccountConfigId, AWSAccountUpdateRequest body) throws ApiException {
+ return updateAWSAccountWithHttpInfo(awsAccountConfigId, body).getData();
+ }
+
+ /**
+ * Update an AWS integration.
+ *
+ *
See {@link #updateAWSAccountWithHttpInfoAsync}.
+ *
+ * @param awsAccountConfigId Unique Datadog ID of the AWS Account Integration Config (required)
+ * @param body (required)
+ * @return CompletableFuture<AWSAccountResponse>
+ */
+ public CompletableFuture updateAWSAccountAsync(
+ String awsAccountConfigId, AWSAccountUpdateRequest body) {
+ return updateAWSAccountWithHttpInfoAsync(awsAccountConfigId, body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Update an AWS Account Integration Config
+ *
+ * @param awsAccountConfigId Unique Datadog ID of the AWS Account Integration Config (required)
+ * @param body (required)
+ * @return ApiResponse<AWSAccountResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * Status Code | Description | Response Headers |
+ * 200 | AWS Account object | - |
+ * 400 | Bad Request | - |
+ * 403 | Forbidden | - |
+ * 404 | Not Found | - |
+ * 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse updateAWSAccountWithHttpInfo(
+ String awsAccountConfigId, AWSAccountUpdateRequest body) throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "updateAWSAccount";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'awsAccountConfigId' is set
+ if (awsAccountConfigId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'awsAccountConfigId' when calling updateAWSAccount");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling updateAWSAccount");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/integration/aws/accounts/{aws_account_config_id}"
+ .replaceAll(
+ "\\{" + "aws_account_config_id" + "\\}",
+ apiClient.escapeString(awsAccountConfigId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.AwsIntegrationApi.updateAWSAccount",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "PATCH",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Update an AWS integration.
+ *
+ * See {@link #updateAWSAccountWithHttpInfo}.
+ *
+ * @param awsAccountConfigId Unique Datadog ID of the AWS Account Integration Config (required)
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<AWSAccountResponse>>
+ */
+ public CompletableFuture> updateAWSAccountWithHttpInfoAsync(
+ String awsAccountConfigId, AWSAccountUpdateRequest body) {
+ // Check if unstable operation is enabled
+ String operationId = "updateAWSAccount";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'awsAccountConfigId' is set
+ if (awsAccountConfigId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'awsAccountConfigId' when calling updateAWSAccount"));
+ return result;
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'body' when calling updateAWSAccount"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/integration/aws/accounts/{aws_account_config_id}"
+ .replaceAll(
+ "\\{" + "aws_account_config_id" + "\\}",
+ apiClient.escapeString(awsAccountConfigId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.AwsIntegrationApi.updateAWSAccount",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "PATCH",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/api/AwsLogsIntegrationApi.java b/src/main/java/com/datadog/api/client/v2/api/AwsLogsIntegrationApi.java
new file mode 100644
index 00000000000..cb66b6bc36d
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/api/AwsLogsIntegrationApi.java
@@ -0,0 +1,173 @@
+package com.datadog.api.client.v2.api;
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.ApiResponse;
+import com.datadog.api.client.Pair;
+import com.datadog.api.client.v2.model.AWSLogsServicesResponse;
+import jakarta.ws.rs.client.Invocation;
+import jakarta.ws.rs.core.GenericType;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.CompletableFuture;
+
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AwsLogsIntegrationApi {
+ private ApiClient apiClient;
+
+ public AwsLogsIntegrationApi() {
+ this(ApiClient.getDefaultApiClient());
+ }
+
+ public AwsLogsIntegrationApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Get the API client.
+ *
+ * @return API client
+ */
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ /**
+ * Set the API client.
+ *
+ * @param apiClient an instance of API client
+ */
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Get list of AWS log ready services.
+ *
+ * See {@link #listAWSLogsServicesWithHttpInfo}.
+ *
+ * @return AWSLogsServicesResponse
+ * @throws ApiException if fails to make API call
+ */
+ public AWSLogsServicesResponse listAWSLogsServices() throws ApiException {
+ return listAWSLogsServicesWithHttpInfo().getData();
+ }
+
+ /**
+ * Get list of AWS log ready services.
+ *
+ *
See {@link #listAWSLogsServicesWithHttpInfoAsync}.
+ *
+ * @return CompletableFuture<AWSLogsServicesResponse>
+ */
+ public CompletableFuture listAWSLogsServicesAsync() {
+ return listAWSLogsServicesWithHttpInfoAsync()
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get a list of AWS services that can send logs to Datadog.
+ *
+ * @return ApiResponse<AWSLogsServicesResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * Status Code | Description | Response Headers |
+ * 200 | AWS Logs Services List object | - |
+ * 403 | Forbidden | - |
+ * 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse listAWSLogsServicesWithHttpInfo()
+ throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "listAWSLogsServices";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = null;
+ // create path and map variables
+ String localVarPath = "/api/v2/integration/aws/logs/services";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.AwsLogsIntegrationApi.listAWSLogsServices",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get list of AWS log ready services.
+ *
+ * See {@link #listAWSLogsServicesWithHttpInfo}.
+ *
+ * @return CompletableFuture<ApiResponse<AWSLogsServicesResponse>>
+ */
+ public CompletableFuture>
+ listAWSLogsServicesWithHttpInfoAsync() {
+ // Check if unstable operation is enabled
+ String operationId = "listAWSLogsServices";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = null;
+ // create path and map variables
+ String localVarPath = "/api/v2/integration/aws/logs/services";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.AwsLogsIntegrationApi.listAWSLogsServices",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSAccountCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/AWSAccountCreateRequest.java
new file mode 100644
index 00000000000..449a09a1561
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AWSAccountCreateRequest.java
@@ -0,0 +1,145 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** AWS Account Create Request body */
+@JsonPropertyOrder({AWSAccountCreateRequest.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AWSAccountCreateRequest {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private AWSAccountCreateRequestData data;
+
+ public AWSAccountCreateRequest() {}
+
+ @JsonCreator
+ public AWSAccountCreateRequest(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA) AWSAccountCreateRequestData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ }
+
+ public AWSAccountCreateRequest data(AWSAccountCreateRequestData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * AWS Account Create Request data
+ *
+ * @return data
+ */
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public AWSAccountCreateRequestData getData() {
+ return data;
+ }
+
+ public void setData(AWSAccountCreateRequestData data) {
+ this.data = data;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return AWSAccountCreateRequest
+ */
+ @JsonAnySetter
+ public AWSAccountCreateRequest putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this AWSAccountCreateRequest object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AWSAccountCreateRequest awsAccountCreateRequest = (AWSAccountCreateRequest) o;
+ return Objects.equals(this.data, awsAccountCreateRequest.data)
+ && Objects.equals(this.additionalProperties, awsAccountCreateRequest.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AWSAccountCreateRequest {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSAccountCreateRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AWSAccountCreateRequestAttributes.java
new file mode 100644
index 00000000000..2c9c13cb858
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AWSAccountCreateRequestAttributes.java
@@ -0,0 +1,413 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import org.openapitools.jackson.nullable.JsonNullable;
+
+/** The AWS Account Integration Config to be created */
+@JsonPropertyOrder({
+ AWSAccountCreateRequestAttributes.JSON_PROPERTY_ACCOUNT_TAGS,
+ AWSAccountCreateRequestAttributes.JSON_PROPERTY_AUTH_CONFIG,
+ AWSAccountCreateRequestAttributes.JSON_PROPERTY_AWS_ACCOUNT_ID,
+ AWSAccountCreateRequestAttributes.JSON_PROPERTY_AWS_PARTITION,
+ AWSAccountCreateRequestAttributes.JSON_PROPERTY_AWS_REGIONS,
+ AWSAccountCreateRequestAttributes.JSON_PROPERTY_LOGS_CONFIG,
+ AWSAccountCreateRequestAttributes.JSON_PROPERTY_METRICS_CONFIG,
+ AWSAccountCreateRequestAttributes.JSON_PROPERTY_RESOURCES_CONFIG,
+ AWSAccountCreateRequestAttributes.JSON_PROPERTY_TRACES_CONFIG
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AWSAccountCreateRequestAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ACCOUNT_TAGS = "account_tags";
+ private JsonNullable> accountTags = JsonNullable.>undefined();
+
+ public static final String JSON_PROPERTY_AUTH_CONFIG = "auth_config";
+ private AWSAuthConfig authConfig;
+
+ public static final String JSON_PROPERTY_AWS_ACCOUNT_ID = "aws_account_id";
+ private String awsAccountId;
+
+ public static final String JSON_PROPERTY_AWS_PARTITION = "aws_partition";
+ private AWSAccountPartition awsPartition = AWSAccountPartition.AWS;
+
+ public static final String JSON_PROPERTY_AWS_REGIONS = "aws_regions";
+ private AWSRegions awsRegions;
+
+ public static final String JSON_PROPERTY_LOGS_CONFIG = "logs_config";
+ private AWSLogsConfig logsConfig;
+
+ public static final String JSON_PROPERTY_METRICS_CONFIG = "metrics_config";
+ private AWSMetricsConfig metricsConfig;
+
+ public static final String JSON_PROPERTY_RESOURCES_CONFIG = "resources_config";
+ private AWSResourcesConfig resourcesConfig;
+
+ public static final String JSON_PROPERTY_TRACES_CONFIG = "traces_config";
+ private AWSTracesConfig tracesConfig;
+
+ public AWSAccountCreateRequestAttributes() {}
+
+ @JsonCreator
+ public AWSAccountCreateRequestAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_AUTH_CONFIG) AWSAuthConfig authConfig,
+ @JsonProperty(required = true, value = JSON_PROPERTY_AWS_ACCOUNT_ID) String awsAccountId,
+ @JsonProperty(required = true, value = JSON_PROPERTY_AWS_PARTITION)
+ AWSAccountPartition awsPartition) {
+ this.authConfig = authConfig;
+ this.unparsed |= authConfig.unparsed;
+ this.awsAccountId = awsAccountId;
+ this.awsPartition = awsPartition;
+ this.unparsed |= !awsPartition.isValid();
+ }
+
+ public AWSAccountCreateRequestAttributes accountTags(List accountTags) {
+ this.accountTags = JsonNullable.>of(accountTags);
+ return this;
+ }
+
+ public AWSAccountCreateRequestAttributes addAccountTagsItem(String accountTagsItem) {
+ if (this.accountTags == null || !this.accountTags.isPresent()) {
+ this.accountTags = JsonNullable.>of(new ArrayList<>());
+ }
+ try {
+ this.accountTags.get().add(accountTagsItem);
+ } catch (java.util.NoSuchElementException e) {
+ // this can never happen, as we make sure above that the value is present
+ }
+ return this;
+ }
+
+ /**
+ * Tags to apply to all metrics in the account
+ *
+ * @return accountTags
+ */
+ @jakarta.annotation.Nullable
+ @JsonIgnore
+ public List getAccountTags() {
+ return accountTags.orElse(null);
+ }
+
+ @JsonProperty(JSON_PROPERTY_ACCOUNT_TAGS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public JsonNullable> getAccountTags_JsonNullable() {
+ return accountTags;
+ }
+
+ @JsonProperty(JSON_PROPERTY_ACCOUNT_TAGS)
+ public void setAccountTags_JsonNullable(JsonNullable> accountTags) {
+ this.accountTags = accountTags;
+ }
+
+ public void setAccountTags(List accountTags) {
+ this.accountTags = JsonNullable.>of(accountTags);
+ }
+
+ public AWSAccountCreateRequestAttributes authConfig(AWSAuthConfig authConfig) {
+ this.authConfig = authConfig;
+ this.unparsed |= authConfig.unparsed;
+ return this;
+ }
+
+ /**
+ * AWS Authentication config
+ *
+ * @return authConfig
+ */
+ @JsonProperty(JSON_PROPERTY_AUTH_CONFIG)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public AWSAuthConfig getAuthConfig() {
+ return authConfig;
+ }
+
+ public void setAuthConfig(AWSAuthConfig authConfig) {
+ this.authConfig = authConfig;
+ }
+
+ public AWSAccountCreateRequestAttributes awsAccountId(String awsAccountId) {
+ this.awsAccountId = awsAccountId;
+ return this;
+ }
+
+ /**
+ * AWS Account ID
+ *
+ * @return awsAccountId
+ */
+ @JsonProperty(JSON_PROPERTY_AWS_ACCOUNT_ID)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getAwsAccountId() {
+ return awsAccountId;
+ }
+
+ public void setAwsAccountId(String awsAccountId) {
+ this.awsAccountId = awsAccountId;
+ }
+
+ public AWSAccountCreateRequestAttributes awsPartition(AWSAccountPartition awsPartition) {
+ this.awsPartition = awsPartition;
+ this.unparsed |= !awsPartition.isValid();
+ return this;
+ }
+
+ /**
+ * AWS Account partition
+ *
+ * @return awsPartition
+ */
+ @JsonProperty(JSON_PROPERTY_AWS_PARTITION)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public AWSAccountPartition getAwsPartition() {
+ return awsPartition;
+ }
+
+ public void setAwsPartition(AWSAccountPartition awsPartition) {
+ if (!awsPartition.isValid()) {
+ this.unparsed = true;
+ }
+ this.awsPartition = awsPartition;
+ }
+
+ public AWSAccountCreateRequestAttributes awsRegions(AWSRegions awsRegions) {
+ this.awsRegions = awsRegions;
+ this.unparsed |= awsRegions.unparsed;
+ return this;
+ }
+
+ /**
+ * AWS Regions to collect data from
+ *
+ * @return awsRegions
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_AWS_REGIONS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AWSRegions getAwsRegions() {
+ return awsRegions;
+ }
+
+ public void setAwsRegions(AWSRegions awsRegions) {
+ this.awsRegions = awsRegions;
+ }
+
+ public AWSAccountCreateRequestAttributes logsConfig(AWSLogsConfig logsConfig) {
+ this.logsConfig = logsConfig;
+ this.unparsed |= logsConfig.unparsed;
+ return this;
+ }
+
+ /**
+ * AWS Logs config
+ *
+ * @return logsConfig
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_LOGS_CONFIG)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AWSLogsConfig getLogsConfig() {
+ return logsConfig;
+ }
+
+ public void setLogsConfig(AWSLogsConfig logsConfig) {
+ this.logsConfig = logsConfig;
+ }
+
+ public AWSAccountCreateRequestAttributes metricsConfig(AWSMetricsConfig metricsConfig) {
+ this.metricsConfig = metricsConfig;
+ this.unparsed |= metricsConfig.unparsed;
+ return this;
+ }
+
+ /**
+ * AWS Metrics config
+ *
+ * @return metricsConfig
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_METRICS_CONFIG)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AWSMetricsConfig getMetricsConfig() {
+ return metricsConfig;
+ }
+
+ public void setMetricsConfig(AWSMetricsConfig metricsConfig) {
+ this.metricsConfig = metricsConfig;
+ }
+
+ public AWSAccountCreateRequestAttributes resourcesConfig(AWSResourcesConfig resourcesConfig) {
+ this.resourcesConfig = resourcesConfig;
+ this.unparsed |= resourcesConfig.unparsed;
+ return this;
+ }
+
+ /**
+ * AWS Resources config
+ *
+ * @return resourcesConfig
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_RESOURCES_CONFIG)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AWSResourcesConfig getResourcesConfig() {
+ return resourcesConfig;
+ }
+
+ public void setResourcesConfig(AWSResourcesConfig resourcesConfig) {
+ this.resourcesConfig = resourcesConfig;
+ }
+
+ public AWSAccountCreateRequestAttributes tracesConfig(AWSTracesConfig tracesConfig) {
+ this.tracesConfig = tracesConfig;
+ this.unparsed |= tracesConfig.unparsed;
+ return this;
+ }
+
+ /**
+ * AWS Traces config
+ *
+ * @return tracesConfig
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_TRACES_CONFIG)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AWSTracesConfig getTracesConfig() {
+ return tracesConfig;
+ }
+
+ public void setTracesConfig(AWSTracesConfig tracesConfig) {
+ this.tracesConfig = tracesConfig;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return AWSAccountCreateRequestAttributes
+ */
+ @JsonAnySetter
+ public AWSAccountCreateRequestAttributes putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this AWSAccountCreateRequestAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AWSAccountCreateRequestAttributes awsAccountCreateRequestAttributes =
+ (AWSAccountCreateRequestAttributes) o;
+ return Objects.equals(this.accountTags, awsAccountCreateRequestAttributes.accountTags)
+ && Objects.equals(this.authConfig, awsAccountCreateRequestAttributes.authConfig)
+ && Objects.equals(this.awsAccountId, awsAccountCreateRequestAttributes.awsAccountId)
+ && Objects.equals(this.awsPartition, awsAccountCreateRequestAttributes.awsPartition)
+ && Objects.equals(this.awsRegions, awsAccountCreateRequestAttributes.awsRegions)
+ && Objects.equals(this.logsConfig, awsAccountCreateRequestAttributes.logsConfig)
+ && Objects.equals(this.metricsConfig, awsAccountCreateRequestAttributes.metricsConfig)
+ && Objects.equals(this.resourcesConfig, awsAccountCreateRequestAttributes.resourcesConfig)
+ && Objects.equals(this.tracesConfig, awsAccountCreateRequestAttributes.tracesConfig)
+ && Objects.equals(
+ this.additionalProperties, awsAccountCreateRequestAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ accountTags,
+ authConfig,
+ awsAccountId,
+ awsPartition,
+ awsRegions,
+ logsConfig,
+ metricsConfig,
+ resourcesConfig,
+ tracesConfig,
+ additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AWSAccountCreateRequestAttributes {\n");
+ sb.append(" accountTags: ").append(toIndentedString(accountTags)).append("\n");
+ sb.append(" authConfig: ").append(toIndentedString(authConfig)).append("\n");
+ sb.append(" awsAccountId: ").append(toIndentedString(awsAccountId)).append("\n");
+ sb.append(" awsPartition: ").append(toIndentedString(awsPartition)).append("\n");
+ sb.append(" awsRegions: ").append(toIndentedString(awsRegions)).append("\n");
+ sb.append(" logsConfig: ").append(toIndentedString(logsConfig)).append("\n");
+ sb.append(" metricsConfig: ").append(toIndentedString(metricsConfig)).append("\n");
+ sb.append(" resourcesConfig: ").append(toIndentedString(resourcesConfig)).append("\n");
+ sb.append(" tracesConfig: ").append(toIndentedString(tracesConfig)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSAccountCreateRequestData.java b/src/main/java/com/datadog/api/client/v2/model/AWSAccountCreateRequestData.java
new file mode 100644
index 00000000000..8dac7679846
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AWSAccountCreateRequestData.java
@@ -0,0 +1,182 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** AWS Account Create Request data */
+@JsonPropertyOrder({
+ AWSAccountCreateRequestData.JSON_PROPERTY_ATTRIBUTES,
+ AWSAccountCreateRequestData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AWSAccountCreateRequestData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private AWSAccountCreateRequestAttributes attributes;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private AWSAccountType type = AWSAccountType.ACCOUNT;
+
+ public AWSAccountCreateRequestData() {}
+
+ @JsonCreator
+ public AWSAccountCreateRequestData(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
+ AWSAccountCreateRequestAttributes attributes,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AWSAccountType type) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public AWSAccountCreateRequestData attributes(AWSAccountCreateRequestAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * The AWS Account Integration Config to be created
+ *
+ * @return attributes
+ */
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public AWSAccountCreateRequestAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(AWSAccountCreateRequestAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public AWSAccountCreateRequestData type(AWSAccountType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * AWS Account resource type.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public AWSAccountType getType() {
+ return type;
+ }
+
+ public void setType(AWSAccountType type) {
+ if (!type.isValid()) {
+ this.unparsed = true;
+ }
+ this.type = type;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return AWSAccountCreateRequestData
+ */
+ @JsonAnySetter
+ public AWSAccountCreateRequestData putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this AWSAccountCreateRequestData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AWSAccountCreateRequestData awsAccountCreateRequestData = (AWSAccountCreateRequestData) o;
+ return Objects.equals(this.attributes, awsAccountCreateRequestData.attributes)
+ && Objects.equals(this.type, awsAccountCreateRequestData.type)
+ && Objects.equals(
+ this.additionalProperties, awsAccountCreateRequestData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AWSAccountCreateRequestData {\n");
+ sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSAccountPartition.java b/src/main/java/com/datadog/api/client/v2/model/AWSAccountPartition.java
new file mode 100644
index 00000000000..5b6d72225ec
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AWSAccountPartition.java
@@ -0,0 +1,57 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.datadog.api.client.ModelEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/** AWS Account partition */
+@JsonSerialize(using = AWSAccountPartition.AWSAccountPartitionSerializer.class)
+public class AWSAccountPartition extends ModelEnum {
+
+ private static final Set allowedValues =
+ new HashSet(Arrays.asList("aws", "aws-cn", "aws-us-gov"));
+
+ public static final AWSAccountPartition AWS = new AWSAccountPartition("aws");
+ public static final AWSAccountPartition AWS_CN = new AWSAccountPartition("aws-cn");
+ public static final AWSAccountPartition AWS_US_GOV = new AWSAccountPartition("aws-us-gov");
+
+ AWSAccountPartition(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class AWSAccountPartitionSerializer extends StdSerializer {
+ public AWSAccountPartitionSerializer(Class t) {
+ super(t);
+ }
+
+ public AWSAccountPartitionSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ AWSAccountPartition value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static AWSAccountPartition fromValue(String value) {
+ return new AWSAccountPartition(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSAccountResponse.java b/src/main/java/com/datadog/api/client/v2/model/AWSAccountResponse.java
new file mode 100644
index 00000000000..f71be990c6f
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AWSAccountResponse.java
@@ -0,0 +1,145 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** AWS Account response body */
+@JsonPropertyOrder({AWSAccountResponse.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AWSAccountResponse {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private AWSAccountResponseData data;
+
+ public AWSAccountResponse() {}
+
+ @JsonCreator
+ public AWSAccountResponse(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA) AWSAccountResponseData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ }
+
+ public AWSAccountResponse data(AWSAccountResponseData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * AWS Account Response body
+ *
+ * @return data
+ */
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public AWSAccountResponseData getData() {
+ return data;
+ }
+
+ public void setData(AWSAccountResponseData data) {
+ this.data = data;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return AWSAccountResponse
+ */
+ @JsonAnySetter
+ public AWSAccountResponse putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this AWSAccountResponse object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AWSAccountResponse awsAccountResponse = (AWSAccountResponse) o;
+ return Objects.equals(this.data, awsAccountResponse.data)
+ && Objects.equals(this.additionalProperties, awsAccountResponse.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AWSAccountResponse {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSAccountResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AWSAccountResponseAttributes.java
new file mode 100644
index 00000000000..2f300f693c0
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AWSAccountResponseAttributes.java
@@ -0,0 +1,446 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.time.OffsetDateTime;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import org.openapitools.jackson.nullable.JsonNullable;
+
+/** The AWS Account Integration Config */
+@JsonPropertyOrder({
+ AWSAccountResponseAttributes.JSON_PROPERTY_ACCOUNT_TAGS,
+ AWSAccountResponseAttributes.JSON_PROPERTY_AUTH_CONFIG,
+ AWSAccountResponseAttributes.JSON_PROPERTY_AWS_ACCOUNT_ID,
+ AWSAccountResponseAttributes.JSON_PROPERTY_AWS_PARTITION,
+ AWSAccountResponseAttributes.JSON_PROPERTY_AWS_REGIONS,
+ AWSAccountResponseAttributes.JSON_PROPERTY_CREATED_AT,
+ AWSAccountResponseAttributes.JSON_PROPERTY_LOGS_CONFIG,
+ AWSAccountResponseAttributes.JSON_PROPERTY_METRICS_CONFIG,
+ AWSAccountResponseAttributes.JSON_PROPERTY_MODIFIED_AT,
+ AWSAccountResponseAttributes.JSON_PROPERTY_RESOURCES_CONFIG,
+ AWSAccountResponseAttributes.JSON_PROPERTY_TRACES_CONFIG
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AWSAccountResponseAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ACCOUNT_TAGS = "account_tags";
+ private JsonNullable> accountTags = JsonNullable.>undefined();
+
+ public static final String JSON_PROPERTY_AUTH_CONFIG = "auth_config";
+ private AWSAuthConfig authConfig;
+
+ public static final String JSON_PROPERTY_AWS_ACCOUNT_ID = "aws_account_id";
+ private String awsAccountId;
+
+ public static final String JSON_PROPERTY_AWS_PARTITION = "aws_partition";
+ private AWSAccountPartition awsPartition = AWSAccountPartition.AWS;
+
+ public static final String JSON_PROPERTY_AWS_REGIONS = "aws_regions";
+ private AWSRegions awsRegions;
+
+ public static final String JSON_PROPERTY_CREATED_AT = "created_at";
+ private OffsetDateTime createdAt;
+
+ public static final String JSON_PROPERTY_LOGS_CONFIG = "logs_config";
+ private AWSLogsConfig logsConfig;
+
+ public static final String JSON_PROPERTY_METRICS_CONFIG = "metrics_config";
+ private AWSMetricsConfig metricsConfig;
+
+ public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at";
+ private OffsetDateTime modifiedAt;
+
+ public static final String JSON_PROPERTY_RESOURCES_CONFIG = "resources_config";
+ private AWSResourcesConfig resourcesConfig;
+
+ public static final String JSON_PROPERTY_TRACES_CONFIG = "traces_config";
+ private AWSTracesConfig tracesConfig;
+
+ public AWSAccountResponseAttributes() {}
+
+ @JsonCreator
+ public AWSAccountResponseAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_AWS_ACCOUNT_ID) String awsAccountId) {
+ this.awsAccountId = awsAccountId;
+ }
+
+ public AWSAccountResponseAttributes accountTags(List accountTags) {
+ this.accountTags = JsonNullable.>of(accountTags);
+ return this;
+ }
+
+ public AWSAccountResponseAttributes addAccountTagsItem(String accountTagsItem) {
+ if (this.accountTags == null || !this.accountTags.isPresent()) {
+ this.accountTags = JsonNullable.>of(new ArrayList<>());
+ }
+ try {
+ this.accountTags.get().add(accountTagsItem);
+ } catch (java.util.NoSuchElementException e) {
+ // this can never happen, as we make sure above that the value is present
+ }
+ return this;
+ }
+
+ /**
+ * Tags to apply to all metrics in the account
+ *
+ * @return accountTags
+ */
+ @jakarta.annotation.Nullable
+ @JsonIgnore
+ public List getAccountTags() {
+ return accountTags.orElse(null);
+ }
+
+ @JsonProperty(JSON_PROPERTY_ACCOUNT_TAGS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public JsonNullable> getAccountTags_JsonNullable() {
+ return accountTags;
+ }
+
+ @JsonProperty(JSON_PROPERTY_ACCOUNT_TAGS)
+ public void setAccountTags_JsonNullable(JsonNullable> accountTags) {
+ this.accountTags = accountTags;
+ }
+
+ public void setAccountTags(List accountTags) {
+ this.accountTags = JsonNullable.>of(accountTags);
+ }
+
+ public AWSAccountResponseAttributes authConfig(AWSAuthConfig authConfig) {
+ this.authConfig = authConfig;
+ this.unparsed |= authConfig.unparsed;
+ return this;
+ }
+
+ /**
+ * AWS Authentication config
+ *
+ * @return authConfig
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_AUTH_CONFIG)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AWSAuthConfig getAuthConfig() {
+ return authConfig;
+ }
+
+ public void setAuthConfig(AWSAuthConfig authConfig) {
+ this.authConfig = authConfig;
+ }
+
+ public AWSAccountResponseAttributes awsAccountId(String awsAccountId) {
+ this.awsAccountId = awsAccountId;
+ return this;
+ }
+
+ /**
+ * AWS Account ID
+ *
+ * @return awsAccountId
+ */
+ @JsonProperty(JSON_PROPERTY_AWS_ACCOUNT_ID)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getAwsAccountId() {
+ return awsAccountId;
+ }
+
+ public void setAwsAccountId(String awsAccountId) {
+ this.awsAccountId = awsAccountId;
+ }
+
+ public AWSAccountResponseAttributes awsPartition(AWSAccountPartition awsPartition) {
+ this.awsPartition = awsPartition;
+ this.unparsed |= !awsPartition.isValid();
+ return this;
+ }
+
+ /**
+ * AWS Account partition
+ *
+ * @return awsPartition
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_AWS_PARTITION)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AWSAccountPartition getAwsPartition() {
+ return awsPartition;
+ }
+
+ public void setAwsPartition(AWSAccountPartition awsPartition) {
+ if (!awsPartition.isValid()) {
+ this.unparsed = true;
+ }
+ this.awsPartition = awsPartition;
+ }
+
+ public AWSAccountResponseAttributes awsRegions(AWSRegions awsRegions) {
+ this.awsRegions = awsRegions;
+ this.unparsed |= awsRegions.unparsed;
+ return this;
+ }
+
+ /**
+ * AWS Regions to collect data from
+ *
+ * @return awsRegions
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_AWS_REGIONS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AWSRegions getAwsRegions() {
+ return awsRegions;
+ }
+
+ public void setAwsRegions(AWSRegions awsRegions) {
+ this.awsRegions = awsRegions;
+ }
+
+ /**
+ * Timestamp of when the account integration was created
+ *
+ * @return createdAt
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_CREATED_AT)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public OffsetDateTime getCreatedAt() {
+ return createdAt;
+ }
+
+ public AWSAccountResponseAttributes logsConfig(AWSLogsConfig logsConfig) {
+ this.logsConfig = logsConfig;
+ this.unparsed |= logsConfig.unparsed;
+ return this;
+ }
+
+ /**
+ * AWS Logs config
+ *
+ * @return logsConfig
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_LOGS_CONFIG)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AWSLogsConfig getLogsConfig() {
+ return logsConfig;
+ }
+
+ public void setLogsConfig(AWSLogsConfig logsConfig) {
+ this.logsConfig = logsConfig;
+ }
+
+ public AWSAccountResponseAttributes metricsConfig(AWSMetricsConfig metricsConfig) {
+ this.metricsConfig = metricsConfig;
+ this.unparsed |= metricsConfig.unparsed;
+ return this;
+ }
+
+ /**
+ * AWS Metrics config
+ *
+ * @return metricsConfig
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_METRICS_CONFIG)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AWSMetricsConfig getMetricsConfig() {
+ return metricsConfig;
+ }
+
+ public void setMetricsConfig(AWSMetricsConfig metricsConfig) {
+ this.metricsConfig = metricsConfig;
+ }
+
+ /**
+ * Timestamp of when the account integration was updated
+ *
+ * @return modifiedAt
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_MODIFIED_AT)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public OffsetDateTime getModifiedAt() {
+ return modifiedAt;
+ }
+
+ public AWSAccountResponseAttributes resourcesConfig(AWSResourcesConfig resourcesConfig) {
+ this.resourcesConfig = resourcesConfig;
+ this.unparsed |= resourcesConfig.unparsed;
+ return this;
+ }
+
+ /**
+ * AWS Resources config
+ *
+ * @return resourcesConfig
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_RESOURCES_CONFIG)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AWSResourcesConfig getResourcesConfig() {
+ return resourcesConfig;
+ }
+
+ public void setResourcesConfig(AWSResourcesConfig resourcesConfig) {
+ this.resourcesConfig = resourcesConfig;
+ }
+
+ public AWSAccountResponseAttributes tracesConfig(AWSTracesConfig tracesConfig) {
+ this.tracesConfig = tracesConfig;
+ this.unparsed |= tracesConfig.unparsed;
+ return this;
+ }
+
+ /**
+ * AWS Traces config
+ *
+ * @return tracesConfig
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_TRACES_CONFIG)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AWSTracesConfig getTracesConfig() {
+ return tracesConfig;
+ }
+
+ public void setTracesConfig(AWSTracesConfig tracesConfig) {
+ this.tracesConfig = tracesConfig;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return AWSAccountResponseAttributes
+ */
+ @JsonAnySetter
+ public AWSAccountResponseAttributes putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this AWSAccountResponseAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AWSAccountResponseAttributes awsAccountResponseAttributes = (AWSAccountResponseAttributes) o;
+ return Objects.equals(this.accountTags, awsAccountResponseAttributes.accountTags)
+ && Objects.equals(this.authConfig, awsAccountResponseAttributes.authConfig)
+ && Objects.equals(this.awsAccountId, awsAccountResponseAttributes.awsAccountId)
+ && Objects.equals(this.awsPartition, awsAccountResponseAttributes.awsPartition)
+ && Objects.equals(this.awsRegions, awsAccountResponseAttributes.awsRegions)
+ && Objects.equals(this.createdAt, awsAccountResponseAttributes.createdAt)
+ && Objects.equals(this.logsConfig, awsAccountResponseAttributes.logsConfig)
+ && Objects.equals(this.metricsConfig, awsAccountResponseAttributes.metricsConfig)
+ && Objects.equals(this.modifiedAt, awsAccountResponseAttributes.modifiedAt)
+ && Objects.equals(this.resourcesConfig, awsAccountResponseAttributes.resourcesConfig)
+ && Objects.equals(this.tracesConfig, awsAccountResponseAttributes.tracesConfig)
+ && Objects.equals(
+ this.additionalProperties, awsAccountResponseAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ accountTags,
+ authConfig,
+ awsAccountId,
+ awsPartition,
+ awsRegions,
+ createdAt,
+ logsConfig,
+ metricsConfig,
+ modifiedAt,
+ resourcesConfig,
+ tracesConfig,
+ additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AWSAccountResponseAttributes {\n");
+ sb.append(" accountTags: ").append(toIndentedString(accountTags)).append("\n");
+ sb.append(" authConfig: ").append(toIndentedString(authConfig)).append("\n");
+ sb.append(" awsAccountId: ").append(toIndentedString(awsAccountId)).append("\n");
+ sb.append(" awsPartition: ").append(toIndentedString(awsPartition)).append("\n");
+ sb.append(" awsRegions: ").append(toIndentedString(awsRegions)).append("\n");
+ sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
+ sb.append(" logsConfig: ").append(toIndentedString(logsConfig)).append("\n");
+ sb.append(" metricsConfig: ").append(toIndentedString(metricsConfig)).append("\n");
+ sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n");
+ sb.append(" resourcesConfig: ").append(toIndentedString(resourcesConfig)).append("\n");
+ sb.append(" tracesConfig: ").append(toIndentedString(tracesConfig)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSAccountResponseData.java b/src/main/java/com/datadog/api/client/v2/model/AWSAccountResponseData.java
new file mode 100644
index 00000000000..4776751e299
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AWSAccountResponseData.java
@@ -0,0 +1,206 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** AWS Account Response body */
+@JsonPropertyOrder({
+ AWSAccountResponseData.JSON_PROPERTY_ATTRIBUTES,
+ AWSAccountResponseData.JSON_PROPERTY_ID,
+ AWSAccountResponseData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AWSAccountResponseData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private AWSAccountResponseAttributes attributes;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private AWSAccountType type = AWSAccountType.ACCOUNT;
+
+ public AWSAccountResponseData() {}
+
+ @JsonCreator
+ public AWSAccountResponseData(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AWSAccountType type) {
+ this.id = id;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public AWSAccountResponseData attributes(AWSAccountResponseAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * The AWS Account Integration Config
+ *
+ * @return attributes
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AWSAccountResponseAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(AWSAccountResponseAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public AWSAccountResponseData id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Unique Datadog ID of the AWS Account Integration Config
+ *
+ * @return id
+ */
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public AWSAccountResponseData type(AWSAccountType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * AWS Account resource type.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public AWSAccountType getType() {
+ return type;
+ }
+
+ public void setType(AWSAccountType type) {
+ if (!type.isValid()) {
+ this.unparsed = true;
+ }
+ this.type = type;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return AWSAccountResponseData
+ */
+ @JsonAnySetter
+ public AWSAccountResponseData putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this AWSAccountResponseData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AWSAccountResponseData awsAccountResponseData = (AWSAccountResponseData) o;
+ return Objects.equals(this.attributes, awsAccountResponseData.attributes)
+ && Objects.equals(this.id, awsAccountResponseData.id)
+ && Objects.equals(this.type, awsAccountResponseData.type)
+ && Objects.equals(this.additionalProperties, awsAccountResponseData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, id, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AWSAccountResponseData {\n");
+ sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSAccountType.java b/src/main/java/com/datadog/api/client/v2/model/AWSAccountType.java
new file mode 100644
index 00000000000..d74f4981559
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AWSAccountType.java
@@ -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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.datadog.api.client.ModelEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/** AWS Account resource type. */
+@JsonSerialize(using = AWSAccountType.AWSAccountTypeSerializer.class)
+public class AWSAccountType extends ModelEnum {
+
+ private static final Set allowedValues = new HashSet(Arrays.asList("account"));
+
+ public static final AWSAccountType ACCOUNT = new AWSAccountType("account");
+
+ AWSAccountType(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class AWSAccountTypeSerializer extends StdSerializer {
+ public AWSAccountTypeSerializer(Class t) {
+ super(t);
+ }
+
+ public AWSAccountTypeSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(AWSAccountType value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static AWSAccountType fromValue(String value) {
+ return new AWSAccountType(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSAccountUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/AWSAccountUpdateRequest.java
new file mode 100644
index 00000000000..958c125e44c
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AWSAccountUpdateRequest.java
@@ -0,0 +1,145 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** AWS Account Update Request body */
+@JsonPropertyOrder({AWSAccountUpdateRequest.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AWSAccountUpdateRequest {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private AWSAccountUpdateRequestData data;
+
+ public AWSAccountUpdateRequest() {}
+
+ @JsonCreator
+ public AWSAccountUpdateRequest(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA) AWSAccountUpdateRequestData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ }
+
+ public AWSAccountUpdateRequest data(AWSAccountUpdateRequestData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * AWS Account Update Request data
+ *
+ * @return data
+ */
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public AWSAccountUpdateRequestData getData() {
+ return data;
+ }
+
+ public void setData(AWSAccountUpdateRequestData data) {
+ this.data = data;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return AWSAccountUpdateRequest
+ */
+ @JsonAnySetter
+ public AWSAccountUpdateRequest putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this AWSAccountUpdateRequest object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AWSAccountUpdateRequest awsAccountUpdateRequest = (AWSAccountUpdateRequest) o;
+ return Objects.equals(this.data, awsAccountUpdateRequest.data)
+ && Objects.equals(this.additionalProperties, awsAccountUpdateRequest.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AWSAccountUpdateRequest {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSAccountUpdateRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AWSAccountUpdateRequestAttributes.java
new file mode 100644
index 00000000000..9b7f6b0c670
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AWSAccountUpdateRequestAttributes.java
@@ -0,0 +1,408 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import org.openapitools.jackson.nullable.JsonNullable;
+
+/** The AWS Account Integration Config to be updated */
+@JsonPropertyOrder({
+ AWSAccountUpdateRequestAttributes.JSON_PROPERTY_ACCOUNT_TAGS,
+ AWSAccountUpdateRequestAttributes.JSON_PROPERTY_AUTH_CONFIG,
+ AWSAccountUpdateRequestAttributes.JSON_PROPERTY_AWS_ACCOUNT_ID,
+ AWSAccountUpdateRequestAttributes.JSON_PROPERTY_AWS_PARTITION,
+ AWSAccountUpdateRequestAttributes.JSON_PROPERTY_AWS_REGIONS,
+ AWSAccountUpdateRequestAttributes.JSON_PROPERTY_LOGS_CONFIG,
+ AWSAccountUpdateRequestAttributes.JSON_PROPERTY_METRICS_CONFIG,
+ AWSAccountUpdateRequestAttributes.JSON_PROPERTY_RESOURCES_CONFIG,
+ AWSAccountUpdateRequestAttributes.JSON_PROPERTY_TRACES_CONFIG
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AWSAccountUpdateRequestAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ACCOUNT_TAGS = "account_tags";
+ private JsonNullable> accountTags = JsonNullable.>undefined();
+
+ public static final String JSON_PROPERTY_AUTH_CONFIG = "auth_config";
+ private AWSAuthConfig authConfig;
+
+ public static final String JSON_PROPERTY_AWS_ACCOUNT_ID = "aws_account_id";
+ private String awsAccountId;
+
+ public static final String JSON_PROPERTY_AWS_PARTITION = "aws_partition";
+ private AWSAccountPartition awsPartition = AWSAccountPartition.AWS;
+
+ public static final String JSON_PROPERTY_AWS_REGIONS = "aws_regions";
+ private AWSRegions awsRegions;
+
+ public static final String JSON_PROPERTY_LOGS_CONFIG = "logs_config";
+ private AWSLogsConfig logsConfig;
+
+ public static final String JSON_PROPERTY_METRICS_CONFIG = "metrics_config";
+ private AWSMetricsConfig metricsConfig;
+
+ public static final String JSON_PROPERTY_RESOURCES_CONFIG = "resources_config";
+ private AWSResourcesConfig resourcesConfig;
+
+ public static final String JSON_PROPERTY_TRACES_CONFIG = "traces_config";
+ private AWSTracesConfig tracesConfig;
+
+ public AWSAccountUpdateRequestAttributes() {}
+
+ @JsonCreator
+ public AWSAccountUpdateRequestAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_AWS_ACCOUNT_ID) String awsAccountId) {
+ this.awsAccountId = awsAccountId;
+ }
+
+ public AWSAccountUpdateRequestAttributes accountTags(List accountTags) {
+ this.accountTags = JsonNullable.>of(accountTags);
+ return this;
+ }
+
+ public AWSAccountUpdateRequestAttributes addAccountTagsItem(String accountTagsItem) {
+ if (this.accountTags == null || !this.accountTags.isPresent()) {
+ this.accountTags = JsonNullable.>of(new ArrayList<>());
+ }
+ try {
+ this.accountTags.get().add(accountTagsItem);
+ } catch (java.util.NoSuchElementException e) {
+ // this can never happen, as we make sure above that the value is present
+ }
+ return this;
+ }
+
+ /**
+ * Tags to apply to all metrics in the account
+ *
+ * @return accountTags
+ */
+ @jakarta.annotation.Nullable
+ @JsonIgnore
+ public List getAccountTags() {
+ return accountTags.orElse(null);
+ }
+
+ @JsonProperty(JSON_PROPERTY_ACCOUNT_TAGS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public JsonNullable> getAccountTags_JsonNullable() {
+ return accountTags;
+ }
+
+ @JsonProperty(JSON_PROPERTY_ACCOUNT_TAGS)
+ public void setAccountTags_JsonNullable(JsonNullable> accountTags) {
+ this.accountTags = accountTags;
+ }
+
+ public void setAccountTags(List accountTags) {
+ this.accountTags = JsonNullable.>of(accountTags);
+ }
+
+ public AWSAccountUpdateRequestAttributes authConfig(AWSAuthConfig authConfig) {
+ this.authConfig = authConfig;
+ this.unparsed |= authConfig.unparsed;
+ return this;
+ }
+
+ /**
+ * AWS Authentication config
+ *
+ * @return authConfig
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_AUTH_CONFIG)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AWSAuthConfig getAuthConfig() {
+ return authConfig;
+ }
+
+ public void setAuthConfig(AWSAuthConfig authConfig) {
+ this.authConfig = authConfig;
+ }
+
+ public AWSAccountUpdateRequestAttributes awsAccountId(String awsAccountId) {
+ this.awsAccountId = awsAccountId;
+ return this;
+ }
+
+ /**
+ * AWS Account ID
+ *
+ * @return awsAccountId
+ */
+ @JsonProperty(JSON_PROPERTY_AWS_ACCOUNT_ID)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getAwsAccountId() {
+ return awsAccountId;
+ }
+
+ public void setAwsAccountId(String awsAccountId) {
+ this.awsAccountId = awsAccountId;
+ }
+
+ public AWSAccountUpdateRequestAttributes awsPartition(AWSAccountPartition awsPartition) {
+ this.awsPartition = awsPartition;
+ this.unparsed |= !awsPartition.isValid();
+ return this;
+ }
+
+ /**
+ * AWS Account partition
+ *
+ * @return awsPartition
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_AWS_PARTITION)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AWSAccountPartition getAwsPartition() {
+ return awsPartition;
+ }
+
+ public void setAwsPartition(AWSAccountPartition awsPartition) {
+ if (!awsPartition.isValid()) {
+ this.unparsed = true;
+ }
+ this.awsPartition = awsPartition;
+ }
+
+ public AWSAccountUpdateRequestAttributes awsRegions(AWSRegions awsRegions) {
+ this.awsRegions = awsRegions;
+ this.unparsed |= awsRegions.unparsed;
+ return this;
+ }
+
+ /**
+ * AWS Regions to collect data from
+ *
+ * @return awsRegions
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_AWS_REGIONS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AWSRegions getAwsRegions() {
+ return awsRegions;
+ }
+
+ public void setAwsRegions(AWSRegions awsRegions) {
+ this.awsRegions = awsRegions;
+ }
+
+ public AWSAccountUpdateRequestAttributes logsConfig(AWSLogsConfig logsConfig) {
+ this.logsConfig = logsConfig;
+ this.unparsed |= logsConfig.unparsed;
+ return this;
+ }
+
+ /**
+ * AWS Logs config
+ *
+ * @return logsConfig
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_LOGS_CONFIG)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AWSLogsConfig getLogsConfig() {
+ return logsConfig;
+ }
+
+ public void setLogsConfig(AWSLogsConfig logsConfig) {
+ this.logsConfig = logsConfig;
+ }
+
+ public AWSAccountUpdateRequestAttributes metricsConfig(AWSMetricsConfig metricsConfig) {
+ this.metricsConfig = metricsConfig;
+ this.unparsed |= metricsConfig.unparsed;
+ return this;
+ }
+
+ /**
+ * AWS Metrics config
+ *
+ * @return metricsConfig
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_METRICS_CONFIG)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AWSMetricsConfig getMetricsConfig() {
+ return metricsConfig;
+ }
+
+ public void setMetricsConfig(AWSMetricsConfig metricsConfig) {
+ this.metricsConfig = metricsConfig;
+ }
+
+ public AWSAccountUpdateRequestAttributes resourcesConfig(AWSResourcesConfig resourcesConfig) {
+ this.resourcesConfig = resourcesConfig;
+ this.unparsed |= resourcesConfig.unparsed;
+ return this;
+ }
+
+ /**
+ * AWS Resources config
+ *
+ * @return resourcesConfig
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_RESOURCES_CONFIG)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AWSResourcesConfig getResourcesConfig() {
+ return resourcesConfig;
+ }
+
+ public void setResourcesConfig(AWSResourcesConfig resourcesConfig) {
+ this.resourcesConfig = resourcesConfig;
+ }
+
+ public AWSAccountUpdateRequestAttributes tracesConfig(AWSTracesConfig tracesConfig) {
+ this.tracesConfig = tracesConfig;
+ this.unparsed |= tracesConfig.unparsed;
+ return this;
+ }
+
+ /**
+ * AWS Traces config
+ *
+ * @return tracesConfig
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_TRACES_CONFIG)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AWSTracesConfig getTracesConfig() {
+ return tracesConfig;
+ }
+
+ public void setTracesConfig(AWSTracesConfig tracesConfig) {
+ this.tracesConfig = tracesConfig;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return AWSAccountUpdateRequestAttributes
+ */
+ @JsonAnySetter
+ public AWSAccountUpdateRequestAttributes putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this AWSAccountUpdateRequestAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AWSAccountUpdateRequestAttributes awsAccountUpdateRequestAttributes =
+ (AWSAccountUpdateRequestAttributes) o;
+ return Objects.equals(this.accountTags, awsAccountUpdateRequestAttributes.accountTags)
+ && Objects.equals(this.authConfig, awsAccountUpdateRequestAttributes.authConfig)
+ && Objects.equals(this.awsAccountId, awsAccountUpdateRequestAttributes.awsAccountId)
+ && Objects.equals(this.awsPartition, awsAccountUpdateRequestAttributes.awsPartition)
+ && Objects.equals(this.awsRegions, awsAccountUpdateRequestAttributes.awsRegions)
+ && Objects.equals(this.logsConfig, awsAccountUpdateRequestAttributes.logsConfig)
+ && Objects.equals(this.metricsConfig, awsAccountUpdateRequestAttributes.metricsConfig)
+ && Objects.equals(this.resourcesConfig, awsAccountUpdateRequestAttributes.resourcesConfig)
+ && Objects.equals(this.tracesConfig, awsAccountUpdateRequestAttributes.tracesConfig)
+ && Objects.equals(
+ this.additionalProperties, awsAccountUpdateRequestAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ accountTags,
+ authConfig,
+ awsAccountId,
+ awsPartition,
+ awsRegions,
+ logsConfig,
+ metricsConfig,
+ resourcesConfig,
+ tracesConfig,
+ additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AWSAccountUpdateRequestAttributes {\n");
+ sb.append(" accountTags: ").append(toIndentedString(accountTags)).append("\n");
+ sb.append(" authConfig: ").append(toIndentedString(authConfig)).append("\n");
+ sb.append(" awsAccountId: ").append(toIndentedString(awsAccountId)).append("\n");
+ sb.append(" awsPartition: ").append(toIndentedString(awsPartition)).append("\n");
+ sb.append(" awsRegions: ").append(toIndentedString(awsRegions)).append("\n");
+ sb.append(" logsConfig: ").append(toIndentedString(logsConfig)).append("\n");
+ sb.append(" metricsConfig: ").append(toIndentedString(metricsConfig)).append("\n");
+ sb.append(" resourcesConfig: ").append(toIndentedString(resourcesConfig)).append("\n");
+ sb.append(" tracesConfig: ").append(toIndentedString(tracesConfig)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSAccountUpdateRequestData.java b/src/main/java/com/datadog/api/client/v2/model/AWSAccountUpdateRequestData.java
new file mode 100644
index 00000000000..4a075239aa3
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AWSAccountUpdateRequestData.java
@@ -0,0 +1,209 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** AWS Account Update Request data */
+@JsonPropertyOrder({
+ AWSAccountUpdateRequestData.JSON_PROPERTY_ATTRIBUTES,
+ AWSAccountUpdateRequestData.JSON_PROPERTY_ID,
+ AWSAccountUpdateRequestData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AWSAccountUpdateRequestData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private AWSAccountUpdateRequestAttributes attributes;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private AWSAccountType type = AWSAccountType.ACCOUNT;
+
+ public AWSAccountUpdateRequestData() {}
+
+ @JsonCreator
+ public AWSAccountUpdateRequestData(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
+ AWSAccountUpdateRequestAttributes attributes,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AWSAccountType type) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public AWSAccountUpdateRequestData attributes(AWSAccountUpdateRequestAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * The AWS Account Integration Config to be updated
+ *
+ * @return attributes
+ */
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public AWSAccountUpdateRequestAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(AWSAccountUpdateRequestAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public AWSAccountUpdateRequestData id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Unique Datadog ID of the AWS Account Integration Config
+ *
+ * @return id
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public AWSAccountUpdateRequestData type(AWSAccountType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * AWS Account resource type.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public AWSAccountType getType() {
+ return type;
+ }
+
+ public void setType(AWSAccountType type) {
+ if (!type.isValid()) {
+ this.unparsed = true;
+ }
+ this.type = type;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return AWSAccountUpdateRequestData
+ */
+ @JsonAnySetter
+ public AWSAccountUpdateRequestData putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this AWSAccountUpdateRequestData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AWSAccountUpdateRequestData awsAccountUpdateRequestData = (AWSAccountUpdateRequestData) o;
+ return Objects.equals(this.attributes, awsAccountUpdateRequestData.attributes)
+ && Objects.equals(this.id, awsAccountUpdateRequestData.id)
+ && Objects.equals(this.type, awsAccountUpdateRequestData.type)
+ && Objects.equals(
+ this.additionalProperties, awsAccountUpdateRequestData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, id, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AWSAccountUpdateRequestData {\n");
+ sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSAccountsResponse.java b/src/main/java/com/datadog/api/client/v2/model/AWSAccountsResponse.java
new file mode 100644
index 00000000000..3c271e6c3aa
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AWSAccountsResponse.java
@@ -0,0 +1,155 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/** AWS Accounts response body */
+@JsonPropertyOrder({AWSAccountsResponse.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AWSAccountsResponse {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private List data = new ArrayList<>();
+
+ public AWSAccountsResponse() {}
+
+ @JsonCreator
+ public AWSAccountsResponse(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA)
+ List data) {
+ this.data = data;
+ }
+
+ public AWSAccountsResponse data(List data) {
+ this.data = data;
+ for (AWSAccountResponseData item : data) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public AWSAccountsResponse addDataItem(AWSAccountResponseData dataItem) {
+ this.data.add(dataItem);
+ this.unparsed |= dataItem.unparsed;
+ return this;
+ }
+
+ /**
+ * List of AWS Account Integration Configs
+ *
+ * @return data
+ */
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public List getData() {
+ return data;
+ }
+
+ public void setData(List data) {
+ this.data = data;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return AWSAccountsResponse
+ */
+ @JsonAnySetter
+ public AWSAccountsResponse putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this AWSAccountsResponse object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AWSAccountsResponse awsAccountsResponse = (AWSAccountsResponse) o;
+ return Objects.equals(this.data, awsAccountsResponse.data)
+ && Objects.equals(this.additionalProperties, awsAccountsResponse.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AWSAccountsResponse {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSAuthConfig.java b/src/main/java/com/datadog/api/client/v2/model/AWSAuthConfig.java
new file mode 100644
index 00000000000..1c9c62bf68a
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AWSAuthConfig.java
@@ -0,0 +1,274 @@
+/*
+ * 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 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.datadog.api.client.AbstractOpenApiSchema;
+import com.datadog.api.client.JSON;
+import com.datadog.api.client.UnparsedObject;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.MapperFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import jakarta.ws.rs.core.GenericType;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+@JsonDeserialize(using = AWSAuthConfig.AWSAuthConfigDeserializer.class)
+@JsonSerialize(using = AWSAuthConfig.AWSAuthConfigSerializer.class)
+public class AWSAuthConfig extends AbstractOpenApiSchema {
+ private static final Logger log = Logger.getLogger(AWSAuthConfig.class.getName());
+
+ @JsonIgnore public boolean unparsed = false;
+
+ public static class AWSAuthConfigSerializer extends StdSerializer {
+ public AWSAuthConfigSerializer(Class t) {
+ super(t);
+ }
+
+ public AWSAuthConfigSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(AWSAuthConfig value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.getActualInstance());
+ }
+ }
+
+ public static class AWSAuthConfigDeserializer extends StdDeserializer {
+ public AWSAuthConfigDeserializer() {
+ this(AWSAuthConfig.class);
+ }
+
+ public AWSAuthConfigDeserializer(Class> vc) {
+ super(vc);
+ }
+
+ @Override
+ public AWSAuthConfig deserialize(JsonParser jp, DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+ JsonNode tree = jp.readValueAsTree();
+ Object deserialized = null;
+ Object tmp = null;
+ boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS);
+ int match = 0;
+ JsonToken token = tree.traverse(jp.getCodec()).nextToken();
+ // deserialize AWSAuthConfigKeys
+ try {
+ boolean attemptParsing = true;
+ // ensure that we respect type coercion as set on the client ObjectMapper
+ if (AWSAuthConfigKeys.class.equals(Integer.class)
+ || AWSAuthConfigKeys.class.equals(Long.class)
+ || AWSAuthConfigKeys.class.equals(Float.class)
+ || AWSAuthConfigKeys.class.equals(Double.class)
+ || AWSAuthConfigKeys.class.equals(Boolean.class)
+ || AWSAuthConfigKeys.class.equals(String.class)) {
+ attemptParsing = typeCoercion;
+ if (!attemptParsing) {
+ attemptParsing |=
+ ((AWSAuthConfigKeys.class.equals(Integer.class)
+ || AWSAuthConfigKeys.class.equals(Long.class))
+ && token == JsonToken.VALUE_NUMBER_INT);
+ attemptParsing |=
+ ((AWSAuthConfigKeys.class.equals(Float.class)
+ || AWSAuthConfigKeys.class.equals(Double.class))
+ && (token == JsonToken.VALUE_NUMBER_FLOAT
+ || token == JsonToken.VALUE_NUMBER_INT));
+ attemptParsing |=
+ (AWSAuthConfigKeys.class.equals(Boolean.class)
+ && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE));
+ attemptParsing |=
+ (AWSAuthConfigKeys.class.equals(String.class) && token == JsonToken.VALUE_STRING);
+ }
+ }
+ if (attemptParsing) {
+ tmp = tree.traverse(jp.getCodec()).readValueAs(AWSAuthConfigKeys.class);
+ // TODO: there is no validation against JSON schema constraints
+ // (min, max, enum, pattern...), this does not perform a strict JSON
+ // validation, which means the 'match' count may be higher than it should be.
+ if (!((AWSAuthConfigKeys) tmp).unparsed) {
+ deserialized = tmp;
+ match++;
+ }
+ log.log(Level.FINER, "Input data matches schema 'AWSAuthConfigKeys'");
+ }
+ } catch (Exception e) {
+ // deserialization failed, continue
+ log.log(Level.FINER, "Input data does not match schema 'AWSAuthConfigKeys'", e);
+ }
+
+ // deserialize AWSAuthConfigRole
+ try {
+ boolean attemptParsing = true;
+ // ensure that we respect type coercion as set on the client ObjectMapper
+ if (AWSAuthConfigRole.class.equals(Integer.class)
+ || AWSAuthConfigRole.class.equals(Long.class)
+ || AWSAuthConfigRole.class.equals(Float.class)
+ || AWSAuthConfigRole.class.equals(Double.class)
+ || AWSAuthConfigRole.class.equals(Boolean.class)
+ || AWSAuthConfigRole.class.equals(String.class)) {
+ attemptParsing = typeCoercion;
+ if (!attemptParsing) {
+ attemptParsing |=
+ ((AWSAuthConfigRole.class.equals(Integer.class)
+ || AWSAuthConfigRole.class.equals(Long.class))
+ && token == JsonToken.VALUE_NUMBER_INT);
+ attemptParsing |=
+ ((AWSAuthConfigRole.class.equals(Float.class)
+ || AWSAuthConfigRole.class.equals(Double.class))
+ && (token == JsonToken.VALUE_NUMBER_FLOAT
+ || token == JsonToken.VALUE_NUMBER_INT));
+ attemptParsing |=
+ (AWSAuthConfigRole.class.equals(Boolean.class)
+ && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE));
+ attemptParsing |=
+ (AWSAuthConfigRole.class.equals(String.class) && token == JsonToken.VALUE_STRING);
+ }
+ }
+ if (attemptParsing) {
+ tmp = tree.traverse(jp.getCodec()).readValueAs(AWSAuthConfigRole.class);
+ // TODO: there is no validation against JSON schema constraints
+ // (min, max, enum, pattern...), this does not perform a strict JSON
+ // validation, which means the 'match' count may be higher than it should be.
+ if (!((AWSAuthConfigRole) tmp).unparsed) {
+ deserialized = tmp;
+ match++;
+ }
+ log.log(Level.FINER, "Input data matches schema 'AWSAuthConfigRole'");
+ }
+ } catch (Exception e) {
+ // deserialization failed, continue
+ log.log(Level.FINER, "Input data does not match schema 'AWSAuthConfigRole'", e);
+ }
+
+ AWSAuthConfig ret = new AWSAuthConfig();
+ if (match == 1) {
+ ret.setActualInstance(deserialized);
+ } else {
+ Map res =
+ new ObjectMapper()
+ .readValue(
+ tree.traverse(jp.getCodec()).readValueAsTree().toString(),
+ new TypeReference