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// Changes the settings for an existing DB proxy. 15func (c *Client) ModifyDBProxy(ctx context.Context, params *ModifyDBProxyInput, optFns ...func(*Options)) (*ModifyDBProxyOutput, error) { 16 if params == nil { 17 params = &ModifyDBProxyInput{} 18 } 19 20 result, metadata, err := c.invokeOperation(ctx, "ModifyDBProxy", params, optFns, addOperationModifyDBProxyMiddlewares) 21 if err != nil { 22 return nil, err 23 } 24 25 out := result.(*ModifyDBProxyOutput) 26 out.ResultMetadata = metadata 27 return out, nil 28} 29 30type ModifyDBProxyInput struct { 31 32 // The identifier for the DBProxy to modify. 33 // 34 // This member is required. 35 DBProxyName *string 36 37 // The new authentication settings for the DBProxy. 38 Auth []types.UserAuthConfig 39 40 // Whether the proxy includes detailed information about SQL statements in its 41 // logs. This information helps you to debug issues involving SQL behavior or the 42 // performance and scalability of the proxy connections. The debug information 43 // includes the text of SQL statements that you submit through the proxy. Thus, 44 // only enable this setting when needed for debugging, and only when you have 45 // security measures in place to safeguard any sensitive information that appears 46 // in the logs. 47 DebugLogging *bool 48 49 // The number of seconds that a connection to the proxy can be inactive before the 50 // proxy disconnects it. You can set this value higher or lower than the connection 51 // timeout limit for the associated database. 52 IdleClientTimeout *int32 53 54 // The new identifier for the DBProxy. An identifier must begin with a letter and 55 // must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen 56 // or contain two consecutive hyphens. 57 NewDBProxyName *string 58 59 // Whether Transport Layer Security (TLS) encryption is required for connections to 60 // the proxy. By enabling this setting, you can enforce encrypted TLS connections 61 // to the proxy, even if the associated database doesn't use TLS. 62 RequireTLS *bool 63 64 // The Amazon Resource Name (ARN) of the IAM role that the proxy uses to access 65 // secrets in AWS Secrets Manager. 66 RoleArn *string 67 68 // The new list of security groups for the DBProxy. 69 SecurityGroups []string 70} 71 72type ModifyDBProxyOutput struct { 73 74 // The DBProxy object representing the new settings for the proxy. 75 DBProxy *types.DBProxy 76 77 // Metadata pertaining to the operation's result. 78 ResultMetadata middleware.Metadata 79} 80 81func addOperationModifyDBProxyMiddlewares(stack *middleware.Stack, options Options) (err error) { 82 err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyDBProxy{}, middleware.After) 83 if err != nil { 84 return err 85 } 86 err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyDBProxy{}, middleware.After) 87 if err != nil { 88 return err 89 } 90 if err = addSetLoggerMiddleware(stack, options); err != nil { 91 return err 92 } 93 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 94 return err 95 } 96 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 97 return err 98 } 99 if err = addResolveEndpointMiddleware(stack, options); err != nil { 100 return err 101 } 102 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 103 return err 104 } 105 if err = addRetryMiddlewares(stack, options); err != nil { 106 return err 107 } 108 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 109 return err 110 } 111 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 112 return err 113 } 114 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 115 return err 116 } 117 if err = addClientUserAgent(stack); err != nil { 118 return err 119 } 120 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 121 return err 122 } 123 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 124 return err 125 } 126 if err = addOpModifyDBProxyValidationMiddleware(stack); err != nil { 127 return err 128 } 129 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyDBProxy(options.Region), middleware.Before); err != nil { 130 return err 131 } 132 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 133 return err 134 } 135 if err = addResponseErrorMiddleware(stack); err != nil { 136 return err 137 } 138 if err = addRequestResponseLogging(stack, options); err != nil { 139 return err 140 } 141 return nil 142} 143 144func newServiceMetadataMiddleware_opModifyDBProxy(region string) *awsmiddleware.RegisterServiceMetadata { 145 return &awsmiddleware.RegisterServiceMetadata{ 146 Region: region, 147 ServiceID: ServiceID, 148 SigningName: "rds", 149 OperationName: "ModifyDBProxy", 150 } 151} 152