Skip to content

Commit 2d39d87

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit af216d4 of spec repo
1 parent 877e7b7 commit 2d39d87

9 files changed

+326
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10740,6 +10740,7 @@ components:
1074010740
- $ref: '#/components/schemas/CustomDestinationForwardDestinationSplunk'
1074110741
- $ref: '#/components/schemas/CustomDestinationForwardDestinationElasticsearch'
1074210742
- $ref: '#/components/schemas/CustomDestinationForwardDestinationMicrosoftSentinel'
10743+
- $ref: '#/components/schemas/CustomDestinationForwardDestinationGoogleSecurityOperations'
1074310744
CustomDestinationForwardDestinationElasticsearch:
1074410745
description: The Elasticsearch destination.
1074510746
properties:
@@ -10797,6 +10798,42 @@ components:
1079710798
type: string
1079810799
x-enum-varnames:
1079910800
- ELASTICSEARCH
10801+
CustomDestinationForwardDestinationGoogleSecurityOperations:
10802+
description: The Google Security Operations destination.
10803+
properties:
10804+
auth:
10805+
$ref: '#/components/schemas/CustomDestinationGoogleSecurityOperationsDestinationAuth'
10806+
customer_id:
10807+
description: The customer ID of the Google Security Operations account.
10808+
example: 123-456-7890
10809+
type: string
10810+
namespace:
10811+
description: The namespace of the Google Security Operations account.
10812+
example: google-security-operations-namespace
10813+
type: string
10814+
regional_endpoint:
10815+
description: The `CustomDestinationForwardDestinationGoogleSecurityOperations`
10816+
`regional_endpoint`.
10817+
example: https://malachiteingestion-pa.googleapis.com
10818+
type: string
10819+
type:
10820+
$ref: '#/components/schemas/CustomDestinationForwardDestinationGoogleSecurityOperationsType'
10821+
required:
10822+
- type
10823+
- customer_id
10824+
- regional_endpoint
10825+
- namespace
10826+
- auth
10827+
type: object
10828+
CustomDestinationForwardDestinationGoogleSecurityOperationsType:
10829+
default: google_security_operations
10830+
description: Type of the Google Security Operations destination.
10831+
enum:
10832+
- google_security_operations
10833+
example: google_security_operations
10834+
type: string
10835+
x-enum-varnames:
10836+
- GOOGLE_SECURITY_OPERATIONS
1080010837
CustomDestinationForwardDestinationHttp:
1080110838
description: The HTTP destination.
1080210839
properties:
@@ -10898,6 +10935,55 @@ components:
1089810935
type: string
1089910936
x-enum-varnames:
1090010937
- SPLUNK_HEC
10938+
CustomDestinationGoogleSecurityOperationsDestinationAuth:
10939+
description: Google Security Operations destination authentication.
10940+
properties:
10941+
client_email:
10942+
description: The Google Security Operations client email address.
10943+
10944+
type: string
10945+
client_id:
10946+
description: The Google Security Operations client ID. This field is not
10947+
returned by the API.
10948+
example: def123456
10949+
type: string
10950+
writeOnly: true
10951+
private_key:
10952+
description: The Google Security Operations private key. This field is not
10953+
returned by the API.
10954+
example: '-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBK...\n-----END
10955+
PRIVATE KEY-----\n'
10956+
type: string
10957+
writeOnly: true
10958+
private_key_id:
10959+
description: The Google Security Operations private key ID. This field is
10960+
not returned by the API.
10961+
example: abc12345678
10962+
type: string
10963+
writeOnly: true
10964+
project_id:
10965+
description: The Google Security Operations project ID.
10966+
example: gcp-project
10967+
type: string
10968+
type:
10969+
$ref: '#/components/schemas/CustomDestinationGoogleSecurityOperationsDestinationAuthType'
10970+
required:
10971+
- type
10972+
- project_id
10973+
- private_key_id
10974+
- client_email
10975+
- client_id
10976+
- private_key
10977+
type: object
10978+
CustomDestinationGoogleSecurityOperationsDestinationAuthType:
10979+
default: gcp_private_key
10980+
description: Type of the Google Security Operations destination authentication.
10981+
enum:
10982+
- gcp_private_key
10983+
example: gcp_private_key
10984+
type: string
10985+
x-enum-varnames:
10986+
- GCP_PRIVATE_KEY
1090110987
CustomDestinationHttpDestinationAuth:
1090210988
description: Authentication method of the HTTP requests.
1090310989
oneOf:

features/v2/logs_custom_destinations.feature

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,33 @@ Feature: Logs Custom Destinations
5757
And the response "data.attributes.forward_tags_restriction_list" array contains value "host"
5858
And the response "data.attributes.forward_tags_restriction_list_type" is equal to "ALLOW_LIST"
5959

60+
@team:DataDog/logs-backend @team:DataDog/logs-forwarding
61+
Scenario: Create a Google Security Operations custom destination returns "OK" response
62+
Given new "CreateLogsCustomDestination" request
63+
And body with value {"data": {"attributes": {"enabled": false, "forward_tags": false, "forward_tags_restriction_list": ["datacenter", "host"], "forward_tags_restriction_list_type": "ALLOW_LIST", "forwarder_destination": {"type": "google_security_operations", "customer_id": "123-456-7890", "regional_endpoint": "https://malachiteingestion-pa.googleapis.com", "namespace": "google-security-operations-namespace", "auth": {"type": "gcp_private_key", "project_id": "gcp-project", "private_key_id": "abc12345678", "client_email": "[email protected]", "client_id": "def123456", "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBK...\n-----END PRIVATE KEY-----\n"}}, "name": "Nginx logs", "query": "source:nginx"}, "type": "custom_destination"}}
64+
When the request is sent
65+
Then the response status is 200 OK
66+
And the response "data.type" is equal to "custom_destination"
67+
And the response "data" has field "id"
68+
And the response "data.attributes.name" is equal to "Nginx logs"
69+
And the response "data.attributes.query" is equal to "source:nginx"
70+
And the response "data.attributes.forwarder_destination.type" is equal to "google_security_operations"
71+
And the response "data.attributes.forwarder_destination.customer_id" is equal to "123-456-7890"
72+
And the response "data.attributes.forwarder_destination.regional_endpoint" is equal to "https://malachiteingestion-pa.googleapis.com"
73+
And the response "data.attributes.forwarder_destination.namespace" is equal to "google-security-operations-namespace"
74+
And the response "data.attributes.forwarder_destination.auth.type" is equal to "gcp_private_key"
75+
And the response "data.attributes.forwarder_destination.auth.project_id" is equal to "gcp-project"
76+
And the response "data.attributes.forwarder_destination.auth.client_email" is equal to "[email protected]"
77+
And the response "data.attributes.forwarder_destination.auth" does not have field "private_key"
78+
And the response "data.attributes.forwarder_destination.auth" does not have field "private_key_id"
79+
And the response "data.attributes.forwarder_destination.auth" does not have field "client_id"
80+
And the response "data.attributes.enabled" is false
81+
And the response "data.attributes.forward_tags" is false
82+
And the response "data.attributes.forward_tags_restriction_list" has length 2
83+
And the response "data.attributes.forward_tags_restriction_list" array contains value "datacenter"
84+
And the response "data.attributes.forward_tags_restriction_list" array contains value "host"
85+
And the response "data.attributes.forward_tags_restriction_list_type" is equal to "ALLOW_LIST"
86+
6087
@team:DataDog/logs-backend @team:DataDog/logs-forwarding
6188
Scenario: Create a Microsoft Sentinel custom destination returns "OK" response
6289
Given new "CreateLogsCustomDestination" request

services/logs_custom_destinations/src/v2/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,16 @@ export { CustomDestinationElasticsearchDestinationAuth } from "./models/CustomDe
1515
export { CustomDestinationForwardDestination } from "./models/CustomDestinationForwardDestination";
1616
export { CustomDestinationForwardDestinationElasticsearch } from "./models/CustomDestinationForwardDestinationElasticsearch";
1717
export { CustomDestinationForwardDestinationElasticsearchType } from "./models/CustomDestinationForwardDestinationElasticsearchType";
18+
export { CustomDestinationForwardDestinationGoogleSecurityOperations } from "./models/CustomDestinationForwardDestinationGoogleSecurityOperations";
19+
export { CustomDestinationForwardDestinationGoogleSecurityOperationsType } from "./models/CustomDestinationForwardDestinationGoogleSecurityOperationsType";
1820
export { CustomDestinationForwardDestinationHttp } from "./models/CustomDestinationForwardDestinationHttp";
1921
export { CustomDestinationForwardDestinationHttpType } from "./models/CustomDestinationForwardDestinationHttpType";
2022
export { CustomDestinationForwardDestinationMicrosoftSentinel } from "./models/CustomDestinationForwardDestinationMicrosoftSentinel";
2123
export { CustomDestinationForwardDestinationMicrosoftSentinelType } from "./models/CustomDestinationForwardDestinationMicrosoftSentinelType";
2224
export { CustomDestinationForwardDestinationSplunk } from "./models/CustomDestinationForwardDestinationSplunk";
2325
export { CustomDestinationForwardDestinationSplunkType } from "./models/CustomDestinationForwardDestinationSplunkType";
26+
export { CustomDestinationGoogleSecurityOperationsDestinationAuth } from "./models/CustomDestinationGoogleSecurityOperationsDestinationAuth";
27+
export { CustomDestinationGoogleSecurityOperationsDestinationAuthType } from "./models/CustomDestinationGoogleSecurityOperationsDestinationAuthType";
2428
export { CustomDestinationHttpDestinationAuth } from "./models/CustomDestinationHttpDestinationAuth";
2529
export { CustomDestinationHttpDestinationAuthBasic } from "./models/CustomDestinationHttpDestinationAuthBasic";
2630
export { CustomDestinationHttpDestinationAuthBasicType } from "./models/CustomDestinationHttpDestinationAuthBasicType";

services/logs_custom_destinations/src/v2/models/CustomDestinationForwardDestination.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { UnparsedObject } from "@datadog/datadog-api-client";
22

33
import { CustomDestinationForwardDestinationElasticsearch } from "./CustomDestinationForwardDestinationElasticsearch";
4+
import { CustomDestinationForwardDestinationGoogleSecurityOperations } from "./CustomDestinationForwardDestinationGoogleSecurityOperations";
45
import { CustomDestinationForwardDestinationHttp } from "./CustomDestinationForwardDestinationHttp";
56
import { CustomDestinationForwardDestinationMicrosoftSentinel } from "./CustomDestinationForwardDestinationMicrosoftSentinel";
67
import { CustomDestinationForwardDestinationSplunk } from "./CustomDestinationForwardDestinationSplunk";
@@ -13,4 +14,5 @@ export type CustomDestinationForwardDestination =
1314
| CustomDestinationForwardDestinationSplunk
1415
| CustomDestinationForwardDestinationElasticsearch
1516
| CustomDestinationForwardDestinationMicrosoftSentinel
17+
| CustomDestinationForwardDestinationGoogleSecurityOperations
1618
| UnparsedObject;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
import { AttributeTypeMap } from "@datadog/datadog-api-client";
2+
3+
import { CustomDestinationForwardDestinationGoogleSecurityOperationsType } from "./CustomDestinationForwardDestinationGoogleSecurityOperationsType";
4+
import { CustomDestinationGoogleSecurityOperationsDestinationAuth } from "./CustomDestinationGoogleSecurityOperationsDestinationAuth";
5+
6+
/**
7+
* The Google Security Operations destination.
8+
*/
9+
export class CustomDestinationForwardDestinationGoogleSecurityOperations {
10+
/**
11+
* Google Security Operations destination authentication.
12+
*/
13+
"auth": CustomDestinationGoogleSecurityOperationsDestinationAuth;
14+
/**
15+
* The customer ID of the Google Security Operations account.
16+
*/
17+
"customerId": string;
18+
/**
19+
* The namespace of the Google Security Operations account.
20+
*/
21+
"namespace": string;
22+
/**
23+
* The `CustomDestinationForwardDestinationGoogleSecurityOperations` `regional_endpoint`.
24+
*/
25+
"regionalEndpoint": string;
26+
/**
27+
* Type of the Google Security Operations destination.
28+
*/
29+
"type": CustomDestinationForwardDestinationGoogleSecurityOperationsType;
30+
/**
31+
* A container for additional, undeclared properties.
32+
* This is a holder for any undeclared properties as specified with
33+
* the 'additionalProperties' keyword in the OAS document.
34+
*/
35+
"additionalProperties"?: { [key: string]: any };
36+
/**
37+
* @ignore
38+
*/
39+
"_unparsed"?: boolean;
40+
41+
/**
42+
* @ignore
43+
*/
44+
static readonly attributeTypeMap: AttributeTypeMap = {
45+
auth: {
46+
baseName: "auth",
47+
type: "CustomDestinationGoogleSecurityOperationsDestinationAuth",
48+
required: true,
49+
},
50+
customerId: {
51+
baseName: "customer_id",
52+
type: "string",
53+
required: true,
54+
},
55+
namespace: {
56+
baseName: "namespace",
57+
type: "string",
58+
required: true,
59+
},
60+
regionalEndpoint: {
61+
baseName: "regional_endpoint",
62+
type: "string",
63+
required: true,
64+
},
65+
type: {
66+
baseName: "type",
67+
type: "CustomDestinationForwardDestinationGoogleSecurityOperationsType",
68+
required: true,
69+
},
70+
additionalProperties: {
71+
baseName: "additionalProperties",
72+
type: "{ [key: string]: any; }",
73+
},
74+
};
75+
76+
/**
77+
* @ignore
78+
*/
79+
static getAttributeTypeMap(): AttributeTypeMap {
80+
return CustomDestinationForwardDestinationGoogleSecurityOperations.attributeTypeMap;
81+
}
82+
83+
public constructor() {}
84+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { UnparsedObject } from "@datadog/datadog-api-client";
2+
3+
/**
4+
* Type of the Google Security Operations destination.
5+
*/
6+
export type CustomDestinationForwardDestinationGoogleSecurityOperationsType =
7+
| typeof GOOGLE_SECURITY_OPERATIONS
8+
| UnparsedObject;
9+
export const GOOGLE_SECURITY_OPERATIONS = "google_security_operations";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
import { AttributeTypeMap } from "@datadog/datadog-api-client";
2+
3+
import { CustomDestinationGoogleSecurityOperationsDestinationAuthType } from "./CustomDestinationGoogleSecurityOperationsDestinationAuthType";
4+
5+
/**
6+
* Google Security Operations destination authentication.
7+
*/
8+
export class CustomDestinationGoogleSecurityOperationsDestinationAuth {
9+
/**
10+
* The Google Security Operations client email address.
11+
*/
12+
"clientEmail": string;
13+
/**
14+
* The Google Security Operations client ID. This field is not returned by the API.
15+
*/
16+
"clientId": string;
17+
/**
18+
* The Google Security Operations private key. This field is not returned by the API.
19+
*/
20+
"privateKey": string;
21+
/**
22+
* The Google Security Operations private key ID. This field is not returned by the API.
23+
*/
24+
"privateKeyId": string;
25+
/**
26+
* The Google Security Operations project ID.
27+
*/
28+
"projectId": string;
29+
/**
30+
* Type of the Google Security Operations destination authentication.
31+
*/
32+
"type": CustomDestinationGoogleSecurityOperationsDestinationAuthType;
33+
/**
34+
* A container for additional, undeclared properties.
35+
* This is a holder for any undeclared properties as specified with
36+
* the 'additionalProperties' keyword in the OAS document.
37+
*/
38+
"additionalProperties"?: { [key: string]: any };
39+
/**
40+
* @ignore
41+
*/
42+
"_unparsed"?: boolean;
43+
44+
/**
45+
* @ignore
46+
*/
47+
static readonly attributeTypeMap: AttributeTypeMap = {
48+
clientEmail: {
49+
baseName: "client_email",
50+
type: "string",
51+
required: true,
52+
},
53+
clientId: {
54+
baseName: "client_id",
55+
type: "string",
56+
required: true,
57+
},
58+
privateKey: {
59+
baseName: "private_key",
60+
type: "string",
61+
required: true,
62+
},
63+
privateKeyId: {
64+
baseName: "private_key_id",
65+
type: "string",
66+
required: true,
67+
},
68+
projectId: {
69+
baseName: "project_id",
70+
type: "string",
71+
required: true,
72+
},
73+
type: {
74+
baseName: "type",
75+
type: "CustomDestinationGoogleSecurityOperationsDestinationAuthType",
76+
required: true,
77+
},
78+
additionalProperties: {
79+
baseName: "additionalProperties",
80+
type: "{ [key: string]: any; }",
81+
},
82+
};
83+
84+
/**
85+
* @ignore
86+
*/
87+
static getAttributeTypeMap(): AttributeTypeMap {
88+
return CustomDestinationGoogleSecurityOperationsDestinationAuth.attributeTypeMap;
89+
}
90+
91+
public constructor() {}
92+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { UnparsedObject } from "@datadog/datadog-api-client";
2+
3+
/**
4+
* Type of the Google Security Operations destination authentication.
5+
*/
6+
export type CustomDestinationGoogleSecurityOperationsDestinationAuthType =
7+
| typeof GCP_PRIVATE_KEY
8+
| UnparsedObject;
9+
export const GCP_PRIVATE_KEY = "gcp_private_key";

0 commit comments

Comments
 (0)