Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add encryption field to logs archive destination #2012

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-01-23 20:01:31.168629",
"spec_repo_commit": "f985f8bc"
"regenerated": "2025-01-23 20:45:58.623313",
"spec_repo_commit": "2350cf2b"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-01-23 20:01:31.184080",
"spec_repo_commit": "f985f8bc"
"regenerated": "2025-01-23 20:45:58.639334",
"spec_repo_commit": "2350cf2b"
}
}
}
26 changes: 26 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16762,6 +16762,8 @@ components:
description: The bucket where the archive will be stored.
example: bucket-name
type: string
encryption:
$ref: '#/components/schemas/LogsArchiveEncryptionS3'
integration:
$ref: '#/components/schemas/LogsArchiveIntegrationS3'
path:
Expand All @@ -16783,6 +16785,30 @@ components:
type: string
x-enum-varnames:
- S3
LogsArchiveEncryptionS3:
description: The S3 encryption settings.
properties:
key:
description: An Amazon Resource Name (ARN) used to identify an AWS KMS key.
example: arn:aws:kms:us-east-1:012345678901:key/DatadogIntegrationRoleKms
type: string
type:
$ref: '#/components/schemas/LogsArchiveEncryptionS3Type'
required:
- type
type: object
LogsArchiveEncryptionS3Type:
description: Type of S3 encryption for a destination.
enum:
- NO_OVERRIDE
- SSE_S3
- SSE_KMS
example: SSE_S3
type: string
x-enum-varnames:
- NO_OVERRIDE
- SSE_S3
- SSE_KMS
LogsArchiveIntegrationAzure:
description: The Azure archive's integration destination.
properties:
Expand Down
2 changes: 2 additions & 0 deletions packages/datadog-api-client-v2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1627,6 +1627,8 @@ export { LogsArchiveDestinationGCS } from "./models/LogsArchiveDestinationGCS";
export { LogsArchiveDestinationGCSType } from "./models/LogsArchiveDestinationGCSType";
export { LogsArchiveDestinationS3 } from "./models/LogsArchiveDestinationS3";
export { LogsArchiveDestinationS3Type } from "./models/LogsArchiveDestinationS3Type";
export { LogsArchiveEncryptionS3 } from "./models/LogsArchiveEncryptionS3";
export { LogsArchiveEncryptionS3Type } from "./models/LogsArchiveEncryptionS3Type";
export { LogsArchiveIntegrationAzure } from "./models/LogsArchiveIntegrationAzure";
export { LogsArchiveIntegrationGCS } from "./models/LogsArchiveIntegrationGCS";
export { LogsArchiveIntegrationS3 } from "./models/LogsArchiveIntegrationS3";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Copyright 2020-Present Datadog, Inc.
*/
import { LogsArchiveDestinationS3Type } from "./LogsArchiveDestinationS3Type";
import { LogsArchiveEncryptionS3 } from "./LogsArchiveEncryptionS3";
import { LogsArchiveIntegrationS3 } from "./LogsArchiveIntegrationS3";

import { AttributeTypeMap } from "../../datadog-api-client-common/util";
Expand All @@ -16,6 +17,10 @@ export class LogsArchiveDestinationS3 {
* The bucket where the archive will be stored.
*/
"bucket": string;
/**
* The S3 encryption settings.
*/
"encryption"?: LogsArchiveEncryptionS3;
/**
* The S3 Archive's integration destination.
*/
Expand Down Expand Up @@ -50,6 +55,10 @@ export class LogsArchiveDestinationS3 {
type: "string",
required: true,
},
encryption: {
baseName: "encryption",
type: "LogsArchiveEncryptionS3",
},
integration: {
baseName: "integration",
type: "LogsArchiveIntegrationS3",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/**
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2020-Present Datadog, Inc.
*/
import { LogsArchiveEncryptionS3Type } from "./LogsArchiveEncryptionS3Type";

import { AttributeTypeMap } from "../../datadog-api-client-common/util";

/**
* The S3 encryption settings.
*/
export class LogsArchiveEncryptionS3 {
/**
* An Amazon Resource Name (ARN) used to identify an AWS KMS key.
*/
"key"?: string;
/**
* Type of S3 encryption for a destination.
*/
"type": LogsArchiveEncryptionS3Type;

/**
* 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 = {
key: {
baseName: "key",
type: "string",
},
type: {
baseName: "type",
type: "LogsArchiveEncryptionS3Type",
required: true,
},
additionalProperties: {
baseName: "additionalProperties",
type: "any",
},
};

/**
* @ignore
*/
static getAttributeTypeMap(): AttributeTypeMap {
return LogsArchiveEncryptionS3.attributeTypeMap;
}

public constructor() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2020-Present Datadog, Inc.
*/

import { UnparsedObject } from "../../datadog-api-client-common/util";

/**
* Type of S3 encryption for a destination.
*/

export type LogsArchiveEncryptionS3Type =
| typeof NO_OVERRIDE
| typeof SSE_S3
| typeof SSE_KMS
| UnparsedObject;
export const NO_OVERRIDE = "NO_OVERRIDE";
export const SSE_S3 = "SSE_S3";
export const SSE_KMS = "SSE_KMS";
3 changes: 3 additions & 0 deletions packages/datadog-api-client-v2/models/ObjectSerializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,7 @@ import { LogsArchiveDefinition } from "./LogsArchiveDefinition";
import { LogsArchiveDestinationAzure } from "./LogsArchiveDestinationAzure";
import { LogsArchiveDestinationGCS } from "./LogsArchiveDestinationGCS";
import { LogsArchiveDestinationS3 } from "./LogsArchiveDestinationS3";
import { LogsArchiveEncryptionS3 } from "./LogsArchiveEncryptionS3";
import { LogsArchiveIntegrationAzure } from "./LogsArchiveIntegrationAzure";
import { LogsArchiveIntegrationGCS } from "./LogsArchiveIntegrationGCS";
import { LogsArchiveIntegrationS3 } from "./LogsArchiveIntegrationS3";
Expand Down Expand Up @@ -1889,6 +1890,7 @@ const enumsMap: { [key: string]: any[] } = {
LogsArchiveDestinationAzureType: ["azure"],
LogsArchiveDestinationGCSType: ["gcs"],
LogsArchiveDestinationS3Type: ["s3"],
LogsArchiveEncryptionS3Type: ["NO_OVERRIDE", "SSE_S3", "SSE_KMS"],
LogsArchiveOrderDefinitionType: ["archive_order"],
LogsArchiveState: ["UNKNOWN", "WORKING", "FAILING", "WORKING_AUTH_LEGACY"],
LogsComputeType: ["timeseries", "total"],
Expand Down Expand Up @@ -3204,6 +3206,7 @@ const typeMap: { [index: string]: any } = {
LogsArchiveDestinationAzure: LogsArchiveDestinationAzure,
LogsArchiveDestinationGCS: LogsArchiveDestinationGCS,
LogsArchiveDestinationS3: LogsArchiveDestinationS3,
LogsArchiveEncryptionS3: LogsArchiveEncryptionS3,
LogsArchiveIntegrationAzure: LogsArchiveIntegrationAzure,
LogsArchiveIntegrationGCS: LogsArchiveIntegrationGCS,
LogsArchiveIntegrationS3: LogsArchiveIntegrationS3,
Expand Down
Loading