1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package rds
4
5import (
6	"context"
7	awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
8	"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
9	"github.com/aws/aws-sdk-go-v2/service/rds/types"
10	"github.com/aws/smithy-go/middleware"
11	smithyhttp "github.com/aws/smithy-go/transport/http"
12)
13
14// Creates a new DB instance.
15func (c *Client) CreateDBInstance(ctx context.Context, params *CreateDBInstanceInput, optFns ...func(*Options)) (*CreateDBInstanceOutput, error) {
16	if params == nil {
17		params = &CreateDBInstanceInput{}
18	}
19
20	result, metadata, err := c.invokeOperation(ctx, "CreateDBInstance", params, optFns, addOperationCreateDBInstanceMiddlewares)
21	if err != nil {
22		return nil, err
23	}
24
25	out := result.(*CreateDBInstanceOutput)
26	out.ResultMetadata = metadata
27	return out, nil
28}
29
30//
31type CreateDBInstanceInput struct {
32
33	// The compute and memory capacity of the DB instance, for example, db.m4.large.
34	// Not all DB instance classes are available in all AWS Regions, or for all
35	// database engines. For the full list of DB instance classes, and availability for
36	// your engine, see DB Instance Class
37	// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html)
38	// in the Amazon RDS User Guide.
39	//
40	// This member is required.
41	DBInstanceClass *string
42
43	// The DB instance identifier. This parameter is stored as a lowercase string.
44	// Constraints:
45	//
46	// * Must contain from 1 to 63 letters, numbers, or hyphens.
47	//
48	// * First
49	// character must be a letter.
50	//
51	// * Can't end with a hyphen or contain two
52	// consecutive hyphens.
53	//
54	// Example: mydbinstance
55	//
56	// This member is required.
57	DBInstanceIdentifier *string
58
59	// The name of the database engine to be used for this instance. Not every database
60	// engine is available for every AWS Region. Valid Values:
61	//
62	// * aurora (for MySQL
63	// 5.6-compatible Aurora)
64	//
65	// * aurora-mysql (for MySQL 5.7-compatible Aurora)
66	//
67	// *
68	// aurora-postgresql
69	//
70	// * mariadb
71	//
72	// * mysql
73	//
74	// * oracle-ee
75	//
76	// * oracle-se2
77	//
78	// *
79	// oracle-se1
80	//
81	// * oracle-se
82	//
83	// * postgres
84	//
85	// * sqlserver-ee
86	//
87	// * sqlserver-se
88	//
89	// *
90	// sqlserver-ex
91	//
92	// * sqlserver-web
93	//
94	// This member is required.
95	Engine *string
96
97	// The amount of storage (in gibibytes) to allocate for the DB instance. Type:
98	// Integer Amazon Aurora Not applicable. Aurora cluster volumes automatically grow
99	// as the amount of data in your database increases, though you are only charged
100	// for the space that you use in an Aurora cluster volume. MySQL Constraints to the
101	// amount of storage for each storage type are the following:
102	//
103	// * General Purpose
104	// (SSD) storage (gp2): Must be an integer from 20 to 65536.
105	//
106	// * Provisioned IOPS
107	// storage (io1): Must be an integer from 100 to 65536.
108	//
109	// * Magnetic storage
110	// (standard): Must be an integer from 5 to 3072.
111	//
112	// MariaDB Constraints to the
113	// amount of storage for each storage type are the following:
114	//
115	// * General Purpose
116	// (SSD) storage (gp2): Must be an integer from 20 to 65536.
117	//
118	// * Provisioned IOPS
119	// storage (io1): Must be an integer from 100 to 65536.
120	//
121	// * Magnetic storage
122	// (standard): Must be an integer from 5 to 3072.
123	//
124	// PostgreSQL Constraints to the
125	// amount of storage for each storage type are the following:
126	//
127	// * General Purpose
128	// (SSD) storage (gp2): Must be an integer from 20 to 65536.
129	//
130	// * Provisioned IOPS
131	// storage (io1): Must be an integer from 100 to 65536.
132	//
133	// * Magnetic storage
134	// (standard): Must be an integer from 5 to 3072.
135	//
136	// Oracle Constraints to the amount
137	// of storage for each storage type are the following:
138	//
139	// * General Purpose (SSD)
140	// storage (gp2): Must be an integer from 20 to 65536.
141	//
142	// * Provisioned IOPS storage
143	// (io1): Must be an integer from 100 to 65536.
144	//
145	// * Magnetic storage (standard):
146	// Must be an integer from 10 to 3072.
147	//
148	// SQL Server Constraints to the amount of
149	// storage for each storage type are the following:
150	//
151	// * General Purpose (SSD)
152	// storage (gp2):
153	//
154	// * Enterprise and Standard editions: Must be an integer from 200
155	// to 16384.
156	//
157	// * Web and Express editions: Must be an integer from 20 to 16384.
158	//
159	// *
160	// Provisioned IOPS storage (io1):
161	//
162	// * Enterprise and Standard editions: Must be an
163	// integer from 200 to 16384.
164	//
165	// * Web and Express editions: Must be an integer from
166	// 100 to 16384.
167	//
168	// * Magnetic storage (standard):
169	//
170	// * Enterprise and Standard
171	// editions: Must be an integer from 200 to 1024.
172	//
173	// * Web and Express editions: Must
174	// be an integer from 20 to 1024.
175	AllocatedStorage *int32
176
177	// A value that indicates whether minor engine upgrades are applied automatically
178	// to the DB instance during the maintenance window. By default, minor engine
179	// upgrades are applied automatically.
180	AutoMinorVersionUpgrade *bool
181
182	// The Availability Zone (AZ) where the database will be created. For information
183	// on AWS Regions and Availability Zones, see Regions and Availability Zones
184	// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html).
185	// Default: A random, system-chosen Availability Zone in the endpoint's AWS Region.
186	// Example: us-east-1d Constraint: The AvailabilityZone parameter can't be
187	// specified if the DB instance is a Multi-AZ deployment. The specified
188	// Availability Zone must be in the same AWS Region as the current endpoint. If
189	// you're creating a DB instance in an RDS on VMware environment, specify the
190	// identifier of the custom Availability Zone to create the DB instance in. For
191	// more information about RDS on VMware, see the  RDS on VMware User Guide.
192	// (https://docs.aws.amazon.com/AmazonRDS/latest/RDSonVMwareUserGuide/rds-on-vmware.html)
193	AvailabilityZone *string
194
195	// The number of days for which automated backups are retained. Setting this
196	// parameter to a positive number enables backups. Setting this parameter to 0
197	// disables automated backups. Amazon Aurora Not applicable. The retention period
198	// for automated backups is managed by the DB cluster. Default: 1 Constraints:
199	//
200	// *
201	// Must be a value from 0 to 35
202	//
203	// * Can't be set to 0 if the DB instance is a source
204	// to read replicas
205	BackupRetentionPeriod *int32
206
207	// For supported engines, indicates that the DB instance should be associated with
208	// the specified CharacterSet. Amazon Aurora Not applicable. The character set is
209	// managed by the DB cluster. For more information, see CreateDBCluster.
210	CharacterSetName *string
211
212	// A value that indicates whether to copy tags from the DB instance to snapshots of
213	// the DB instance. By default, tags are not copied. Amazon Aurora Not applicable.
214	// Copying tags to snapshots is managed by the DB cluster. Setting this value for
215	// an Aurora DB instance has no effect on the DB cluster setting.
216	CopyTagsToSnapshot *bool
217
218	// The identifier of the DB cluster that the instance will belong to.
219	DBClusterIdentifier *string
220
221	// The meaning of this parameter differs according to the database engine you use.
222	// MySQL The name of the database to create when the DB instance is created. If
223	// this parameter isn't specified, no database is created in the DB instance.
224	// Constraints:
225	//
226	// * Must contain 1 to 64 letters or numbers.
227	//
228	// * Must begin with a
229	// letter. Subsequent characters can be letters, underscores, or digits (0-9).
230	//
231	// *
232	// Can't be a word reserved by the specified database engine
233	//
234	// MariaDB The name of
235	// the database to create when the DB instance is created. If this parameter isn't
236	// specified, no database is created in the DB instance. Constraints:
237	//
238	// * Must
239	// contain 1 to 64 letters or numbers.
240	//
241	// * Must begin with a letter. Subsequent
242	// characters can be letters, underscores, or digits (0-9).
243	//
244	// * Can't be a word
245	// reserved by the specified database engine
246	//
247	// PostgreSQL The name of the database
248	// to create when the DB instance is created. If this parameter isn't specified, a
249	// database named postgres is created in the DB instance. Constraints:
250	//
251	// * Must
252	// contain 1 to 63 letters, numbers, or underscores.
253	//
254	// * Must begin with a letter.
255	// Subsequent characters can be letters, underscores, or digits (0-9).
256	//
257	// * Can't be
258	// a word reserved by the specified database engine
259	//
260	// Oracle The Oracle System ID
261	// (SID) of the created DB instance. If you specify null, the default value ORCL is
262	// used. You can't specify the string NULL, or any other reserved word, for DBName.
263	// Default: ORCL Constraints:
264	//
265	// * Can't be longer than 8 characters
266	//
267	// SQL Server Not
268	// applicable. Must be null. Amazon Aurora MySQL The name of the database to create
269	// when the primary DB instance of the Aurora MySQL DB cluster is created. If this
270	// parameter isn't specified for an Aurora MySQL DB cluster, no database is created
271	// in the DB cluster. Constraints:
272	//
273	// * It must contain 1 to 64 alphanumeric
274	// characters.
275	//
276	// * It can't be a word reserved by the database engine.
277	//
278	// Amazon
279	// Aurora PostgreSQL The name of the database to create when the primary DB
280	// instance of the Aurora PostgreSQL DB cluster is created. If this parameter isn't
281	// specified for an Aurora PostgreSQL DB cluster, a database named postgres is
282	// created in the DB cluster. Constraints:
283	//
284	// * It must contain 1 to 63 alphanumeric
285	// characters.
286	//
287	// * It must begin with a letter or an underscore. Subsequent
288	// characters can be letters, underscores, or digits (0 to 9).
289	//
290	// * It can't be a
291	// word reserved by the database engine.
292	DBName *string
293
294	// The name of the DB parameter group to associate with this DB instance. If you do
295	// not specify a value, then the default DB parameter group for the specified DB
296	// engine and version is used. Constraints:
297	//
298	// * Must be 1 to 255 letters, numbers,
299	// or hyphens.
300	//
301	// * First character must be a letter
302	//
303	// * Can't end with a hyphen or
304	// contain two consecutive hyphens
305	DBParameterGroupName *string
306
307	// A list of DB security groups to associate with this DB instance. Default: The
308	// default DB security group for the database engine.
309	DBSecurityGroups []string
310
311	// A DB subnet group to associate with this DB instance. If there is no DB subnet
312	// group, then it is a non-VPC DB instance.
313	DBSubnetGroupName *string
314
315	// A value that indicates whether the DB instance has deletion protection enabled.
316	// The database can't be deleted when deletion protection is enabled. By default,
317	// deletion protection is disabled. For more information, see  Deleting a DB
318	// Instance
319	// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html).
320	// Amazon Aurora Not applicable. You can enable or disable deletion protection for
321	// the DB cluster. For more information, see CreateDBCluster. DB instances in a DB
322	// cluster can be deleted even when deletion protection is enabled for the DB
323	// cluster.
324	DeletionProtection *bool
325
326	// The Active Directory directory ID to create the DB instance in. Currently, only
327	// MySQL, Microsoft SQL Server, Oracle, and PostgreSQL DB instances can be created
328	// in an Active Directory Domain. For more information, see  Kerberos
329	// Authentication
330	// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/kerberos-authentication.html)
331	// in the Amazon RDS User Guide.
332	Domain *string
333
334	// Specify the name of the IAM role to be used when making API calls to the
335	// Directory Service.
336	DomainIAMRoleName *string
337
338	// The list of log types that need to be enabled for exporting to CloudWatch Logs.
339	// The values in the list depend on the DB engine being used. For more information,
340	// see Publishing Database Logs to Amazon CloudWatch Logs
341	// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch)
342	// in the Amazon Relational Database Service User Guide. Amazon Aurora Not
343	// applicable. CloudWatch Logs exports are managed by the DB cluster. MariaDB
344	// Possible values are audit, error, general, and slowquery. Microsoft SQL Server
345	// Possible values are agent and error. MySQL Possible values are audit, error,
346	// general, and slowquery. Oracle Possible values are alert, audit, listener,
347	// trace, and oemagent. PostgreSQL Possible values are postgresql and upgrade.
348	EnableCloudwatchLogsExports []string
349
350	// A value that indicates whether to enable a customer-owned IP address (CoIP) for
351	// an RDS on Outposts DB instance. A CoIP provides local or external connectivity
352	// to resources in your Outpost subnets through your on-premises network. For some
353	// use cases, a CoIP can provide lower latency for connections to the DB instance
354	// from outside of its virtual private cloud (VPC) on your local network. For more
355	// information about RDS on Outposts, see Working with Amazon RDS on AWS Outposts
356	// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html) in
357	// the Amazon RDS User Guide. For more information about CoIPs, see Customer-owned
358	// IP addresses
359	// (https://docs.aws.amazon.com/outposts/latest/userguide/outposts-networking-components.html#ip-addressing)
360	// in the AWS Outposts User Guide.
361	EnableCustomerOwnedIp *bool
362
363	// A value that indicates whether to enable mapping of AWS Identity and Access
364	// Management (IAM) accounts to database accounts. By default, mapping is disabled.
365	// This setting doesn't apply to Amazon Aurora. Mapping AWS IAM accounts to
366	// database accounts is managed by the DB cluster. For more information, see  IAM
367	// Database Authentication for MySQL and PostgreSQL
368	// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html)
369	// in the Amazon RDS User Guide.
370	EnableIAMDatabaseAuthentication *bool
371
372	// A value that indicates whether to enable Performance Insights for the DB
373	// instance. For more information, see Using Amazon Performance Insights
374	// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html)
375	// in the Amazon Relational Database Service User Guide.
376	EnablePerformanceInsights *bool
377
378	// The version number of the database engine to use. For a list of valid engine
379	// versions, use the DescribeDBEngineVersions action. The following are the
380	// database engines and links to information about the major and minor versions
381	// that are available with Amazon RDS. Not every database engine is available for
382	// every AWS Region. Amazon Aurora Not applicable. The version number of the
383	// database engine to be used by the DB instance is managed by the DB cluster.
384	// MariaDB See MariaDB on Amazon RDS Versions
385	// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MariaDB.html#MariaDB.Concepts.VersionMgmt)
386	// in the Amazon RDS User Guide. Microsoft SQL Server See Microsoft SQL Server
387	// Versions on Amazon RDS
388	// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SQLServer.html#SQLServer.Concepts.General.VersionSupport)
389	// in the Amazon RDS User Guide. MySQL See MySQL on Amazon RDS Versions
390	// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MySQL.html#MySQL.Concepts.VersionMgmt)
391	// in the Amazon RDS User Guide. Oracle See Oracle Database Engine Release Notes
392	// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.Oracle.PatchComposition.html)
393	// in the Amazon RDS User Guide. PostgreSQL See Amazon RDS for PostgreSQL versions
394	// and extensions
395	// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts)
396	// in the Amazon RDS User Guide.
397	EngineVersion *string
398
399	// The amount of Provisioned IOPS (input/output operations per second) to be
400	// initially allocated for the DB instance. For information about valid Iops
401	// values, see Amazon RDS Provisioned IOPS Storage to Improve Performance
402	// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS)
403	// in the Amazon RDS User Guide. Constraints: For MariaDB, MySQL, Oracle, and
404	// PostgreSQL DB instances, must be a multiple between .5 and 50 of the storage
405	// amount for the DB instance. For SQL Server DB instances, must be a multiple
406	// between 1 and 50 of the storage amount for the DB instance.
407	Iops *int32
408
409	// The AWS KMS key identifier for an encrypted DB instance. The AWS KMS key
410	// identifier is the key ARN, key ID, alias ARN, or alias name for the AWS KMS
411	// customer master key (CMK). To use a CMK in a different AWS account, specify the
412	// key ARN or alias ARN. Amazon Aurora Not applicable. The AWS KMS key identifier
413	// is managed by the DB cluster. For more information, see CreateDBCluster. If
414	// StorageEncrypted is enabled, and you do not specify a value for the KmsKeyId
415	// parameter, then Amazon RDS uses your default CMK. There is a default CMK for
416	// your AWS account. Your AWS account has a different default CMK for each AWS
417	// Region.
418	KmsKeyId *string
419
420	// License model information for this DB instance. Valid values: license-included |
421	// bring-your-own-license | general-public-license
422	LicenseModel *string
423
424	// The password for the master user. The password can include any printable ASCII
425	// character except "/", """, or "@". Amazon Aurora Not applicable. The password
426	// for the master user is managed by the DB cluster. MariaDB Constraints: Must
427	// contain from 8 to 41 characters. Microsoft SQL Server Constraints: Must contain
428	// from 8 to 128 characters. MySQL Constraints: Must contain from 8 to 41
429	// characters. Oracle Constraints: Must contain from 8 to 30 characters. PostgreSQL
430	// Constraints: Must contain from 8 to 128 characters.
431	MasterUserPassword *string
432
433	// The name for the master user. Amazon Aurora Not applicable. The name for the
434	// master user is managed by the DB cluster. MariaDB Constraints:
435	//
436	// * Required for
437	// MariaDB.
438	//
439	// * Must be 1 to 16 letters or numbers.
440	//
441	// * Can't be a reserved word for
442	// the chosen database engine.
443	//
444	// Microsoft SQL Server Constraints:
445	//
446	// * Required for
447	// SQL Server.
448	//
449	// * Must be 1 to 128 letters or numbers.
450	//
451	// * The first character must
452	// be a letter.
453	//
454	// * Can't be a reserved word for the chosen database engine.
455	//
456	// MySQL
457	// Constraints:
458	//
459	// * Required for MySQL.
460	//
461	// * Must be 1 to 16 letters or numbers.
462	//
463	// *
464	// First character must be a letter.
465	//
466	// * Can't be a reserved word for the chosen
467	// database engine.
468	//
469	// Oracle Constraints:
470	//
471	// * Required for Oracle.
472	//
473	// * Must be 1 to 30
474	// letters or numbers.
475	//
476	// * First character must be a letter.
477	//
478	// * Can't be a reserved
479	// word for the chosen database engine.
480	//
481	// PostgreSQL Constraints:
482	//
483	// * Required for
484	// PostgreSQL.
485	//
486	// * Must be 1 to 63 letters or numbers.
487	//
488	// * First character must be a
489	// letter.
490	//
491	// * Can't be a reserved word for the chosen database engine.
492	MasterUsername *string
493
494	// The upper limit to which Amazon RDS can automatically scale the storage of the
495	// DB instance. For more information about this setting, including limitations that
496	// apply to it, see  Managing capacity automatically with Amazon RDS storage
497	// autoscaling
498	// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PIOPS.StorageTypes.html#USER_PIOPS.Autoscaling)
499	// in the Amazon RDS User Guide.
500	MaxAllocatedStorage *int32
501
502	// The interval, in seconds, between points when Enhanced Monitoring metrics are
503	// collected for the DB instance. To disable collecting Enhanced Monitoring
504	// metrics, specify 0. The default is 0. If MonitoringRoleArn is specified, then
505	// you must also set MonitoringInterval to a value other than 0. Valid Values: 0,
506	// 1, 5, 10, 15, 30, 60
507	MonitoringInterval *int32
508
509	// The ARN for the IAM role that permits RDS to send enhanced monitoring metrics to
510	// Amazon CloudWatch Logs. For example, arn:aws:iam:123456789012:role/emaccess. For
511	// information on creating a monitoring role, go to Setting Up and Enabling
512	// Enhanced Monitoring
513	// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.OS.html#USER_Monitoring.OS.Enabling)
514	// in the Amazon RDS User Guide. If MonitoringInterval is set to a value other than
515	// 0, then you must supply a MonitoringRoleArn value.
516	MonitoringRoleArn *string
517
518	// A value that indicates whether the DB instance is a Multi-AZ deployment. You
519	// can't set the AvailabilityZone parameter if the DB instance is a Multi-AZ
520	// deployment.
521	MultiAZ *bool
522
523	// The name of the NCHAR character set for the Oracle DB instance.
524	NcharCharacterSetName *string
525
526	// A value that indicates that the DB instance should be associated with the
527	// specified option group. Permanent options, such as the TDE option for Oracle
528	// Advanced Security TDE, can't be removed from an option group. Also, that option
529	// group can't be removed from a DB instance once it is associated with a DB
530	// instance
531	OptionGroupName *string
532
533	// The AWS KMS key identifier for encryption of Performance Insights data. The AWS
534	// KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the AWS
535	// KMS customer master key (CMK). If you do not specify a value for
536	// PerformanceInsightsKMSKeyId, then Amazon RDS uses your default CMK. There is a
537	// default CMK for your AWS account. Your AWS account has a different default CMK
538	// for each AWS Region.
539	PerformanceInsightsKMSKeyId *string
540
541	// The amount of time, in days, to retain Performance Insights data. Valid values
542	// are 7 or 731 (2 years).
543	PerformanceInsightsRetentionPeriod *int32
544
545	// The port number on which the database accepts connections. MySQL Default: 3306
546	// Valid values: 1150-65535 Type: Integer MariaDB Default: 3306 Valid values:
547	// 1150-65535 Type: Integer PostgreSQL Default: 5432 Valid values: 1150-65535 Type:
548	// Integer Oracle Default: 1521 Valid values: 1150-65535 SQL Server Default: 1433
549	// Valid values: 1150-65535 except 1234, 1434, 3260, 3343, 3389, 47001, and
550	// 49152-49156. Amazon Aurora Default: 3306 Valid values: 1150-65535 Type: Integer
551	Port *int32
552
553	// The daily time range during which automated backups are created if automated
554	// backups are enabled, using the BackupRetentionPeriod parameter. The default is a
555	// 30-minute window selected at random from an 8-hour block of time for each AWS
556	// Region. For more information, see Backup window
557	// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow)
558	// in the Amazon RDS User Guide. Amazon Aurora Not applicable. The daily time range
559	// for creating automated backups is managed by the DB cluster. Constraints:
560	//
561	// *
562	// Must be in the format hh24:mi-hh24:mi.
563	//
564	// * Must be in Universal Coordinated Time
565	// (UTC).
566	//
567	// * Must not conflict with the preferred maintenance window.
568	//
569	// * Must be at
570	// least 30 minutes.
571	PreferredBackupWindow *string
572
573	// The time range each week during which system maintenance can occur, in Universal
574	// Coordinated Time (UTC). For more information, see Amazon RDS Maintenance Window
575	// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#Concepts.DBMaintenance).
576	// Format: ddd:hh24:mi-ddd:hh24:mi The default is a 30-minute window selected at
577	// random from an 8-hour block of time for each AWS Region, occurring on a random
578	// day of the week. Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. Constraints:
579	// Minimum 30-minute window.
580	PreferredMaintenanceWindow *string
581
582	// The number of CPU cores and the number of threads per core for the DB instance
583	// class of the DB instance.
584	ProcessorFeatures []types.ProcessorFeature
585
586	// A value that specifies the order in which an Aurora Replica is promoted to the
587	// primary instance after a failure of the existing primary instance. For more
588	// information, see  Fault Tolerance for an Aurora DB Cluster
589	// (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Backups.html#Aurora.Managing.FaultTolerance)
590	// in the Amazon Aurora User Guide. Default: 1 Valid Values: 0 - 15
591	PromotionTier *int32
592
593	// A value that indicates whether the DB instance is publicly accessible. When the
594	// DB instance is publicly accessible, its DNS endpoint resolves to the private IP
595	// address from within the DB instance's VPC, and to the public IP address from
596	// outside of the DB instance's VPC. Access to the DB instance is ultimately
597	// controlled by the security group it uses, and that public access is not
598	// permitted if the security group assigned to the DB instance doesn't permit it.
599	// When the DB instance isn't publicly accessible, it is an internal DB instance
600	// with a DNS name that resolves to a private IP address. Default: The default
601	// behavior varies depending on whether DBSubnetGroupName is specified. If
602	// DBSubnetGroupName isn't specified, and PubliclyAccessible isn't specified, the
603	// following applies:
604	//
605	// * If the default VPC in the target region doesn’t have an
606	// Internet gateway attached to it, the DB instance is private.
607	//
608	// * If the default
609	// VPC in the target region has an Internet gateway attached to it, the DB instance
610	// is public.
611	//
612	// If DBSubnetGroupName is specified, and PubliclyAccessible isn't
613	// specified, the following applies:
614	//
615	// * If the subnets are part of a VPC that
616	// doesn’t have an Internet gateway attached to it, the DB instance is private.
617	//
618	// *
619	// If the subnets are part of a VPC that has an Internet gateway attached to it,
620	// the DB instance is public.
621	PubliclyAccessible *bool
622
623	// A value that indicates whether the DB instance is encrypted. By default, it
624	// isn't encrypted. Amazon Aurora Not applicable. The encryption for DB instances
625	// is managed by the DB cluster.
626	StorageEncrypted *bool
627
628	// Specifies the storage type to be associated with the DB instance. Valid values:
629	// standard | gp2 | io1 If you specify io1, you must also include a value for the
630	// Iops parameter. Default: io1 if the Iops parameter is specified, otherwise gp2
631	StorageType *string
632
633	// Tags to assign to the DB instance.
634	Tags []types.Tag
635
636	// The ARN from the key store with which to associate the instance for TDE
637	// encryption.
638	TdeCredentialArn *string
639
640	// The password for the given ARN from the key store in order to access the device.
641	TdeCredentialPassword *string
642
643	// The time zone of the DB instance. The time zone parameter is currently supported
644	// only by Microsoft SQL Server
645	// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SQLServer.html#SQLServer.Concepts.General.TimeZone).
646	Timezone *string
647
648	// A list of Amazon EC2 VPC security groups to associate with this DB instance.
649	// Amazon Aurora Not applicable. The associated list of EC2 VPC security groups is
650	// managed by the DB cluster. Default: The default EC2 VPC security group for the
651	// DB subnet group's VPC.
652	VpcSecurityGroupIds []string
653}
654
655type CreateDBInstanceOutput struct {
656
657	// Contains the details of an Amazon RDS DB instance. This data type is used as a
658	// response element in the DescribeDBInstances action.
659	DBInstance *types.DBInstance
660
661	// Metadata pertaining to the operation's result.
662	ResultMetadata middleware.Metadata
663}
664
665func addOperationCreateDBInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) {
666	err = stack.Serialize.Add(&awsAwsquery_serializeOpCreateDBInstance{}, middleware.After)
667	if err != nil {
668		return err
669	}
670	err = stack.Deserialize.Add(&awsAwsquery_deserializeOpCreateDBInstance{}, middleware.After)
671	if err != nil {
672		return err
673	}
674	if err = addSetLoggerMiddleware(stack, options); err != nil {
675		return err
676	}
677	if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
678		return err
679	}
680	if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
681		return err
682	}
683	if err = addResolveEndpointMiddleware(stack, options); err != nil {
684		return err
685	}
686	if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
687		return err
688	}
689	if err = addRetryMiddlewares(stack, options); err != nil {
690		return err
691	}
692	if err = addHTTPSignerV4Middleware(stack, options); err != nil {
693		return err
694	}
695	if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
696		return err
697	}
698	if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
699		return err
700	}
701	if err = addClientUserAgent(stack); err != nil {
702		return err
703	}
704	if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
705		return err
706	}
707	if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
708		return err
709	}
710	if err = addOpCreateDBInstanceValidationMiddleware(stack); err != nil {
711		return err
712	}
713	if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateDBInstance(options.Region), middleware.Before); err != nil {
714		return err
715	}
716	if err = addRequestIDRetrieverMiddleware(stack); err != nil {
717		return err
718	}
719	if err = addResponseErrorMiddleware(stack); err != nil {
720		return err
721	}
722	if err = addRequestResponseLogging(stack, options); err != nil {
723		return err
724	}
725	return nil
726}
727
728func newServiceMetadataMiddleware_opCreateDBInstance(region string) *awsmiddleware.RegisterServiceMetadata {
729	return &awsmiddleware.RegisterServiceMetadata{
730		Region:        region,
731		ServiceID:     ServiceID,
732		SigningName:   "rds",
733		OperationName: "CreateDBInstance",
734	}
735}
736