api_op_GetReusableDelegationSetLimit.go (5112B)
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 the maximum number of hosted zones that you can associate with the 15 // specified reusable delegation set. For the default limit, see Limits (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html) 16 // in the Amazon Route 53 Developer Guide. To request a higher limit, open a case (https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-route53) 17 // . 18 func (c *Client) GetReusableDelegationSetLimit(ctx context.Context, params *GetReusableDelegationSetLimitInput, optFns ...func(*Options)) (*GetReusableDelegationSetLimitOutput, error) { 19 if params == nil { 20 params = &GetReusableDelegationSetLimitInput{} 21 } 22 23 result, metadata, err := c.invokeOperation(ctx, "GetReusableDelegationSetLimit", params, optFns, c.addOperationGetReusableDelegationSetLimitMiddlewares) 24 if err != nil { 25 return nil, err 26 } 27 28 out := result.(*GetReusableDelegationSetLimitOutput) 29 out.ResultMetadata = metadata 30 return out, nil 31 } 32 33 // A complex type that contains information about the request to create a hosted 34 // zone. 35 type GetReusableDelegationSetLimitInput struct { 36 37 // The ID of the delegation set that you want to get the limit for. 38 // 39 // This member is required. 40 DelegationSetId *string 41 42 // Specify MAX_ZONES_BY_REUSABLE_DELEGATION_SET to get the maximum number of 43 // hosted zones that you can associate with the specified reusable delegation set. 44 // 45 // This member is required. 46 Type types.ReusableDelegationSetLimitType 47 48 noSmithyDocumentSerde 49 } 50 51 // A complex type that contains the requested limit. 52 type GetReusableDelegationSetLimitOutput struct { 53 54 // The current number of hosted zones that you can associate with the specified 55 // reusable delegation set. 56 // 57 // This member is required. 58 Count int64 59 60 // The current setting for the limit on hosted zones that you can associate with 61 // the specified reusable delegation set. 62 // 63 // This member is required. 64 Limit *types.ReusableDelegationSetLimit 65 66 // Metadata pertaining to the operation's result. 67 ResultMetadata middleware.Metadata 68 69 noSmithyDocumentSerde 70 } 71 72 func (c *Client) addOperationGetReusableDelegationSetLimitMiddlewares(stack *middleware.Stack, options Options) (err error) { 73 if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { 74 return err 75 } 76 err = stack.Serialize.Add(&awsRestxml_serializeOpGetReusableDelegationSetLimit{}, middleware.After) 77 if err != nil { 78 return err 79 } 80 err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetReusableDelegationSetLimit{}, middleware.After) 81 if err != nil { 82 return err 83 } 84 if err := addProtocolFinalizerMiddlewares(stack, options, "GetReusableDelegationSetLimit"); err != nil { 85 return fmt.Errorf("add protocol finalizers: %v", err) 86 } 87 88 if err = addlegacyEndpointContextSetter(stack, options); err != nil { 89 return err 90 } 91 if err = addSetLoggerMiddleware(stack, options); err != nil { 92 return err 93 } 94 if err = addClientRequestID(stack); err != nil { 95 return err 96 } 97 if err = addComputeContentLength(stack); err != nil { 98 return err 99 } 100 if err = addResolveEndpointMiddleware(stack, options); err != nil { 101 return err 102 } 103 if err = addComputePayloadSHA256(stack); err != nil { 104 return err 105 } 106 if err = addRetry(stack, options); err != nil { 107 return err 108 } 109 if err = addRawResponseToMetadata(stack); err != nil { 110 return err 111 } 112 if err = addRecordResponseTiming(stack); err != nil { 113 return err 114 } 115 if err = addClientUserAgent(stack, options); err != nil { 116 return err 117 } 118 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 119 return err 120 } 121 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 122 return err 123 } 124 if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { 125 return err 126 } 127 if err = addOpGetReusableDelegationSetLimitValidationMiddleware(stack); err != nil { 128 return err 129 } 130 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetReusableDelegationSetLimit(options.Region), middleware.Before); err != nil { 131 return err 132 } 133 if err = addRecursionDetection(stack); err != nil { 134 return err 135 } 136 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 137 return err 138 } 139 if err = addResponseErrorMiddleware(stack); err != nil { 140 return err 141 } 142 if err = addSanitizeURLMiddleware(stack); err != nil { 143 return err 144 } 145 if err = addRequestResponseLogging(stack, options); err != nil { 146 return err 147 } 148 if err = addDisableHTTPSMiddleware(stack, options); err != nil { 149 return err 150 } 151 return nil 152 } 153 154 func newServiceMetadataMiddleware_opGetReusableDelegationSetLimit(region string) *awsmiddleware.RegisterServiceMetadata { 155 return &awsmiddleware.RegisterServiceMetadata{ 156 Region: region, 157 ServiceID: ServiceID, 158 OperationName: "GetReusableDelegationSetLimit", 159 } 160 }