/
CreateDBClusterCommand.ts
561 lines (550 loc) · 22 KB
/
CreateDBClusterCommand.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
// smithy-typescript generated code
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
import { getCrossRegionPresignedUrlPlugin } from "@aws-sdk/middleware-sdk-rds";
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";
import { CreateDBClusterMessage, CreateDBClusterResult } from "../models/models_0";
import { de_CreateDBClusterCommand, se_CreateDBClusterCommand } from "../protocols/Aws_query";
import { RDSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RDSClient";
/**
* @public
*
* The input for {@link CreateDBClusterCommand}.
*/
export interface CreateDBClusterCommandInput extends CreateDBClusterMessage {}
/**
* @public
*
* The output of {@link CreateDBClusterCommand}.
*/
export interface CreateDBClusterCommandOutput extends CreateDBClusterResult, __MetadataBearer {}
/**
* @public
* <p>Creates a new Amazon Aurora DB cluster or Multi-AZ DB cluster.</p>
* <p>If you create an Aurora DB cluster, the request creates an empty cluster. You must
* explicitly create the writer instance for your DB cluster using the <a href="https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html">CreateDBInstance</a> operation. If you create a Multi-AZ DB cluster, the
* request creates a writer and two reader DB instances for you, each in a different
* Availability Zone.</p>
* <p>You can use the <code>ReplicationSourceIdentifier</code> parameter to create an Amazon
* Aurora DB cluster as a read replica of another DB cluster or Amazon RDS for MySQL or
* PostgreSQL DB instance. For more information about Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html">What is Amazon Aurora?</a> in the <i>Amazon Aurora User
* Guide</i>.</p>
* <p>You can also use the <code>ReplicationSourceIdentifier</code> parameter to create a
* Multi-AZ DB cluster read replica with an RDS for MySQL or PostgreSQL DB instance as the
* source. For more information about Multi-AZ DB clusters, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html">Multi-AZ DB
* cluster deployments</a> in the <i>Amazon RDS User
* Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { RDSClient, CreateDBClusterCommand } from "@aws-sdk/client-rds"; // ES Modules import
* // const { RDSClient, CreateDBClusterCommand } = require("@aws-sdk/client-rds"); // CommonJS import
* const client = new RDSClient(config);
* const input = { // CreateDBClusterMessage
* AvailabilityZones: [ // AvailabilityZones
* "STRING_VALUE",
* ],
* BackupRetentionPeriod: Number("int"),
* CharacterSetName: "STRING_VALUE",
* DatabaseName: "STRING_VALUE",
* DBClusterIdentifier: "STRING_VALUE", // required
* DBClusterParameterGroupName: "STRING_VALUE",
* VpcSecurityGroupIds: [ // VpcSecurityGroupIdList
* "STRING_VALUE",
* ],
* DBSubnetGroupName: "STRING_VALUE",
* Engine: "STRING_VALUE", // required
* EngineVersion: "STRING_VALUE",
* Port: Number("int"),
* MasterUsername: "STRING_VALUE",
* MasterUserPassword: "STRING_VALUE",
* OptionGroupName: "STRING_VALUE",
* PreferredBackupWindow: "STRING_VALUE",
* PreferredMaintenanceWindow: "STRING_VALUE",
* ReplicationSourceIdentifier: "STRING_VALUE",
* Tags: [ // TagList
* { // Tag
* Key: "STRING_VALUE",
* Value: "STRING_VALUE",
* },
* ],
* StorageEncrypted: true || false,
* KmsKeyId: "STRING_VALUE",
* PreSignedUrl: "STRING_VALUE",
* EnableIAMDatabaseAuthentication: true || false,
* BacktrackWindow: Number("long"),
* EnableCloudwatchLogsExports: [ // LogTypeList
* "STRING_VALUE",
* ],
* EngineMode: "STRING_VALUE",
* ScalingConfiguration: { // ScalingConfiguration
* MinCapacity: Number("int"),
* MaxCapacity: Number("int"),
* AutoPause: true || false,
* SecondsUntilAutoPause: Number("int"),
* TimeoutAction: "STRING_VALUE",
* SecondsBeforeTimeout: Number("int"),
* },
* DeletionProtection: true || false,
* GlobalClusterIdentifier: "STRING_VALUE",
* EnableHttpEndpoint: true || false,
* CopyTagsToSnapshot: true || false,
* Domain: "STRING_VALUE",
* DomainIAMRoleName: "STRING_VALUE",
* EnableGlobalWriteForwarding: true || false,
* DBClusterInstanceClass: "STRING_VALUE",
* AllocatedStorage: Number("int"),
* StorageType: "STRING_VALUE",
* Iops: Number("int"),
* PubliclyAccessible: true || false,
* AutoMinorVersionUpgrade: true || false,
* MonitoringInterval: Number("int"),
* MonitoringRoleArn: "STRING_VALUE",
* EnablePerformanceInsights: true || false,
* PerformanceInsightsKMSKeyId: "STRING_VALUE",
* PerformanceInsightsRetentionPeriod: Number("int"),
* ServerlessV2ScalingConfiguration: { // ServerlessV2ScalingConfiguration
* MinCapacity: Number("double"),
* MaxCapacity: Number("double"),
* },
* NetworkType: "STRING_VALUE",
* DBSystemId: "STRING_VALUE",
* ManageMasterUserPassword: true || false,
* MasterUserSecretKmsKeyId: "STRING_VALUE",
* };
* const command = new CreateDBClusterCommand(input);
* const response = await client.send(command);
* // { // CreateDBClusterResult
* // DBCluster: { // DBCluster
* // AllocatedStorage: Number("int"),
* // AvailabilityZones: [ // AvailabilityZones
* // "STRING_VALUE",
* // ],
* // BackupRetentionPeriod: Number("int"),
* // CharacterSetName: "STRING_VALUE",
* // DatabaseName: "STRING_VALUE",
* // DBClusterIdentifier: "STRING_VALUE",
* // DBClusterParameterGroup: "STRING_VALUE",
* // DBSubnetGroup: "STRING_VALUE",
* // Status: "STRING_VALUE",
* // AutomaticRestartTime: new Date("TIMESTAMP"),
* // PercentProgress: "STRING_VALUE",
* // EarliestRestorableTime: new Date("TIMESTAMP"),
* // Endpoint: "STRING_VALUE",
* // ReaderEndpoint: "STRING_VALUE",
* // CustomEndpoints: [ // StringList
* // "STRING_VALUE",
* // ],
* // MultiAZ: true || false,
* // Engine: "STRING_VALUE",
* // EngineVersion: "STRING_VALUE",
* // LatestRestorableTime: new Date("TIMESTAMP"),
* // Port: Number("int"),
* // MasterUsername: "STRING_VALUE",
* // DBClusterOptionGroupMemberships: [ // DBClusterOptionGroupMemberships
* // { // DBClusterOptionGroupStatus
* // DBClusterOptionGroupName: "STRING_VALUE",
* // Status: "STRING_VALUE",
* // },
* // ],
* // PreferredBackupWindow: "STRING_VALUE",
* // PreferredMaintenanceWindow: "STRING_VALUE",
* // ReplicationSourceIdentifier: "STRING_VALUE",
* // ReadReplicaIdentifiers: [ // ReadReplicaIdentifierList
* // "STRING_VALUE",
* // ],
* // DBClusterMembers: [ // DBClusterMemberList
* // { // DBClusterMember
* // DBInstanceIdentifier: "STRING_VALUE",
* // IsClusterWriter: true || false,
* // DBClusterParameterGroupStatus: "STRING_VALUE",
* // PromotionTier: Number("int"),
* // },
* // ],
* // VpcSecurityGroups: [ // VpcSecurityGroupMembershipList
* // { // VpcSecurityGroupMembership
* // VpcSecurityGroupId: "STRING_VALUE",
* // Status: "STRING_VALUE",
* // },
* // ],
* // HostedZoneId: "STRING_VALUE",
* // StorageEncrypted: true || false,
* // KmsKeyId: "STRING_VALUE",
* // DbClusterResourceId: "STRING_VALUE",
* // DBClusterArn: "STRING_VALUE",
* // AssociatedRoles: [ // DBClusterRoles
* // { // DBClusterRole
* // RoleArn: "STRING_VALUE",
* // Status: "STRING_VALUE",
* // FeatureName: "STRING_VALUE",
* // },
* // ],
* // IAMDatabaseAuthenticationEnabled: true || false,
* // CloneGroupId: "STRING_VALUE",
* // ClusterCreateTime: new Date("TIMESTAMP"),
* // EarliestBacktrackTime: new Date("TIMESTAMP"),
* // BacktrackWindow: Number("long"),
* // BacktrackConsumedChangeRecords: Number("long"),
* // EnabledCloudwatchLogsExports: [ // LogTypeList
* // "STRING_VALUE",
* // ],
* // Capacity: Number("int"),
* // EngineMode: "STRING_VALUE",
* // ScalingConfigurationInfo: { // ScalingConfigurationInfo
* // MinCapacity: Number("int"),
* // MaxCapacity: Number("int"),
* // AutoPause: true || false,
* // SecondsUntilAutoPause: Number("int"),
* // TimeoutAction: "STRING_VALUE",
* // SecondsBeforeTimeout: Number("int"),
* // },
* // DeletionProtection: true || false,
* // HttpEndpointEnabled: true || false,
* // ActivityStreamMode: "sync" || "async",
* // ActivityStreamStatus: "stopped" || "starting" || "started" || "stopping",
* // ActivityStreamKmsKeyId: "STRING_VALUE",
* // ActivityStreamKinesisStreamName: "STRING_VALUE",
* // CopyTagsToSnapshot: true || false,
* // CrossAccountClone: true || false,
* // DomainMemberships: [ // DomainMembershipList
* // { // DomainMembership
* // Domain: "STRING_VALUE",
* // Status: "STRING_VALUE",
* // FQDN: "STRING_VALUE",
* // IAMRoleName: "STRING_VALUE",
* // },
* // ],
* // TagList: [ // TagList
* // { // Tag
* // Key: "STRING_VALUE",
* // Value: "STRING_VALUE",
* // },
* // ],
* // GlobalWriteForwardingStatus: "enabled" || "disabled" || "enabling" || "disabling" || "unknown",
* // GlobalWriteForwardingRequested: true || false,
* // PendingModifiedValues: { // ClusterPendingModifiedValues
* // PendingCloudwatchLogsExports: { // PendingCloudwatchLogsExports
* // LogTypesToEnable: [
* // "STRING_VALUE",
* // ],
* // LogTypesToDisable: [
* // "STRING_VALUE",
* // ],
* // },
* // DBClusterIdentifier: "STRING_VALUE",
* // MasterUserPassword: "STRING_VALUE",
* // IAMDatabaseAuthenticationEnabled: true || false,
* // EngineVersion: "STRING_VALUE",
* // BackupRetentionPeriod: Number("int"),
* // AllocatedStorage: Number("int"),
* // Iops: Number("int"),
* // StorageType: "STRING_VALUE",
* // },
* // DBClusterInstanceClass: "STRING_VALUE",
* // StorageType: "STRING_VALUE",
* // Iops: Number("int"),
* // PubliclyAccessible: true || false,
* // AutoMinorVersionUpgrade: true || false,
* // MonitoringInterval: Number("int"),
* // MonitoringRoleArn: "STRING_VALUE",
* // PerformanceInsightsEnabled: true || false,
* // PerformanceInsightsKMSKeyId: "STRING_VALUE",
* // PerformanceInsightsRetentionPeriod: Number("int"),
* // ServerlessV2ScalingConfiguration: { // ServerlessV2ScalingConfigurationInfo
* // MinCapacity: Number("double"),
* // MaxCapacity: Number("double"),
* // },
* // NetworkType: "STRING_VALUE",
* // DBSystemId: "STRING_VALUE",
* // MasterUserSecret: { // MasterUserSecret
* // SecretArn: "STRING_VALUE",
* // SecretStatus: "STRING_VALUE",
* // KmsKeyId: "STRING_VALUE",
* // },
* // IOOptimizedNextAllowedModificationTime: new Date("TIMESTAMP"),
* // },
* // };
*
* ```
*
* @param CreateDBClusterCommandInput - {@link CreateDBClusterCommandInput}
* @returns {@link CreateDBClusterCommandOutput}
* @see {@link CreateDBClusterCommandInput} for command's `input` shape.
* @see {@link CreateDBClusterCommandOutput} for command's `response` shape.
* @see {@link RDSClientResolvedConfig | config} for RDSClient's `config` shape.
*
* @throws {@link DBClusterAlreadyExistsFault} (client fault)
* <p>The user already has a DB cluster with the given identifier.</p>
*
* @throws {@link DBClusterNotFoundFault} (client fault)
* <p>
* <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.</p>
*
* @throws {@link DBClusterParameterGroupNotFoundFault} (client fault)
* <p>
* <code>DBClusterParameterGroupName</code> doesn't refer to an existing DB
* cluster parameter group.</p>
*
* @throws {@link DBClusterQuotaExceededFault} (client fault)
* <p>The user attempted to create a new DB cluster and the user has already reached the
* maximum allowed DB cluster quota.</p>
*
* @throws {@link DBInstanceNotFoundFault} (client fault)
* <p>
* <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.</p>
*
* @throws {@link DBSubnetGroupDoesNotCoverEnoughAZs} (client fault)
* <p>Subnets in the DB subnet group should cover at least two Availability Zones unless there is only one Availability Zone.</p>
*
* @throws {@link DBSubnetGroupNotFoundFault} (client fault)
* <p>
* <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.</p>
*
* @throws {@link DomainNotFoundFault} (client fault)
* <p>
* <code>Domain</code> doesn't refer to an existing Active Directory domain.</p>
*
* @throws {@link GlobalClusterNotFoundFault} (client fault)
* <p>The <code>GlobalClusterIdentifier</code> doesn't refer to an existing global database cluster.</p>
*
* @throws {@link InsufficientStorageClusterCapacityFault} (client fault)
* <p>There is insufficient storage available for the current action. You might be able to
* resolve this error by updating your subnet group to use different Availability Zones
* that have more storage available.</p>
*
* @throws {@link InvalidDBClusterStateFault} (client fault)
* <p>The requested operation can't be performed while the cluster is in this state.</p>
*
* @throws {@link InvalidDBInstanceStateFault} (client fault)
* <p>The DB instance isn't in a valid state.</p>
*
* @throws {@link InvalidDBSubnetGroupStateFault} (client fault)
* <p>The DB subnet group cannot be deleted because it's in use.</p>
*
* @throws {@link InvalidGlobalClusterStateFault} (client fault)
* <p>The global cluster is in an invalid state and can't perform the requested operation.</p>
*
* @throws {@link InvalidSubnet} (client fault)
* <p>The requested subnet is invalid, or multiple subnets were requested that are not all in a common VPC.</p>
*
* @throws {@link InvalidVPCNetworkStateFault} (client fault)
* <p>The DB subnet group doesn't cover all Availability Zones after it's
* created because of users' change.</p>
*
* @throws {@link KMSKeyNotAccessibleFault} (client fault)
* <p>An error occurred accessing an Amazon Web Services KMS key.</p>
*
* @throws {@link StorageQuotaExceededFault} (client fault)
* <p>The request would result in the user exceeding the allowed amount of storage
* available across all DB instances.</p>
*
* @throws {@link RDSServiceException}
* <p>Base exception class for all service exceptions from RDS service.</p>
*
* @example To create a MySQL 5.7-compatible DB cluster
* ```javascript
* // The following example creates a MySQL 5.7-compatible Aurora DB cluster.
* const input = {
* "DBClusterIdentifier": "sample-cluster",
* "DBSubnetGroupName": "default",
* "Engine": "aurora-mysql",
* "EngineVersion": "5.7.12",
* "MasterUserPassword": "mypassword",
* "MasterUsername": "admin",
* "VpcSecurityGroupIds": [
* "sg-0b91305example"
* ]
* };
* const command = new CreateDBClusterCommand(input);
* const response = await client.send(command);
* /* response ==
* {
* "DBCluster": {
* "AllocatedStorage": 1,
* "AssociatedRoles": [],
* "AvailabilityZones": [
* "us-east-1a",
* "us-east-1b",
* "us-east-1e"
* ],
* "BackupRetentionPeriod": 1,
* "ClusterCreateTime": "2019-06-07T23:21:33.048Z",
* "CopyTagsToSnapshot": false,
* "DBClusterArn": "arn:aws:rds:us-east-1:123456789012:cluster:sample-cluster",
* "DBClusterIdentifier": "sample-cluster",
* "DBClusterMembers": [],
* "DBClusterParameterGroup": "default.aurora-mysql5.7",
* "DBSubnetGroup": "default",
* "DbClusterResourceId": "cluster-ANPAJ4AE5446DAEXAMPLE",
* "DeletionProtection": false,
* "Endpoint": "sample-cluster.cluster-cnpexample.us-east-1.rds.amazonaws.com",
* "Engine": "aurora-mysql",
* "EngineMode": "provisioned",
* "EngineVersion": "5.7.12",
* "HostedZoneId": "Z2R2ITUGPM61AM",
* "HttpEndpointEnabled": false,
* "IAMDatabaseAuthenticationEnabled": false,
* "MasterUsername": "master",
* "MultiAZ": false,
* "Port": 3306,
* "PreferredBackupWindow": "09:12-09:42",
* "PreferredMaintenanceWindow": "mon:04:31-mon:05:01",
* "ReadReplicaIdentifiers": [],
* "ReaderEndpoint": "sample-cluster.cluster-ro-cnpexample.us-east-1.rds.amazonaws.com",
* "Status": "creating",
* "StorageEncrypted": false,
* "VpcSecurityGroups": [
* {
* "Status": "active",
* "VpcSecurityGroupId": "sg-0b91305example"
* }
* ]
* }
* }
* *\/
* // example id: to-create-a-mysql-57-compatible-db-cluster-1679699416154
* ```
*
* @example To create a PostgreSQL-compatible DB cluster
* ```javascript
* // The following example creates a PostgreSQL-compatible Aurora DB cluster.
* const input = {
* "DBClusterIdentifier": "sample-pg-cluster",
* "DBSubnetGroupName": "default",
* "Engine": "aurora-postgresql",
* "MasterUserPassword": "mypassword",
* "MasterUsername": "admin",
* "VpcSecurityGroupIds": [
* "sg-0b91305example"
* ]
* };
* const command = new CreateDBClusterCommand(input);
* const response = await client.send(command);
* /* response ==
* {
* "DBCluster": {
* "AllocatedStorage": 1,
* "AssociatedRoles": [],
* "AvailabilityZones": [
* "us-east-1a",
* "us-east-1b",
* "us-east-1c"
* ],
* "BackupRetentionPeriod": 1,
* "ClusterCreateTime": "2019-06-07T23:26:08.371Z",
* "CopyTagsToSnapshot": false,
* "DBClusterArn": "arn:aws:rds:us-east-1:123456789012:cluster:sample-pg-cluster",
* "DBClusterIdentifier": "sample-pg-cluster",
* "DBClusterMembers": [],
* "DBClusterParameterGroup": "default.aurora-postgresql9.6",
* "DBSubnetGroup": "default",
* "DbClusterResourceId": "cluster-ANPAJ4AE5446DAEXAMPLE",
* "DeletionProtection": false,
* "Endpoint": "sample-pg-cluster.cluster-cnpexample.us-east-1.rds.amazonaws.com",
* "Engine": "aurora-postgresql",
* "EngineMode": "provisioned",
* "EngineVersion": "9.6.9",
* "HostedZoneId": "Z2R2ITUGPM61AM",
* "HttpEndpointEnabled": false,
* "IAMDatabaseAuthenticationEnabled": false,
* "MasterUsername": "master",
* "MultiAZ": false,
* "Port": 5432,
* "PreferredBackupWindow": "09:56-10:26",
* "PreferredMaintenanceWindow": "wed:03:33-wed:04:03",
* "ReadReplicaIdentifiers": [],
* "ReaderEndpoint": "sample-pg-cluster.cluster-ro-cnpexample.us-east-1.rds.amazonaws.com",
* "Status": "creating",
* "StorageEncrypted": false,
* "VpcSecurityGroups": [
* {
* "Status": "active",
* "VpcSecurityGroupId": "sg-0b91305example"
* }
* ]
* }
* }
* *\/
* // example id: to-create-a-postgresql-compatible-db-cluster-1679700161087
* ```
*
*/
export class CreateDBClusterCommand extends $Command<
CreateDBClusterCommandInput,
CreateDBClusterCommandOutput,
RDSClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
return {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
}
/**
* @public
*/
constructor(readonly input: CreateDBClusterCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}
/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: RDSClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<CreateDBClusterCommandInput, CreateDBClusterCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
this.middlewareStack.use(
getEndpointPlugin(configuration, CreateDBClusterCommand.getEndpointParameterInstructions())
);
this.middlewareStack.use(getCrossRegionPresignedUrlPlugin(configuration));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "RDSClient";
const commandName = "CreateDBClusterCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: (_: any) => _,
outputFilterSensitiveLog: (_: any) => _,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}
/**
* @internal
*/
private serialize(input: CreateDBClusterCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return se_CreateDBClusterCommand(input, context);
}
/**
* @internal
*/
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<CreateDBClusterCommandOutput> {
return de_CreateDBClusterCommand(output, context);
}
// Start section: command_body_extra
// End section: command_body_extra
}