src

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

api_op_GetHostedZoneLimit.go (4007B)


      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 the specified limit for a specified hosted zone, for example, the maximum
     13 // number of records that you can create in the hosted zone.
     14 //
     15 // For the default limit, see [Limits] in the Amazon Route 53 Developer Guide. To request
     16 // a higher limit, [open a case].
     17 //
     18 // [Limits]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html
     19 // [open a case]: https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-route53
     20 func (c *Client) GetHostedZoneLimit(ctx context.Context, params *GetHostedZoneLimitInput, optFns ...func(*Options)) (*GetHostedZoneLimitOutput, error) {
     21 	if params == nil {
     22 		params = &GetHostedZoneLimitInput{}
     23 	}
     24 
     25 	result, metadata, err := c.invokeOperation(ctx, "GetHostedZoneLimit", params, optFns, c.addOperationGetHostedZoneLimitMiddlewares)
     26 	if err != nil {
     27 		return nil, err
     28 	}
     29 
     30 	out := result.(*GetHostedZoneLimitOutput)
     31 	out.ResultMetadata = metadata
     32 	return out, nil
     33 }
     34 
     35 // A complex type that contains information about the request to create a hosted
     36 // zone.
     37 type GetHostedZoneLimitInput struct {
     38 
     39 	// The ID of the hosted zone that you want to get a limit for.
     40 	//
     41 	// This member is required.
     42 	HostedZoneId *string
     43 
     44 	// The limit that you want to get. Valid values include the following:
     45 	//
     46 	//   - MAX_RRSETS_BY_ZONE: The maximum number of records that you can create in
     47 	//   the specified hosted zone.
     48 	//
     49 	//   - MAX_VPCS_ASSOCIATED_BY_ZONE: The maximum number of Amazon VPCs that you can
     50 	//   associate with the specified private hosted zone.
     51 	//
     52 	// This member is required.
     53 	Type types.HostedZoneLimitType
     54 
     55 	noSmithyDocumentSerde
     56 }
     57 
     58 // A complex type that contains the requested limit.
     59 type GetHostedZoneLimitOutput struct {
     60 
     61 	// The current number of entities that you have created of the specified type. For
     62 	// example, if you specified MAX_RRSETS_BY_ZONE for the value of Type in the
     63 	// request, the value of Count is the current number of records that you have
     64 	// created in the specified hosted zone.
     65 	//
     66 	// This member is required.
     67 	Count int64
     68 
     69 	// The current setting for the specified limit. For example, if you specified
     70 	// MAX_RRSETS_BY_ZONE for the value of Type in the request, the value of Limit is
     71 	// the maximum number of records that you can create in the specified hosted zone.
     72 	//
     73 	// This member is required.
     74 	Limit *types.HostedZoneLimit
     75 
     76 	// Metadata pertaining to the operation's result.
     77 	ResultMetadata middleware.Metadata
     78 
     79 	noSmithyDocumentSerde
     80 }
     81 
     82 func (c *Client) addOperationGetHostedZoneLimitMiddlewares(stack *middleware.Stack, options Options) (err error) {
     83 	err = stack.Serialize.Add(&awsRestxml_serializeOpGetHostedZoneLimit{}, middleware.After)
     84 	if err != nil {
     85 		return err
     86 	}
     87 	err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetHostedZoneLimit{}, middleware.After)
     88 	if err != nil {
     89 		return err
     90 	}
     91 
     92 	if err = addComputeContentLength(stack); err != nil {
     93 		return err
     94 	}
     95 	if err = addResolveEndpointMiddleware(stack, options); err != nil {
     96 		return err
     97 	}
     98 	if err = addComputePayloadSHA256(stack); err != nil {
     99 		return err
    100 	}
    101 	if err = addRecordResponseTiming(stack, options); err != nil {
    102 		return err
    103 	}
    104 	if err = addCredentialSource(stack, options); err != nil {
    105 		return err
    106 	}
    107 	if err = addOpGetHostedZoneLimitValidationMiddleware(stack); err != nil {
    108 		return err
    109 	}
    110 	if err = addRequestIDRetrieverMiddleware(stack); err != nil {
    111 		return err
    112 	}
    113 	if err = addResponseErrorMiddleware(stack); err != nil {
    114 		return err
    115 	}
    116 	if err = addSanitizeURLMiddleware(stack); err != nil {
    117 		return err
    118 	}
    119 	if err = addRequestResponseLogging(stack, options); err != nil {
    120 		return err
    121 	}
    122 	if err = addDisableHTTPSMiddleware(stack, options); err != nil {
    123 		return err
    124 	}
    125 	if err = addInterceptors(stack, options); err != nil {
    126 		return err
    127 	}
    128 	return nil
    129 }