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