src

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

api_op_ListTrafficPolicyInstancesByHostedZone.go (6438B)


      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 information about the traffic policy instances that you created in a
     13 // specified hosted zone.
     14 //
     15 // After you submit a CreateTrafficPolicyInstance or an UpdateTrafficPolicyInstance
     16 // request, there's a brief delay while Amazon Route 53 creates the resource record
     17 // sets that are specified in the traffic policy definition. For more information,
     18 // see the State response element.
     19 //
     20 // Route 53 returns a maximum of 100 items in each response. If you have a lot of
     21 // traffic policy instances, you can use the MaxItems parameter to list them in
     22 // groups of up to 100.
     23 func (c *Client) ListTrafficPolicyInstancesByHostedZone(ctx context.Context, params *ListTrafficPolicyInstancesByHostedZoneInput, optFns ...func(*Options)) (*ListTrafficPolicyInstancesByHostedZoneOutput, error) {
     24 	if params == nil {
     25 		params = &ListTrafficPolicyInstancesByHostedZoneInput{}
     26 	}
     27 
     28 	result, metadata, err := c.invokeOperation(ctx, "ListTrafficPolicyInstancesByHostedZone", params, optFns, c.addOperationListTrafficPolicyInstancesByHostedZoneMiddlewares)
     29 	if err != nil {
     30 		return nil, err
     31 	}
     32 
     33 	out := result.(*ListTrafficPolicyInstancesByHostedZoneOutput)
     34 	out.ResultMetadata = metadata
     35 	return out, nil
     36 }
     37 
     38 // A request for the traffic policy instances that you created in a specified
     39 // hosted zone.
     40 type ListTrafficPolicyInstancesByHostedZoneInput struct {
     41 
     42 	// The ID of the hosted zone that you want to list traffic policy instances for.
     43 	//
     44 	// This member is required.
     45 	HostedZoneId *string
     46 
     47 	// The maximum number of traffic policy instances to be included in the response
     48 	// body for this request. If you have more than MaxItems traffic policy instances,
     49 	// the value of the IsTruncated element in the response is true , and the values of
     50 	// HostedZoneIdMarker , TrafficPolicyInstanceNameMarker , and
     51 	// TrafficPolicyInstanceTypeMarker represent the first traffic policy instance that
     52 	// Amazon Route 53 will return if you submit another request.
     53 	MaxItems *int32
     54 
     55 	// If the value of IsTruncated in the previous response is true, you have more
     56 	// traffic policy instances. To get more traffic policy instances, submit another
     57 	// ListTrafficPolicyInstances request. For the value of trafficpolicyinstancename ,
     58 	// specify the value of TrafficPolicyInstanceNameMarker from the previous
     59 	// response, which is the name of the first traffic policy instance in the next
     60 	// group of traffic policy instances.
     61 	//
     62 	// If the value of IsTruncated in the previous response was false , there are no
     63 	// more traffic policy instances to get.
     64 	TrafficPolicyInstanceNameMarker *string
     65 
     66 	// If the value of IsTruncated in the previous response is true, you have more
     67 	// traffic policy instances. To get more traffic policy instances, submit another
     68 	// ListTrafficPolicyInstances request. For the value of trafficpolicyinstancetype ,
     69 	// specify the value of TrafficPolicyInstanceTypeMarker from the previous
     70 	// response, which is the type of the first traffic policy instance in the next
     71 	// group of traffic policy instances.
     72 	//
     73 	// If the value of IsTruncated in the previous response was false , there are no
     74 	// more traffic policy instances to get.
     75 	TrafficPolicyInstanceTypeMarker types.RRType
     76 
     77 	noSmithyDocumentSerde
     78 }
     79 
     80 // A complex type that contains the response information for the request.
     81 type ListTrafficPolicyInstancesByHostedZoneOutput struct {
     82 
     83 	// A flag that indicates whether there are more traffic policy instances to be
     84 	// listed. If the response was truncated, you can get the next group of traffic
     85 	// policy instances by submitting another ListTrafficPolicyInstancesByHostedZone
     86 	// request and specifying the values of HostedZoneIdMarker ,
     87 	// TrafficPolicyInstanceNameMarker , and TrafficPolicyInstanceTypeMarker in the
     88 	// corresponding request parameters.
     89 	//
     90 	// This member is required.
     91 	IsTruncated bool
     92 
     93 	// The value that you specified for the MaxItems parameter in the
     94 	// ListTrafficPolicyInstancesByHostedZone request that produced the current
     95 	// response.
     96 	//
     97 	// This member is required.
     98 	MaxItems *int32
     99 
    100 	// A list that contains one TrafficPolicyInstance element for each traffic policy
    101 	// instance that matches the elements in the request.
    102 	//
    103 	// This member is required.
    104 	TrafficPolicyInstances []types.TrafficPolicyInstance
    105 
    106 	// If IsTruncated is true , TrafficPolicyInstanceNameMarker is the name of the
    107 	// first traffic policy instance in the next group of traffic policy instances.
    108 	TrafficPolicyInstanceNameMarker *string
    109 
    110 	// If IsTruncated is true, TrafficPolicyInstanceTypeMarker is the DNS type of the
    111 	// resource record sets that are associated with the first traffic policy instance
    112 	// in the next group of traffic policy instances.
    113 	TrafficPolicyInstanceTypeMarker types.RRType
    114 
    115 	// Metadata pertaining to the operation's result.
    116 	ResultMetadata middleware.Metadata
    117 
    118 	noSmithyDocumentSerde
    119 }
    120 
    121 func (c *Client) addOperationListTrafficPolicyInstancesByHostedZoneMiddlewares(stack *middleware.Stack, options Options) (err error) {
    122 	err = stack.Serialize.Add(&awsRestxml_serializeOpListTrafficPolicyInstancesByHostedZone{}, middleware.After)
    123 	if err != nil {
    124 		return err
    125 	}
    126 	err = stack.Deserialize.Add(&awsRestxml_deserializeOpListTrafficPolicyInstancesByHostedZone{}, middleware.After)
    127 	if err != nil {
    128 		return err
    129 	}
    130 
    131 	if err = addComputeContentLength(stack); err != nil {
    132 		return err
    133 	}
    134 	if err = addResolveEndpointMiddleware(stack, options); err != nil {
    135 		return err
    136 	}
    137 	if err = addComputePayloadSHA256(stack); err != nil {
    138 		return err
    139 	}
    140 	if err = addRecordResponseTiming(stack, options); err != nil {
    141 		return err
    142 	}
    143 	if err = addCredentialSource(stack, options); err != nil {
    144 		return err
    145 	}
    146 	if err = addOpListTrafficPolicyInstancesByHostedZoneValidationMiddleware(stack); err != nil {
    147 		return err
    148 	}
    149 	if err = addRequestIDRetrieverMiddleware(stack); err != nil {
    150 		return err
    151 	}
    152 	if err = addResponseErrorMiddleware(stack); err != nil {
    153 		return err
    154 	}
    155 	if err = addSanitizeURLMiddleware(stack); err != nil {
    156 		return err
    157 	}
    158 	if err = addRequestResponseLogging(stack, options); err != nil {
    159 		return err
    160 	}
    161 	if err = addDisableHTTPSMiddleware(stack, options); err != nil {
    162 		return err
    163 	}
    164 	if err = addInterceptors(stack, options); err != nil {
    165 		return err
    166 	}
    167 	return nil
    168 }