src

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

api_op_ListHostedZonesByName.go (8212B)


      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 // Retrieves a list of your hosted zones in lexicographic order. The response
     13 // includes a HostedZones child element for each hosted zone created by the
     14 // current Amazon Web Services account.
     15 //
     16 // ListHostedZonesByName sorts hosted zones by name with the labels reversed. For
     17 // example:
     18 //
     19 //	com.example.www.
     20 //
     21 // Note the trailing dot, which can change the sort order in some circumstances.
     22 //
     23 // If the domain name includes escape characters or Punycode, ListHostedZonesByName
     24 // alphabetizes the domain name using the escaped or Punycoded value, which is the
     25 // format that Amazon Route 53 saves in its database. For example, to create a
     26 // hosted zone for exämple.com, you specify ex\344mple.com for the domain name.
     27 // ListHostedZonesByName alphabetizes it as:
     28 //
     29 //	com.ex\344mple.
     30 //
     31 // The labels are reversed and alphabetized using the escaped value. For more
     32 // information about valid domain name formats, including internationalized domain
     33 // names, see [DNS Domain Name Format]in the Amazon Route 53 Developer Guide.
     34 //
     35 // Route 53 returns up to 100 items in each response. If you have a lot of hosted
     36 // zones, use the MaxItems parameter to list them in groups of up to 100. The
     37 // response includes values that help navigate from one group of MaxItems hosted
     38 // zones to the next:
     39 //
     40 //   - The DNSName and HostedZoneId elements in the response contain the values, if
     41 //     any, specified for the dnsname and hostedzoneid parameters in the request that
     42 //     produced the current response.
     43 //
     44 //   - The MaxItems element in the response contains the value, if any, that you
     45 //     specified for the maxitems parameter in the request that produced the current
     46 //     response.
     47 //
     48 //   - If the value of IsTruncated in the response is true, there are more hosted
     49 //     zones associated with the current Amazon Web Services account.
     50 //
     51 // If IsTruncated is false, this response includes the last hosted zone that is
     52 //
     53 //	associated with the current account. The NextDNSName element and
     54 //	NextHostedZoneId elements are omitted from the response.
     55 //
     56 //	- The NextDNSName and NextHostedZoneId elements in the response contain the
     57 //	domain name and the hosted zone ID of the next hosted zone that is associated
     58 //	with the current Amazon Web Services account. If you want to list more hosted
     59 //	zones, make another call to ListHostedZonesByName , and specify the value of
     60 //	NextDNSName and NextHostedZoneId in the dnsname and hostedzoneid parameters,
     61 //	respectively.
     62 //
     63 // [DNS Domain Name Format]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DomainNameFormat.html
     64 func (c *Client) ListHostedZonesByName(ctx context.Context, params *ListHostedZonesByNameInput, optFns ...func(*Options)) (*ListHostedZonesByNameOutput, error) {
     65 	if params == nil {
     66 		params = &ListHostedZonesByNameInput{}
     67 	}
     68 
     69 	result, metadata, err := c.invokeOperation(ctx, "ListHostedZonesByName", params, optFns, c.addOperationListHostedZonesByNameMiddlewares)
     70 	if err != nil {
     71 		return nil, err
     72 	}
     73 
     74 	out := result.(*ListHostedZonesByNameOutput)
     75 	out.ResultMetadata = metadata
     76 	return out, nil
     77 }
     78 
     79 // Retrieves a list of the public and private hosted zones that are associated
     80 // with the current Amazon Web Services account in ASCII order by domain name.
     81 type ListHostedZonesByNameInput struct {
     82 
     83 	// (Optional) For your first request to ListHostedZonesByName , include the dnsname
     84 	// parameter only if you want to specify the name of the first hosted zone in the
     85 	// response. If you don't include the dnsname parameter, Amazon Route 53 returns
     86 	// all of the hosted zones that were created by the current Amazon Web Services
     87 	// account, in ASCII order. For subsequent requests, include both dnsname and
     88 	// hostedzoneid parameters. For dnsname , specify the value of NextDNSName from
     89 	// the previous response.
     90 	DNSName *string
     91 
     92 	// (Optional) For your first request to ListHostedZonesByName , do not include the
     93 	// hostedzoneid parameter.
     94 	//
     95 	// If you have more hosted zones than the value of maxitems , ListHostedZonesByName
     96 	// returns only the first maxitems hosted zones. To get the next group of maxitems
     97 	// hosted zones, submit another request to ListHostedZonesByName and include both
     98 	// dnsname and hostedzoneid parameters. For the value of hostedzoneid , specify the
     99 	// value of the NextHostedZoneId element from the previous response.
    100 	HostedZoneId *string
    101 
    102 	// The maximum number of hosted zones to be included in the response body for this
    103 	// request. If you have more than maxitems hosted zones, then the value of the
    104 	// IsTruncated element in the response is true, and the values of NextDNSName and
    105 	// NextHostedZoneId specify the first hosted zone in the next group of maxitems
    106 	// hosted zones.
    107 	MaxItems *int32
    108 
    109 	noSmithyDocumentSerde
    110 }
    111 
    112 // A complex type that contains the response information for the request.
    113 type ListHostedZonesByNameOutput struct {
    114 
    115 	// A complex type that contains general information about the hosted zone.
    116 	//
    117 	// This member is required.
    118 	HostedZones []types.HostedZone
    119 
    120 	// A flag that indicates whether there are more hosted zones to be listed. If the
    121 	// response was truncated, you can get the next group of maxitems hosted zones by
    122 	// calling ListHostedZonesByName again and specifying the values of NextDNSName
    123 	// and NextHostedZoneId elements in the dnsname and hostedzoneid parameters.
    124 	//
    125 	// This member is required.
    126 	IsTruncated bool
    127 
    128 	// The value that you specified for the maxitems parameter in the call to
    129 	// ListHostedZonesByName that produced the current response.
    130 	//
    131 	// This member is required.
    132 	MaxItems *int32
    133 
    134 	// For the second and subsequent calls to ListHostedZonesByName , DNSName is the
    135 	// value that you specified for the dnsname parameter in the request that produced
    136 	// the current response.
    137 	DNSName *string
    138 
    139 	// The ID that Amazon Route 53 assigned to the hosted zone when you created it.
    140 	HostedZoneId *string
    141 
    142 	// If IsTruncated is true, the value of NextDNSName is the name of the first
    143 	// hosted zone in the next group of maxitems hosted zones. Call
    144 	// ListHostedZonesByName again and specify the value of NextDNSName and
    145 	// NextHostedZoneId in the dnsname and hostedzoneid parameters, respectively.
    146 	//
    147 	// This element is present only if IsTruncated is true .
    148 	NextDNSName *string
    149 
    150 	// If IsTruncated is true , the value of NextHostedZoneId identifies the first
    151 	// hosted zone in the next group of maxitems hosted zones. Call
    152 	// ListHostedZonesByName again and specify the value of NextDNSName and
    153 	// NextHostedZoneId in the dnsname and hostedzoneid parameters, respectively.
    154 	//
    155 	// This element is present only if IsTruncated is true .
    156 	NextHostedZoneId *string
    157 
    158 	// Metadata pertaining to the operation's result.
    159 	ResultMetadata middleware.Metadata
    160 
    161 	noSmithyDocumentSerde
    162 }
    163 
    164 func (c *Client) addOperationListHostedZonesByNameMiddlewares(stack *middleware.Stack, options Options) (err error) {
    165 	err = stack.Serialize.Add(&awsRestxml_serializeOpListHostedZonesByName{}, middleware.After)
    166 	if err != nil {
    167 		return err
    168 	}
    169 	err = stack.Deserialize.Add(&awsRestxml_deserializeOpListHostedZonesByName{}, middleware.After)
    170 	if err != nil {
    171 		return err
    172 	}
    173 
    174 	if err = addComputeContentLength(stack); err != nil {
    175 		return err
    176 	}
    177 	if err = addResolveEndpointMiddleware(stack, options); err != nil {
    178 		return err
    179 	}
    180 	if err = addComputePayloadSHA256(stack); err != nil {
    181 		return err
    182 	}
    183 	if err = addRecordResponseTiming(stack, options); err != nil {
    184 		return err
    185 	}
    186 	if err = addCredentialSource(stack, options); err != nil {
    187 		return err
    188 	}
    189 	if err = addRequestIDRetrieverMiddleware(stack); err != nil {
    190 		return err
    191 	}
    192 	if err = addResponseErrorMiddleware(stack); err != nil {
    193 		return err
    194 	}
    195 	if err = addSanitizeURLMiddleware(stack); err != nil {
    196 		return err
    197 	}
    198 	if err = addRequestResponseLogging(stack, options); err != nil {
    199 		return err
    200 	}
    201 	if err = addDisableHTTPSMiddleware(stack, options); err != nil {
    202 		return err
    203 	}
    204 	if err = addInterceptors(stack, options); err != nil {
    205 		return err
    206 	}
    207 	return nil
    208 }