1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package mq 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/mq/types" 10 "github.com/aws/smithy-go/middleware" 11 smithyhttp "github.com/aws/smithy-go/transport/http" 12) 13 14// Adds a pending configuration change to a broker. 15func (c *Client) UpdateBroker(ctx context.Context, params *UpdateBrokerInput, optFns ...func(*Options)) (*UpdateBrokerOutput, error) { 16 if params == nil { 17 params = &UpdateBrokerInput{} 18 } 19 20 result, metadata, err := c.invokeOperation(ctx, "UpdateBroker", params, optFns, addOperationUpdateBrokerMiddlewares) 21 if err != nil { 22 return nil, err 23 } 24 25 out := result.(*UpdateBrokerOutput) 26 out.ResultMetadata = metadata 27 return out, nil 28} 29 30// Updates the broker using the specified properties. 31type UpdateBrokerInput struct { 32 33 // The unique ID that Amazon MQ generates for the broker. 34 // 35 // This member is required. 36 BrokerId *string 37 38 // The authentication strategy used to secure the broker. 39 AuthenticationStrategy types.AuthenticationStrategy 40 41 // Enables automatic upgrades to new minor versions for brokers, as Apache releases 42 // the versions. The automatic upgrades occur during the maintenance window of the 43 // broker or after a manual broker reboot. 44 AutoMinorVersionUpgrade bool 45 46 // A list of information about the configuration. 47 Configuration *types.ConfigurationId 48 49 // The version of the broker engine. For a list of supported engine versions, see 50 // https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/broker-engine.html 51 EngineVersion *string 52 53 // The host instance type of the broker to upgrade to. For a list of supported 54 // instance types, see 55 // https://docs.aws.amazon.com/amazon-mq/latest/developer-guide//broker.html#broker-instance-types 56 HostInstanceType *string 57 58 // The metadata of the LDAP server used to authenticate and authorize connections 59 // to the broker. 60 LdapServerMetadata *types.LdapServerMetadataInput 61 62 // Enables Amazon CloudWatch logging for brokers. 63 Logs *types.Logs 64 65 // The list of security groups (1 minimum, 5 maximum) that authorizes connections 66 // to brokers. 67 SecurityGroups []string 68} 69 70type UpdateBrokerOutput struct { 71 72 // The authentication strategy used to secure the broker. 73 AuthenticationStrategy types.AuthenticationStrategy 74 75 // The new value of automatic upgrades to new minor version for brokers. 76 AutoMinorVersionUpgrade bool 77 78 // Required. The unique ID that Amazon MQ generates for the broker. 79 BrokerId *string 80 81 // The ID of the updated configuration. 82 Configuration *types.ConfigurationId 83 84 // The version of the broker engine to upgrade to. For a list of supported engine 85 // versions, see 86 // https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/broker-engine.html 87 EngineVersion *string 88 89 // The host instance type of the broker to upgrade to. For a list of supported 90 // instance types, see 91 // https://docs.aws.amazon.com/amazon-mq/latest/developer-guide//broker.html#broker-instance-types 92 HostInstanceType *string 93 94 // The metadata of the LDAP server used to authenticate and authorize connections 95 // to the broker. 96 LdapServerMetadata *types.LdapServerMetadataOutput 97 98 // The list of information about logs to be enabled for the specified broker. 99 Logs *types.Logs 100 101 // The list of security groups (1 minimum, 5 maximum) that authorizes connections 102 // to brokers. 103 SecurityGroups []string 104 105 // Metadata pertaining to the operation's result. 106 ResultMetadata middleware.Metadata 107} 108 109func addOperationUpdateBrokerMiddlewares(stack *middleware.Stack, options Options) (err error) { 110 err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateBroker{}, middleware.After) 111 if err != nil { 112 return err 113 } 114 err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateBroker{}, middleware.After) 115 if err != nil { 116 return err 117 } 118 if err = addSetLoggerMiddleware(stack, options); err != nil { 119 return err 120 } 121 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 122 return err 123 } 124 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 125 return err 126 } 127 if err = addResolveEndpointMiddleware(stack, options); err != nil { 128 return err 129 } 130 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 131 return err 132 } 133 if err = addRetryMiddlewares(stack, options); err != nil { 134 return err 135 } 136 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 137 return err 138 } 139 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 140 return err 141 } 142 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 143 return err 144 } 145 if err = addClientUserAgent(stack); err != nil { 146 return err 147 } 148 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 149 return err 150 } 151 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 152 return err 153 } 154 if err = addOpUpdateBrokerValidationMiddleware(stack); err != nil { 155 return err 156 } 157 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateBroker(options.Region), middleware.Before); err != nil { 158 return err 159 } 160 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 161 return err 162 } 163 if err = addResponseErrorMiddleware(stack); err != nil { 164 return err 165 } 166 if err = addRequestResponseLogging(stack, options); err != nil { 167 return err 168 } 169 return nil 170} 171 172func newServiceMetadataMiddleware_opUpdateBroker(region string) *awsmiddleware.RegisterServiceMetadata { 173 return &awsmiddleware.RegisterServiceMetadata{ 174 Region: region, 175 ServiceID: ServiceID, 176 SigningName: "mq", 177 OperationName: "UpdateBroker", 178 } 179} 180