api_op_GetReusableDelegationSet.go (4322B)
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 // Retrieves information about a specified reusable delegation set, including the 15 // four name servers that are assigned to the delegation set. 16 func (c *Client) GetReusableDelegationSet(ctx context.Context, params *GetReusableDelegationSetInput, optFns ...func(*Options)) (*GetReusableDelegationSetOutput, error) { 17 if params == nil { 18 params = &GetReusableDelegationSetInput{} 19 } 20 21 result, metadata, err := c.invokeOperation(ctx, "GetReusableDelegationSet", params, optFns, c.addOperationGetReusableDelegationSetMiddlewares) 22 if err != nil { 23 return nil, err 24 } 25 26 out := result.(*GetReusableDelegationSetOutput) 27 out.ResultMetadata = metadata 28 return out, nil 29 } 30 31 // A request to get information about a specified reusable delegation set. 32 type GetReusableDelegationSetInput struct { 33 34 // The ID of the reusable delegation set that you want to get a list of name 35 // servers for. 36 // 37 // This member is required. 38 Id *string 39 40 noSmithyDocumentSerde 41 } 42 43 // A complex type that contains the response to the GetReusableDelegationSet 44 // request. 45 type GetReusableDelegationSetOutput struct { 46 47 // A complex type that contains information about the reusable delegation set. 48 // 49 // This member is required. 50 DelegationSet *types.DelegationSet 51 52 // Metadata pertaining to the operation's result. 53 ResultMetadata middleware.Metadata 54 55 noSmithyDocumentSerde 56 } 57 58 func (c *Client) addOperationGetReusableDelegationSetMiddlewares(stack *middleware.Stack, options Options) (err error) { 59 if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { 60 return err 61 } 62 err = stack.Serialize.Add(&awsRestxml_serializeOpGetReusableDelegationSet{}, middleware.After) 63 if err != nil { 64 return err 65 } 66 err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetReusableDelegationSet{}, middleware.After) 67 if err != nil { 68 return err 69 } 70 if err := addProtocolFinalizerMiddlewares(stack, options, "GetReusableDelegationSet"); err != nil { 71 return fmt.Errorf("add protocol finalizers: %v", err) 72 } 73 74 if err = addlegacyEndpointContextSetter(stack, options); err != nil { 75 return err 76 } 77 if err = addSetLoggerMiddleware(stack, options); err != nil { 78 return err 79 } 80 if err = addClientRequestID(stack); err != nil { 81 return err 82 } 83 if err = addComputeContentLength(stack); err != nil { 84 return err 85 } 86 if err = addResolveEndpointMiddleware(stack, options); err != nil { 87 return err 88 } 89 if err = addComputePayloadSHA256(stack); err != nil { 90 return err 91 } 92 if err = addRetry(stack, options); err != nil { 93 return err 94 } 95 if err = addRawResponseToMetadata(stack); err != nil { 96 return err 97 } 98 if err = addRecordResponseTiming(stack); err != nil { 99 return err 100 } 101 if err = addClientUserAgent(stack, options); err != nil { 102 return err 103 } 104 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 105 return err 106 } 107 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 108 return err 109 } 110 if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { 111 return err 112 } 113 if err = addOpGetReusableDelegationSetValidationMiddleware(stack); err != nil { 114 return err 115 } 116 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetReusableDelegationSet(options.Region), middleware.Before); err != nil { 117 return err 118 } 119 if err = addRecursionDetection(stack); err != nil { 120 return err 121 } 122 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 123 return err 124 } 125 if err = addResponseErrorMiddleware(stack); err != nil { 126 return err 127 } 128 if err = addSanitizeURLMiddleware(stack); err != nil { 129 return err 130 } 131 if err = addRequestResponseLogging(stack, options); err != nil { 132 return err 133 } 134 if err = addDisableHTTPSMiddleware(stack, options); err != nil { 135 return err 136 } 137 return nil 138 } 139 140 func newServiceMetadataMiddleware_opGetReusableDelegationSet(region string) *awsmiddleware.RegisterServiceMetadata { 141 return &awsmiddleware.RegisterServiceMetadata{ 142 Region: region, 143 ServiceID: ServiceID, 144 OperationName: "GetReusableDelegationSet", 145 } 146 }