@aws-cdk/mixins-preview 2.275.0-alpha.0 → 2.277.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii.gz +0 -0
- package/.jsii.tabl.json.gz +0 -0
- package/.warnings.jsii.js +38 -12
- package/lib/services/aws-appmesh/events.generated.js +1 -1
- package/lib/services/aws-athena/events.generated.js +3 -3
- package/lib/services/aws-autoscaling/events.generated.js +14 -14
- package/lib/services/aws-b2bi/events.generated.js +4 -4
- package/lib/services/aws-batch/events.generated.js +2 -2
- package/lib/services/aws-bedrock/logs-delivery-mixins.generated.js +12 -12
- package/lib/services/aws-bedrockagentcore/logs-delivery-mixins.generated.js +34 -34
- package/lib/services/aws-chime/events.generated.js +1 -1
- package/lib/services/aws-cloudformation/events.generated.js +1 -1
- package/lib/services/aws-cloudfront/logs-delivery-mixins.generated.js +5 -5
- package/lib/services/aws-cloudwatch/events.generated.js +5 -5
- package/lib/services/aws-codebuild/events.generated.js +7 -7
- package/lib/services/aws-codecommit/events.generated.js +10 -10
- package/lib/services/aws-codedeploy/events.generated.js +2 -2
- package/lib/services/aws-codeguruprofiler/events.generated.js +1 -1
- package/lib/services/aws-codepipeline/events.generated.js +3 -3
- package/lib/services/aws-connect/events.generated.js +7 -7
- package/lib/services/aws-dataexchange/events.generated.js +4 -4
- package/lib/services/aws-datasync/events.generated.js +4 -4
- package/lib/services/aws-deadline/events.generated.js +1 -1
- package/lib/services/aws-devopsagent/logs-delivery-mixins.generated.js +3 -3
- package/lib/services/aws-devopsguru/events.generated.js +5 -5
- package/lib/services/aws-dlm/events.generated.js +2 -2
- package/lib/services/aws-dsql/.jsiirc.json +16 -0
- package/lib/services/aws-dsql/.mixins.jsiirc.json +16 -0
- package/lib/services/aws-dsql/index.d.ts +1 -0
- package/lib/services/aws-dsql/index.js +37 -0
- package/lib/services/aws-dsql/logs-delivery-mixins.generated.d.ts +145 -0
- package/lib/services/aws-dsql/logs-delivery-mixins.generated.js +226 -0
- package/lib/services/aws-dsql/mixins.d.ts +1 -0
- package/lib/services/aws-dsql/mixins.js +17 -0
- package/lib/services/aws-ec2/events.generated.js +11 -11
- package/lib/services/aws-ec2/logs-delivery-mixins.generated.d.ts +136 -0
- package/lib/services/aws-ec2/logs-delivery-mixins.generated.js +200 -4
- package/lib/services/aws-ecr/events.generated.js +13 -13
- package/lib/services/aws-ecs/events.generated.js +9 -9
- package/lib/services/aws-ecs/logs-delivery-mixins.generated.js +3 -3
- package/lib/services/aws-eks/logs-delivery-mixins.generated.d.ts +177 -176
- package/lib/services/aws-eks/logs-delivery-mixins.generated.js +190 -189
- package/lib/services/aws-elasticache/events.generated.js +10 -10
- package/lib/services/aws-elasticloadbalancing/events.generated.js +1 -1
- package/lib/services/aws-elasticloadbalancingv2/logs-delivery-mixins.generated.d.ts +4 -0
- package/lib/services/aws-elasticloadbalancingv2/logs-delivery-mixins.generated.js +13 -9
- package/lib/services/aws-elementalinference/logs-delivery-mixins.generated.js +3 -3
- package/lib/services/aws-emr/events.generated.js +7 -7
- package/lib/services/aws-entityresolution/logs-delivery-mixins.generated.js +6 -6
- package/lib/services/aws-events/events.generated.js +1 -1
- package/lib/services/aws-events/logs-delivery-mixins.generated.js +7 -7
- package/lib/services/aws-fis/events.generated.js +1 -1
- package/lib/services/aws-gamelift/events.generated.js +2 -2
- package/lib/services/aws-gamelift/logs-delivery-mixins.generated.js +3 -3
- package/lib/services/aws-glue/events.generated.js +12 -12
- package/lib/services/aws-guardduty/events.generated.js +8 -8
- package/lib/services/aws-healthimaging/events.generated.js +39 -39
- package/lib/services/aws-healthlake/events.generated.js +14 -14
- package/lib/services/aws-imagebuilder/events.generated.js +3 -3
- package/lib/services/aws-iotanalytics/events.generated.js +4 -4
- package/lib/services/aws-ivs/events.generated.js +4 -4
- package/lib/services/aws-kms/events.generated.js +9 -9
- package/lib/services/aws-logs/events.generated.js +3 -3
- package/lib/services/aws-logs/logs-delivery.js +5 -5
- package/lib/services/aws-logs/logs-destination.js +4 -4
- package/lib/services/aws-managedblockchain/events.generated.js +2 -2
- package/lib/services/aws-medialive/events.generated.js +7 -7
- package/lib/services/aws-mediapackage/events.generated.js +5 -5
- package/lib/services/aws-mediapackagev2/logs-delivery-mixins.generated.js +5 -5
- package/lib/services/aws-mediatailor/logs-delivery-mixins.generated.js +7 -7
- package/lib/services/aws-mgn/events.generated.js +3 -3
- package/lib/services/aws-networkfirewall/events.generated.js +3 -3
- package/lib/services/aws-networkfirewall/logs-delivery-mixins.generated.js +7 -7
- package/lib/services/aws-networkmanager/events.generated.js +5 -5
- package/lib/services/aws-omics/events.generated.js +24 -24
- package/lib/services/aws-opsworks/events.generated.js +4 -4
- package/lib/services/aws-organizations/events.generated.js +3 -3
- package/lib/services/aws-pcs/logs-delivery-mixins.generated.js +9 -9
- package/lib/services/aws-qbusiness/logs-delivery-mixins.generated.js +5 -5
- package/lib/services/aws-qldb/events.generated.js +1 -1
- package/lib/services/aws-rds/events.generated.js +7 -7
- package/lib/services/aws-route53recoveryreadiness/events.generated.js +9 -9
- package/lib/services/aws-route53resolver/events.generated.js +5 -5
- package/lib/services/aws-rtbfabric/logs-delivery-mixins.generated.js +3 -3
- package/lib/services/aws-s3/events.generated.js +23 -23
- package/lib/services/aws-s3/logs-delivery-mixins.generated.js +3 -3
- package/lib/services/aws-sagemaker/events.generated.js +14 -14
- package/lib/services/aws-securityhub/events.generated.js +3 -3
- package/lib/services/aws-securityhub/logs-delivery-mixins.generated.js +6 -6
- package/lib/services/aws-ses/events.generated.js +2 -2
- package/lib/services/aws-ses/logs-delivery-mixins.generated.js +8 -8
- package/lib/services/aws-shield/logs-delivery-mixins.generated.js +3 -3
- package/lib/services/aws-ssm/events.generated.js +1 -1
- package/lib/services/aws-storagegateway/events.generated.js +3 -3
- package/lib/services/aws-synthetics/events.generated.js +3 -3
- package/lib/services/aws-transcribe/events.generated.js +3 -3
- package/lib/services/aws-transfer/events.generated.js +74 -74
- package/lib/services/aws-translate/events.generated.js +2 -2
- package/lib/services/aws-voiceid/events.generated.js +17 -17
- package/lib/services/aws-wellarchitected/events.generated.js +1 -1
- package/lib/services/aws-wisdom/logs-delivery-mixins.generated.js +3 -3
- package/lib/services/aws-workspaces/events.generated.js +3 -3
- package/lib/services/aws-xray/events.generated.js +1 -1
- package/lib/services/index.d.ts +1 -0
- package/lib/services/index.js +3 -2
- package/package.json +12 -10
- package/scripts/gen.js +2 -2
- package/scripts/spec2eventbridge/builder.js +4 -1
- package/scripts/spec2eventbridge/generate.d.ts +1 -1
- package/scripts/spec2eventbridge/generate.js +2 -1
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.CfnClusterAuditLogsRecordFields = exports.CfnClusterAuditLogsOutputFormat = exports.CfnClusterLogsMixin = exports.CfnClusterAuditLogs = void 0;
|
|
37
|
+
const jsiiDeprecationWarnings = require("../../../.warnings.jsii.js");
|
|
38
|
+
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
|
|
39
|
+
/* eslint-disable @stylistic/max-len, eol-last */
|
|
40
|
+
const cdk = __importStar(require("aws-cdk-lib/core"));
|
|
41
|
+
const logsDelivery = __importStar(require("../aws-logs/logs-delivery"));
|
|
42
|
+
const service = __importStar(require("aws-cdk-lib/aws-dsql"));
|
|
43
|
+
/**
|
|
44
|
+
* Builder for CfnClusterLogsMixin to generate AUDIT_LOGS for CfnCluster
|
|
45
|
+
*
|
|
46
|
+
* @cloudformationResource AWS::DSQL::Cluster
|
|
47
|
+
* @logType AUDIT_LOGS
|
|
48
|
+
* @stability external
|
|
49
|
+
*/
|
|
50
|
+
class CfnClusterAuditLogs {
|
|
51
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/mixins-preview.aws_dsql.mixins.CfnClusterAuditLogs", version: "2.277.0-alpha.0" };
|
|
52
|
+
/**
|
|
53
|
+
* Send logs to an S3 Bucket
|
|
54
|
+
*
|
|
55
|
+
* @param props Additional properties that are optionally used in log delivery for S3 destinations
|
|
56
|
+
*/
|
|
57
|
+
toS3(bucket, props) {
|
|
58
|
+
try {
|
|
59
|
+
jsiiDeprecationWarnings._aws_cdk_mixins_preview_aws_dsql_mixins_CfnClusterAuditLogsS3Props(props);
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
|
|
63
|
+
Error.captureStackTrace(error, this.toS3);
|
|
64
|
+
}
|
|
65
|
+
throw error;
|
|
66
|
+
}
|
|
67
|
+
{
|
|
68
|
+
return new CfnClusterLogsMixin("AUDIT_LOGS", new logsDelivery.S3LogsDelivery(bucket, {
|
|
69
|
+
permissionsVersion: logsDelivery.S3LogsDeliveryPermissionsVersion.V2,
|
|
70
|
+
kmsKey: props?.encryptionKey,
|
|
71
|
+
outputFormat: props?.outputFormat,
|
|
72
|
+
providedFields: props?.recordFields,
|
|
73
|
+
mandatoryFields: undefined
|
|
74
|
+
}));
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Delivers logs to a pre-created delivery destination
|
|
79
|
+
*
|
|
80
|
+
* Supported destinations are S3
|
|
81
|
+
* You are responsible for setting up the correct permissions for your delivery destination, toDestination() does not set up any permissions for you.
|
|
82
|
+
* Delivery destinations that are imported from another stack using CfnDeliveryDestination.fromDeliveryDestinationArn() or CfnDeliveryDestination.fromDeliveryDestinationName() are supported by toDestination().
|
|
83
|
+
*
|
|
84
|
+
* @param props Additional properties that are optionally used in log delivery for destinations
|
|
85
|
+
*/
|
|
86
|
+
toDestination(destination, props) {
|
|
87
|
+
try {
|
|
88
|
+
jsiiDeprecationWarnings._aws_cdk_mixins_preview_aws_dsql_mixins_CfnClusterAuditLogsDestProps(props);
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
|
|
92
|
+
Error.captureStackTrace(error, this.toDestination);
|
|
93
|
+
}
|
|
94
|
+
throw error;
|
|
95
|
+
}
|
|
96
|
+
{
|
|
97
|
+
return new CfnClusterLogsMixin("AUDIT_LOGS", new logsDelivery.DestinationLogsDelivery(destination, {
|
|
98
|
+
providedFields: props?.recordFields,
|
|
99
|
+
mandatoryFields: undefined
|
|
100
|
+
}));
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
exports.CfnClusterAuditLogs = CfnClusterAuditLogs;
|
|
105
|
+
/**
|
|
106
|
+
* The `AWS::DSQL::Cluster` resource specifies an cluster. You can use this resource to create, modify, and manage clusters.
|
|
107
|
+
*
|
|
108
|
+
* This resource supports both single-Region clusters and multi-Region clusters through the `MultiRegionProperties` parameter.
|
|
109
|
+
*
|
|
110
|
+
* > Creating multi-Region clusters requires additional IAM permissions beyond those needed for single-Region clusters. > - The witness Region specified in `multiRegionProperties.witnessRegion` cannot be the same as the cluster's Region.
|
|
111
|
+
*
|
|
112
|
+
* *Required permissions*
|
|
113
|
+
*
|
|
114
|
+
* - **dsql:CreateCluster** - Required to create a cluster.
|
|
115
|
+
*
|
|
116
|
+
* Resources: `arn:aws:dsql:region:account-id:cluster/*`
|
|
117
|
+
* - **dsql:TagResource** - Permission to add tags to a resource.
|
|
118
|
+
*
|
|
119
|
+
* Resources: `arn:aws:dsql:region:account-id:cluster/*`
|
|
120
|
+
* - **dsql:PutMultiRegionProperties** - Permission to configure multi-Region properties for a cluster.
|
|
121
|
+
*
|
|
122
|
+
* Resources: `arn:aws:dsql:region:account-id:cluster/*`
|
|
123
|
+
* - **dsql:AddPeerCluster** - When specifying `multiRegionProperties.clusters` , permission to add peer clusters.
|
|
124
|
+
*
|
|
125
|
+
* Resources:
|
|
126
|
+
*
|
|
127
|
+
* - Local cluster: `arn:aws:dsql:region:account-id:cluster/*`
|
|
128
|
+
* - Each peer cluster: exact ARN of each specified peer cluster
|
|
129
|
+
* - **dsql:PutWitnessRegion** - When specifying `multiRegionProperties.witnessRegion` , permission to set a witness Region. This permission is checked both in the cluster Region and in the witness Region.
|
|
130
|
+
*
|
|
131
|
+
* Resources: `arn:aws:dsql:region:account-id:cluster/*`
|
|
132
|
+
*
|
|
133
|
+
* Condition Keys: `dsql:WitnessRegion` (matching the specified witness region)
|
|
134
|
+
*
|
|
135
|
+
* @cloudformationResource AWS::DSQL::Cluster
|
|
136
|
+
* @mixin true
|
|
137
|
+
* @stability external
|
|
138
|
+
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dsql-cluster.html
|
|
139
|
+
*/
|
|
140
|
+
class CfnClusterLogsMixin extends cdk.Mixin {
|
|
141
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/mixins-preview.aws_dsql.mixins.CfnClusterLogsMixin", version: "2.277.0-alpha.0" };
|
|
142
|
+
static AUDIT_LOGS = new CfnClusterAuditLogs();
|
|
143
|
+
logType;
|
|
144
|
+
logDelivery;
|
|
145
|
+
/**
|
|
146
|
+
* Create a mixin to enable vended logs for `AWS::DSQL::Cluster`.
|
|
147
|
+
*
|
|
148
|
+
* @param logType Type of logs that are getting vended
|
|
149
|
+
* @param logDelivery Object in charge of setting up the delivery source, delivery destination, and delivery connection
|
|
150
|
+
*/
|
|
151
|
+
constructor(logType, logDelivery) {
|
|
152
|
+
super();
|
|
153
|
+
try {
|
|
154
|
+
jsiiDeprecationWarnings._aws_cdk_mixins_preview_aws_logs_ILogsDelivery(logDelivery);
|
|
155
|
+
}
|
|
156
|
+
catch (error) {
|
|
157
|
+
if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
|
|
158
|
+
Error.captureStackTrace(error, CfnClusterLogsMixin);
|
|
159
|
+
}
|
|
160
|
+
throw error;
|
|
161
|
+
}
|
|
162
|
+
this.logType = logType;
|
|
163
|
+
this.logDelivery = logDelivery;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Check if this mixin supports the given construct (has vendedLogs property)
|
|
167
|
+
*/
|
|
168
|
+
supports(construct) {
|
|
169
|
+
return (cdk.CfnResource.isCfnResource(construct) && service.CfnCluster.isCfnCluster(construct));
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Apply vended logs configuration to the construct
|
|
173
|
+
*/
|
|
174
|
+
applyTo(resource) {
|
|
175
|
+
if (!this.supports(resource)) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
const sourceArn = service.CfnCluster.arnForCluster(resource);
|
|
179
|
+
this.logDelivery.bind(resource, this.logType, sourceArn);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
exports.CfnClusterLogsMixin = CfnClusterLogsMixin;
|
|
183
|
+
/**
|
|
184
|
+
* Output Format options for each destination of CfnClusterAuditLogs.
|
|
185
|
+
*/
|
|
186
|
+
class CfnClusterAuditLogsOutputFormat {
|
|
187
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/mixins-preview.aws_dsql.mixins.CfnClusterAuditLogsOutputFormat", version: "2.277.0-alpha.0" };
|
|
188
|
+
}
|
|
189
|
+
exports.CfnClusterAuditLogsOutputFormat = CfnClusterAuditLogsOutputFormat;
|
|
190
|
+
(function (CfnClusterAuditLogsOutputFormat) {
|
|
191
|
+
let S3;
|
|
192
|
+
(function (S3) {
|
|
193
|
+
S3["PLAIN"] = "plain";
|
|
194
|
+
S3["JSON"] = "json";
|
|
195
|
+
S3["W3C"] = "w3c";
|
|
196
|
+
S3["PARQUET"] = "parquet";
|
|
197
|
+
})(S3 = CfnClusterAuditLogsOutputFormat.S3 || (CfnClusterAuditLogsOutputFormat.S3 = {}));
|
|
198
|
+
})(CfnClusterAuditLogsOutputFormat || (exports.CfnClusterAuditLogsOutputFormat = CfnClusterAuditLogsOutputFormat = {}));
|
|
199
|
+
var CfnClusterAuditLogsRecordFields;
|
|
200
|
+
(function (CfnClusterAuditLogsRecordFields) {
|
|
201
|
+
CfnClusterAuditLogsRecordFields["TIMESTAMP"] = "timestamp";
|
|
202
|
+
CfnClusterAuditLogsRecordFields["RESOURCE_ARN"] = "resource_arn";
|
|
203
|
+
CfnClusterAuditLogsRecordFields["EVENT_TIMESTAMP"] = "event_timestamp";
|
|
204
|
+
CfnClusterAuditLogsRecordFields["RESOURCE_ID"] = "resource_id";
|
|
205
|
+
CfnClusterAuditLogsRecordFields["SCHEMA_VERSION"] = "schema_version";
|
|
206
|
+
CfnClusterAuditLogsRecordFields["AWS_REGION"] = "aws_region";
|
|
207
|
+
CfnClusterAuditLogsRecordFields["CLUSTER_ID"] = "cluster_id";
|
|
208
|
+
CfnClusterAuditLogsRecordFields["TYPE"] = "type";
|
|
209
|
+
CfnClusterAuditLogsRecordFields["DATABASE"] = "database";
|
|
210
|
+
CfnClusterAuditLogsRecordFields["SESSION_ID"] = "session_id";
|
|
211
|
+
CfnClusterAuditLogsRecordFields["IAM_PRINCIPAL"] = "iam_principal";
|
|
212
|
+
CfnClusterAuditLogsRecordFields["IAM_ARN"] = "iam_arn";
|
|
213
|
+
CfnClusterAuditLogsRecordFields["SESSION_USER"] = "session_user";
|
|
214
|
+
CfnClusterAuditLogsRecordFields["USER_ID"] = "user_id";
|
|
215
|
+
CfnClusterAuditLogsRecordFields["CLIENT_APPLICATION"] = "client_application";
|
|
216
|
+
CfnClusterAuditLogsRecordFields["TRANSACTION_ID"] = "transaction_id";
|
|
217
|
+
CfnClusterAuditLogsRecordFields["STATEMENT_ID"] = "statement_id";
|
|
218
|
+
CfnClusterAuditLogsRecordFields["SUBSTATEMENT_ID"] = "substatement_id";
|
|
219
|
+
CfnClusterAuditLogsRecordFields["CLASS"] = "class";
|
|
220
|
+
CfnClusterAuditLogsRecordFields["COMMAND"] = "command";
|
|
221
|
+
CfnClusterAuditLogsRecordFields["OBJECT_TYPE"] = "object_type";
|
|
222
|
+
CfnClusterAuditLogsRecordFields["OBJECT_NAME"] = "object_name";
|
|
223
|
+
CfnClusterAuditLogsRecordFields["STATEMENT_TEXT"] = "statement_text";
|
|
224
|
+
CfnClusterAuditLogsRecordFields["PARAMETERS"] = "parameters";
|
|
225
|
+
CfnClusterAuditLogsRecordFields["ROWS_AFFECTED"] = "rows_affected";
|
|
226
|
+
})(CfnClusterAuditLogsRecordFields || (exports.CfnClusterAuditLogsRecordFields = CfnClusterAuditLogsRecordFields = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './logs-delivery-mixins.generated';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./logs-delivery-mixins.generated"), exports);
|
|
@@ -7,7 +7,7 @@ const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
|
|
|
7
7
|
* EventBridge event pattern for aws.ec2@EBSMultiVolumeSnapshotsCompletionStatus
|
|
8
8
|
*/
|
|
9
9
|
class EBSMultiVolumeSnapshotsCompletionStatus {
|
|
10
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/mixins-preview.aws_ec2.events.EBSMultiVolumeSnapshotsCompletionStatus", version: "2.
|
|
10
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/mixins-preview.aws_ec2.events.EBSMultiVolumeSnapshotsCompletionStatus", version: "2.277.0-alpha.0" };
|
|
11
11
|
/**
|
|
12
12
|
* EventBridge event pattern for EBS Multi-Volume Snapshots Completion Status
|
|
13
13
|
*/
|
|
@@ -72,7 +72,7 @@ function convertEBSMultiVolumeSnapshotsCompletionStatusDetailToEventPattern(obj)
|
|
|
72
72
|
* EventBridge event pattern for aws.ec2@EBSSnapshotNotification
|
|
73
73
|
*/
|
|
74
74
|
class EBSSnapshotNotification {
|
|
75
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/mixins-preview.aws_ec2.events.EBSSnapshotNotification", version: "2.
|
|
75
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/mixins-preview.aws_ec2.events.EBSSnapshotNotification", version: "2.277.0-alpha.0" };
|
|
76
76
|
/**
|
|
77
77
|
* EventBridge event pattern for EBS Snapshot Notification
|
|
78
78
|
*/
|
|
@@ -122,7 +122,7 @@ function convertEBSSnapshotNotificationDetailToEventPattern(obj) {
|
|
|
122
122
|
* EventBridge event pattern for aws.ec2@EBSVolumeNotification
|
|
123
123
|
*/
|
|
124
124
|
class EBSVolumeNotification {
|
|
125
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/mixins-preview.aws_ec2.events.EBSVolumeNotification", version: "2.
|
|
125
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/mixins-preview.aws_ec2.events.EBSVolumeNotification", version: "2.277.0-alpha.0" };
|
|
126
126
|
/**
|
|
127
127
|
* EventBridge event pattern for EBS Volume Notification
|
|
128
128
|
*/
|
|
@@ -168,7 +168,7 @@ function convertEBSVolumeNotificationDetailToEventPattern(obj) {
|
|
|
168
168
|
* EventBridge event pattern for aws.ec2@EC2FastLaunchStateChangeNotification
|
|
169
169
|
*/
|
|
170
170
|
class EC2FastLaunchStateChangeNotification {
|
|
171
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/mixins-preview.aws_ec2.events.EC2FastLaunchStateChangeNotification", version: "2.
|
|
171
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/mixins-preview.aws_ec2.events.EC2FastLaunchStateChangeNotification", version: "2.277.0-alpha.0" };
|
|
172
172
|
/**
|
|
173
173
|
* EventBridge event pattern for EC2 Fast Launch State-change Notification
|
|
174
174
|
*/
|
|
@@ -214,7 +214,7 @@ function convertEC2FastLaunchStateChangeNotificationDetailToEventPattern(obj) {
|
|
|
214
214
|
* EventBridge event pattern for aws.ec2@AWSAPICallViaCloudTrail
|
|
215
215
|
*/
|
|
216
216
|
class AWSAPICallViaCloudTrail {
|
|
217
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/mixins-preview.aws_ec2.events.AWSAPICallViaCloudTrail", version: "2.
|
|
217
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/mixins-preview.aws_ec2.events.AWSAPICallViaCloudTrail", version: "2.277.0-alpha.0" };
|
|
218
218
|
/**
|
|
219
219
|
* EventBridge event pattern for AWS API Call via CloudTrail
|
|
220
220
|
*/
|
|
@@ -522,7 +522,7 @@ function convertAWSAPICallViaCloudTrailInstancesSetItemToEventPattern(obj, iRef)
|
|
|
522
522
|
virtualizationType: obj?.virtualizationType,
|
|
523
523
|
amiLaunchIndex: obj?.amiLaunchIndex,
|
|
524
524
|
sourceDestCheck: obj?.sourceDestCheck,
|
|
525
|
-
instanceId: (obj?.instanceId ?? [iRef
|
|
525
|
+
instanceId: (obj?.instanceId ?? ((iRef === undefined) ? undefined : [iRef.instanceRef.instanceId])),
|
|
526
526
|
vpcId: obj?.vpcId,
|
|
527
527
|
hypervisor: obj?.hypervisor,
|
|
528
528
|
rootDeviceName: obj?.rootDeviceName,
|
|
@@ -1260,7 +1260,7 @@ function convertAWSAPICallViaCloudTrailDetailToEventPattern(obj, iRef) {
|
|
|
1260
1260
|
* EventBridge event patterns for Instance
|
|
1261
1261
|
*/
|
|
1262
1262
|
class InstanceEvents {
|
|
1263
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/mixins-preview.aws_ec2.events.InstanceEvents", version: "2.
|
|
1263
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/mixins-preview.aws_ec2.events.InstanceEvents", version: "2.277.0-alpha.0" };
|
|
1264
1264
|
/**
|
|
1265
1265
|
* Create InstanceEvents from a Instance reference
|
|
1266
1266
|
*/
|
|
@@ -1346,7 +1346,7 @@ exports.InstanceEvents = InstanceEvents;
|
|
|
1346
1346
|
* EventBridge event pattern for aws.ec2@EC2InstanceStateChangeNotification
|
|
1347
1347
|
*/
|
|
1348
1348
|
class EC2InstanceStateChangeNotification {
|
|
1349
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/mixins-preview.aws_ec2.events.EC2InstanceStateChangeNotification", version: "2.
|
|
1349
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/mixins-preview.aws_ec2.events.EC2InstanceStateChangeNotification", version: "2.277.0-alpha.0" };
|
|
1350
1350
|
/**
|
|
1351
1351
|
* EventBridge event pattern for EC2 Instance State-change Notification
|
|
1352
1352
|
*/
|
|
@@ -1374,7 +1374,7 @@ exports.EC2InstanceStateChangeNotification = EC2InstanceStateChangeNotification;
|
|
|
1374
1374
|
// @ts-ignore TS6133
|
|
1375
1375
|
function convertEC2InstanceStateChangeNotificationDetailToEventPattern(obj, iRef) {
|
|
1376
1376
|
const ret = {
|
|
1377
|
-
"instance-id": (obj?.instanceId ?? [iRef
|
|
1377
|
+
"instance-id": (obj?.instanceId ?? ((iRef === undefined) ? undefined : [iRef.instanceRef.instanceId])),
|
|
1378
1378
|
state: obj?.state
|
|
1379
1379
|
};
|
|
1380
1380
|
for (const [key, value] of Object.entries(ret)) {
|
|
@@ -1390,7 +1390,7 @@ function convertEC2InstanceStateChangeNotificationDetailToEventPattern(obj, iRef
|
|
|
1390
1390
|
* EventBridge event pattern for aws.ec2@EC2SpotInstanceInterruptionWarning
|
|
1391
1391
|
*/
|
|
1392
1392
|
class EC2SpotInstanceInterruptionWarning {
|
|
1393
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/mixins-preview.aws_ec2.events.EC2SpotInstanceInterruptionWarning", version: "2.
|
|
1393
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/mixins-preview.aws_ec2.events.EC2SpotInstanceInterruptionWarning", version: "2.277.0-alpha.0" };
|
|
1394
1394
|
/**
|
|
1395
1395
|
* EventBridge event pattern for EC2 Spot Instance Interruption Warning
|
|
1396
1396
|
*/
|
|
@@ -1418,7 +1418,7 @@ exports.EC2SpotInstanceInterruptionWarning = EC2SpotInstanceInterruptionWarning;
|
|
|
1418
1418
|
// @ts-ignore TS6133
|
|
1419
1419
|
function convertEC2SpotInstanceInterruptionWarningDetailToEventPattern(obj, iRef) {
|
|
1420
1420
|
const ret = {
|
|
1421
|
-
"instance-id": (obj?.instanceId ?? [iRef
|
|
1421
|
+
"instance-id": (obj?.instanceId ?? ((iRef === undefined) ? undefined : [iRef.instanceRef.instanceId])),
|
|
1422
1422
|
"instance-action": obj?.instanceAction
|
|
1423
1423
|
};
|
|
1424
1424
|
for (const [key, value] of Object.entries(ret)) {
|
|
@@ -3,6 +3,142 @@ import * as interfaces from "aws-cdk-lib/interfaces";
|
|
|
3
3
|
import * as constructs from "constructs";
|
|
4
4
|
import * as logsDelivery from "../aws-logs/logs-delivery";
|
|
5
5
|
import * as service from "aws-cdk-lib/aws-ec2";
|
|
6
|
+
/**
|
|
7
|
+
* Builder for CfnInstanceLogsMixin to generate CONSOLE_LOGS for CfnInstance
|
|
8
|
+
*
|
|
9
|
+
* @cloudformationResource AWS::EC2::Instance
|
|
10
|
+
* @logType CONSOLE_LOGS
|
|
11
|
+
* @stability external
|
|
12
|
+
*/
|
|
13
|
+
export declare class CfnInstanceConsoleLogs {
|
|
14
|
+
/**
|
|
15
|
+
* Send logs to an S3 Bucket
|
|
16
|
+
*
|
|
17
|
+
* @param props Additional properties that are optionally used in log delivery for S3 destinations
|
|
18
|
+
*/
|
|
19
|
+
toS3(bucket: interfaces.aws_s3.IBucketRef, props?: CfnInstanceConsoleLogsS3Props): CfnInstanceLogsMixin;
|
|
20
|
+
/**
|
|
21
|
+
* Send logs to a CloudWatch Log Group
|
|
22
|
+
*
|
|
23
|
+
* @param props Additional properties that are optionally used in log delivery for Log Group destinations
|
|
24
|
+
*/
|
|
25
|
+
toLogGroup(logGroup: interfaces.aws_logs.ILogGroupRef, props?: CfnInstanceConsoleLogsLogGroupProps): CfnInstanceLogsMixin;
|
|
26
|
+
/**
|
|
27
|
+
* Send logs to a Firehose Delivery Stream
|
|
28
|
+
*
|
|
29
|
+
* @param props Additional properties that are optionally used in log delivery for Firehose destinations
|
|
30
|
+
*/
|
|
31
|
+
toFirehose(deliveryStream: interfaces.aws_kinesisfirehose.IDeliveryStreamRef, props?: CfnInstanceConsoleLogsFirehoseProps): CfnInstanceLogsMixin;
|
|
32
|
+
/**
|
|
33
|
+
* Delivers logs to a pre-created delivery destination
|
|
34
|
+
*
|
|
35
|
+
* Supported destinations are S3, CWL, FH
|
|
36
|
+
* You are responsible for setting up the correct permissions for your delivery destination, toDestination() does not set up any permissions for you.
|
|
37
|
+
* Delivery destinations that are imported from another stack using CfnDeliveryDestination.fromDeliveryDestinationArn() or CfnDeliveryDestination.fromDeliveryDestinationName() are supported by toDestination().
|
|
38
|
+
*
|
|
39
|
+
* @param props Additional properties that are optionally used in log delivery for destinations
|
|
40
|
+
*/
|
|
41
|
+
toDestination(destination: interfaces.aws_logs.IDeliveryDestinationRef, props?: CfnInstanceConsoleLogsDestProps): CfnInstanceLogsMixin;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Specifies an EC2 instance.
|
|
45
|
+
*
|
|
46
|
+
* If an Elastic IP address is attached to your instance, AWS CloudFormation reattaches the Elastic IP address after it updates the instance. For more information about updating stacks, see [AWS CloudFormation Stacks Updates](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks.html) .
|
|
47
|
+
*
|
|
48
|
+
* @cloudformationResource AWS::EC2::Instance
|
|
49
|
+
* @mixin true
|
|
50
|
+
* @stability external
|
|
51
|
+
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-instance.html
|
|
52
|
+
*/
|
|
53
|
+
export declare class CfnInstanceLogsMixin extends cdk.Mixin implements constructs.IMixin {
|
|
54
|
+
static readonly CONSOLE_LOGS: CfnInstanceConsoleLogs;
|
|
55
|
+
protected readonly logType: string;
|
|
56
|
+
protected readonly logDelivery: logsDelivery.ILogsDelivery;
|
|
57
|
+
/**
|
|
58
|
+
* Create a mixin to enable vended logs for `AWS::EC2::Instance`.
|
|
59
|
+
*
|
|
60
|
+
* @param logType Type of logs that are getting vended
|
|
61
|
+
* @param logDelivery Object in charge of setting up the delivery source, delivery destination, and delivery connection
|
|
62
|
+
*/
|
|
63
|
+
constructor(logType: string, logDelivery: logsDelivery.ILogsDelivery);
|
|
64
|
+
/**
|
|
65
|
+
* Check if this mixin supports the given construct (has vendedLogs property)
|
|
66
|
+
*/
|
|
67
|
+
supports(construct: constructs.IConstruct): construct is service.CfnInstance;
|
|
68
|
+
/**
|
|
69
|
+
* Apply vended logs configuration to the construct
|
|
70
|
+
*/
|
|
71
|
+
applyTo(resource: constructs.IConstruct): void;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Output Format options for each destination of CfnInstanceConsoleLogs.
|
|
75
|
+
*/
|
|
76
|
+
export declare class CfnInstanceConsoleLogsOutputFormat {
|
|
77
|
+
}
|
|
78
|
+
export declare namespace CfnInstanceConsoleLogsOutputFormat {
|
|
79
|
+
enum S3 {
|
|
80
|
+
PLAIN = "plain",
|
|
81
|
+
JSON = "json",
|
|
82
|
+
W3C = "w3c",
|
|
83
|
+
PARQUET = "parquet"
|
|
84
|
+
}
|
|
85
|
+
enum LogGroup {
|
|
86
|
+
PLAIN = "plain",
|
|
87
|
+
JSON = "json"
|
|
88
|
+
}
|
|
89
|
+
enum Firehose {
|
|
90
|
+
PLAIN = "plain",
|
|
91
|
+
JSON = "json",
|
|
92
|
+
RAW = "raw"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
export declare enum CfnInstanceConsoleLogsRecordFields {
|
|
96
|
+
TIMESTAMP = "timestamp",
|
|
97
|
+
RESOURCE_ID = "resource_id",
|
|
98
|
+
RESOURCE_ARN = "resource_arn",
|
|
99
|
+
EVENT_TIMESTAMP = "event_timestamp",
|
|
100
|
+
MESSAGE = "message"
|
|
101
|
+
}
|
|
102
|
+
export interface CfnInstanceConsoleLogsS3Props {
|
|
103
|
+
/**
|
|
104
|
+
* Encrpytion key for your delivery bucket
|
|
105
|
+
*/
|
|
106
|
+
readonly encryptionKey?: interfaces.aws_kms.IKeyRef;
|
|
107
|
+
/**
|
|
108
|
+
* Format for log output, options are plain,json,w3c,parquet
|
|
109
|
+
*/
|
|
110
|
+
readonly outputFormat?: CfnInstanceConsoleLogsOutputFormat.S3;
|
|
111
|
+
/**
|
|
112
|
+
* Record fields that can be provided to a log delivery
|
|
113
|
+
*/
|
|
114
|
+
readonly recordFields?: Array<CfnInstanceConsoleLogsRecordFields>;
|
|
115
|
+
}
|
|
116
|
+
export interface CfnInstanceConsoleLogsLogGroupProps {
|
|
117
|
+
/**
|
|
118
|
+
* Format for log output, options are plain,json
|
|
119
|
+
*/
|
|
120
|
+
readonly outputFormat?: CfnInstanceConsoleLogsOutputFormat.LogGroup;
|
|
121
|
+
/**
|
|
122
|
+
* Record fields that can be provided to a log delivery
|
|
123
|
+
*/
|
|
124
|
+
readonly recordFields?: Array<CfnInstanceConsoleLogsRecordFields>;
|
|
125
|
+
}
|
|
126
|
+
export interface CfnInstanceConsoleLogsFirehoseProps {
|
|
127
|
+
/**
|
|
128
|
+
* Format for log output, options are plain,json,raw
|
|
129
|
+
*/
|
|
130
|
+
readonly outputFormat?: CfnInstanceConsoleLogsOutputFormat.Firehose;
|
|
131
|
+
/**
|
|
132
|
+
* Record fields that can be provided to a log delivery
|
|
133
|
+
*/
|
|
134
|
+
readonly recordFields?: Array<CfnInstanceConsoleLogsRecordFields>;
|
|
135
|
+
}
|
|
136
|
+
export interface CfnInstanceConsoleLogsDestProps {
|
|
137
|
+
/**
|
|
138
|
+
* Record fields that can be provided to a log delivery
|
|
139
|
+
*/
|
|
140
|
+
readonly recordFields?: Array<CfnInstanceConsoleLogsRecordFields>;
|
|
141
|
+
}
|
|
6
142
|
/**
|
|
7
143
|
* Builder for CfnRouteServerPeerLogsMixin to generate EVENT_LOGS for CfnRouteServerPeer
|
|
8
144
|
*
|