src

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

api_op_ListTrafficPolicyInstances.go (6970B)


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