diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 63f76505a12b..738f4ba6490f 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -56769,19 +56769,35 @@ components: - client_email type: object LogsArchiveIntegrationS3: - description: The S3 Archive's integration destination. + description: >- + The S3 Archive's integration destination. You must provide one of the following: `access_key_id` alone, or both `account_id` and `role_name` together. + oneOf: + - $ref: "#/components/schemas/LogsArchiveIntegrationS3AccessKey" + - $ref: "#/components/schemas/LogsArchiveIntegrationS3Role" + LogsArchiveIntegrationS3AccessKey: + description: The S3 Archive's integration destination using an access key. + properties: + access_key_id: + description: The access key ID for the integration. + example: AKIAIOSFODNN7EXAMPLE + type: string + required: + - access_key_id + type: object + LogsArchiveIntegrationS3Role: + description: The S3 Archive's integration destination using an IAM role. properties: account_id: description: The account ID for the integration. example: "123456789012" type: string role_name: - description: The path of the integration. + description: The name of the role to assume for the integration. example: role-name type: string required: - - role_name - account_id + - role_name type: object LogsArchiveOrder: description: A ordered list of archive IDs. @@ -149153,6 +149169,18 @@ paths: - team:intake - team:app type: archives + s3_access_key_id: + value: + data: + attributes: + destination: + bucket: my-bucket + integration: + access_key_id: AKIAIOSFODNN7EXAMPLE + type: s3 + name: Nginx Archive + query: source:nginx + type: archives schema: $ref: "#/components/schemas/LogsArchiveCreateRequest" description: The definition of the new archive. @@ -149178,6 +149206,21 @@ paths: state: WORKING id: 00000000-0000-0000-0000-000000000002 type: archives + s3_access_key_id: + value: + data: + attributes: + destination: + bucket: my-bucket + integration: + access_key_id: AKIAIOSFODNN7EXAMPLE + type: s3 + include_tags: false + name: Nginx Archive + query: source:nginx + state: WORKING + id: 00000000-0000-0000-0000-000000000002 + type: archives schema: $ref: "#/components/schemas/LogsArchive" description: OK @@ -149327,6 +149370,18 @@ paths: - team:intake - team:app type: archives + s3_access_key_id: + value: + data: + attributes: + destination: + bucket: my-bucket + integration: + access_key_id: AKIAIOSFODNN7EXAMPLE + type: s3 + name: Nginx Archive + query: source:nginx + type: archives schema: $ref: "#/components/schemas/LogsArchiveCreateRequest" description: New definition of the archive. @@ -149352,6 +149407,21 @@ paths: state: WORKING id: 00000000-0000-0000-0000-000000000004 type: archives + s3_access_key_id: + value: + data: + attributes: + destination: + bucket: my-bucket + integration: + access_key_id: AKIAIOSFODNN7EXAMPLE + type: s3 + include_tags: false + name: Nginx Archive + query: source:nginx + state: WORKING + id: 00000000-0000-0000-0000-000000000004 + type: archives schema: $ref: "#/components/schemas/LogsArchive" description: OK diff --git a/services/logs_archives/src/v2/index.ts b/services/logs_archives/src/v2/index.ts index 9fba29c1b37f..29b12cb55f7d 100644 --- a/services/logs_archives/src/v2/index.ts +++ b/services/logs_archives/src/v2/index.ts @@ -31,6 +31,8 @@ export { LogsArchiveEncryptionS3Type } from "./models/LogsArchiveEncryptionS3Typ export { LogsArchiveIntegrationAzure } from "./models/LogsArchiveIntegrationAzure"; export { LogsArchiveIntegrationGCS } from "./models/LogsArchiveIntegrationGCS"; export { LogsArchiveIntegrationS3 } from "./models/LogsArchiveIntegrationS3"; +export { LogsArchiveIntegrationS3AccessKey } from "./models/LogsArchiveIntegrationS3AccessKey"; +export { LogsArchiveIntegrationS3Role } from "./models/LogsArchiveIntegrationS3Role"; export { LogsArchiveOrder } from "./models/LogsArchiveOrder"; export { LogsArchiveOrderAttributes } from "./models/LogsArchiveOrderAttributes"; export { LogsArchiveOrderDefinition } from "./models/LogsArchiveOrderDefinition"; diff --git a/services/logs_archives/src/v2/models/LogsArchiveDestinationS3.ts b/services/logs_archives/src/v2/models/LogsArchiveDestinationS3.ts index 70be9fa23e79..2c4f976fa2ae 100644 --- a/services/logs_archives/src/v2/models/LogsArchiveDestinationS3.ts +++ b/services/logs_archives/src/v2/models/LogsArchiveDestinationS3.ts @@ -18,7 +18,7 @@ export class LogsArchiveDestinationS3 { */ "encryption"?: LogsArchiveEncryptionS3; /** - * The S3 Archive's integration destination. + * The S3 Archive's integration destination. You must provide one of the following: `access_key_id` alone, or both `account_id` and `role_name` together. */ "integration": LogsArchiveIntegrationS3; /** diff --git a/services/logs_archives/src/v2/models/LogsArchiveIntegrationS3.ts b/services/logs_archives/src/v2/models/LogsArchiveIntegrationS3.ts index 50d9279253de..68b8a9115952 100644 --- a/services/logs_archives/src/v2/models/LogsArchiveIntegrationS3.ts +++ b/services/logs_archives/src/v2/models/LogsArchiveIntegrationS3.ts @@ -1,54 +1,12 @@ -import { AttributeTypeMap } from "@datadog/datadog-api-client"; +import { UnparsedObject } from "@datadog/datadog-api-client"; + +import { LogsArchiveIntegrationS3AccessKey } from "./LogsArchiveIntegrationS3AccessKey"; +import { LogsArchiveIntegrationS3Role } from "./LogsArchiveIntegrationS3Role"; /** - * The S3 Archive's integration destination. + * The S3 Archive's integration destination. You must provide one of the following: `access_key_id` alone, or both `account_id` and `role_name` together. */ -export class LogsArchiveIntegrationS3 { - /** - * The account ID for the integration. - */ - "accountId": string; - /** - * The path of the integration. - */ - "roleName": string; - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - "additionalProperties"?: { [key: string]: any }; - /** - * @ignore - */ - "_unparsed"?: boolean; - - /** - * @ignore - */ - static readonly attributeTypeMap: AttributeTypeMap = { - accountId: { - baseName: "account_id", - type: "string", - required: true, - }, - roleName: { - baseName: "role_name", - type: "string", - required: true, - }, - additionalProperties: { - baseName: "additionalProperties", - type: "{ [key: string]: any; }", - }, - }; - - /** - * @ignore - */ - static getAttributeTypeMap(): AttributeTypeMap { - return LogsArchiveIntegrationS3.attributeTypeMap; - } - - public constructor() {} -} +export type LogsArchiveIntegrationS3 = + | LogsArchiveIntegrationS3AccessKey + | LogsArchiveIntegrationS3Role + | UnparsedObject; diff --git a/services/logs_archives/src/v2/models/LogsArchiveIntegrationS3AccessKey.ts b/services/logs_archives/src/v2/models/LogsArchiveIntegrationS3AccessKey.ts new file mode 100644 index 000000000000..c5bca0cb8cdd --- /dev/null +++ b/services/logs_archives/src/v2/models/LogsArchiveIntegrationS3AccessKey.ts @@ -0,0 +1,45 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * The S3 Archive's integration destination using an access key. + */ +export class LogsArchiveIntegrationS3AccessKey { + /** + * The access key ID for the integration. + */ + "accessKeyId": string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + accessKeyId: { + baseName: "access_key_id", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LogsArchiveIntegrationS3AccessKey.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/logs_archives/src/v2/models/LogsArchiveIntegrationS3Role.ts b/services/logs_archives/src/v2/models/LogsArchiveIntegrationS3Role.ts new file mode 100644 index 000000000000..8561c7dbe63e --- /dev/null +++ b/services/logs_archives/src/v2/models/LogsArchiveIntegrationS3Role.ts @@ -0,0 +1,54 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * The S3 Archive's integration destination using an IAM role. + */ +export class LogsArchiveIntegrationS3Role { + /** + * The account ID for the integration. + */ + "accountId": string; + /** + * The name of the role to assume for the integration. + */ + "roleName": string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + accountId: { + baseName: "account_id", + type: "string", + required: true, + }, + roleName: { + baseName: "role_name", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LogsArchiveIntegrationS3Role.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/logs_archives/src/v2/models/TypingInfo.ts b/services/logs_archives/src/v2/models/TypingInfo.ts index d0c9b5119d20..ddfd2cfb37a5 100644 --- a/services/logs_archives/src/v2/models/TypingInfo.ts +++ b/services/logs_archives/src/v2/models/TypingInfo.ts @@ -13,7 +13,8 @@ import { LogsArchiveDestinationS3 } from "./LogsArchiveDestinationS3"; import { LogsArchiveEncryptionS3 } from "./LogsArchiveEncryptionS3"; import { LogsArchiveIntegrationAzure } from "./LogsArchiveIntegrationAzure"; import { LogsArchiveIntegrationGCS } from "./LogsArchiveIntegrationGCS"; -import { LogsArchiveIntegrationS3 } from "./LogsArchiveIntegrationS3"; +import { LogsArchiveIntegrationS3AccessKey } from "./LogsArchiveIntegrationS3AccessKey"; +import { LogsArchiveIntegrationS3Role } from "./LogsArchiveIntegrationS3Role"; import { LogsArchiveOrder } from "./LogsArchiveOrder"; import { LogsArchiveOrderAttributes } from "./LogsArchiveOrderAttributes"; import { LogsArchiveOrderDefinition } from "./LogsArchiveOrderDefinition"; @@ -59,6 +60,10 @@ export const TypingInfo: ModelTypingInfo = { "LogsArchiveDestinationGCS", "LogsArchiveDestinationS3", ], + LogsArchiveIntegrationS3: [ + "LogsArchiveIntegrationS3AccessKey", + "LogsArchiveIntegrationS3Role", + ], }, typeMap: { APIErrorResponse: APIErrorResponse, @@ -74,7 +79,8 @@ export const TypingInfo: ModelTypingInfo = { LogsArchiveEncryptionS3: LogsArchiveEncryptionS3, LogsArchiveIntegrationAzure: LogsArchiveIntegrationAzure, LogsArchiveIntegrationGCS: LogsArchiveIntegrationGCS, - LogsArchiveIntegrationS3: LogsArchiveIntegrationS3, + LogsArchiveIntegrationS3AccessKey: LogsArchiveIntegrationS3AccessKey, + LogsArchiveIntegrationS3Role: LogsArchiveIntegrationS3Role, LogsArchiveOrder: LogsArchiveOrder, LogsArchiveOrderAttributes: LogsArchiveOrderAttributes, LogsArchiveOrderDefinition: LogsArchiveOrderDefinition,