1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package rds 4 5import ( 6 "context" 7 "fmt" 8 awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" 9 "github.com/aws/aws-sdk-go-v2/aws/signer/v4" 10 presignedurlcust "github.com/aws/aws-sdk-go-v2/service/internal/presigned-url" 11 "github.com/aws/aws-sdk-go-v2/service/rds/types" 12 "github.com/aws/smithy-go/middleware" 13 smithyhttp "github.com/aws/smithy-go/transport/http" 14) 15 16// Creates a new DB instance that acts as a read replica for an existing source DB 17// instance. You can create a read replica for a DB instance running MySQL, 18// MariaDB, Oracle, PostgreSQL, or SQL Server. For more information, see Working 19// with Read Replicas 20// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html) in 21// the Amazon RDS User Guide. Amazon Aurora doesn't support this action. Call the 22// CreateDBInstance action to create a DB instance for an Aurora DB cluster. All 23// read replica DB instances are created with backups disabled. All other DB 24// instance attributes (including DB security groups and DB parameter groups) are 25// inherited from the source DB instance, except as specified. Your source DB 26// instance must have backup retention enabled. 27func (c *Client) CreateDBInstanceReadReplica(ctx context.Context, params *CreateDBInstanceReadReplicaInput, optFns ...func(*Options)) (*CreateDBInstanceReadReplicaOutput, error) { 28 if params == nil { 29 params = &CreateDBInstanceReadReplicaInput{} 30 } 31 32 result, metadata, err := c.invokeOperation(ctx, "CreateDBInstanceReadReplica", params, optFns, addOperationCreateDBInstanceReadReplicaMiddlewares) 33 if err != nil { 34 return nil, err 35 } 36 37 out := result.(*CreateDBInstanceReadReplicaOutput) 38 out.ResultMetadata = metadata 39 return out, nil 40} 41 42type CreateDBInstanceReadReplicaInput struct { 43 44 // The DB instance identifier of the read replica. This identifier is the unique 45 // key that identifies a DB instance. This parameter is stored as a lowercase 46 // string. 47 // 48 // This member is required. 49 DBInstanceIdentifier *string 50 51 // The identifier of the DB instance that will act as the source for the read 52 // replica. Each DB instance can have up to five read replicas. Constraints: 53 // 54 // * 55 // Must be the identifier of an existing MySQL, MariaDB, Oracle, PostgreSQL, or SQL 56 // Server DB instance. 57 // 58 // * Can specify a DB instance that is a MySQL read replica 59 // only if the source is running MySQL 5.6 or later. 60 // 61 // * For the limitations of 62 // Oracle read replicas, see Read Replica Limitations with Oracle 63 // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-read-replicas.html) 64 // in the Amazon RDS User Guide. 65 // 66 // * For the limitations of SQL Server read 67 // replicas, see Read Replica Limitations with Microsoft SQL Server 68 // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/SQLServer.ReadReplicas.Limitations.html) 69 // in the Amazon RDS User Guide. 70 // 71 // * Can specify a PostgreSQL DB instance only if 72 // the source is running PostgreSQL 9.3.5 or later (9.4.7 and higher for 73 // cross-region replication). 74 // 75 // * The specified DB instance must have automatic 76 // backups enabled, that is, its backup retention period must be greater than 0. 77 // 78 // * 79 // If the source DB instance is in the same AWS Region as the read replica, specify 80 // a valid DB instance identifier. 81 // 82 // * If the source DB instance is in a different 83 // AWS Region from the read replica, specify a valid DB instance ARN. For more 84 // information, see Constructing an ARN for Amazon RDS 85 // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing) 86 // in the Amazon RDS User Guide. This doesn't apply to SQL Server, which doesn't 87 // support cross-region replicas. 88 // 89 // This member is required. 90 SourceDBInstanceIdentifier *string 91 92 // A value that indicates whether minor engine upgrades are applied automatically 93 // to the read replica during the maintenance window. Default: Inherits from the 94 // source DB instance 95 AutoMinorVersionUpgrade *bool 96 97 // The Availability Zone (AZ) where the read replica will be created. Default: A 98 // random, system-chosen Availability Zone in the endpoint's AWS Region. Example: 99 // us-east-1d 100 AvailabilityZone *string 101 102 // A value that indicates whether to copy all tags from the read replica to 103 // snapshots of the read replica. By default, tags are not copied. 104 CopyTagsToSnapshot *bool 105 106 // The compute and memory capacity of the read replica, for example, db.m4.large. 107 // Not all DB instance classes are available in all AWS Regions, or for all 108 // database engines. For the full list of DB instance classes, and availability for 109 // your engine, see DB Instance Class 110 // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) 111 // in the Amazon RDS User Guide. Default: Inherits from the source DB instance. 112 DBInstanceClass *string 113 114 // The name of the DB parameter group to associate with this DB instance. If you do 115 // not specify a value for DBParameterGroupName, then Amazon RDS uses the 116 // DBParameterGroup of source DB instance for a same region read replica, or the 117 // default DBParameterGroup for the specified DB engine for a cross region read 118 // replica. Currently, specifying a parameter group for this operation is only 119 // supported for Oracle DB instances. Constraints: 120 // 121 // * Must be 1 to 255 letters, 122 // numbers, or hyphens. 123 // 124 // * First character must be a letter 125 // 126 // * Can't end with a 127 // hyphen or contain two consecutive hyphens 128 DBParameterGroupName *string 129 130 // Specifies a DB subnet group for the DB instance. The new DB instance is created 131 // in the VPC associated with the DB subnet group. If no DB subnet group is 132 // specified, then the new DB instance isn't created in a VPC. Constraints: 133 // 134 // * Can 135 // only be specified if the source DB instance identifier specifies a DB instance 136 // in another AWS Region. 137 // 138 // * If supplied, must match the name of an existing 139 // DBSubnetGroup. 140 // 141 // * The specified DB subnet group must be in the same AWS Region 142 // in which the operation is running. 143 // 144 // * All read replicas in one AWS Region that 145 // are created from the same source DB instance must either:> 146 // 147 // * Specify DB subnet 148 // groups from the same VPC. All these read replicas are created in the same 149 // VPC. 150 // 151 // * Not specify a DB subnet group. All these read replicas are created 152 // outside of any VPC. 153 // 154 // Example: mySubnetgroup 155 DBSubnetGroupName *string 156 157 // A value that indicates whether the DB instance has deletion protection enabled. 158 // The database can't be deleted when deletion protection is enabled. By default, 159 // deletion protection is disabled. For more information, see Deleting a DB 160 // Instance 161 // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). 162 DeletionProtection *bool 163 164 // The Active Directory directory ID to create the DB instance in. Currently, only 165 // MySQL, Microsoft SQL Server, Oracle, and PostgreSQL DB instances can be created 166 // in an Active Directory Domain. For more information, see Kerberos 167 // Authentication 168 // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/kerberos-authentication.html) 169 // in the Amazon RDS User Guide. 170 Domain *string 171 172 // Specify the name of the IAM role to be used when making API calls to the 173 // Directory Service. 174 DomainIAMRoleName *string 175 176 // The list of logs that the new DB instance is to export to CloudWatch Logs. The 177 // values in the list depend on the DB engine being used. For more information, see 178 // Publishing Database Logs to Amazon CloudWatch Logs 179 // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) 180 // in the Amazon RDS User Guide. 181 EnableCloudwatchLogsExports []string 182 183 // A value that indicates whether to enable mapping of AWS Identity and Access 184 // Management (IAM) accounts to database accounts. By default, mapping is disabled. 185 // For more information about IAM database authentication, see IAM Database 186 // Authentication for MySQL and PostgreSQL 187 // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html) 188 // in the Amazon RDS User Guide. 189 EnableIAMDatabaseAuthentication *bool 190 191 // A value that indicates whether to enable Performance Insights for the read 192 // replica. For more information, see Using Amazon Performance Insights 193 // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html) 194 // in the Amazon RDS User Guide. 195 EnablePerformanceInsights *bool 196 197 // The amount of Provisioned IOPS (input/output operations per second) to be 198 // initially allocated for the DB instance. 199 Iops *int32 200 201 // The AWS KMS key identifier for an encrypted read replica. The AWS KMS key 202 // identifier is the key ARN, key ID, alias ARN, or alias name for the AWS KMS CMK. 203 // If you create an encrypted read replica in the same AWS Region as the source DB 204 // instance, then do not specify a value for this parameter. A read replica in the 205 // same Region is always encrypted with the same AWS KMS CMK as the source DB 206 // instance. If you create an encrypted read replica in a different AWS Region, 207 // then you must specify a AWS KMS key identifier for the destination AWS Region. 208 // AWS KMS CMKs are specific to the AWS Region that they are created in, and you 209 // can't use CMKs from one AWS Region in another AWS Region. You can't create an 210 // encrypted read replica from an unencrypted DB instance. 211 KmsKeyId *string 212 213 // The upper limit to which Amazon RDS can automatically scale the storage of the 214 // DB instance. 215 MaxAllocatedStorage *int32 216 217 // The interval, in seconds, between points when Enhanced Monitoring metrics are 218 // collected for the read replica. To disable collecting Enhanced Monitoring 219 // metrics, specify 0. The default is 0. If MonitoringRoleArn is specified, then 220 // you must also set MonitoringInterval to a value other than 0. Valid Values: 0, 221 // 1, 5, 10, 15, 30, 60 222 MonitoringInterval *int32 223 224 // The ARN for the IAM role that permits RDS to send enhanced monitoring metrics to 225 // Amazon CloudWatch Logs. For example, arn:aws:iam:123456789012:role/emaccess. For 226 // information on creating a monitoring role, go to To create an IAM role for 227 // Amazon RDS Enhanced Monitoring 228 // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.html#USER_Monitoring.OS.IAMRole) 229 // in the Amazon RDS User Guide. If MonitoringInterval is set to a value other than 230 // 0, then you must supply a MonitoringRoleArn value. 231 MonitoringRoleArn *string 232 233 // A value that indicates whether the read replica is in a Multi-AZ deployment. You 234 // can create a read replica as a Multi-AZ DB instance. RDS creates a standby of 235 // your replica in another Availability Zone for failover support for the replica. 236 // Creating your read replica as a Multi-AZ DB instance is independent of whether 237 // the source database is a Multi-AZ DB instance. 238 MultiAZ *bool 239 240 // The option group the DB instance is associated with. If omitted, the option 241 // group associated with the source instance is used. For SQL Server, you must use 242 // the option group associated with the source instance. 243 OptionGroupName *string 244 245 // The AWS KMS key identifier for encryption of Performance Insights data. The AWS 246 // KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the AWS 247 // KMS customer master key (CMK). If you do not specify a value for 248 // PerformanceInsightsKMSKeyId, then Amazon RDS uses your default CMK. There is a 249 // default CMK for your AWS account. Your AWS account has a different default CMK 250 // for each AWS Region. 251 PerformanceInsightsKMSKeyId *string 252 253 // The amount of time, in days, to retain Performance Insights data. Valid values 254 // are 7 or 731 (2 years). 255 PerformanceInsightsRetentionPeriod *int32 256 257 // The port number that the DB instance uses for connections. Default: Inherits 258 // from the source DB instance Valid Values: 1150-65535 259 Port *int32 260 261 // The URL that contains a Signature Version 4 signed request for the 262 // CreateDBInstanceReadReplica API action in the source AWS Region that contains 263 // the source DB instance. You must specify this parameter when you create an 264 // encrypted read replica from another AWS Region by using the Amazon RDS API. 265 // Don't specify PreSignedUrl when you are creating an encrypted read replica in 266 // the same AWS Region. The presigned URL must be a valid request for the 267 // CreateDBInstanceReadReplica API action that can be executed in the source AWS 268 // Region that contains the encrypted source DB instance. The presigned URL request 269 // must contain the following parameter values: 270 // 271 // * DestinationRegion - The AWS 272 // Region that the encrypted read replica is created in. This AWS Region is the 273 // same one where the CreateDBInstanceReadReplica action is called that contains 274 // this presigned URL. For example, if you create an encrypted DB instance in the 275 // us-west-1 AWS Region, from a source DB instance in the us-east-2 AWS Region, 276 // then you call the CreateDBInstanceReadReplica action in the us-east-1 AWS Region 277 // and provide a presigned URL that contains a call to the 278 // CreateDBInstanceReadReplica action in the us-west-2 AWS Region. For this 279 // example, the DestinationRegion in the presigned URL must be set to the us-east-1 280 // AWS Region. 281 // 282 // * KmsKeyId - The AWS KMS key identifier for the key to use to 283 // encrypt the read replica in the destination AWS Region. This is the same 284 // identifier for both the CreateDBInstanceReadReplica action that is called in the 285 // destination AWS Region, and the action contained in the presigned URL. 286 // 287 // * 288 // SourceDBInstanceIdentifier - The DB instance identifier for the encrypted DB 289 // instance to be replicated. This identifier must be in the Amazon Resource Name 290 // (ARN) format for the source AWS Region. For example, if you are creating an 291 // encrypted read replica from a DB instance in the us-west-2 AWS Region, then your 292 // SourceDBInstanceIdentifier looks like the following example: 293 // arn:aws:rds:us-west-2:123456789012:instance:mysql-instance1-20161115. 294 // 295 // To learn 296 // how to generate a Signature Version 4 signed request, see Authenticating 297 // Requests: Using Query Parameters (AWS Signature Version 4) 298 // (https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html) 299 // and Signature Version 4 Signing Process 300 // (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). If you 301 // are using an AWS SDK tool or the AWS CLI, you can specify SourceRegion (or 302 // --source-region for the AWS CLI) instead of specifying PreSignedUrl manually. 303 // Specifying SourceRegion autogenerates a presigned URL that is a valid request 304 // for the operation that can be executed in the source AWS Region. SourceRegion 305 // isn't supported for SQL Server, because SQL Server on Amazon RDS doesn't support 306 // cross-region read replicas. 307 PreSignedUrl *string 308 309 // The number of CPU cores and the number of threads per core for the DB instance 310 // class of the DB instance. 311 ProcessorFeatures []types.ProcessorFeature 312 313 // A value that indicates whether the DB instance is publicly accessible. When the 314 // DB instance is publicly accessible, its DNS endpoint resolves to the private IP 315 // address from within the DB instance's VPC, and to the public IP address from 316 // outside of the DB instance's VPC. Access to the DB instance is ultimately 317 // controlled by the security group it uses, and that public access is not 318 // permitted if the security group assigned to the DB instance doesn't permit it. 319 // When the DB instance isn't publicly accessible, it is an internal DB instance 320 // with a DNS name that resolves to a private IP address. For more information, see 321 // CreateDBInstance. 322 PubliclyAccessible *bool 323 324 // The open mode of the replica database: mounted or read-only. This parameter is 325 // only supported for Oracle DB instances. Mounted DB replicas are included in 326 // Oracle Enterprise Edition. The main use case for mounted replicas is 327 // cross-Region disaster recovery. The primary database doesn't use Active Data 328 // Guard to transmit information to the mounted replica. Because it doesn't accept 329 // user connections, a mounted replica can't serve a read-only workload. You can 330 // create a combination of mounted and read-only DB replicas for the same primary 331 // DB instance. For more information, see Working with Oracle Read Replicas for 332 // Amazon RDS 333 // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-read-replicas.html) 334 // in the Amazon RDS User Guide. 335 ReplicaMode types.ReplicaMode 336 337 // The AWS region the resource is in. The presigned URL will be created with this 338 // region, if the PresignURL member is empty set. 339 SourceRegion *string 340 341 // Specifies the storage type to be associated with the read replica. Valid values: 342 // standard | gp2 | io1 If you specify io1, you must also include a value for the 343 // Iops parameter. Default: io1 if the Iops parameter is specified, otherwise gp2 344 StorageType *string 345 346 // A list of tags. For more information, see Tagging Amazon RDS Resources 347 // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) in 348 // the Amazon RDS User Guide. 349 Tags []types.Tag 350 351 // A value that indicates whether the DB instance class of the DB instance uses its 352 // default processor features. 353 UseDefaultProcessorFeatures *bool 354 355 // A list of EC2 VPC security groups to associate with the read replica. Default: 356 // The default EC2 VPC security group for the DB subnet group's VPC. 357 VpcSecurityGroupIds []string 358 359 // Used by the SDK's PresignURL autofill customization to specify the region the of 360 // the client's request. 361 destinationRegion *string 362} 363 364type CreateDBInstanceReadReplicaOutput struct { 365 366 // Contains the details of an Amazon RDS DB instance. This data type is used as a 367 // response element in the DescribeDBInstances action. 368 DBInstance *types.DBInstance 369 370 // Metadata pertaining to the operation's result. 371 ResultMetadata middleware.Metadata 372} 373 374func addOperationCreateDBInstanceReadReplicaMiddlewares(stack *middleware.Stack, options Options) (err error) { 375 err = stack.Serialize.Add(&awsAwsquery_serializeOpCreateDBInstanceReadReplica{}, middleware.After) 376 if err != nil { 377 return err 378 } 379 err = stack.Deserialize.Add(&awsAwsquery_deserializeOpCreateDBInstanceReadReplica{}, middleware.After) 380 if err != nil { 381 return err 382 } 383 if err = addSetLoggerMiddleware(stack, options); err != nil { 384 return err 385 } 386 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 387 return err 388 } 389 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 390 return err 391 } 392 if err = addResolveEndpointMiddleware(stack, options); err != nil { 393 return err 394 } 395 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 396 return err 397 } 398 if err = addRetryMiddlewares(stack, options); err != nil { 399 return err 400 } 401 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 402 return err 403 } 404 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 405 return err 406 } 407 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 408 return err 409 } 410 if err = addClientUserAgent(stack); err != nil { 411 return err 412 } 413 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 414 return err 415 } 416 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 417 return err 418 } 419 if err = addCreateDBInstanceReadReplicaPresignURLMiddleware(stack, options); err != nil { 420 return err 421 } 422 if err = addOpCreateDBInstanceReadReplicaValidationMiddleware(stack); err != nil { 423 return err 424 } 425 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateDBInstanceReadReplica(options.Region), middleware.Before); err != nil { 426 return err 427 } 428 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 429 return err 430 } 431 if err = addResponseErrorMiddleware(stack); err != nil { 432 return err 433 } 434 if err = addRequestResponseLogging(stack, options); err != nil { 435 return err 436 } 437 return nil 438} 439 440func copyCreateDBInstanceReadReplicaInputForPresign(params interface{}) (interface{}, error) { 441 input, ok := params.(*CreateDBInstanceReadReplicaInput) 442 if !ok { 443 return nil, fmt.Errorf("expect *CreateDBInstanceReadReplicaInput type, got %T", params) 444 } 445 cpy := *input 446 return &cpy, nil 447} 448func getCreateDBInstanceReadReplicaPreSignedUrl(params interface{}) (string, bool, error) { 449 input, ok := params.(*CreateDBInstanceReadReplicaInput) 450 if !ok { 451 return ``, false, fmt.Errorf("expect *CreateDBInstanceReadReplicaInput type, got %T", params) 452 } 453 if input.PreSignedUrl == nil || len(*input.PreSignedUrl) == 0 { 454 return ``, false, nil 455 } 456 return *input.PreSignedUrl, true, nil 457} 458func getCreateDBInstanceReadReplicaSourceRegion(params interface{}) (string, bool, error) { 459 input, ok := params.(*CreateDBInstanceReadReplicaInput) 460 if !ok { 461 return ``, false, fmt.Errorf("expect *CreateDBInstanceReadReplicaInput type, got %T", params) 462 } 463 if input.SourceRegion == nil || len(*input.SourceRegion) == 0 { 464 return ``, false, nil 465 } 466 return *input.SourceRegion, true, nil 467} 468func setCreateDBInstanceReadReplicaPreSignedUrl(params interface{}, value string) error { 469 input, ok := params.(*CreateDBInstanceReadReplicaInput) 470 if !ok { 471 return fmt.Errorf("expect *CreateDBInstanceReadReplicaInput type, got %T", params) 472 } 473 input.PreSignedUrl = &value 474 return nil 475} 476func setCreateDBInstanceReadReplicadestinationRegion(params interface{}, value string) error { 477 input, ok := params.(*CreateDBInstanceReadReplicaInput) 478 if !ok { 479 return fmt.Errorf("expect *CreateDBInstanceReadReplicaInput type, got %T", params) 480 } 481 input.destinationRegion = &value 482 return nil 483} 484func addCreateDBInstanceReadReplicaPresignURLMiddleware(stack *middleware.Stack, options Options) error { 485 return presignedurlcust.AddMiddleware(stack, presignedurlcust.Options{ 486 Accessor: presignedurlcust.ParameterAccessor{ 487 GetPresignedURL: getCreateDBInstanceReadReplicaPreSignedUrl, 488 489 GetSourceRegion: getCreateDBInstanceReadReplicaSourceRegion, 490 491 CopyInput: copyCreateDBInstanceReadReplicaInputForPresign, 492 493 SetDestinationRegion: setCreateDBInstanceReadReplicadestinationRegion, 494 495 SetPresignedURL: setCreateDBInstanceReadReplicaPreSignedUrl, 496 }, 497 Presigner: &presignAutoFillCreateDBInstanceReadReplicaClient{client: NewPresignClient(New(options))}, 498 }) 499} 500 501type presignAutoFillCreateDBInstanceReadReplicaClient struct { 502 client *PresignClient 503} 504 505// PresignURL is a middleware accessor that satisfies URLPresigner interface. 506func (c *presignAutoFillCreateDBInstanceReadReplicaClient) PresignURL(ctx context.Context, srcRegion string, params interface{}) (*v4.PresignedHTTPRequest, error) { 507 input, ok := params.(*CreateDBInstanceReadReplicaInput) 508 if !ok { 509 return nil, fmt.Errorf("expect *CreateDBInstanceReadReplicaInput type, got %T", params) 510 } 511 optFn := func(o *Options) { 512 o.Region = srcRegion 513 o.APIOptions = append(o.APIOptions, presignedurlcust.RemoveMiddleware) 514 } 515 presignOptFn := WithPresignClientFromClientOptions(optFn) 516 return c.client.PresignCreateDBInstanceReadReplica(ctx, input, presignOptFn) 517} 518 519func newServiceMetadataMiddleware_opCreateDBInstanceReadReplica(region string) *awsmiddleware.RegisterServiceMetadata { 520 return &awsmiddleware.RegisterServiceMetadata{ 521 Region: region, 522 ServiceID: ServiceID, 523 SigningName: "rds", 524 OperationName: "CreateDBInstanceReadReplica", 525 } 526} 527 528// PresignCreateDBInstanceReadReplica is used to generate a presigned HTTP Request 529// which contains presigned URL, signed headers and HTTP method used. 530func (c *PresignClient) PresignCreateDBInstanceReadReplica(ctx context.Context, params *CreateDBInstanceReadReplicaInput, optFns ...func(*PresignOptions)) (*v4.PresignedHTTPRequest, error) { 531 if params == nil { 532 params = &CreateDBInstanceReadReplicaInput{} 533 } 534 options := c.options.copy() 535 for _, fn := range optFns { 536 fn(&options) 537 } 538 clientOptFns := append(options.ClientOptions, withNopHTTPClientAPIOption) 539 540 result, _, err := c.client.invokeOperation(ctx, "CreateDBInstanceReadReplica", params, clientOptFns, 541 addOperationCreateDBInstanceReadReplicaMiddlewares, 542 presignConverter(options).convertToPresignMiddleware, 543 ) 544 if err != nil { 545 return nil, err 546 } 547 548 out := result.(*v4.PresignedHTTPRequest) 549 return out, nil 550} 551