src

Go monorepo.
git clone git://code.dwrz.net/src
Log | Files | Refs

api_op_GetHealthCheckCount.go (2450B)


      1 // Code generated by smithy-go-codegen DO NOT EDIT.
      2 
      3 package route53
      4 
      5 import (
      6 	"context"
      7 
      8 	"github.com/aws/smithy-go/middleware"
      9 )
     10 
     11 // Retrieves the number of health checks that are associated with the current
     12 // Amazon Web Services account.
     13 func (c *Client) GetHealthCheckCount(ctx context.Context, params *GetHealthCheckCountInput, optFns ...func(*Options)) (*GetHealthCheckCountOutput, error) {
     14 	if params == nil {
     15 		params = &GetHealthCheckCountInput{}
     16 	}
     17 
     18 	result, metadata, err := c.invokeOperation(ctx, "GetHealthCheckCount", params, optFns, c.addOperationGetHealthCheckCountMiddlewares)
     19 	if err != nil {
     20 		return nil, err
     21 	}
     22 
     23 	out := result.(*GetHealthCheckCountOutput)
     24 	out.ResultMetadata = metadata
     25 	return out, nil
     26 }
     27 
     28 // A request for the number of health checks that are associated with the current
     29 // Amazon Web Services account.
     30 type GetHealthCheckCountInput struct {
     31 	noSmithyDocumentSerde
     32 }
     33 
     34 // A complex type that contains the response to a GetHealthCheckCount request.
     35 type GetHealthCheckCountOutput struct {
     36 
     37 	// The number of health checks associated with the current Amazon Web Services
     38 	// account.
     39 	//
     40 	// This member is required.
     41 	HealthCheckCount *int64
     42 
     43 	// Metadata pertaining to the operation's result.
     44 	ResultMetadata middleware.Metadata
     45 
     46 	noSmithyDocumentSerde
     47 }
     48 
     49 func (c *Client) addOperationGetHealthCheckCountMiddlewares(stack *middleware.Stack, options Options) (err error) {
     50 	err = stack.Serialize.Add(&awsRestxml_serializeOpGetHealthCheckCount{}, middleware.After)
     51 	if err != nil {
     52 		return err
     53 	}
     54 	err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetHealthCheckCount{}, middleware.After)
     55 	if err != nil {
     56 		return err
     57 	}
     58 
     59 	if err = addComputeContentLength(stack); err != nil {
     60 		return err
     61 	}
     62 	if err = addResolveEndpointMiddleware(stack, options); err != nil {
     63 		return err
     64 	}
     65 	if err = addComputePayloadSHA256(stack); err != nil {
     66 		return err
     67 	}
     68 	if err = addRecordResponseTiming(stack, options); err != nil {
     69 		return err
     70 	}
     71 	if err = addCredentialSource(stack, options); err != nil {
     72 		return err
     73 	}
     74 	if err = addRequestIDRetrieverMiddleware(stack); err != nil {
     75 		return err
     76 	}
     77 	if err = addResponseErrorMiddleware(stack); err != nil {
     78 		return err
     79 	}
     80 	if err = addRequestResponseLogging(stack, options); err != nil {
     81 		return err
     82 	}
     83 	if err = addDisableHTTPSMiddleware(stack, options); err != nil {
     84 		return err
     85 	}
     86 	if err = addInterceptors(stack, options); err != nil {
     87 		return err
     88 	}
     89 	return nil
     90 }