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 "time" 13) 14 15// Returns information about the specified broker. 16func (c *Client) DescribeBroker(ctx context.Context, params *DescribeBrokerInput, optFns ...func(*Options)) (*DescribeBrokerOutput, error) { 17 if params == nil { 18 params = &DescribeBrokerInput{} 19 } 20 21 result, metadata, err := c.invokeOperation(ctx, "DescribeBroker", params, optFns, addOperationDescribeBrokerMiddlewares) 22 if err != nil { 23 return nil, err 24 } 25 26 out := result.(*DescribeBrokerOutput) 27 out.ResultMetadata = metadata 28 return out, nil 29} 30 31type DescribeBrokerInput struct { 32 33 // The name of the broker. This value must be unique in your AWS account, 1-50 34 // characters long, must contain only letters, numbers, dashes, and underscores, 35 // and must not contain whitespaces, brackets, wildcard characters, or special 36 // characters. 37 // 38 // This member is required. 39 BrokerId *string 40} 41 42type DescribeBrokerOutput struct { 43 44 // The authentication strategy used to secure the broker. 45 AuthenticationStrategy types.AuthenticationStrategy 46 47 // Required. Enables automatic upgrades to new minor versions for brokers, as 48 // Apache releases the versions. The automatic upgrades occur during the 49 // maintenance window of the broker or after a manual broker reboot. 50 AutoMinorVersionUpgrade bool 51 52 // The Amazon Resource Name (ARN) of the broker. 53 BrokerArn *string 54 55 // The unique ID that Amazon MQ generates for the broker. 56 BrokerId *string 57 58 // A list of information about allocated brokers. 59 BrokerInstances []types.BrokerInstance 60 61 // The name of the broker. This value must be unique in your AWS account, 1-50 62 // characters long, must contain only letters, numbers, dashes, and underscores, 63 // and must not contain whitespaces, brackets, wildcard characters, or special 64 // characters. 65 BrokerName *string 66 67 // The status of the broker. 68 BrokerState types.BrokerState 69 70 // The list of all revisions for the specified configuration. 71 Configurations *types.Configurations 72 73 // The time when the broker was created. 74 Created *time.Time 75 76 // Required. The deployment mode of the broker. 77 DeploymentMode types.DeploymentMode 78 79 // Encryption options for the broker. 80 EncryptionOptions *types.EncryptionOptions 81 82 // Required. The type of broker engine. Note: Currently, Amazon MQ supports 83 // ACTIVEMQ and RABBITMQ. 84 EngineType types.EngineType 85 86 // The version of the broker engine. For a list of supported engine versions, see 87 // https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/broker-engine.html 88 EngineVersion *string 89 90 // The broker's instance type. 91 HostInstanceType *string 92 93 // The metadata of the LDAP server used to authenticate and authorize connections 94 // to the broker. 95 LdapServerMetadata *types.LdapServerMetadataOutput 96 97 // The list of information about logs currently enabled and pending to be deployed 98 // for the specified broker. 99 Logs *types.LogsSummary 100 101 // The parameters that determine the WeeklyStartTime. 102 MaintenanceWindowStartTime *types.WeeklyStartTime 103 104 // The authentication strategy that will be applied when the broker is rebooted. 105 PendingAuthenticationStrategy types.AuthenticationStrategy 106 107 // The version of the broker engine to upgrade to. For a list of supported engine 108 // versions, see 109 // https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/broker-engine.html 110 PendingEngineVersion *string 111 112 // The host instance type of the broker to upgrade to. For a list of supported 113 // instance types, see 114 // https://docs.aws.amazon.com/amazon-mq/latest/developer-guide//broker.html#broker-instance-types 115 PendingHostInstanceType *string 116 117 // The metadata of the LDAP server that will be used to authenticate and authorize 118 // connections to the broker once it is rebooted. 119 PendingLdapServerMetadata *types.LdapServerMetadataOutput 120 121 // The list of pending security groups to authorize connections to brokers. 122 PendingSecurityGroups []string 123 124 // Required. Enables connections from applications outside of the VPC that hosts 125 // the broker's subnets. 126 PubliclyAccessible bool 127 128 // The list of security groups (1 minimum, 5 maximum) that authorizes connections 129 // to brokers. 130 SecurityGroups []string 131 132 // The broker's storage type. 133 StorageType types.BrokerStorageType 134 135 // The list of groups that define which subnets and IP ranges the broker can use 136 // from different Availability Zones. A SINGLE_INSTANCE deployment requires one 137 // subnet (for example, the default subnet). An ACTIVE_STANDBY_MULTI_AZ deployment 138 // (ACTIVEMQ) requires two subnets. A CLUSTER_MULTI_AZ deployment (RABBITMQ) has no 139 // subnet requirements when deployed with public accessibility, deployment without 140 // public accessibility requires at least one subnet. 141 SubnetIds []string 142 143 // The list of all tags associated with this broker. 144 Tags map[string]string 145 146 // The list of all broker usernames for the specified broker. 147 Users []types.UserSummary 148 149 // Metadata pertaining to the operation's result. 150 ResultMetadata middleware.Metadata 151} 152 153func addOperationDescribeBrokerMiddlewares(stack *middleware.Stack, options Options) (err error) { 154 err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeBroker{}, middleware.After) 155 if err != nil { 156 return err 157 } 158 err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeBroker{}, middleware.After) 159 if err != nil { 160 return err 161 } 162 if err = addSetLoggerMiddleware(stack, options); err != nil { 163 return err 164 } 165 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 166 return err 167 } 168 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 169 return err 170 } 171 if err = addResolveEndpointMiddleware(stack, options); err != nil { 172 return err 173 } 174 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 175 return err 176 } 177 if err = addRetryMiddlewares(stack, options); err != nil { 178 return err 179 } 180 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 181 return err 182 } 183 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 184 return err 185 } 186 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 187 return err 188 } 189 if err = addClientUserAgent(stack); err != nil { 190 return err 191 } 192 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 193 return err 194 } 195 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 196 return err 197 } 198 if err = addOpDescribeBrokerValidationMiddleware(stack); err != nil { 199 return err 200 } 201 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeBroker(options.Region), middleware.Before); err != nil { 202 return err 203 } 204 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 205 return err 206 } 207 if err = addResponseErrorMiddleware(stack); err != nil { 208 return err 209 } 210 if err = addRequestResponseLogging(stack, options); err != nil { 211 return err 212 } 213 return nil 214} 215 216func newServiceMetadataMiddleware_opDescribeBroker(region string) *awsmiddleware.RegisterServiceMetadata { 217 return &awsmiddleware.RegisterServiceMetadata{ 218 Region: region, 219 ServiceID: ServiceID, 220 SigningName: "mq", 221 OperationName: "DescribeBroker", 222 } 223} 224