src

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

api_op_GetHostedZone.go (4325B)


      1 // Code generated by smithy-go-codegen DO NOT EDIT.
      2 
      3 package route53
      4 
      5 import (
      6 	"context"
      7 	"fmt"
      8 	awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
      9 	"github.com/aws/aws-sdk-go-v2/service/route53/types"
     10 	"github.com/aws/smithy-go/middleware"
     11 	smithyhttp "github.com/aws/smithy-go/transport/http"
     12 )
     13 
     14 // Gets information about a specified hosted zone including the four name servers
     15 // assigned to the hosted zone.
     16 func (c *Client) GetHostedZone(ctx context.Context, params *GetHostedZoneInput, optFns ...func(*Options)) (*GetHostedZoneOutput, error) {
     17 	if params == nil {
     18 		params = &GetHostedZoneInput{}
     19 	}
     20 
     21 	result, metadata, err := c.invokeOperation(ctx, "GetHostedZone", params, optFns, c.addOperationGetHostedZoneMiddlewares)
     22 	if err != nil {
     23 		return nil, err
     24 	}
     25 
     26 	out := result.(*GetHostedZoneOutput)
     27 	out.ResultMetadata = metadata
     28 	return out, nil
     29 }
     30 
     31 // A request to get information about a specified hosted zone.
     32 type GetHostedZoneInput struct {
     33 
     34 	// The ID of the hosted zone that you want to get information about.
     35 	//
     36 	// This member is required.
     37 	Id *string
     38 
     39 	noSmithyDocumentSerde
     40 }
     41 
     42 // A complex type that contain the response to a GetHostedZone request.
     43 type GetHostedZoneOutput struct {
     44 
     45 	// A complex type that contains general information about the specified hosted
     46 	// zone.
     47 	//
     48 	// This member is required.
     49 	HostedZone *types.HostedZone
     50 
     51 	// A complex type that lists the Amazon Route 53 name servers for the specified
     52 	// hosted zone.
     53 	DelegationSet *types.DelegationSet
     54 
     55 	// A complex type that contains information about the VPCs that are associated
     56 	// with the specified hosted zone.
     57 	VPCs []types.VPC
     58 
     59 	// Metadata pertaining to the operation's result.
     60 	ResultMetadata middleware.Metadata
     61 
     62 	noSmithyDocumentSerde
     63 }
     64 
     65 func (c *Client) addOperationGetHostedZoneMiddlewares(stack *middleware.Stack, options Options) (err error) {
     66 	if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
     67 		return err
     68 	}
     69 	err = stack.Serialize.Add(&awsRestxml_serializeOpGetHostedZone{}, middleware.After)
     70 	if err != nil {
     71 		return err
     72 	}
     73 	err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetHostedZone{}, middleware.After)
     74 	if err != nil {
     75 		return err
     76 	}
     77 	if err := addProtocolFinalizerMiddlewares(stack, options, "GetHostedZone"); err != nil {
     78 		return fmt.Errorf("add protocol finalizers: %v", err)
     79 	}
     80 
     81 	if err = addlegacyEndpointContextSetter(stack, options); err != nil {
     82 		return err
     83 	}
     84 	if err = addSetLoggerMiddleware(stack, options); err != nil {
     85 		return err
     86 	}
     87 	if err = addClientRequestID(stack); err != nil {
     88 		return err
     89 	}
     90 	if err = addComputeContentLength(stack); err != nil {
     91 		return err
     92 	}
     93 	if err = addResolveEndpointMiddleware(stack, options); err != nil {
     94 		return err
     95 	}
     96 	if err = addComputePayloadSHA256(stack); err != nil {
     97 		return err
     98 	}
     99 	if err = addRetry(stack, options); err != nil {
    100 		return err
    101 	}
    102 	if err = addRawResponseToMetadata(stack); err != nil {
    103 		return err
    104 	}
    105 	if err = addRecordResponseTiming(stack); err != nil {
    106 		return err
    107 	}
    108 	if err = addClientUserAgent(stack, options); err != nil {
    109 		return err
    110 	}
    111 	if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
    112 		return err
    113 	}
    114 	if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
    115 		return err
    116 	}
    117 	if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
    118 		return err
    119 	}
    120 	if err = addOpGetHostedZoneValidationMiddleware(stack); err != nil {
    121 		return err
    122 	}
    123 	if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHostedZone(options.Region), middleware.Before); err != nil {
    124 		return err
    125 	}
    126 	if err = addRecursionDetection(stack); err != nil {
    127 		return err
    128 	}
    129 	if err = addRequestIDRetrieverMiddleware(stack); err != nil {
    130 		return err
    131 	}
    132 	if err = addResponseErrorMiddleware(stack); err != nil {
    133 		return err
    134 	}
    135 	if err = addSanitizeURLMiddleware(stack); err != nil {
    136 		return err
    137 	}
    138 	if err = addRequestResponseLogging(stack, options); err != nil {
    139 		return err
    140 	}
    141 	if err = addDisableHTTPSMiddleware(stack, options); err != nil {
    142 		return err
    143 	}
    144 	return nil
    145 }
    146 
    147 func newServiceMetadataMiddleware_opGetHostedZone(region string) *awsmiddleware.RegisterServiceMetadata {
    148 	return &awsmiddleware.RegisterServiceMetadata{
    149 		Region:        region,
    150 		ServiceID:     ServiceID,
    151 		OperationName: "GetHostedZone",
    152 	}
    153 }