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// Override the system-default Secure Sockets Layer/Transport Layer Security 15// (SSL/TLS) certificate for Amazon RDS for new DB instances temporarily, or remove 16// the override. By using this operation, you can specify an RDS-approved SSL/TLS 17// certificate for new DB instances that is different from the default certificate 18// provided by RDS. You can also use this operation to remove the override, so that 19// new DB instances use the default certificate provided by RDS. You might need to 20// override the default certificate in the following situations: 21// 22// * You already 23// migrated your applications to support the latest certificate authority (CA) 24// certificate, but the new CA certificate is not yet the RDS default CA 25// certificate for the specified AWS Region. 26// 27// * RDS has already moved to a new 28// default CA certificate for the specified AWS Region, but you are still in the 29// process of supporting the new CA certificate. In this case, you temporarily need 30// additional time to finish your application changes. 31// 32// For more information about 33// rotating your SSL/TLS certificate for RDS DB engines, see Rotating Your SSL/TLS 34// Certificate 35// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL-certificate-rotation.html) 36// in the Amazon RDS User Guide. For more information about rotating your SSL/TLS 37// certificate for Aurora DB engines, see Rotating Your SSL/TLS Certificate 38// (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.SSL-certificate-rotation.html) 39// in the Amazon Aurora User Guide. 40func (c *Client) ModifyCertificates(ctx context.Context, params *ModifyCertificatesInput, optFns ...func(*Options)) (*ModifyCertificatesOutput, error) { 41 if params == nil { 42 params = &ModifyCertificatesInput{} 43 } 44 45 result, metadata, err := c.invokeOperation(ctx, "ModifyCertificates", params, optFns, addOperationModifyCertificatesMiddlewares) 46 if err != nil { 47 return nil, err 48 } 49 50 out := result.(*ModifyCertificatesOutput) 51 out.ResultMetadata = metadata 52 return out, nil 53} 54 55type ModifyCertificatesInput struct { 56 57 // The new default certificate identifier to override the current one with. To 58 // determine the valid values, use the describe-certificates AWS CLI command or the 59 // DescribeCertificates API operation. 60 CertificateIdentifier *string 61 62 // A value that indicates whether to remove the override for the default 63 // certificate. If the override is removed, the default certificate is the system 64 // default. 65 RemoveCustomerOverride *bool 66} 67 68type ModifyCertificatesOutput struct { 69 70 // A CA certificate for an AWS account. 71 Certificate *types.Certificate 72 73 // Metadata pertaining to the operation's result. 74 ResultMetadata middleware.Metadata 75} 76 77func addOperationModifyCertificatesMiddlewares(stack *middleware.Stack, options Options) (err error) { 78 err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyCertificates{}, middleware.After) 79 if err != nil { 80 return err 81 } 82 err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyCertificates{}, middleware.After) 83 if err != nil { 84 return err 85 } 86 if err = addSetLoggerMiddleware(stack, options); err != nil { 87 return err 88 } 89 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 90 return err 91 } 92 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 93 return err 94 } 95 if err = addResolveEndpointMiddleware(stack, options); err != nil { 96 return err 97 } 98 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 99 return err 100 } 101 if err = addRetryMiddlewares(stack, options); err != nil { 102 return err 103 } 104 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 105 return err 106 } 107 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 108 return err 109 } 110 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 111 return err 112 } 113 if err = addClientUserAgent(stack); err != nil { 114 return err 115 } 116 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 117 return err 118 } 119 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 120 return err 121 } 122 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyCertificates(options.Region), middleware.Before); err != nil { 123 return err 124 } 125 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 126 return err 127 } 128 if err = addResponseErrorMiddleware(stack); err != nil { 129 return err 130 } 131 if err = addRequestResponseLogging(stack, options); err != nil { 132 return err 133 } 134 return nil 135} 136 137func newServiceMetadataMiddleware_opModifyCertificates(region string) *awsmiddleware.RegisterServiceMetadata { 138 return &awsmiddleware.RegisterServiceMetadata{ 139 Region: region, 140 ServiceID: ServiceID, 141 SigningName: "rds", 142 OperationName: "ModifyCertificates", 143 } 144} 145