api_op_GetHealthCheckStatus.go (3253B)
1 // Code generated by smithy-go-codegen DO NOT EDIT. 2 3 package route53 4 5 import ( 6 "context" 7 8 "github.com/aws/aws-sdk-go-v2/service/route53/types" 9 "github.com/aws/smithy-go/middleware" 10 ) 11 12 // Gets status of a specified health check. 13 // 14 // This API is intended for use during development to diagnose behavior. It 15 // doesn’t support production use-cases with high query rates that require 16 // immediate and actionable responses. 17 func (c *Client) GetHealthCheckStatus(ctx context.Context, params *GetHealthCheckStatusInput, optFns ...func(*Options)) (*GetHealthCheckStatusOutput, error) { 18 if params == nil { 19 params = &GetHealthCheckStatusInput{} 20 } 21 22 result, metadata, err := c.invokeOperation(ctx, "GetHealthCheckStatus", params, optFns, c.addOperationGetHealthCheckStatusMiddlewares) 23 if err != nil { 24 return nil, err 25 } 26 27 out := result.(*GetHealthCheckStatusOutput) 28 out.ResultMetadata = metadata 29 return out, nil 30 } 31 32 // A request to get the status for a health check. 33 type GetHealthCheckStatusInput struct { 34 35 // The ID for the health check that you want the current status for. When you 36 // created the health check, CreateHealthCheck returned the ID in the response, in 37 // the HealthCheckId element. 38 // 39 // If you want to check the status of a calculated health check, you must use the 40 // Amazon Route 53 console or the CloudWatch console. You can't use 41 // GetHealthCheckStatus to get the status of a calculated health check. 42 // 43 // This member is required. 44 HealthCheckId *string 45 46 noSmithyDocumentSerde 47 } 48 49 // A complex type that contains the response to a GetHealthCheck request. 50 type GetHealthCheckStatusOutput struct { 51 52 // A list that contains one HealthCheckObservation element for each Amazon Route 53 // 53 health checker that is reporting a status about the health check endpoint. 54 // 55 // This member is required. 56 HealthCheckObservations []types.HealthCheckObservation 57 58 // Metadata pertaining to the operation's result. 59 ResultMetadata middleware.Metadata 60 61 noSmithyDocumentSerde 62 } 63 64 func (c *Client) addOperationGetHealthCheckStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { 65 err = stack.Serialize.Add(&awsRestxml_serializeOpGetHealthCheckStatus{}, middleware.After) 66 if err != nil { 67 return err 68 } 69 err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetHealthCheckStatus{}, middleware.After) 70 if err != nil { 71 return err 72 } 73 74 if err = addComputeContentLength(stack); err != nil { 75 return err 76 } 77 if err = addResolveEndpointMiddleware(stack, options); err != nil { 78 return err 79 } 80 if err = addComputePayloadSHA256(stack); err != nil { 81 return err 82 } 83 if err = addRecordResponseTiming(stack, options); err != nil { 84 return err 85 } 86 if err = addCredentialSource(stack, options); err != nil { 87 return err 88 } 89 if err = addOpGetHealthCheckStatusValidationMiddleware(stack); err != nil { 90 return err 91 } 92 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 93 return err 94 } 95 if err = addResponseErrorMiddleware(stack); err != nil { 96 return err 97 } 98 if err = addRequestResponseLogging(stack, options); err != nil { 99 return err 100 } 101 if err = addDisableHTTPSMiddleware(stack, options); err != nil { 102 return err 103 } 104 if err = addInterceptors(stack, options); err != nil { 105 return err 106 } 107 return nil 108 }