src

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

api_op_GetAccountLimit.go (4725B)


      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 the current account, for example, the maximum
     13 // number of health checks that you can create using the account.
     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 // You can also view account limits in Amazon Web Services Trusted Advisor. Sign
     19 // in to the Amazon Web Services Management Console and open the Trusted Advisor
     20 // console at [https://console.aws.amazon.com/trustedadvisor/]. Then choose Service limits in the navigation pane.
     21 //
     22 // [Limits]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html
     23 // [https://console.aws.amazon.com/trustedadvisor/]: https://console.aws.amazon.com/trustedadvisor
     24 // [open a case]: https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-route53
     25 func (c *Client) GetAccountLimit(ctx context.Context, params *GetAccountLimitInput, optFns ...func(*Options)) (*GetAccountLimitOutput, error) {
     26 	if params == nil {
     27 		params = &GetAccountLimitInput{}
     28 	}
     29 
     30 	result, metadata, err := c.invokeOperation(ctx, "GetAccountLimit", params, optFns, c.addOperationGetAccountLimitMiddlewares)
     31 	if err != nil {
     32 		return nil, err
     33 	}
     34 
     35 	out := result.(*GetAccountLimitOutput)
     36 	out.ResultMetadata = metadata
     37 	return out, nil
     38 }
     39 
     40 // A complex type that contains information about the request to create a hosted
     41 // zone.
     42 type GetAccountLimitInput struct {
     43 
     44 	// The limit that you want to get. Valid values include the following:
     45 	//
     46 	//   - MAX_HEALTH_CHECKS_BY_OWNER: The maximum number of health checks that you
     47 	//   can create using the current account.
     48 	//
     49 	//   - MAX_HOSTED_ZONES_BY_OWNER: The maximum number of hosted zones that you can
     50 	//   create using the current account.
     51 	//
     52 	//   - MAX_REUSABLE_DELEGATION_SETS_BY_OWNER: The maximum number of reusable
     53 	//   delegation sets that you can create using the current account.
     54 	//
     55 	//   - MAX_TRAFFIC_POLICIES_BY_OWNER: The maximum number of traffic policies that
     56 	//   you can create using the current account.
     57 	//
     58 	//   - MAX_TRAFFIC_POLICY_INSTANCES_BY_OWNER: The maximum number of traffic policy
     59 	//   instances that you can create using the current account. (Traffic policy
     60 	//   instances are referred to as traffic flow policy records in the Amazon Route 53
     61 	//   console.)
     62 	//
     63 	// This member is required.
     64 	Type types.AccountLimitType
     65 
     66 	noSmithyDocumentSerde
     67 }
     68 
     69 // A complex type that contains the requested limit.
     70 type GetAccountLimitOutput struct {
     71 
     72 	// The current number of entities that you have created of the specified type. For
     73 	// example, if you specified MAX_HEALTH_CHECKS_BY_OWNER for the value of Type in
     74 	// the request, the value of Count is the current number of health checks that you
     75 	// have created using the current account.
     76 	//
     77 	// This member is required.
     78 	Count int64
     79 
     80 	// The current setting for the specified limit. For example, if you specified
     81 	// MAX_HEALTH_CHECKS_BY_OWNER for the value of Type in the request, the value of
     82 	// Limit is the maximum number of health checks that you can create using the
     83 	// current account.
     84 	//
     85 	// This member is required.
     86 	Limit *types.AccountLimit
     87 
     88 	// Metadata pertaining to the operation's result.
     89 	ResultMetadata middleware.Metadata
     90 
     91 	noSmithyDocumentSerde
     92 }
     93 
     94 func (c *Client) addOperationGetAccountLimitMiddlewares(stack *middleware.Stack, options Options) (err error) {
     95 	err = stack.Serialize.Add(&awsRestxml_serializeOpGetAccountLimit{}, middleware.After)
     96 	if err != nil {
     97 		return err
     98 	}
     99 	err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetAccountLimit{}, middleware.After)
    100 	if err != nil {
    101 		return err
    102 	}
    103 
    104 	if err = addComputeContentLength(stack); err != nil {
    105 		return err
    106 	}
    107 	if err = addResolveEndpointMiddleware(stack, options); err != nil {
    108 		return err
    109 	}
    110 	if err = addComputePayloadSHA256(stack); err != nil {
    111 		return err
    112 	}
    113 	if err = addRecordResponseTiming(stack, options); err != nil {
    114 		return err
    115 	}
    116 	if err = addCredentialSource(stack, options); err != nil {
    117 		return err
    118 	}
    119 	if err = addOpGetAccountLimitValidationMiddleware(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 = addRequestResponseLogging(stack, options); err != nil {
    129 		return err
    130 	}
    131 	if err = addDisableHTTPSMiddleware(stack, options); err != nil {
    132 		return err
    133 	}
    134 	if err = addInterceptors(stack, options); err != nil {
    135 		return err
    136 	}
    137 	return nil
    138 }