code.dwrz.net

Go monorepo.
Log | Files | Refs

api_op_ListTrafficPolicyInstancesByPolicy.go (8615B)


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