src

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

api_op_ListTrafficPolicyInstancesByPolicy.go (7572B)


      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 by using a
     13 // specify traffic policy version.
     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) ListTrafficPolicyInstancesByPolicy(ctx context.Context, params *ListTrafficPolicyInstancesByPolicyInput, optFns ...func(*Options)) (*ListTrafficPolicyInstancesByPolicyOutput, error) {
     24 	if params == nil {
     25 		params = &ListTrafficPolicyInstancesByPolicyInput{}
     26 	}
     27 
     28 	result, metadata, err := c.invokeOperation(ctx, "ListTrafficPolicyInstancesByPolicy", params, optFns, c.addOperationListTrafficPolicyInstancesByPolicyMiddlewares)
     29 	if err != nil {
     30 		return nil, err
     31 	}
     32 
     33 	out := result.(*ListTrafficPolicyInstancesByPolicyOutput)
     34 	out.ResultMetadata = metadata
     35 	return out, nil
     36 }
     37 
     38 // A complex type that contains the information about the request to list your
     39 // traffic policy instances.
     40 type ListTrafficPolicyInstancesByPolicyInput struct {
     41 
     42 	// The ID of the traffic policy for which you want to list traffic policy
     43 	// instances.
     44 	//
     45 	// This member is required.
     46 	TrafficPolicyId *string
     47 
     48 	// The version of the traffic policy for which you want to list traffic policy
     49 	// instances. The version must be associated with the traffic policy that is
     50 	// specified by TrafficPolicyId .
     51 	//
     52 	// This member is required.
     53 	TrafficPolicyVersion *int32
     54 
     55 	// If the value of IsTruncated in the previous response was true , you have more
     56 	// traffic policy instances. To get more traffic policy instances, submit another
     57 	// ListTrafficPolicyInstancesByPolicy request.
     58 	//
     59 	// For the value of hostedzoneid , specify the value of HostedZoneIdMarker from
     60 	// the previous response, which is the hosted zone ID of the first traffic policy
     61 	// instance that Amazon Route 53 will return if you submit another request.
     62 	//
     63 	// If the value of IsTruncated in the previous response was false , there are no
     64 	// more traffic policy instances to get.
     65 	HostedZoneIdMarker *string
     66 
     67 	// The maximum number of traffic policy instances to be included in the response
     68 	// body for this request. If you have more than MaxItems traffic policy instances,
     69 	// the value of the IsTruncated element in the response is true , and the values of
     70 	// HostedZoneIdMarker , TrafficPolicyInstanceNameMarker , and
     71 	// TrafficPolicyInstanceTypeMarker represent the first traffic policy instance that
     72 	// Amazon Route 53 will return if you submit another request.
     73 	MaxItems *int32
     74 
     75 	// If the value of IsTruncated in the previous response was true , you have more
     76 	// traffic policy instances. To get more traffic policy instances, submit another
     77 	// ListTrafficPolicyInstancesByPolicy request.
     78 	//
     79 	// For the value of trafficpolicyinstancename , specify the value of
     80 	// TrafficPolicyInstanceNameMarker from the previous response, which is the name of
     81 	// the first traffic policy instance that Amazon Route 53 will return if you submit
     82 	// another request.
     83 	//
     84 	// If the value of IsTruncated in the previous response was false , there are no
     85 	// more traffic policy instances to get.
     86 	TrafficPolicyInstanceNameMarker *string
     87 
     88 	// If the value of IsTruncated in the previous response was true , you have more
     89 	// traffic policy instances. To get more traffic policy instances, submit another
     90 	// ListTrafficPolicyInstancesByPolicy request.
     91 	//
     92 	// For the value of trafficpolicyinstancetype , specify the value of
     93 	// TrafficPolicyInstanceTypeMarker from the previous response, which is the name of
     94 	// the first traffic policy instance that Amazon Route 53 will return if you submit
     95 	// another request.
     96 	//
     97 	// If the value of IsTruncated in the previous response was false , there are no
     98 	// more traffic policy instances to get.
     99 	TrafficPolicyInstanceTypeMarker types.RRType
    100 
    101 	noSmithyDocumentSerde
    102 }
    103 
    104 // A complex type that contains the response information for the request.
    105 type ListTrafficPolicyInstancesByPolicyOutput struct {
    106 
    107 	// A flag that indicates whether there are more traffic policy instances to be
    108 	// listed. If the response was truncated, you can get the next group of traffic
    109 	// policy instances by calling ListTrafficPolicyInstancesByPolicy again and
    110 	// specifying the values of the HostedZoneIdMarker ,
    111 	// TrafficPolicyInstanceNameMarker , and TrafficPolicyInstanceTypeMarker elements
    112 	// in the corresponding request parameters.
    113 	//
    114 	// This member is required.
    115 	IsTruncated bool
    116 
    117 	// The value that you specified for the MaxItems parameter in the call to
    118 	// ListTrafficPolicyInstancesByPolicy that produced the current response.
    119 	//
    120 	// This member is required.
    121 	MaxItems *int32
    122 
    123 	// A list that contains one TrafficPolicyInstance element for each traffic policy
    124 	// instance that matches the elements in the request.
    125 	//
    126 	// This member is required.
    127 	TrafficPolicyInstances []types.TrafficPolicyInstance
    128 
    129 	// If IsTruncated is true , HostedZoneIdMarker is the ID of the hosted zone of the
    130 	// first traffic policy instance in the next group of traffic policy instances.
    131 	HostedZoneIdMarker *string
    132 
    133 	// If IsTruncated is true , TrafficPolicyInstanceNameMarker is the name of the
    134 	// first traffic policy instance in the next group of MaxItems traffic policy
    135 	// instances.
    136 	TrafficPolicyInstanceNameMarker *string
    137 
    138 	// If IsTruncated is true , TrafficPolicyInstanceTypeMarker is the DNS type of the
    139 	// resource record sets that are associated with the first traffic policy instance
    140 	// in the next group of MaxItems traffic policy instances.
    141 	TrafficPolicyInstanceTypeMarker types.RRType
    142 
    143 	// Metadata pertaining to the operation's result.
    144 	ResultMetadata middleware.Metadata
    145 
    146 	noSmithyDocumentSerde
    147 }
    148 
    149 func (c *Client) addOperationListTrafficPolicyInstancesByPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
    150 	err = stack.Serialize.Add(&awsRestxml_serializeOpListTrafficPolicyInstancesByPolicy{}, middleware.After)
    151 	if err != nil {
    152 		return err
    153 	}
    154 	err = stack.Deserialize.Add(&awsRestxml_deserializeOpListTrafficPolicyInstancesByPolicy{}, middleware.After)
    155 	if err != nil {
    156 		return err
    157 	}
    158 
    159 	if err = addComputeContentLength(stack); err != nil {
    160 		return err
    161 	}
    162 	if err = addResolveEndpointMiddleware(stack, options); err != nil {
    163 		return err
    164 	}
    165 	if err = addComputePayloadSHA256(stack); err != nil {
    166 		return err
    167 	}
    168 	if err = addRecordResponseTiming(stack, options); err != nil {
    169 		return err
    170 	}
    171 	if err = addCredentialSource(stack, options); err != nil {
    172 		return err
    173 	}
    174 	if err = addOpListTrafficPolicyInstancesByPolicyValidationMiddleware(stack); err != nil {
    175 		return err
    176 	}
    177 	if err = addRequestIDRetrieverMiddleware(stack); err != nil {
    178 		return err
    179 	}
    180 	if err = addResponseErrorMiddleware(stack); err != nil {
    181 		return err
    182 	}
    183 	if err = addSanitizeURLMiddleware(stack); err != nil {
    184 		return err
    185 	}
    186 	if err = addRequestResponseLogging(stack, options); err != nil {
    187 		return err
    188 	}
    189 	if err = addDisableHTTPSMiddleware(stack, options); err != nil {
    190 		return err
    191 	}
    192 	if err = addInterceptors(stack, options); err != nil {
    193 		return err
    194 	}
    195 	return nil
    196 }