1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package ec2 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/ec2/types" 10 "github.com/aws/smithy-go/middleware" 11 smithyhttp "github.com/aws/smithy-go/transport/http" 12) 13 14// Describes available services to which you can create a VPC endpoint. When the 15// service provider and the consumer have different accounts in multiple 16// Availability Zones, and the consumer views the VPC endpoint service information, 17// the response only includes the common Availability Zones. For example, when the 18// service provider account uses us-east-1a and us-east-1c and the consumer uses 19// us-east-1a and us-east-1b, the response includes the VPC endpoint services in 20// the common Availability Zone, us-east-1a. 21func (c *Client) DescribeVpcEndpointServices(ctx context.Context, params *DescribeVpcEndpointServicesInput, optFns ...func(*Options)) (*DescribeVpcEndpointServicesOutput, error) { 22 if params == nil { 23 params = &DescribeVpcEndpointServicesInput{} 24 } 25 26 result, metadata, err := c.invokeOperation(ctx, "DescribeVpcEndpointServices", params, optFns, c.addOperationDescribeVpcEndpointServicesMiddlewares) 27 if err != nil { 28 return nil, err 29 } 30 31 out := result.(*DescribeVpcEndpointServicesOutput) 32 out.ResultMetadata = metadata 33 return out, nil 34} 35 36// Contains the parameters for DescribeVpcEndpointServices. 37type DescribeVpcEndpointServicesInput struct { 38 39 // Checks whether you have the required permissions for the action, without 40 // actually making the request, and provides an error response. If you have the 41 // required permissions, the error response is DryRunOperation. Otherwise, it is 42 // UnauthorizedOperation. 43 DryRun *bool 44 45 // One or more filters. 46 // 47 // * service-name - The name of the service. 48 // 49 // * service-type 50 // - The type of service (Interface | Gateway). 51 // 52 // * tag: - The key/value combination 53 // of a tag assigned to the resource. Use the tag key in the filter name and the 54 // tag value as the filter value. For example, to find all resources that have a 55 // tag with the key Owner and the value TeamA, specify tag:Owner for the filter 56 // name and TeamA for the filter value. 57 // 58 // * tag-key - The key of a tag assigned to 59 // the resource. Use this filter to find all resources assigned a tag with a 60 // specific key, regardless of the tag value. 61 Filters []types.Filter 62 63 // The maximum number of items to return for this request. The request returns a 64 // token that you can specify in a subsequent call to get the next set of results. 65 // Constraint: If the value is greater than 1,000, we return only 1,000 items. 66 MaxResults *int32 67 68 // The token for the next set of items to return. (You received this token from a 69 // prior call.) 70 NextToken *string 71 72 // One or more service names. 73 ServiceNames []string 74 75 noSmithyDocumentSerde 76} 77 78// Contains the output of DescribeVpcEndpointServices. 79type DescribeVpcEndpointServicesOutput struct { 80 81 // The token to use when requesting the next set of items. If there are no 82 // additional items to return, the string is empty. 83 NextToken *string 84 85 // Information about the service. 86 ServiceDetails []types.ServiceDetail 87 88 // A list of supported services. 89 ServiceNames []string 90 91 // Metadata pertaining to the operation's result. 92 ResultMetadata middleware.Metadata 93 94 noSmithyDocumentSerde 95} 96 97func (c *Client) addOperationDescribeVpcEndpointServicesMiddlewares(stack *middleware.Stack, options Options) (err error) { 98 err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVpcEndpointServices{}, middleware.After) 99 if err != nil { 100 return err 101 } 102 err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVpcEndpointServices{}, middleware.After) 103 if err != nil { 104 return err 105 } 106 if err = addSetLoggerMiddleware(stack, options); err != nil { 107 return err 108 } 109 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 110 return err 111 } 112 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 113 return err 114 } 115 if err = addResolveEndpointMiddleware(stack, options); err != nil { 116 return err 117 } 118 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 119 return err 120 } 121 if err = addRetryMiddlewares(stack, options); err != nil { 122 return err 123 } 124 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 125 return err 126 } 127 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 128 return err 129 } 130 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 131 return err 132 } 133 if err = addClientUserAgent(stack); err != nil { 134 return err 135 } 136 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 137 return err 138 } 139 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 140 return err 141 } 142 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpcEndpointServices(options.Region), middleware.Before); err != nil { 143 return err 144 } 145 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 146 return err 147 } 148 if err = addResponseErrorMiddleware(stack); err != nil { 149 return err 150 } 151 if err = addRequestResponseLogging(stack, options); err != nil { 152 return err 153 } 154 return nil 155} 156 157func newServiceMetadataMiddleware_opDescribeVpcEndpointServices(region string) *awsmiddleware.RegisterServiceMetadata { 158 return &awsmiddleware.RegisterServiceMetadata{ 159 Region: region, 160 ServiceID: ServiceID, 161 SigningName: "ec2", 162 OperationName: "DescribeVpcEndpointServices", 163 } 164} 165