1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package kafkaconnect 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/kafkaconnect/types" 10 "github.com/aws/smithy-go/middleware" 11 smithyhttp "github.com/aws/smithy-go/transport/http" 12 "time" 13) 14 15// Returns summary information about the connector. 16func (c *Client) DescribeConnector(ctx context.Context, params *DescribeConnectorInput, optFns ...func(*Options)) (*DescribeConnectorOutput, error) { 17 if params == nil { 18 params = &DescribeConnectorInput{} 19 } 20 21 result, metadata, err := c.invokeOperation(ctx, "DescribeConnector", params, optFns, c.addOperationDescribeConnectorMiddlewares) 22 if err != nil { 23 return nil, err 24 } 25 26 out := result.(*DescribeConnectorOutput) 27 out.ResultMetadata = metadata 28 return out, nil 29} 30 31type DescribeConnectorInput struct { 32 33 // The Amazon Resource Name (ARN) of the connector that you want to describe. 34 // 35 // This member is required. 36 ConnectorArn *string 37 38 noSmithyDocumentSerde 39} 40 41type DescribeConnectorOutput struct { 42 43 // Information about the capacity of the connector, whether it is auto scaled or 44 // provisioned. 45 Capacity *types.CapacityDescription 46 47 // The Amazon Resource Name (ARN) of the connector. 48 ConnectorArn *string 49 50 // A map of keys to values that represent the configuration for the connector. 51 ConnectorConfiguration map[string]string 52 53 // A summary description of the connector. 54 ConnectorDescription *string 55 56 // The name of the connector. 57 ConnectorName *string 58 59 // The state of the connector. 60 ConnectorState types.ConnectorState 61 62 // The time the connector was created. 63 CreationTime *time.Time 64 65 // The current version of the connector. 66 CurrentVersion *string 67 68 // The Apache Kafka cluster that the connector is connected to. 69 KafkaCluster *types.KafkaClusterDescription 70 71 // The type of client authentication used to connect to the Apache Kafka cluster. 72 // The value is NONE when no client authentication is used. 73 KafkaClusterClientAuthentication *types.KafkaClusterClientAuthenticationDescription 74 75 // Details of encryption in transit to the Apache Kafka cluster. 76 KafkaClusterEncryptionInTransit *types.KafkaClusterEncryptionInTransitDescription 77 78 // The version of Kafka Connect. It has to be compatible with both the Apache Kafka 79 // cluster's version and the plugins. 80 KafkaConnectVersion *string 81 82 // Details about delivering logs to Amazon CloudWatch Logs. 83 LogDelivery *types.LogDeliveryDescription 84 85 // Specifies which plugins were used for this connector. 86 Plugins []types.PluginDescription 87 88 // The Amazon Resource Name (ARN) of the IAM role used by the connector to access 89 // Amazon Web Services resources. 90 ServiceExecutionRoleArn *string 91 92 // Specifies which worker configuration was used for the connector. 93 WorkerConfiguration *types.WorkerConfigurationDescription 94 95 // Metadata pertaining to the operation's result. 96 ResultMetadata middleware.Metadata 97 98 noSmithyDocumentSerde 99} 100 101func (c *Client) addOperationDescribeConnectorMiddlewares(stack *middleware.Stack, options Options) (err error) { 102 err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeConnector{}, middleware.After) 103 if err != nil { 104 return err 105 } 106 err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeConnector{}, middleware.After) 107 if err != nil { 108 return err 109 } 110 if err = addSetLoggerMiddleware(stack, options); err != nil { 111 return err 112 } 113 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 114 return err 115 } 116 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 117 return err 118 } 119 if err = addResolveEndpointMiddleware(stack, options); err != nil { 120 return err 121 } 122 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 123 return err 124 } 125 if err = addRetryMiddlewares(stack, options); err != nil { 126 return err 127 } 128 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 129 return err 130 } 131 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 132 return err 133 } 134 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 135 return err 136 } 137 if err = addClientUserAgent(stack); err != nil { 138 return err 139 } 140 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 141 return err 142 } 143 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 144 return err 145 } 146 if err = addOpDescribeConnectorValidationMiddleware(stack); err != nil { 147 return err 148 } 149 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeConnector(options.Region), middleware.Before); err != nil { 150 return err 151 } 152 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 153 return err 154 } 155 if err = addResponseErrorMiddleware(stack); err != nil { 156 return err 157 } 158 if err = addRequestResponseLogging(stack, options); err != nil { 159 return err 160 } 161 return nil 162} 163 164func newServiceMetadataMiddleware_opDescribeConnector(region string) *awsmiddleware.RegisterServiceMetadata { 165 return &awsmiddleware.RegisterServiceMetadata{ 166 Region: region, 167 ServiceID: ServiceID, 168 SigningName: "kafkaconnect", 169 OperationName: "DescribeConnector", 170 } 171} 172