repo_name
stringlengths 1
52
| repo_creator
stringclasses 6
values | programming_language
stringclasses 4
values | code
stringlengths 0
9.68M
| num_lines
int64 1
234k
|
---|---|---|---|---|
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Creates a new version of an existing traffic policy. When you create a new
// version of a traffic policy, you specify the ID of the traffic policy that you
// want to update and a JSON-formatted document that describes the new version. You
// use traffic policies to create multiple DNS resource record sets for one domain
// name (such as example.com) or one subdomain name (such as www.example.com). You
// can create a maximum of 1000 versions of a traffic policy. If you reach the
// limit and need to create another version, you'll need to start a new traffic
// policy.
func (c *Client) CreateTrafficPolicyVersion(ctx context.Context, params *CreateTrafficPolicyVersionInput, optFns ...func(*Options)) (*CreateTrafficPolicyVersionOutput, error) {
if params == nil {
params = &CreateTrafficPolicyVersionInput{}
}
result, metadata, err := c.invokeOperation(ctx, "CreateTrafficPolicyVersion", params, optFns, c.addOperationCreateTrafficPolicyVersionMiddlewares)
if err != nil {
return nil, err
}
out := result.(*CreateTrafficPolicyVersionOutput)
out.ResultMetadata = metadata
return out, nil
}
// A complex type that contains information about the traffic policy that you want
// to create a new version for.
type CreateTrafficPolicyVersionInput struct {
// The definition of this version of the traffic policy, in JSON format. You
// specified the JSON in the CreateTrafficPolicyVersion request. For more
// information about the JSON format, see CreateTrafficPolicy (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateTrafficPolicy.html)
// .
//
// This member is required.
Document *string
// The ID of the traffic policy for which you want to create a new version.
//
// This member is required.
Id *string
// The comment that you specified in the CreateTrafficPolicyVersion request, if
// any.
Comment *string
noSmithyDocumentSerde
}
// A complex type that contains the response information for the
// CreateTrafficPolicyVersion request.
type CreateTrafficPolicyVersionOutput struct {
// A unique URL that represents a new traffic policy version.
//
// This member is required.
Location *string
// A complex type that contains settings for the new version of the traffic policy.
//
// This member is required.
TrafficPolicy *types.TrafficPolicy
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationCreateTrafficPolicyVersionMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpCreateTrafficPolicyVersion{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateTrafficPolicyVersion{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpCreateTrafficPolicyVersionValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTrafficPolicyVersion(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opCreateTrafficPolicyVersion(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "CreateTrafficPolicyVersion",
}
}
| 155 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Authorizes the Amazon Web Services account that created a specified VPC to
// submit an AssociateVPCWithHostedZone request to associate the VPC with a
// specified hosted zone that was created by a different account. To submit a
// CreateVPCAssociationAuthorization request, you must use the account that created
// the hosted zone. After you authorize the association, use the account that
// created the VPC to submit an AssociateVPCWithHostedZone request. If you want to
// associate multiple VPCs that you created by using one account with a hosted zone
// that you created by using a different account, you must submit one authorization
// request for each VPC.
func (c *Client) CreateVPCAssociationAuthorization(ctx context.Context, params *CreateVPCAssociationAuthorizationInput, optFns ...func(*Options)) (*CreateVPCAssociationAuthorizationOutput, error) {
if params == nil {
params = &CreateVPCAssociationAuthorizationInput{}
}
result, metadata, err := c.invokeOperation(ctx, "CreateVPCAssociationAuthorization", params, optFns, c.addOperationCreateVPCAssociationAuthorizationMiddlewares)
if err != nil {
return nil, err
}
out := result.(*CreateVPCAssociationAuthorizationOutput)
out.ResultMetadata = metadata
return out, nil
}
// A complex type that contains information about the request to authorize
// associating a VPC with your private hosted zone. Authorization is only required
// when a private hosted zone and a VPC were created by using different accounts.
type CreateVPCAssociationAuthorizationInput struct {
// The ID of the private hosted zone that you want to authorize associating a VPC
// with.
//
// This member is required.
HostedZoneId *string
// A complex type that contains the VPC ID and region for the VPC that you want to
// authorize associating with your hosted zone.
//
// This member is required.
VPC *types.VPC
noSmithyDocumentSerde
}
// A complex type that contains the response information from a
// CreateVPCAssociationAuthorization request.
type CreateVPCAssociationAuthorizationOutput struct {
// The ID of the hosted zone that you authorized associating a VPC with.
//
// This member is required.
HostedZoneId *string
// The VPC that you authorized associating with a hosted zone.
//
// This member is required.
VPC *types.VPC
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationCreateVPCAssociationAuthorizationMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpCreateVPCAssociationAuthorization{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateVPCAssociationAuthorization{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpCreateVPCAssociationAuthorizationValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVPCAssociationAuthorization(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addSanitizeURLMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opCreateVPCAssociationAuthorization(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "CreateVPCAssociationAuthorization",
}
}
| 155 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deactivates a key-signing key (KSK) so that it will not be used for signing by
// DNSSEC. This operation changes the KSK status to INACTIVE .
func (c *Client) DeactivateKeySigningKey(ctx context.Context, params *DeactivateKeySigningKeyInput, optFns ...func(*Options)) (*DeactivateKeySigningKeyOutput, error) {
if params == nil {
params = &DeactivateKeySigningKeyInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeactivateKeySigningKey", params, optFns, c.addOperationDeactivateKeySigningKeyMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeactivateKeySigningKeyOutput)
out.ResultMetadata = metadata
return out, nil
}
type DeactivateKeySigningKeyInput struct {
// A unique string used to identify a hosted zone.
//
// This member is required.
HostedZoneId *string
// A string used to identify a key-signing key (KSK).
//
// This member is required.
Name *string
noSmithyDocumentSerde
}
type DeactivateKeySigningKeyOutput struct {
// A complex type that describes change information about changes made to your
// hosted zone.
//
// This member is required.
ChangeInfo *types.ChangeInfo
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeactivateKeySigningKeyMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpDeactivateKeySigningKey{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeactivateKeySigningKey{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeactivateKeySigningKeyValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeactivateKeySigningKey(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addSanitizeURLMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeactivateKeySigningKey(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "DeactivateKeySigningKey",
}
}
| 137 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes a CIDR collection in the current Amazon Web Services account. The
// collection must be empty before it can be deleted.
func (c *Client) DeleteCidrCollection(ctx context.Context, params *DeleteCidrCollectionInput, optFns ...func(*Options)) (*DeleteCidrCollectionOutput, error) {
if params == nil {
params = &DeleteCidrCollectionInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteCidrCollection", params, optFns, c.addOperationDeleteCidrCollectionMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteCidrCollectionOutput)
out.ResultMetadata = metadata
return out, nil
}
type DeleteCidrCollectionInput struct {
// The UUID of the collection to delete.
//
// This member is required.
Id *string
noSmithyDocumentSerde
}
type DeleteCidrCollectionOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteCidrCollectionMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteCidrCollection{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteCidrCollection{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteCidrCollectionValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteCidrCollection(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteCidrCollection(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "DeleteCidrCollection",
}
}
| 121 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes a health check. Amazon Route 53 does not prevent you from deleting a
// health check even if the health check is associated with one or more resource
// record sets. If you delete a health check and you don't update the associated
// resource record sets, the future status of the health check can't be predicted
// and may change. This will affect the routing of DNS queries for your DNS
// failover configuration. For more information, see Replacing and Deleting Health
// Checks (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/health-checks-creating-deleting.html#health-checks-deleting.html)
// in the Amazon Route 53 Developer Guide. If you're using Cloud Map and you
// configured Cloud Map to create a Route 53 health check when you register an
// instance, you can't use the Route 53 DeleteHealthCheck command to delete the
// health check. The health check is deleted automatically when you deregister the
// instance; there can be a delay of several hours before the health check is
// deleted from Route 53.
func (c *Client) DeleteHealthCheck(ctx context.Context, params *DeleteHealthCheckInput, optFns ...func(*Options)) (*DeleteHealthCheckOutput, error) {
if params == nil {
params = &DeleteHealthCheckInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteHealthCheck", params, optFns, c.addOperationDeleteHealthCheckMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteHealthCheckOutput)
out.ResultMetadata = metadata
return out, nil
}
// This action deletes a health check.
type DeleteHealthCheckInput struct {
// The ID of the health check that you want to delete.
//
// This member is required.
HealthCheckId *string
noSmithyDocumentSerde
}
// An empty element.
type DeleteHealthCheckOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteHealthCheckMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteHealthCheck{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteHealthCheck{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteHealthCheckValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteHealthCheck(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteHealthCheck(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "DeleteHealthCheck",
}
}
| 134 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes a hosted zone. If the hosted zone was created by another service, such
// as Cloud Map, see Deleting Public Hosted Zones That Were Created by Another
// Service (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DeleteHostedZone.html#delete-public-hosted-zone-created-by-another-service)
// in the Amazon Route 53 Developer Guide for information about how to delete it.
// (The process is the same for public and private hosted zones that were created
// by another service.) If you want to keep your domain registration but you want
// to stop routing internet traffic to your website or web application, we
// recommend that you delete resource record sets in the hosted zone instead of
// deleting the hosted zone. If you delete a hosted zone, you can't undelete it.
// You must create a new hosted zone and update the name servers for your domain
// registration, which can require up to 48 hours to take effect. (If you delegated
// responsibility for a subdomain to a hosted zone and you delete the child hosted
// zone, you must update the name servers in the parent hosted zone.) In addition,
// if you delete a hosted zone, someone could hijack the domain and route traffic
// to their own resources using your domain name. If you want to avoid the monthly
// charge for the hosted zone, you can transfer DNS service for the domain to a
// free DNS service. When you transfer DNS service, you have to update the name
// servers for the domain registration. If the domain is registered with Route 53,
// see UpdateDomainNameservers (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_UpdateDomainNameservers.html)
// for information about how to replace Route 53 name servers with name servers for
// the new DNS service. If the domain is registered with another registrar, use the
// method provided by the registrar to update name servers for the domain
// registration. For more information, perform an internet search on "free DNS
// service." You can delete a hosted zone only if it contains only the default SOA
// record and NS resource record sets. If the hosted zone contains other resource
// record sets, you must delete them before you can delete the hosted zone. If you
// try to delete a hosted zone that contains other resource record sets, the
// request fails, and Route 53 returns a HostedZoneNotEmpty error. For information
// about deleting records from your hosted zone, see ChangeResourceRecordSets (https://docs.aws.amazon.com/Route53/latest/APIReference/API_ChangeResourceRecordSets.html)
// . To verify that the hosted zone has been deleted, do one of the following:
// - Use the GetHostedZone action to request information about the hosted zone.
// - Use the ListHostedZones action to get a list of the hosted zones associated
// with the current Amazon Web Services account.
func (c *Client) DeleteHostedZone(ctx context.Context, params *DeleteHostedZoneInput, optFns ...func(*Options)) (*DeleteHostedZoneOutput, error) {
if params == nil {
params = &DeleteHostedZoneInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteHostedZone", params, optFns, c.addOperationDeleteHostedZoneMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteHostedZoneOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to delete a hosted zone.
type DeleteHostedZoneInput struct {
// The ID of the hosted zone you want to delete.
//
// This member is required.
Id *string
noSmithyDocumentSerde
}
// A complex type that contains the response to a DeleteHostedZone request.
type DeleteHostedZoneOutput struct {
// A complex type that contains the ID, the status, and the date and time of a
// request to delete a hosted zone.
//
// This member is required.
ChangeInfo *types.ChangeInfo
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteHostedZoneMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteHostedZone{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteHostedZone{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteHostedZoneValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteHostedZone(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addSanitizeURLMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteHostedZone(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "DeleteHostedZone",
}
}
| 165 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes a key-signing key (KSK). Before you can delete a KSK, you must
// deactivate it. The KSK must be deactivated before you can delete it regardless
// of whether the hosted zone is enabled for DNSSEC signing. You can use
// DeactivateKeySigningKey (https://docs.aws.amazon.com/Route53/latest/APIReference/API_DeactivateKeySigningKey.html)
// to deactivate the key before you delete it. Use GetDNSSEC (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetDNSSEC.html)
// to verify that the KSK is in an INACTIVE status.
func (c *Client) DeleteKeySigningKey(ctx context.Context, params *DeleteKeySigningKeyInput, optFns ...func(*Options)) (*DeleteKeySigningKeyOutput, error) {
if params == nil {
params = &DeleteKeySigningKeyInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteKeySigningKey", params, optFns, c.addOperationDeleteKeySigningKeyMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteKeySigningKeyOutput)
out.ResultMetadata = metadata
return out, nil
}
type DeleteKeySigningKeyInput struct {
// A unique string used to identify a hosted zone.
//
// This member is required.
HostedZoneId *string
// A string used to identify a key-signing key (KSK).
//
// This member is required.
Name *string
noSmithyDocumentSerde
}
type DeleteKeySigningKeyOutput struct {
// A complex type that describes change information about changes made to your
// hosted zone.
//
// This member is required.
ChangeInfo *types.ChangeInfo
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteKeySigningKeyMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteKeySigningKey{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteKeySigningKey{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteKeySigningKeyValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteKeySigningKey(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addSanitizeURLMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteKeySigningKey(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "DeleteKeySigningKey",
}
}
| 141 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes a configuration for DNS query logging. If you delete a configuration,
// Amazon Route 53 stops sending query logs to CloudWatch Logs. Route 53 doesn't
// delete any logs that are already in CloudWatch Logs. For more information about
// DNS query logs, see CreateQueryLoggingConfig (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateQueryLoggingConfig.html)
// .
func (c *Client) DeleteQueryLoggingConfig(ctx context.Context, params *DeleteQueryLoggingConfigInput, optFns ...func(*Options)) (*DeleteQueryLoggingConfigOutput, error) {
if params == nil {
params = &DeleteQueryLoggingConfigInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteQueryLoggingConfig", params, optFns, c.addOperationDeleteQueryLoggingConfigMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteQueryLoggingConfigOutput)
out.ResultMetadata = metadata
return out, nil
}
type DeleteQueryLoggingConfigInput struct {
// The ID of the configuration that you want to delete.
//
// This member is required.
Id *string
noSmithyDocumentSerde
}
type DeleteQueryLoggingConfigOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteQueryLoggingConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteQueryLoggingConfig{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteQueryLoggingConfig{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteQueryLoggingConfigValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteQueryLoggingConfig(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteQueryLoggingConfig(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "DeleteQueryLoggingConfig",
}
}
| 124 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes a reusable delegation set. You can delete a reusable delegation set
// only if it isn't associated with any hosted zones. To verify that the reusable
// delegation set is not associated with any hosted zones, submit a
// GetReusableDelegationSet (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetReusableDelegationSet.html)
// request and specify the ID of the reusable delegation set that you want to
// delete.
func (c *Client) DeleteReusableDelegationSet(ctx context.Context, params *DeleteReusableDelegationSetInput, optFns ...func(*Options)) (*DeleteReusableDelegationSetOutput, error) {
if params == nil {
params = &DeleteReusableDelegationSetInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteReusableDelegationSet", params, optFns, c.addOperationDeleteReusableDelegationSetMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteReusableDelegationSetOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to delete a reusable delegation set.
type DeleteReusableDelegationSetInput struct {
// The ID of the reusable delegation set that you want to delete.
//
// This member is required.
Id *string
noSmithyDocumentSerde
}
// An empty element.
type DeleteReusableDelegationSetOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteReusableDelegationSetMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteReusableDelegationSet{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteReusableDelegationSet{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteReusableDelegationSetValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteReusableDelegationSet(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addSanitizeURLMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteReusableDelegationSet(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "DeleteReusableDelegationSet",
}
}
| 130 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes a traffic policy. When you delete a traffic policy, Route 53 sets a
// flag on the policy to indicate that it has been deleted. However, Route 53 never
// fully deletes the traffic policy. Note the following:
// - Deleted traffic policies aren't listed if you run ListTrafficPolicies (https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListTrafficPolicies.html)
// .
// - There's no way to get a list of deleted policies.
// - If you retain the ID of the policy, you can get information about the
// policy, including the traffic policy document, by running GetTrafficPolicy (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetTrafficPolicy.html)
// .
func (c *Client) DeleteTrafficPolicy(ctx context.Context, params *DeleteTrafficPolicyInput, optFns ...func(*Options)) (*DeleteTrafficPolicyOutput, error) {
if params == nil {
params = &DeleteTrafficPolicyInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteTrafficPolicy", params, optFns, c.addOperationDeleteTrafficPolicyMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteTrafficPolicyOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to delete a specified traffic policy version.
type DeleteTrafficPolicyInput struct {
// The ID of the traffic policy that you want to delete.
//
// This member is required.
Id *string
// The version number of the traffic policy that you want to delete.
//
// This member is required.
Version *int32
noSmithyDocumentSerde
}
// An empty element.
type DeleteTrafficPolicyOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteTrafficPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteTrafficPolicy{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteTrafficPolicy{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteTrafficPolicyValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTrafficPolicy(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteTrafficPolicy(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "DeleteTrafficPolicy",
}
}
| 135 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes a traffic policy instance and all of the resource record sets that
// Amazon Route 53 created when you created the instance. In the Route 53 console,
// traffic policy instances are known as policy records.
func (c *Client) DeleteTrafficPolicyInstance(ctx context.Context, params *DeleteTrafficPolicyInstanceInput, optFns ...func(*Options)) (*DeleteTrafficPolicyInstanceOutput, error) {
if params == nil {
params = &DeleteTrafficPolicyInstanceInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteTrafficPolicyInstance", params, optFns, c.addOperationDeleteTrafficPolicyInstanceMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteTrafficPolicyInstanceOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to delete a specified traffic policy instance.
type DeleteTrafficPolicyInstanceInput struct {
// The ID of the traffic policy instance that you want to delete. When you delete
// a traffic policy instance, Amazon Route 53 also deletes all of the resource
// record sets that were created when you created the traffic policy instance.
//
// This member is required.
Id *string
noSmithyDocumentSerde
}
// An empty element.
type DeleteTrafficPolicyInstanceOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteTrafficPolicyInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteTrafficPolicyInstance{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteTrafficPolicyInstance{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteTrafficPolicyInstanceValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTrafficPolicyInstance(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteTrafficPolicyInstance(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "DeleteTrafficPolicyInstance",
}
}
| 126 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Removes authorization to submit an AssociateVPCWithHostedZone request to
// associate a specified VPC with a hosted zone that was created by a different
// account. You must use the account that created the hosted zone to submit a
// DeleteVPCAssociationAuthorization request. Sending this request only prevents
// the Amazon Web Services account that created the VPC from associating the VPC
// with the Amazon Route 53 hosted zone in the future. If the VPC is already
// associated with the hosted zone, DeleteVPCAssociationAuthorization won't
// disassociate the VPC from the hosted zone. If you want to delete an existing
// association, use DisassociateVPCFromHostedZone .
func (c *Client) DeleteVPCAssociationAuthorization(ctx context.Context, params *DeleteVPCAssociationAuthorizationInput, optFns ...func(*Options)) (*DeleteVPCAssociationAuthorizationOutput, error) {
if params == nil {
params = &DeleteVPCAssociationAuthorizationInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteVPCAssociationAuthorization", params, optFns, c.addOperationDeleteVPCAssociationAuthorizationMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteVPCAssociationAuthorizationOutput)
out.ResultMetadata = metadata
return out, nil
}
// A complex type that contains information about the request to remove
// authorization to associate a VPC that was created by one Amazon Web Services
// account with a hosted zone that was created with a different Amazon Web Services
// account.
type DeleteVPCAssociationAuthorizationInput struct {
// When removing authorization to associate a VPC that was created by one Amazon
// Web Services account with a hosted zone that was created with a different Amazon
// Web Services account, the ID of the hosted zone.
//
// This member is required.
HostedZoneId *string
// When removing authorization to associate a VPC that was created by one Amazon
// Web Services account with a hosted zone that was created with a different Amazon
// Web Services account, a complex type that includes the ID and region of the VPC.
//
// This member is required.
VPC *types.VPC
noSmithyDocumentSerde
}
// Empty response for the request.
type DeleteVPCAssociationAuthorizationOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteVPCAssociationAuthorizationMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteVPCAssociationAuthorization{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteVPCAssociationAuthorization{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteVPCAssociationAuthorizationValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVPCAssociationAuthorization(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addSanitizeURLMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteVPCAssociationAuthorization(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "DeleteVPCAssociationAuthorization",
}
}
| 146 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Disables DNSSEC signing in a specific hosted zone. This action does not
// deactivate any key-signing keys (KSKs) that are active in the hosted zone.
func (c *Client) DisableHostedZoneDNSSEC(ctx context.Context, params *DisableHostedZoneDNSSECInput, optFns ...func(*Options)) (*DisableHostedZoneDNSSECOutput, error) {
if params == nil {
params = &DisableHostedZoneDNSSECInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DisableHostedZoneDNSSEC", params, optFns, c.addOperationDisableHostedZoneDNSSECMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DisableHostedZoneDNSSECOutput)
out.ResultMetadata = metadata
return out, nil
}
type DisableHostedZoneDNSSECInput struct {
// A unique string used to identify a hosted zone.
//
// This member is required.
HostedZoneId *string
noSmithyDocumentSerde
}
type DisableHostedZoneDNSSECOutput struct {
// A complex type that describes change information about changes made to your
// hosted zone.
//
// This member is required.
ChangeInfo *types.ChangeInfo
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDisableHostedZoneDNSSECMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpDisableHostedZoneDNSSEC{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpDisableHostedZoneDNSSEC{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDisableHostedZoneDNSSECValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableHostedZoneDNSSEC(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addSanitizeURLMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDisableHostedZoneDNSSEC(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "DisableHostedZoneDNSSEC",
}
}
| 132 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Disassociates an Amazon Virtual Private Cloud (Amazon VPC) from an Amazon Route
// 53 private hosted zone. Note the following:
//
// - You can't disassociate the last Amazon VPC from a private hosted zone.
//
// - You can't convert a private hosted zone into a public hosted zone.
//
// - You can submit a DisassociateVPCFromHostedZone request using either the
// account that created the hosted zone or the account that created the Amazon VPC.
//
// - Some services, such as Cloud Map and Amazon Elastic File System (Amazon
// EFS) automatically create hosted zones and associate VPCs with the hosted zones.
// A service can create a hosted zone using your account or using its own account.
// You can disassociate a VPC from a hosted zone only if the service created the
// hosted zone using your account. When you run DisassociateVPCFromHostedZone (https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListHostedZonesByVPC.html)
// , if the hosted zone has a value for OwningAccount , you can use
// DisassociateVPCFromHostedZone . If the hosted zone has a value for
// OwningService , you can't use DisassociateVPCFromHostedZone .
//
// When revoking access, the hosted zone and the Amazon VPC must belong to the
// same partition. A partition is a group of Amazon Web Services Regions. Each
// Amazon Web Services account is scoped to one partition. The following are the
// supported partitions:
// - aws - Amazon Web Services Regions
// - aws-cn - China Regions
// - aws-us-gov - Amazon Web Services GovCloud (US) Region
//
// For more information, see Access Management (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
// in the Amazon Web Services General Reference.
func (c *Client) DisassociateVPCFromHostedZone(ctx context.Context, params *DisassociateVPCFromHostedZoneInput, optFns ...func(*Options)) (*DisassociateVPCFromHostedZoneOutput, error) {
if params == nil {
params = &DisassociateVPCFromHostedZoneInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DisassociateVPCFromHostedZone", params, optFns, c.addOperationDisassociateVPCFromHostedZoneMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DisassociateVPCFromHostedZoneOutput)
out.ResultMetadata = metadata
return out, nil
}
// A complex type that contains information about the VPC that you want to
// disassociate from a specified private hosted zone.
type DisassociateVPCFromHostedZoneInput struct {
// The ID of the private hosted zone that you want to disassociate a VPC from.
//
// This member is required.
HostedZoneId *string
// A complex type that contains information about the VPC that you're
// disassociating from the specified hosted zone.
//
// This member is required.
VPC *types.VPC
// Optional: A comment about the disassociation request.
Comment *string
noSmithyDocumentSerde
}
// A complex type that contains the response information for the disassociate
// request.
type DisassociateVPCFromHostedZoneOutput struct {
// A complex type that describes the changes made to the specified private hosted
// zone.
//
// This member is required.
ChangeInfo *types.ChangeInfo
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDisassociateVPCFromHostedZoneMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpDisassociateVPCFromHostedZone{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpDisassociateVPCFromHostedZone{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDisassociateVPCFromHostedZoneValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateVPCFromHostedZone(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addSanitizeURLMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDisassociateVPCFromHostedZone(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "DisassociateVPCFromHostedZone",
}
}
| 172 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Enables DNSSEC signing in a specific hosted zone.
func (c *Client) EnableHostedZoneDNSSEC(ctx context.Context, params *EnableHostedZoneDNSSECInput, optFns ...func(*Options)) (*EnableHostedZoneDNSSECOutput, error) {
if params == nil {
params = &EnableHostedZoneDNSSECInput{}
}
result, metadata, err := c.invokeOperation(ctx, "EnableHostedZoneDNSSEC", params, optFns, c.addOperationEnableHostedZoneDNSSECMiddlewares)
if err != nil {
return nil, err
}
out := result.(*EnableHostedZoneDNSSECOutput)
out.ResultMetadata = metadata
return out, nil
}
type EnableHostedZoneDNSSECInput struct {
// A unique string used to identify a hosted zone.
//
// This member is required.
HostedZoneId *string
noSmithyDocumentSerde
}
type EnableHostedZoneDNSSECOutput struct {
// A complex type that describes change information about changes made to your
// hosted zone.
//
// This member is required.
ChangeInfo *types.ChangeInfo
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationEnableHostedZoneDNSSECMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpEnableHostedZoneDNSSEC{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpEnableHostedZoneDNSSEC{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpEnableHostedZoneDNSSECValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableHostedZoneDNSSEC(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addSanitizeURLMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opEnableHostedZoneDNSSEC(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "EnableHostedZoneDNSSEC",
}
}
| 131 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Gets the specified limit for the current account, for example, the maximum
// number of health checks that you can create using the account. For the default
// limit, see Limits (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html)
// in the Amazon Route 53 Developer Guide. To request a higher limit, open a case (https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-route53)
// . You can also view account limits in Amazon Web Services Trusted Advisor. Sign
// in to the Amazon Web Services Management Console and open the Trusted Advisor
// console at https://console.aws.amazon.com/trustedadvisor/ (https://console.aws.amazon.com/trustedadvisor)
// . Then choose Service limits in the navigation pane.
func (c *Client) GetAccountLimit(ctx context.Context, params *GetAccountLimitInput, optFns ...func(*Options)) (*GetAccountLimitOutput, error) {
if params == nil {
params = &GetAccountLimitInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetAccountLimit", params, optFns, c.addOperationGetAccountLimitMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetAccountLimitOutput)
out.ResultMetadata = metadata
return out, nil
}
// A complex type that contains information about the request to create a hosted
// zone.
type GetAccountLimitInput struct {
// The limit that you want to get. Valid values include the following:
// - MAX_HEALTH_CHECKS_BY_OWNER: The maximum number of health checks that you
// can create using the current account.
// - MAX_HOSTED_ZONES_BY_OWNER: The maximum number of hosted zones that you can
// create using the current account.
// - MAX_REUSABLE_DELEGATION_SETS_BY_OWNER: The maximum number of reusable
// delegation sets that you can create using the current account.
// - MAX_TRAFFIC_POLICIES_BY_OWNER: The maximum number of traffic policies that
// you can create using the current account.
// - MAX_TRAFFIC_POLICY_INSTANCES_BY_OWNER: The maximum number of traffic policy
// instances that you can create using the current account. (Traffic policy
// instances are referred to as traffic flow policy records in the Amazon Route 53
// console.)
//
// This member is required.
Type types.AccountLimitType
noSmithyDocumentSerde
}
// A complex type that contains the requested limit.
type GetAccountLimitOutput struct {
// The current number of entities that you have created of the specified type. For
// example, if you specified MAX_HEALTH_CHECKS_BY_OWNER for the value of Type in
// the request, the value of Count is the current number of health checks that you
// have created using the current account.
//
// This member is required.
Count int64
// The current setting for the specified limit. For example, if you specified
// MAX_HEALTH_CHECKS_BY_OWNER for the value of Type in the request, the value of
// Limit is the maximum number of health checks that you can create using the
// current account.
//
// This member is required.
Limit *types.AccountLimit
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetAccountLimitMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpGetAccountLimit{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetAccountLimit{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpGetAccountLimitValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountLimit(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetAccountLimit(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "GetAccountLimit",
}
}
| 160 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithytime "github.com/aws/smithy-go/time"
smithyhttp "github.com/aws/smithy-go/transport/http"
smithywaiter "github.com/aws/smithy-go/waiter"
"github.com/jmespath/go-jmespath"
"time"
)
// Returns the current status of a change batch request. The status is one of the
// following values:
// - PENDING indicates that the changes in this request have not propagated to
// all Amazon Route 53 DNS servers. This is the initial status of all change batch
// requests.
// - INSYNC indicates that the changes have propagated to all Route 53 DNS
// servers.
func (c *Client) GetChange(ctx context.Context, params *GetChangeInput, optFns ...func(*Options)) (*GetChangeOutput, error) {
if params == nil {
params = &GetChangeInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetChange", params, optFns, c.addOperationGetChangeMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetChangeOutput)
out.ResultMetadata = metadata
return out, nil
}
// The input for a GetChange request.
type GetChangeInput struct {
// The ID of the change batch request. The value that you specify here is the
// value that ChangeResourceRecordSets returned in the Id element when you
// submitted the request.
//
// This member is required.
Id *string
noSmithyDocumentSerde
}
// A complex type that contains the ChangeInfo element.
type GetChangeOutput struct {
// A complex type that contains information about the specified change batch.
//
// This member is required.
ChangeInfo *types.ChangeInfo
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetChangeMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpGetChange{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetChange{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpGetChangeValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetChange(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addSanitizeURLMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
// GetChangeAPIClient is a client that implements the GetChange operation.
type GetChangeAPIClient interface {
GetChange(context.Context, *GetChangeInput, ...func(*Options)) (*GetChangeOutput, error)
}
var _ GetChangeAPIClient = (*Client)(nil)
// ResourceRecordSetsChangedWaiterOptions are waiter options for
// ResourceRecordSetsChangedWaiter
type ResourceRecordSetsChangedWaiterOptions struct {
// Set of options to modify how an operation is invoked. These apply to all
// operations invoked for this client. Use functional options on operation call to
// modify this list for per operation behavior.
APIOptions []func(*middleware.Stack) error
// MinDelay is the minimum amount of time to delay between retries. If unset,
// ResourceRecordSetsChangedWaiter will use default minimum delay of 30 seconds.
// Note that MinDelay must resolve to a value lesser than or equal to the MaxDelay.
MinDelay time.Duration
// MaxDelay is the maximum amount of time to delay between retries. If unset or
// set to zero, ResourceRecordSetsChangedWaiter will use default max delay of 120
// seconds. Note that MaxDelay must resolve to value greater than or equal to the
// MinDelay.
MaxDelay time.Duration
// LogWaitAttempts is used to enable logging for waiter retry attempts
LogWaitAttempts bool
// Retryable is function that can be used to override the service defined
// waiter-behavior based on operation output, or returned error. This function is
// used by the waiter to decide if a state is retryable or a terminal state. By
// default service-modeled logic will populate this option. This option can thus be
// used to define a custom waiter state with fall-back to service-modeled waiter
// state mutators.The function returns an error in case of a failure state. In case
// of retry state, this function returns a bool value of true and nil error, while
// in case of success it returns a bool value of false and nil error.
Retryable func(context.Context, *GetChangeInput, *GetChangeOutput, error) (bool, error)
}
// ResourceRecordSetsChangedWaiter defines the waiters for
// ResourceRecordSetsChanged
type ResourceRecordSetsChangedWaiter struct {
client GetChangeAPIClient
options ResourceRecordSetsChangedWaiterOptions
}
// NewResourceRecordSetsChangedWaiter constructs a ResourceRecordSetsChangedWaiter.
func NewResourceRecordSetsChangedWaiter(client GetChangeAPIClient, optFns ...func(*ResourceRecordSetsChangedWaiterOptions)) *ResourceRecordSetsChangedWaiter {
options := ResourceRecordSetsChangedWaiterOptions{}
options.MinDelay = 30 * time.Second
options.MaxDelay = 120 * time.Second
options.Retryable = resourceRecordSetsChangedStateRetryable
for _, fn := range optFns {
fn(&options)
}
return &ResourceRecordSetsChangedWaiter{
client: client,
options: options,
}
}
// Wait calls the waiter function for ResourceRecordSetsChanged waiter. The
// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is
// required and must be greater than zero.
func (w *ResourceRecordSetsChangedWaiter) Wait(ctx context.Context, params *GetChangeInput, maxWaitDur time.Duration, optFns ...func(*ResourceRecordSetsChangedWaiterOptions)) error {
_, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
return err
}
// WaitForOutput calls the waiter function for ResourceRecordSetsChanged waiter
// and returns the output of the successful operation. The maxWaitDur is the
// maximum wait duration the waiter will wait. The maxWaitDur is required and must
// be greater than zero.
func (w *ResourceRecordSetsChangedWaiter) WaitForOutput(ctx context.Context, params *GetChangeInput, maxWaitDur time.Duration, optFns ...func(*ResourceRecordSetsChangedWaiterOptions)) (*GetChangeOutput, error) {
if maxWaitDur <= 0 {
return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
}
options := w.options
for _, fn := range optFns {
fn(&options)
}
if options.MaxDelay <= 0 {
options.MaxDelay = 120 * time.Second
}
if options.MinDelay > options.MaxDelay {
return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
}
ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
defer cancelFn()
logger := smithywaiter.Logger{}
remainingTime := maxWaitDur
var attempt int64
for {
attempt++
apiOptions := options.APIOptions
start := time.Now()
if options.LogWaitAttempts {
logger.Attempt = attempt
apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
apiOptions = append(apiOptions, logger.AddLogger)
}
out, err := w.client.GetChange(ctx, params, func(o *Options) {
o.APIOptions = append(o.APIOptions, apiOptions...)
})
retryable, err := options.Retryable(ctx, params, out, err)
if err != nil {
return nil, err
}
if !retryable {
return out, nil
}
remainingTime -= time.Since(start)
if remainingTime < options.MinDelay || remainingTime <= 0 {
break
}
// compute exponential backoff between waiter retries
delay, err := smithywaiter.ComputeDelay(
attempt, options.MinDelay, options.MaxDelay, remainingTime,
)
if err != nil {
return nil, fmt.Errorf("error computing waiter delay, %w", err)
}
remainingTime -= delay
// sleep for the delay amount before invoking a request
if err := smithytime.SleepWithContext(ctx, delay); err != nil {
return nil, fmt.Errorf("request cancelled while waiting, %w", err)
}
}
return nil, fmt.Errorf("exceeded max wait time for ResourceRecordSetsChanged waiter")
}
func resourceRecordSetsChangedStateRetryable(ctx context.Context, input *GetChangeInput, output *GetChangeOutput, err error) (bool, error) {
if err == nil {
pathValue, err := jmespath.Search("ChangeInfo.Status", output)
if err != nil {
return false, fmt.Errorf("error evaluating waiter state: %w", err)
}
expectedValue := "INSYNC"
value, ok := pathValue.(types.ChangeStatus)
if !ok {
return false, fmt.Errorf("waiter comparator expected types.ChangeStatus value, got %T", pathValue)
}
if string(value) == expectedValue {
return false, nil
}
}
return true, nil
}
func newServiceMetadataMiddleware_opGetChange(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "GetChange",
}
}
| 315 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Route 53 does not perform authorization for this API because it retrieves
// information that is already available to the public. GetCheckerIpRanges still
// works, but we recommend that you download ip-ranges.json, which includes IP
// address ranges for all Amazon Web Services services. For more information, see
// IP Address Ranges of Amazon Route 53 Servers (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/route-53-ip-addresses.html)
// in the Amazon Route 53 Developer Guide.
func (c *Client) GetCheckerIpRanges(ctx context.Context, params *GetCheckerIpRangesInput, optFns ...func(*Options)) (*GetCheckerIpRangesOutput, error) {
if params == nil {
params = &GetCheckerIpRangesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetCheckerIpRanges", params, optFns, c.addOperationGetCheckerIpRangesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetCheckerIpRangesOutput)
out.ResultMetadata = metadata
return out, nil
}
// Empty request.
type GetCheckerIpRangesInput struct {
noSmithyDocumentSerde
}
// A complex type that contains the CheckerIpRanges element.
type GetCheckerIpRangesOutput struct {
// A complex type that contains sorted list of IP ranges in CIDR format for Amazon
// Route 53 health checkers.
//
// This member is required.
CheckerIpRanges []string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetCheckerIpRangesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpGetCheckerIpRanges{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetCheckerIpRanges{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCheckerIpRanges(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetCheckerIpRanges(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "GetCheckerIpRanges",
}
}
| 125 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns information about DNSSEC for a specific hosted zone, including the
// key-signing keys (KSKs) in the hosted zone.
func (c *Client) GetDNSSEC(ctx context.Context, params *GetDNSSECInput, optFns ...func(*Options)) (*GetDNSSECOutput, error) {
if params == nil {
params = &GetDNSSECInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetDNSSEC", params, optFns, c.addOperationGetDNSSECMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetDNSSECOutput)
out.ResultMetadata = metadata
return out, nil
}
type GetDNSSECInput struct {
// A unique string used to identify a hosted zone.
//
// This member is required.
HostedZoneId *string
noSmithyDocumentSerde
}
type GetDNSSECOutput struct {
// The key-signing keys (KSKs) in your account.
//
// This member is required.
KeySigningKeys []types.KeySigningKey
// A string repesenting the status of DNSSEC.
//
// This member is required.
Status *types.DNSSECStatus
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetDNSSECMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpGetDNSSEC{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetDNSSEC{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpGetDNSSECValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDNSSEC(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addSanitizeURLMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetDNSSEC(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "GetDNSSEC",
}
}
| 136 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Gets information about whether a specified geographic location is supported for
// Amazon Route 53 geolocation resource record sets. Route 53 does not perform
// authorization for this API because it retrieves information that is already
// available to the public. Use the following syntax to determine whether a
// continent is supported for geolocation: GET
// /2013-04-01/geolocation?continentcode=two-letter abbreviation for a continent
// Use the following syntax to determine whether a country is supported for
// geolocation: GET /2013-04-01/geolocation?countrycode=two-character country code
// Use the following syntax to determine whether a subdivision of a country is
// supported for geolocation: GET
// /2013-04-01/geolocation?countrycode=two-character country
// code&subdivisioncode=subdivision code
func (c *Client) GetGeoLocation(ctx context.Context, params *GetGeoLocationInput, optFns ...func(*Options)) (*GetGeoLocationOutput, error) {
if params == nil {
params = &GetGeoLocationInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetGeoLocation", params, optFns, c.addOperationGetGeoLocationMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetGeoLocationOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request for information about whether a specified geographic location is
// supported for Amazon Route 53 geolocation resource record sets.
type GetGeoLocationInput struct {
// For geolocation resource record sets, a two-letter abbreviation that identifies
// a continent. Amazon Route 53 supports the following continent codes:
// - AF: Africa
// - AN: Antarctica
// - AS: Asia
// - EU: Europe
// - OC: Oceania
// - NA: North America
// - SA: South America
ContinentCode *string
// Amazon Route 53 uses the two-letter country codes that are specified in ISO
// standard 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) .
CountryCode *string
// The code for the subdivision, such as a particular state within the United
// States. For a list of US state abbreviations, see Appendix B: Two–Letter State
// and Possession Abbreviations (https://pe.usps.com/text/pub28/28apb.htm) on the
// United States Postal Service website. For a list of all supported subdivision
// codes, use the ListGeoLocations (https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListGeoLocations.html)
// API.
SubdivisionCode *string
noSmithyDocumentSerde
}
// A complex type that contains the response information for the specified
// geolocation code.
type GetGeoLocationOutput struct {
// A complex type that contains the codes and full continent, country, and
// subdivision names for the specified geolocation code.
//
// This member is required.
GeoLocationDetails *types.GeoLocationDetails
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetGeoLocationMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpGetGeoLocation{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetGeoLocation{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetGeoLocation(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetGeoLocation(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "GetGeoLocation",
}
}
| 158 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Gets information about a specified health check.
func (c *Client) GetHealthCheck(ctx context.Context, params *GetHealthCheckInput, optFns ...func(*Options)) (*GetHealthCheckOutput, error) {
if params == nil {
params = &GetHealthCheckInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetHealthCheck", params, optFns, c.addOperationGetHealthCheckMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetHealthCheckOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to get information about a specified health check.
type GetHealthCheckInput struct {
// The identifier that Amazon Route 53 assigned to the health check when you
// created it. When you add or update a resource record set, you use this value to
// specify which health check to use. The value can be up to 64 characters long.
//
// This member is required.
HealthCheckId *string
noSmithyDocumentSerde
}
// A complex type that contains the response to a GetHealthCheck request.
type GetHealthCheckOutput struct {
// A complex type that contains information about one health check that is
// associated with the current Amazon Web Services account.
//
// This member is required.
HealthCheck *types.HealthCheck
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetHealthCheckMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpGetHealthCheck{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetHealthCheck{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpGetHealthCheckValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHealthCheck(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetHealthCheck(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "GetHealthCheck",
}
}
| 132 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Retrieves the number of health checks that are associated with the current
// Amazon Web Services account.
func (c *Client) GetHealthCheckCount(ctx context.Context, params *GetHealthCheckCountInput, optFns ...func(*Options)) (*GetHealthCheckCountOutput, error) {
if params == nil {
params = &GetHealthCheckCountInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetHealthCheckCount", params, optFns, c.addOperationGetHealthCheckCountMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetHealthCheckCountOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request for the number of health checks that are associated with the current
// Amazon Web Services account.
type GetHealthCheckCountInput struct {
noSmithyDocumentSerde
}
// A complex type that contains the response to a GetHealthCheckCount request.
type GetHealthCheckCountOutput struct {
// The number of health checks associated with the current Amazon Web Services
// account.
//
// This member is required.
HealthCheckCount *int64
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetHealthCheckCountMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpGetHealthCheckCount{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetHealthCheckCount{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHealthCheckCount(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetHealthCheckCount(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "GetHealthCheckCount",
}
}
| 122 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Gets the reason that a specified health check failed most recently.
func (c *Client) GetHealthCheckLastFailureReason(ctx context.Context, params *GetHealthCheckLastFailureReasonInput, optFns ...func(*Options)) (*GetHealthCheckLastFailureReasonOutput, error) {
if params == nil {
params = &GetHealthCheckLastFailureReasonInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetHealthCheckLastFailureReason", params, optFns, c.addOperationGetHealthCheckLastFailureReasonMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetHealthCheckLastFailureReasonOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request for the reason that a health check failed most recently.
type GetHealthCheckLastFailureReasonInput struct {
// The ID for the health check for which you want the last failure reason. When
// you created the health check, CreateHealthCheck returned the ID in the
// response, in the HealthCheckId element. If you want to get the last failure
// reason for a calculated health check, you must use the Amazon Route 53 console
// or the CloudWatch console. You can't use GetHealthCheckLastFailureReason for a
// calculated health check.
//
// This member is required.
HealthCheckId *string
noSmithyDocumentSerde
}
// A complex type that contains the response to a GetHealthCheckLastFailureReason
// request.
type GetHealthCheckLastFailureReasonOutput struct {
// A list that contains one Observation element for each Amazon Route 53 health
// checker that is reporting a last failure reason.
//
// This member is required.
HealthCheckObservations []types.HealthCheckObservation
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetHealthCheckLastFailureReasonMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpGetHealthCheckLastFailureReason{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetHealthCheckLastFailureReason{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpGetHealthCheckLastFailureReasonValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHealthCheckLastFailureReason(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetHealthCheckLastFailureReason(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "GetHealthCheckLastFailureReason",
}
}
| 136 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Gets status of a specified health check. This API is intended for use during
// development to diagnose behavior. It doesn’t support production use-cases with
// high query rates that require immediate and actionable responses.
func (c *Client) GetHealthCheckStatus(ctx context.Context, params *GetHealthCheckStatusInput, optFns ...func(*Options)) (*GetHealthCheckStatusOutput, error) {
if params == nil {
params = &GetHealthCheckStatusInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetHealthCheckStatus", params, optFns, c.addOperationGetHealthCheckStatusMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetHealthCheckStatusOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to get the status for a health check.
type GetHealthCheckStatusInput struct {
// The ID for the health check that you want the current status for. When you
// created the health check, CreateHealthCheck returned the ID in the response, in
// the HealthCheckId element. If you want to check the status of a calculated
// health check, you must use the Amazon Route 53 console or the CloudWatch
// console. You can't use GetHealthCheckStatus to get the status of a calculated
// health check.
//
// This member is required.
HealthCheckId *string
noSmithyDocumentSerde
}
// A complex type that contains the response to a GetHealthCheck request.
type GetHealthCheckStatusOutput struct {
// A list that contains one HealthCheckObservation element for each Amazon Route
// 53 health checker that is reporting a status about the health check endpoint.
//
// This member is required.
HealthCheckObservations []types.HealthCheckObservation
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetHealthCheckStatusMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpGetHealthCheckStatus{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetHealthCheckStatus{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpGetHealthCheckStatusValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHealthCheckStatus(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetHealthCheckStatus(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "GetHealthCheckStatus",
}
}
| 137 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Gets information about a specified hosted zone including the four name servers
// assigned to the hosted zone.
func (c *Client) GetHostedZone(ctx context.Context, params *GetHostedZoneInput, optFns ...func(*Options)) (*GetHostedZoneOutput, error) {
if params == nil {
params = &GetHostedZoneInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetHostedZone", params, optFns, c.addOperationGetHostedZoneMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetHostedZoneOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to get information about a specified hosted zone.
type GetHostedZoneInput struct {
// The ID of the hosted zone that you want to get information about.
//
// This member is required.
Id *string
noSmithyDocumentSerde
}
// A complex type that contain the response to a GetHostedZone request.
type GetHostedZoneOutput struct {
// A complex type that contains general information about the specified hosted
// zone.
//
// This member is required.
HostedZone *types.HostedZone
// A complex type that lists the Amazon Route 53 name servers for the specified
// hosted zone.
DelegationSet *types.DelegationSet
// A complex type that contains information about the VPCs that are associated
// with the specified hosted zone.
VPCs []types.VPC
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetHostedZoneMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpGetHostedZone{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetHostedZone{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpGetHostedZoneValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHostedZone(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addSanitizeURLMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetHostedZone(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "GetHostedZone",
}
}
| 142 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Retrieves the number of hosted zones that are associated with the current
// Amazon Web Services account.
func (c *Client) GetHostedZoneCount(ctx context.Context, params *GetHostedZoneCountInput, optFns ...func(*Options)) (*GetHostedZoneCountOutput, error) {
if params == nil {
params = &GetHostedZoneCountInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetHostedZoneCount", params, optFns, c.addOperationGetHostedZoneCountMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetHostedZoneCountOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to retrieve a count of all the hosted zones that are associated with
// the current Amazon Web Services account.
type GetHostedZoneCountInput struct {
noSmithyDocumentSerde
}
// A complex type that contains the response to a GetHostedZoneCount request.
type GetHostedZoneCountOutput struct {
// The total number of public and private hosted zones that are associated with
// the current Amazon Web Services account.
//
// This member is required.
HostedZoneCount *int64
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetHostedZoneCountMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpGetHostedZoneCount{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetHostedZoneCount{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHostedZoneCount(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetHostedZoneCount(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "GetHostedZoneCount",
}
}
| 122 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Gets the specified limit for a specified hosted zone, for example, the maximum
// number of records that you can create in the hosted zone. For the default limit,
// see Limits (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html)
// in the Amazon Route 53 Developer Guide. To request a higher limit, open a case (https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-route53)
// .
func (c *Client) GetHostedZoneLimit(ctx context.Context, params *GetHostedZoneLimitInput, optFns ...func(*Options)) (*GetHostedZoneLimitOutput, error) {
if params == nil {
params = &GetHostedZoneLimitInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetHostedZoneLimit", params, optFns, c.addOperationGetHostedZoneLimitMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetHostedZoneLimitOutput)
out.ResultMetadata = metadata
return out, nil
}
// A complex type that contains information about the request to create a hosted
// zone.
type GetHostedZoneLimitInput struct {
// The ID of the hosted zone that you want to get a limit for.
//
// This member is required.
HostedZoneId *string
// The limit that you want to get. Valid values include the following:
// - MAX_RRSETS_BY_ZONE: The maximum number of records that you can create in
// the specified hosted zone.
// - MAX_VPCS_ASSOCIATED_BY_ZONE: The maximum number of Amazon VPCs that you can
// associate with the specified private hosted zone.
//
// This member is required.
Type types.HostedZoneLimitType
noSmithyDocumentSerde
}
// A complex type that contains the requested limit.
type GetHostedZoneLimitOutput struct {
// The current number of entities that you have created of the specified type. For
// example, if you specified MAX_RRSETS_BY_ZONE for the value of Type in the
// request, the value of Count is the current number of records that you have
// created in the specified hosted zone.
//
// This member is required.
Count int64
// The current setting for the specified limit. For example, if you specified
// MAX_RRSETS_BY_ZONE for the value of Type in the request, the value of Limit is
// the maximum number of records that you can create in the specified hosted zone.
//
// This member is required.
Limit *types.HostedZoneLimit
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetHostedZoneLimitMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpGetHostedZoneLimit{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetHostedZoneLimit{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpGetHostedZoneLimitValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHostedZoneLimit(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addSanitizeURLMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetHostedZoneLimit(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "GetHostedZoneLimit",
}
}
| 156 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Gets information about a specified configuration for DNS query logging. For
// more information about DNS query logs, see CreateQueryLoggingConfig (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateQueryLoggingConfig.html)
// and Logging DNS Queries (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/query-logs.html)
// .
func (c *Client) GetQueryLoggingConfig(ctx context.Context, params *GetQueryLoggingConfigInput, optFns ...func(*Options)) (*GetQueryLoggingConfigOutput, error) {
if params == nil {
params = &GetQueryLoggingConfigInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetQueryLoggingConfig", params, optFns, c.addOperationGetQueryLoggingConfigMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetQueryLoggingConfigOutput)
out.ResultMetadata = metadata
return out, nil
}
type GetQueryLoggingConfigInput struct {
// The ID of the configuration for DNS query logging that you want to get
// information about.
//
// This member is required.
Id *string
noSmithyDocumentSerde
}
type GetQueryLoggingConfigOutput struct {
// A complex type that contains information about the query logging configuration
// that you specified in a GetQueryLoggingConfig (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetQueryLoggingConfig.html)
// request.
//
// This member is required.
QueryLoggingConfig *types.QueryLoggingConfig
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetQueryLoggingConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpGetQueryLoggingConfig{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetQueryLoggingConfig{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpGetQueryLoggingConfigValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetQueryLoggingConfig(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetQueryLoggingConfig(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "GetQueryLoggingConfig",
}
}
| 133 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Retrieves information about a specified reusable delegation set, including the
// four name servers that are assigned to the delegation set.
func (c *Client) GetReusableDelegationSet(ctx context.Context, params *GetReusableDelegationSetInput, optFns ...func(*Options)) (*GetReusableDelegationSetOutput, error) {
if params == nil {
params = &GetReusableDelegationSetInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetReusableDelegationSet", params, optFns, c.addOperationGetReusableDelegationSetMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetReusableDelegationSetOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to get information about a specified reusable delegation set.
type GetReusableDelegationSetInput struct {
// The ID of the reusable delegation set that you want to get a list of name
// servers for.
//
// This member is required.
Id *string
noSmithyDocumentSerde
}
// A complex type that contains the response to the GetReusableDelegationSet
// request.
type GetReusableDelegationSetOutput struct {
// A complex type that contains information about the reusable delegation set.
//
// This member is required.
DelegationSet *types.DelegationSet
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetReusableDelegationSetMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpGetReusableDelegationSet{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetReusableDelegationSet{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpGetReusableDelegationSetValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetReusableDelegationSet(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addSanitizeURLMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetReusableDelegationSet(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "GetReusableDelegationSet",
}
}
| 135 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Gets the maximum number of hosted zones that you can associate with the
// specified reusable delegation set. For the default limit, see Limits (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html)
// in the Amazon Route 53 Developer Guide. To request a higher limit, open a case (https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-route53)
// .
func (c *Client) GetReusableDelegationSetLimit(ctx context.Context, params *GetReusableDelegationSetLimitInput, optFns ...func(*Options)) (*GetReusableDelegationSetLimitOutput, error) {
if params == nil {
params = &GetReusableDelegationSetLimitInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetReusableDelegationSetLimit", params, optFns, c.addOperationGetReusableDelegationSetLimitMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetReusableDelegationSetLimitOutput)
out.ResultMetadata = metadata
return out, nil
}
// A complex type that contains information about the request to create a hosted
// zone.
type GetReusableDelegationSetLimitInput struct {
// The ID of the delegation set that you want to get the limit for.
//
// This member is required.
DelegationSetId *string
// Specify MAX_ZONES_BY_REUSABLE_DELEGATION_SET to get the maximum number of
// hosted zones that you can associate with the specified reusable delegation set.
//
// This member is required.
Type types.ReusableDelegationSetLimitType
noSmithyDocumentSerde
}
// A complex type that contains the requested limit.
type GetReusableDelegationSetLimitOutput struct {
// The current number of hosted zones that you can associate with the specified
// reusable delegation set.
//
// This member is required.
Count int64
// The current setting for the limit on hosted zones that you can associate with
// the specified reusable delegation set.
//
// This member is required.
Limit *types.ReusableDelegationSetLimit
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetReusableDelegationSetLimitMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpGetReusableDelegationSetLimit{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetReusableDelegationSetLimit{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpGetReusableDelegationSetLimitValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetReusableDelegationSetLimit(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addSanitizeURLMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetReusableDelegationSetLimit(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "GetReusableDelegationSetLimit",
}
}
| 149 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Gets information about a specific traffic policy version. For information about
// how of deleting a traffic policy affects the response from GetTrafficPolicy ,
// see DeleteTrafficPolicy (https://docs.aws.amazon.com/Route53/latest/APIReference/API_DeleteTrafficPolicy.html)
// .
func (c *Client) GetTrafficPolicy(ctx context.Context, params *GetTrafficPolicyInput, optFns ...func(*Options)) (*GetTrafficPolicyOutput, error) {
if params == nil {
params = &GetTrafficPolicyInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetTrafficPolicy", params, optFns, c.addOperationGetTrafficPolicyMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetTrafficPolicyOutput)
out.ResultMetadata = metadata
return out, nil
}
// Gets information about a specific traffic policy version.
type GetTrafficPolicyInput struct {
// The ID of the traffic policy that you want to get information about.
//
// This member is required.
Id *string
// The version number of the traffic policy that you want to get information about.
//
// This member is required.
Version *int32
noSmithyDocumentSerde
}
// A complex type that contains the response information for the request.
type GetTrafficPolicyOutput struct {
// A complex type that contains settings for the specified traffic policy.
//
// This member is required.
TrafficPolicy *types.TrafficPolicy
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetTrafficPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpGetTrafficPolicy{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetTrafficPolicy{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpGetTrafficPolicyValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTrafficPolicy(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetTrafficPolicy(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "GetTrafficPolicy",
}
}
| 137 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Gets information about a specified traffic policy instance. After you submit a
// CreateTrafficPolicyInstance or an UpdateTrafficPolicyInstance request, there's
// a brief delay while Amazon Route 53 creates the resource record sets that are
// specified in the traffic policy definition. For more information, see the State
// response element. In the Route 53 console, traffic policy instances are known as
// policy records.
func (c *Client) GetTrafficPolicyInstance(ctx context.Context, params *GetTrafficPolicyInstanceInput, optFns ...func(*Options)) (*GetTrafficPolicyInstanceOutput, error) {
if params == nil {
params = &GetTrafficPolicyInstanceInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetTrafficPolicyInstance", params, optFns, c.addOperationGetTrafficPolicyInstanceMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetTrafficPolicyInstanceOutput)
out.ResultMetadata = metadata
return out, nil
}
// Gets information about a specified traffic policy instance.
type GetTrafficPolicyInstanceInput struct {
// The ID of the traffic policy instance that you want to get information about.
//
// This member is required.
Id *string
noSmithyDocumentSerde
}
// A complex type that contains information about the resource record sets that
// Amazon Route 53 created based on a specified traffic policy.
type GetTrafficPolicyInstanceOutput struct {
// A complex type that contains settings for the traffic policy instance.
//
// This member is required.
TrafficPolicyInstance *types.TrafficPolicyInstance
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetTrafficPolicyInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpGetTrafficPolicyInstance{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetTrafficPolicyInstance{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpGetTrafficPolicyInstanceValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTrafficPolicyInstance(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetTrafficPolicyInstance(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "GetTrafficPolicyInstance",
}
}
| 135 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Gets the number of traffic policy instances that are associated with the
// current Amazon Web Services account.
func (c *Client) GetTrafficPolicyInstanceCount(ctx context.Context, params *GetTrafficPolicyInstanceCountInput, optFns ...func(*Options)) (*GetTrafficPolicyInstanceCountOutput, error) {
if params == nil {
params = &GetTrafficPolicyInstanceCountInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetTrafficPolicyInstanceCount", params, optFns, c.addOperationGetTrafficPolicyInstanceCountMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetTrafficPolicyInstanceCountOutput)
out.ResultMetadata = metadata
return out, nil
}
// Request to get the number of traffic policy instances that are associated with
// the current Amazon Web Services account.
type GetTrafficPolicyInstanceCountInput struct {
noSmithyDocumentSerde
}
// A complex type that contains information about the resource record sets that
// Amazon Route 53 created based on a specified traffic policy.
type GetTrafficPolicyInstanceCountOutput struct {
// The number of traffic policy instances that are associated with the current
// Amazon Web Services account.
//
// This member is required.
TrafficPolicyInstanceCount *int32
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetTrafficPolicyInstanceCountMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpGetTrafficPolicyInstanceCount{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetTrafficPolicyInstanceCount{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTrafficPolicyInstanceCount(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetTrafficPolicyInstanceCount(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "GetTrafficPolicyInstanceCount",
}
}
| 123 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns a paginated list of location objects and their CIDR blocks.
func (c *Client) ListCidrBlocks(ctx context.Context, params *ListCidrBlocksInput, optFns ...func(*Options)) (*ListCidrBlocksOutput, error) {
if params == nil {
params = &ListCidrBlocksInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListCidrBlocks", params, optFns, c.addOperationListCidrBlocksMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListCidrBlocksOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListCidrBlocksInput struct {
// The UUID of the CIDR collection.
//
// This member is required.
CollectionId *string
// The name of the CIDR collection location.
LocationName *string
// Maximum number of results you want returned.
MaxResults *int32
// An opaque pagination token to indicate where the service is to begin
// enumerating results.
NextToken *string
noSmithyDocumentSerde
}
type ListCidrBlocksOutput struct {
// A complex type that contains information about the CIDR blocks.
CidrBlocks []types.CidrBlockSummary
// An opaque pagination token to indicate where the service is to begin
// enumerating results. If no value is provided, the listing of results starts from
// the beginning.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListCidrBlocksMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpListCidrBlocks{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpListCidrBlocks{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpListCidrBlocksValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCidrBlocks(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
// ListCidrBlocksAPIClient is a client that implements the ListCidrBlocks
// operation.
type ListCidrBlocksAPIClient interface {
ListCidrBlocks(context.Context, *ListCidrBlocksInput, ...func(*Options)) (*ListCidrBlocksOutput, error)
}
var _ ListCidrBlocksAPIClient = (*Client)(nil)
// ListCidrBlocksPaginatorOptions is the paginator options for ListCidrBlocks
type ListCidrBlocksPaginatorOptions struct {
// Maximum number of results you want returned.
Limit int32
// Set to true if pagination should stop if the service returns a pagination token
// that matches the most recent token provided to the service.
StopOnDuplicateToken bool
}
// ListCidrBlocksPaginator is a paginator for ListCidrBlocks
type ListCidrBlocksPaginator struct {
options ListCidrBlocksPaginatorOptions
client ListCidrBlocksAPIClient
params *ListCidrBlocksInput
nextToken *string
firstPage bool
}
// NewListCidrBlocksPaginator returns a new ListCidrBlocksPaginator
func NewListCidrBlocksPaginator(client ListCidrBlocksAPIClient, params *ListCidrBlocksInput, optFns ...func(*ListCidrBlocksPaginatorOptions)) *ListCidrBlocksPaginator {
if params == nil {
params = &ListCidrBlocksInput{}
}
options := ListCidrBlocksPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListCidrBlocksPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListCidrBlocksPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListCidrBlocks page.
func (p *ListCidrBlocksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCidrBlocksOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.NextToken = p.nextToken
var limit *int32
if p.options.Limit > 0 {
limit = &p.options.Limit
}
params.MaxResults = limit
result, err := p.client.ListCidrBlocks(ctx, ¶ms, optFns...)
if err != nil {
return nil, err
}
p.firstPage = false
prevToken := p.nextToken
p.nextToken = result.NextToken
if p.options.StopOnDuplicateToken &&
prevToken != nil &&
p.nextToken != nil &&
*prevToken == *p.nextToken {
p.nextToken = nil
}
return result, nil
}
func newServiceMetadataMiddleware_opListCidrBlocks(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "ListCidrBlocks",
}
}
| 231 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns a paginated list of CIDR collections in the Amazon Web Services account
// (metadata only).
func (c *Client) ListCidrCollections(ctx context.Context, params *ListCidrCollectionsInput, optFns ...func(*Options)) (*ListCidrCollectionsOutput, error) {
if params == nil {
params = &ListCidrCollectionsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListCidrCollections", params, optFns, c.addOperationListCidrCollectionsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListCidrCollectionsOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListCidrCollectionsInput struct {
// The maximum number of CIDR collections to return in the response.
MaxResults *int32
// An opaque pagination token to indicate where the service is to begin
// enumerating results. If no value is provided, the listing of results starts from
// the beginning.
NextToken *string
noSmithyDocumentSerde
}
type ListCidrCollectionsOutput struct {
// A complex type with information about the CIDR collection.
CidrCollections []types.CollectionSummary
// An opaque pagination token to indicate where the service is to begin
// enumerating results. If no value is provided, the listing of results starts from
// the beginning.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListCidrCollectionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpListCidrCollections{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpListCidrCollections{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCidrCollections(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
// ListCidrCollectionsAPIClient is a client that implements the
// ListCidrCollections operation.
type ListCidrCollectionsAPIClient interface {
ListCidrCollections(context.Context, *ListCidrCollectionsInput, ...func(*Options)) (*ListCidrCollectionsOutput, error)
}
var _ ListCidrCollectionsAPIClient = (*Client)(nil)
// ListCidrCollectionsPaginatorOptions is the paginator options for
// ListCidrCollections
type ListCidrCollectionsPaginatorOptions struct {
// The maximum number of CIDR collections to return in the response.
Limit int32
// Set to true if pagination should stop if the service returns a pagination token
// that matches the most recent token provided to the service.
StopOnDuplicateToken bool
}
// ListCidrCollectionsPaginator is a paginator for ListCidrCollections
type ListCidrCollectionsPaginator struct {
options ListCidrCollectionsPaginatorOptions
client ListCidrCollectionsAPIClient
params *ListCidrCollectionsInput
nextToken *string
firstPage bool
}
// NewListCidrCollectionsPaginator returns a new ListCidrCollectionsPaginator
func NewListCidrCollectionsPaginator(client ListCidrCollectionsAPIClient, params *ListCidrCollectionsInput, optFns ...func(*ListCidrCollectionsPaginatorOptions)) *ListCidrCollectionsPaginator {
if params == nil {
params = &ListCidrCollectionsInput{}
}
options := ListCidrCollectionsPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListCidrCollectionsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListCidrCollectionsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListCidrCollections page.
func (p *ListCidrCollectionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCidrCollectionsOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.NextToken = p.nextToken
var limit *int32
if p.options.Limit > 0 {
limit = &p.options.Limit
}
params.MaxResults = limit
result, err := p.client.ListCidrCollections(ctx, ¶ms, optFns...)
if err != nil {
return nil, err
}
p.firstPage = false
prevToken := p.nextToken
p.nextToken = result.NextToken
if p.options.StopOnDuplicateToken &&
prevToken != nil &&
p.nextToken != nil &&
*prevToken == *p.nextToken {
p.nextToken = nil
}
return result, nil
}
func newServiceMetadataMiddleware_opListCidrCollections(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "ListCidrCollections",
}
}
| 223 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns a paginated list of CIDR locations for the given collection (metadata
// only, does not include CIDR blocks).
func (c *Client) ListCidrLocations(ctx context.Context, params *ListCidrLocationsInput, optFns ...func(*Options)) (*ListCidrLocationsOutput, error) {
if params == nil {
params = &ListCidrLocationsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListCidrLocations", params, optFns, c.addOperationListCidrLocationsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListCidrLocationsOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListCidrLocationsInput struct {
// The CIDR collection ID.
//
// This member is required.
CollectionId *string
// The maximum number of CIDR collection locations to return in the response.
MaxResults *int32
// An opaque pagination token to indicate where the service is to begin
// enumerating results. If no value is provided, the listing of results starts from
// the beginning.
NextToken *string
noSmithyDocumentSerde
}
type ListCidrLocationsOutput struct {
// A complex type that contains information about the list of CIDR locations.
CidrLocations []types.LocationSummary
// An opaque pagination token to indicate where the service is to begin
// enumerating results. If no value is provided, the listing of results starts from
// the beginning.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListCidrLocationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpListCidrLocations{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpListCidrLocations{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpListCidrLocationsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCidrLocations(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
// ListCidrLocationsAPIClient is a client that implements the ListCidrLocations
// operation.
type ListCidrLocationsAPIClient interface {
ListCidrLocations(context.Context, *ListCidrLocationsInput, ...func(*Options)) (*ListCidrLocationsOutput, error)
}
var _ ListCidrLocationsAPIClient = (*Client)(nil)
// ListCidrLocationsPaginatorOptions is the paginator options for ListCidrLocations
type ListCidrLocationsPaginatorOptions struct {
// The maximum number of CIDR collection locations to return in the response.
Limit int32
// Set to true if pagination should stop if the service returns a pagination token
// that matches the most recent token provided to the service.
StopOnDuplicateToken bool
}
// ListCidrLocationsPaginator is a paginator for ListCidrLocations
type ListCidrLocationsPaginator struct {
options ListCidrLocationsPaginatorOptions
client ListCidrLocationsAPIClient
params *ListCidrLocationsInput
nextToken *string
firstPage bool
}
// NewListCidrLocationsPaginator returns a new ListCidrLocationsPaginator
func NewListCidrLocationsPaginator(client ListCidrLocationsAPIClient, params *ListCidrLocationsInput, optFns ...func(*ListCidrLocationsPaginatorOptions)) *ListCidrLocationsPaginator {
if params == nil {
params = &ListCidrLocationsInput{}
}
options := ListCidrLocationsPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListCidrLocationsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListCidrLocationsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListCidrLocations page.
func (p *ListCidrLocationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCidrLocationsOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.NextToken = p.nextToken
var limit *int32
if p.options.Limit > 0 {
limit = &p.options.Limit
}
params.MaxResults = limit
result, err := p.client.ListCidrLocations(ctx, ¶ms, optFns...)
if err != nil {
return nil, err
}
p.firstPage = false
prevToken := p.nextToken
p.nextToken = result.NextToken
if p.options.StopOnDuplicateToken &&
prevToken != nil &&
p.nextToken != nil &&
*prevToken == *p.nextToken {
p.nextToken = nil
}
return result, nil
}
func newServiceMetadataMiddleware_opListCidrLocations(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "ListCidrLocations",
}
}
| 230 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Retrieves a list of supported geographic locations. Countries are listed first,
// and continents are listed last. If Amazon Route 53 supports subdivisions for a
// country (for example, states or provinces), the subdivisions for that country
// are listed in alphabetical order immediately after the corresponding country.
// Route 53 does not perform authorization for this API because it retrieves
// information that is already available to the public. For a list of supported
// geolocation codes, see the GeoLocation (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GeoLocation.html)
// data type.
func (c *Client) ListGeoLocations(ctx context.Context, params *ListGeoLocationsInput, optFns ...func(*Options)) (*ListGeoLocationsOutput, error) {
if params == nil {
params = &ListGeoLocationsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListGeoLocations", params, optFns, c.addOperationListGeoLocationsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListGeoLocationsOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to get a list of geographic locations that Amazon Route 53 supports
// for geolocation resource record sets.
type ListGeoLocationsInput struct {
// (Optional) The maximum number of geolocations to be included in the response
// body for this request. If more than maxitems geolocations remain to be listed,
// then the value of the IsTruncated element in the response is true .
MaxItems *int32
// The code for the continent with which you want to start listing locations that
// Amazon Route 53 supports for geolocation. If Route 53 has already returned a
// page or more of results, if IsTruncated is true, and if NextContinentCode from
// the previous response has a value, enter that value in startcontinentcode to
// return the next page of results. Include startcontinentcode only if you want to
// list continents. Don't include startcontinentcode when you're listing countries
// or countries with their subdivisions.
StartContinentCode *string
// The code for the country with which you want to start listing locations that
// Amazon Route 53 supports for geolocation. If Route 53 has already returned a
// page or more of results, if IsTruncated is true , and if NextCountryCode from
// the previous response has a value, enter that value in startcountrycode to
// return the next page of results.
StartCountryCode *string
// The code for the state of the United States with which you want to start
// listing locations that Amazon Route 53 supports for geolocation. If Route 53 has
// already returned a page or more of results, if IsTruncated is true , and if
// NextSubdivisionCode from the previous response has a value, enter that value in
// startsubdivisioncode to return the next page of results. To list subdivisions
// (U.S. states), you must include both startcountrycode and startsubdivisioncode .
StartSubdivisionCode *string
noSmithyDocumentSerde
}
// A complex type containing the response information for the request.
type ListGeoLocationsOutput struct {
// A complex type that contains one GeoLocationDetails element for each location
// that Amazon Route 53 supports for geolocation.
//
// This member is required.
GeoLocationDetailsList []types.GeoLocationDetails
// A value that indicates whether more locations remain to be listed after the
// last location in this response. If so, the value of IsTruncated is true . To get
// more values, submit another request and include the values of NextContinentCode
// , NextCountryCode , and NextSubdivisionCode in the startcontinentcode ,
// startcountrycode , and startsubdivisioncode , as applicable.
//
// This member is required.
IsTruncated bool
// The value that you specified for MaxItems in the request.
//
// This member is required.
MaxItems *int32
// If IsTruncated is true , you can make a follow-up request to display more
// locations. Enter the value of NextContinentCode in the startcontinentcode
// parameter in another ListGeoLocations request.
NextContinentCode *string
// If IsTruncated is true , you can make a follow-up request to display more
// locations. Enter the value of NextCountryCode in the startcountrycode parameter
// in another ListGeoLocations request.
NextCountryCode *string
// If IsTruncated is true , you can make a follow-up request to display more
// locations. Enter the value of NextSubdivisionCode in the startsubdivisioncode
// parameter in another ListGeoLocations request.
NextSubdivisionCode *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListGeoLocationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpListGeoLocations{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpListGeoLocations{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGeoLocations(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opListGeoLocations(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "ListGeoLocations",
}
}
| 188 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Retrieve a list of the health checks that are associated with the current
// Amazon Web Services account.
func (c *Client) ListHealthChecks(ctx context.Context, params *ListHealthChecksInput, optFns ...func(*Options)) (*ListHealthChecksOutput, error) {
if params == nil {
params = &ListHealthChecksInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListHealthChecks", params, optFns, c.addOperationListHealthChecksMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListHealthChecksOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to retrieve a list of the health checks that are associated with the
// current Amazon Web Services account.
type ListHealthChecksInput struct {
// If the value of IsTruncated in the previous response was true , you have more
// health checks. To get another group, submit another ListHealthChecks request.
// For the value of marker , specify the value of NextMarker from the previous
// response, which is the ID of the first health check that Amazon Route 53 will
// return if you submit another request. If the value of IsTruncated in the
// previous response was false , there are no more health checks to get.
Marker *string
// The maximum number of health checks that you want ListHealthChecks to return in
// response to the current request. Amazon Route 53 returns a maximum of 100 items.
// If you set MaxItems to a value greater than 100, Route 53 returns only the
// first 100 health checks.
MaxItems *int32
noSmithyDocumentSerde
}
// A complex type that contains the response to a ListHealthChecks request.
type ListHealthChecksOutput struct {
// A complex type that contains one HealthCheck element for each health check that
// is associated with the current Amazon Web Services account.
//
// This member is required.
HealthChecks []types.HealthCheck
// A flag that indicates whether there are more health checks to be listed. If the
// response was truncated, you can get the next group of health checks by
// submitting another ListHealthChecks request and specifying the value of
// NextMarker in the marker parameter.
//
// This member is required.
IsTruncated bool
// For the second and subsequent calls to ListHealthChecks , Marker is the value
// that you specified for the marker parameter in the previous request.
//
// This member is required.
Marker *string
// The value that you specified for the maxitems parameter in the call to
// ListHealthChecks that produced the current response.
//
// This member is required.
MaxItems *int32
// If IsTruncated is true , the value of NextMarker identifies the first health
// check that Amazon Route 53 returns if you submit another ListHealthChecks
// request and specify the value of NextMarker in the marker parameter.
NextMarker *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListHealthChecksMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpListHealthChecks{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpListHealthChecks{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHealthChecks(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
// ListHealthChecksAPIClient is a client that implements the ListHealthChecks
// operation.
type ListHealthChecksAPIClient interface {
ListHealthChecks(context.Context, *ListHealthChecksInput, ...func(*Options)) (*ListHealthChecksOutput, error)
}
var _ ListHealthChecksAPIClient = (*Client)(nil)
// ListHealthChecksPaginatorOptions is the paginator options for ListHealthChecks
type ListHealthChecksPaginatorOptions struct {
// The maximum number of health checks that you want ListHealthChecks to return in
// response to the current request. Amazon Route 53 returns a maximum of 100 items.
// If you set MaxItems to a value greater than 100, Route 53 returns only the
// first 100 health checks.
Limit int32
// Set to true if pagination should stop if the service returns a pagination token
// that matches the most recent token provided to the service.
StopOnDuplicateToken bool
}
// ListHealthChecksPaginator is a paginator for ListHealthChecks
type ListHealthChecksPaginator struct {
options ListHealthChecksPaginatorOptions
client ListHealthChecksAPIClient
params *ListHealthChecksInput
nextToken *string
firstPage bool
}
// NewListHealthChecksPaginator returns a new ListHealthChecksPaginator
func NewListHealthChecksPaginator(client ListHealthChecksAPIClient, params *ListHealthChecksInput, optFns ...func(*ListHealthChecksPaginatorOptions)) *ListHealthChecksPaginator {
if params == nil {
params = &ListHealthChecksInput{}
}
options := ListHealthChecksPaginatorOptions{}
if params.MaxItems != nil {
options.Limit = *params.MaxItems
}
for _, fn := range optFns {
fn(&options)
}
return &ListHealthChecksPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListHealthChecksPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListHealthChecks page.
func (p *ListHealthChecksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListHealthChecksOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.Marker = p.nextToken
var limit *int32
if p.options.Limit > 0 {
limit = &p.options.Limit
}
params.MaxItems = limit
result, err := p.client.ListHealthChecks(ctx, ¶ms, optFns...)
if err != nil {
return nil, err
}
p.firstPage = false
prevToken := p.nextToken
p.nextToken = result.NextMarker
if p.options.StopOnDuplicateToken &&
prevToken != nil &&
p.nextToken != nil &&
*prevToken == *p.nextToken {
p.nextToken = nil
}
return result, nil
}
func newServiceMetadataMiddleware_opListHealthChecks(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "ListHealthChecks",
}
}
| 257 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Retrieves a list of the public and private hosted zones that are associated
// with the current Amazon Web Services account. The response includes a
// HostedZones child element for each hosted zone. Amazon Route 53 returns a
// maximum of 100 items in each response. If you have a lot of hosted zones, you
// can use the maxitems parameter to list them in groups of up to 100.
func (c *Client) ListHostedZones(ctx context.Context, params *ListHostedZonesInput, optFns ...func(*Options)) (*ListHostedZonesOutput, error) {
if params == nil {
params = &ListHostedZonesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListHostedZones", params, optFns, c.addOperationListHostedZonesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListHostedZonesOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to retrieve a list of the public and private hosted zones that are
// associated with the current Amazon Web Services account.
type ListHostedZonesInput struct {
// If you're using reusable delegation sets and you want to list all of the hosted
// zones that are associated with a reusable delegation set, specify the ID of that
// reusable delegation set.
DelegationSetId *string
// If the value of IsTruncated in the previous response was true , you have more
// hosted zones. To get more hosted zones, submit another ListHostedZones request.
// For the value of marker , specify the value of NextMarker from the previous
// response, which is the ID of the first hosted zone that Amazon Route 53 will
// return if you submit another request. If the value of IsTruncated in the
// previous response was false , there are no more hosted zones to get.
Marker *string
// (Optional) The maximum number of hosted zones that you want Amazon Route 53 to
// return. If you have more than maxitems hosted zones, the value of IsTruncated
// in the response is true , and the value of NextMarker is the hosted zone ID of
// the first hosted zone that Route 53 will return if you submit another request.
MaxItems *int32
noSmithyDocumentSerde
}
type ListHostedZonesOutput struct {
// A complex type that contains general information about the hosted zone.
//
// This member is required.
HostedZones []types.HostedZone
// A flag indicating whether there are more hosted zones to be listed. If the
// response was truncated, you can get more hosted zones by submitting another
// ListHostedZones request and specifying the value of NextMarker in the marker
// parameter.
//
// This member is required.
IsTruncated bool
// For the second and subsequent calls to ListHostedZones , Marker is the value
// that you specified for the marker parameter in the request that produced the
// current response.
//
// This member is required.
Marker *string
// The value that you specified for the maxitems parameter in the call to
// ListHostedZones that produced the current response.
//
// This member is required.
MaxItems *int32
// If IsTruncated is true , the value of NextMarker identifies the first hosted
// zone in the next group of hosted zones. Submit another ListHostedZones request,
// and specify the value of NextMarker from the response in the marker parameter.
// This element is present only if IsTruncated is true .
NextMarker *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListHostedZonesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpListHostedZones{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpListHostedZones{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHostedZones(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addSanitizeURLMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
// ListHostedZonesAPIClient is a client that implements the ListHostedZones
// operation.
type ListHostedZonesAPIClient interface {
ListHostedZones(context.Context, *ListHostedZonesInput, ...func(*Options)) (*ListHostedZonesOutput, error)
}
var _ ListHostedZonesAPIClient = (*Client)(nil)
// ListHostedZonesPaginatorOptions is the paginator options for ListHostedZones
type ListHostedZonesPaginatorOptions struct {
// (Optional) The maximum number of hosted zones that you want Amazon Route 53 to
// return. If you have more than maxitems hosted zones, the value of IsTruncated
// in the response is true , and the value of NextMarker is the hosted zone ID of
// the first hosted zone that Route 53 will return if you submit another request.
Limit int32
// Set to true if pagination should stop if the service returns a pagination token
// that matches the most recent token provided to the service.
StopOnDuplicateToken bool
}
// ListHostedZonesPaginator is a paginator for ListHostedZones
type ListHostedZonesPaginator struct {
options ListHostedZonesPaginatorOptions
client ListHostedZonesAPIClient
params *ListHostedZonesInput
nextToken *string
firstPage bool
}
// NewListHostedZonesPaginator returns a new ListHostedZonesPaginator
func NewListHostedZonesPaginator(client ListHostedZonesAPIClient, params *ListHostedZonesInput, optFns ...func(*ListHostedZonesPaginatorOptions)) *ListHostedZonesPaginator {
if params == nil {
params = &ListHostedZonesInput{}
}
options := ListHostedZonesPaginatorOptions{}
if params.MaxItems != nil {
options.Limit = *params.MaxItems
}
for _, fn := range optFns {
fn(&options)
}
return &ListHostedZonesPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListHostedZonesPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListHostedZones page.
func (p *ListHostedZonesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListHostedZonesOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.Marker = p.nextToken
var limit *int32
if p.options.Limit > 0 {
limit = &p.options.Limit
}
params.MaxItems = limit
result, err := p.client.ListHostedZones(ctx, ¶ms, optFns...)
if err != nil {
return nil, err
}
p.firstPage = false
prevToken := p.nextToken
p.nextToken = result.NextMarker
if p.options.StopOnDuplicateToken &&
prevToken != nil &&
p.nextToken != nil &&
*prevToken == *p.nextToken {
p.nextToken = nil
}
return result, nil
}
func newServiceMetadataMiddleware_opListHostedZones(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "ListHostedZones",
}
}
| 268 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Retrieves a list of your hosted zones in lexicographic order. The response
// includes a HostedZones child element for each hosted zone created by the
// current Amazon Web Services account. ListHostedZonesByName sorts hosted zones
// by name with the labels reversed. For example: com.example.www. Note the
// trailing dot, which can change the sort order in some circumstances. If the
// domain name includes escape characters or Punycode, ListHostedZonesByName
// alphabetizes the domain name using the escaped or Punycoded value, which is the
// format that Amazon Route 53 saves in its database. For example, to create a
// hosted zone for exämple.com, you specify ex\344mple.com for the domain name.
// ListHostedZonesByName alphabetizes it as: com.ex\344mple. The labels are
// reversed and alphabetized using the escaped value. For more information about
// valid domain name formats, including internationalized domain names, see DNS
// Domain Name Format (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DomainNameFormat.html)
// in the Amazon Route 53 Developer Guide. Route 53 returns up to 100 items in each
// response. If you have a lot of hosted zones, use the MaxItems parameter to list
// them in groups of up to 100. The response includes values that help navigate
// from one group of MaxItems hosted zones to the next:
// - The DNSName and HostedZoneId elements in the response contain the values, if
// any, specified for the dnsname and hostedzoneid parameters in the request that
// produced the current response.
// - The MaxItems element in the response contains the value, if any, that you
// specified for the maxitems parameter in the request that produced the current
// response.
// - If the value of IsTruncated in the response is true, there are more hosted
// zones associated with the current Amazon Web Services account. If IsTruncated
// is false, this response includes the last hosted zone that is associated with
// the current account. The NextDNSName element and NextHostedZoneId elements are
// omitted from the response.
// - The NextDNSName and NextHostedZoneId elements in the response contain the
// domain name and the hosted zone ID of the next hosted zone that is associated
// with the current Amazon Web Services account. If you want to list more hosted
// zones, make another call to ListHostedZonesByName , and specify the value of
// NextDNSName and NextHostedZoneId in the dnsname and hostedzoneid parameters,
// respectively.
func (c *Client) ListHostedZonesByName(ctx context.Context, params *ListHostedZonesByNameInput, optFns ...func(*Options)) (*ListHostedZonesByNameOutput, error) {
if params == nil {
params = &ListHostedZonesByNameInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListHostedZonesByName", params, optFns, c.addOperationListHostedZonesByNameMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListHostedZonesByNameOutput)
out.ResultMetadata = metadata
return out, nil
}
// Retrieves a list of the public and private hosted zones that are associated
// with the current Amazon Web Services account in ASCII order by domain name.
type ListHostedZonesByNameInput struct {
// (Optional) For your first request to ListHostedZonesByName , include the dnsname
// parameter only if you want to specify the name of the first hosted zone in the
// response. If you don't include the dnsname parameter, Amazon Route 53 returns
// all of the hosted zones that were created by the current Amazon Web Services
// account, in ASCII order. For subsequent requests, include both dnsname and
// hostedzoneid parameters. For dnsname , specify the value of NextDNSName from
// the previous response.
DNSName *string
// (Optional) For your first request to ListHostedZonesByName , do not include the
// hostedzoneid parameter. If you have more hosted zones than the value of maxitems
// , ListHostedZonesByName returns only the first maxitems hosted zones. To get
// the next group of maxitems hosted zones, submit another request to
// ListHostedZonesByName and include both dnsname and hostedzoneid parameters. For
// the value of hostedzoneid , specify the value of the NextHostedZoneId element
// from the previous response.
HostedZoneId *string
// The maximum number of hosted zones to be included in the response body for this
// request. If you have more than maxitems hosted zones, then the value of the
// IsTruncated element in the response is true, and the values of NextDNSName and
// NextHostedZoneId specify the first hosted zone in the next group of maxitems
// hosted zones.
MaxItems *int32
noSmithyDocumentSerde
}
// A complex type that contains the response information for the request.
type ListHostedZonesByNameOutput struct {
// A complex type that contains general information about the hosted zone.
//
// This member is required.
HostedZones []types.HostedZone
// A flag that indicates whether there are more hosted zones to be listed. If the
// response was truncated, you can get the next group of maxitems hosted zones by
// calling ListHostedZonesByName again and specifying the values of NextDNSName
// and NextHostedZoneId elements in the dnsname and hostedzoneid parameters.
//
// This member is required.
IsTruncated bool
// The value that you specified for the maxitems parameter in the call to
// ListHostedZonesByName that produced the current response.
//
// This member is required.
MaxItems *int32
// For the second and subsequent calls to ListHostedZonesByName , DNSName is the
// value that you specified for the dnsname parameter in the request that produced
// the current response.
DNSName *string
// The ID that Amazon Route 53 assigned to the hosted zone when you created it.
HostedZoneId *string
// If IsTruncated is true, the value of NextDNSName is the name of the first
// hosted zone in the next group of maxitems hosted zones. Call
// ListHostedZonesByName again and specify the value of NextDNSName and
// NextHostedZoneId in the dnsname and hostedzoneid parameters, respectively. This
// element is present only if IsTruncated is true .
NextDNSName *string
// If IsTruncated is true , the value of NextHostedZoneId identifies the first
// hosted zone in the next group of maxitems hosted zones. Call
// ListHostedZonesByName again and specify the value of NextDNSName and
// NextHostedZoneId in the dnsname and hostedzoneid parameters, respectively. This
// element is present only if IsTruncated is true .
NextHostedZoneId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListHostedZonesByNameMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpListHostedZonesByName{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpListHostedZonesByName{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHostedZonesByName(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addSanitizeURLMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opListHostedZonesByName(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "ListHostedZonesByName",
}
}
| 219 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists all the private hosted zones that a specified VPC is associated with,
// regardless of which Amazon Web Services account or Amazon Web Services service
// owns the hosted zones. The HostedZoneOwner structure in the response contains
// one of the following values:
// - An OwningAccount element, which contains the account number of either the
// current Amazon Web Services account or another Amazon Web Services account. Some
// services, such as Cloud Map, create hosted zones using the current account.
// - An OwningService element, which identifies the Amazon Web Services service
// that created and owns the hosted zone. For example, if a hosted zone was created
// by Amazon Elastic File System (Amazon EFS), the value of Owner is
// efs.amazonaws.com .
//
// When listing private hosted zones, the hosted zone and the Amazon VPC must
// belong to the same partition where the hosted zones were created. A partition is
// a group of Amazon Web Services Regions. Each Amazon Web Services account is
// scoped to one partition. The following are the supported partitions:
// - aws - Amazon Web Services Regions
// - aws-cn - China Regions
// - aws-us-gov - Amazon Web Services GovCloud (US) Region
//
// For more information, see Access Management (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
// in the Amazon Web Services General Reference.
func (c *Client) ListHostedZonesByVPC(ctx context.Context, params *ListHostedZonesByVPCInput, optFns ...func(*Options)) (*ListHostedZonesByVPCOutput, error) {
if params == nil {
params = &ListHostedZonesByVPCInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListHostedZonesByVPC", params, optFns, c.addOperationListHostedZonesByVPCMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListHostedZonesByVPCOutput)
out.ResultMetadata = metadata
return out, nil
}
// Lists all the private hosted zones that a specified VPC is associated with,
// regardless of which Amazon Web Services account created the hosted zones.
type ListHostedZonesByVPCInput struct {
// The ID of the Amazon VPC that you want to list hosted zones for.
//
// This member is required.
VPCId *string
// For the Amazon VPC that you specified for VPCId , the Amazon Web Services Region
// that you created the VPC in.
//
// This member is required.
VPCRegion types.VPCRegion
// (Optional) The maximum number of hosted zones that you want Amazon Route 53 to
// return. If the specified VPC is associated with more than MaxItems hosted
// zones, the response includes a NextToken element. NextToken contains an
// encrypted token that identifies the first hosted zone that Route 53 will return
// if you submit another request.
MaxItems *int32
// If the previous response included a NextToken element, the specified VPC is
// associated with more hosted zones. To get more hosted zones, submit another
// ListHostedZonesByVPC request. For the value of NextToken , specify the value of
// NextToken from the previous response. If the previous response didn't include a
// NextToken element, there are no more hosted zones to get.
NextToken *string
noSmithyDocumentSerde
}
type ListHostedZonesByVPCOutput struct {
// A list that contains one HostedZoneSummary element for each hosted zone that
// the specified Amazon VPC is associated with. Each HostedZoneSummary element
// contains the hosted zone name and ID, and information about who owns the hosted
// zone.
//
// This member is required.
HostedZoneSummaries []types.HostedZoneSummary
// The value that you specified for MaxItems in the most recent
// ListHostedZonesByVPC request.
//
// This member is required.
MaxItems *int32
// The value that you will use for NextToken in the next ListHostedZonesByVPC
// request.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListHostedZonesByVPCMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpListHostedZonesByVPC{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpListHostedZonesByVPC{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpListHostedZonesByVPCValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHostedZonesByVPC(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opListHostedZonesByVPC(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "ListHostedZonesByVPC",
}
}
| 183 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists the configurations for DNS query logging that are associated with the
// current Amazon Web Services account or the configuration that is associated with
// a specified hosted zone. For more information about DNS query logs, see
// CreateQueryLoggingConfig (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateQueryLoggingConfig.html)
// . Additional information, including the format of DNS query logs, appears in
// Logging DNS Queries (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/query-logs.html)
// in the Amazon Route 53 Developer Guide.
func (c *Client) ListQueryLoggingConfigs(ctx context.Context, params *ListQueryLoggingConfigsInput, optFns ...func(*Options)) (*ListQueryLoggingConfigsOutput, error) {
if params == nil {
params = &ListQueryLoggingConfigsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListQueryLoggingConfigs", params, optFns, c.addOperationListQueryLoggingConfigsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListQueryLoggingConfigsOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListQueryLoggingConfigsInput struct {
// (Optional) If you want to list the query logging configuration that is
// associated with a hosted zone, specify the ID in HostedZoneId . If you don't
// specify a hosted zone ID, ListQueryLoggingConfigs returns all of the
// configurations that are associated with the current Amazon Web Services account.
HostedZoneId *string
// (Optional) The maximum number of query logging configurations that you want
// Amazon Route 53 to return in response to the current request. If the current
// Amazon Web Services account has more than MaxResults configurations, use the
// value of NextToken (https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListQueryLoggingConfigs.html#API_ListQueryLoggingConfigs_RequestSyntax)
// in the response to get the next page of results. If you don't specify a value
// for MaxResults , Route 53 returns up to 100 configurations.
MaxResults *int32
// (Optional) If the current Amazon Web Services account has more than MaxResults
// query logging configurations, use NextToken to get the second and subsequent
// pages of results. For the first ListQueryLoggingConfigs request, omit this
// value. For the second and subsequent requests, get the value of NextToken from
// the previous response and specify that value for NextToken in the request.
NextToken *string
noSmithyDocumentSerde
}
type ListQueryLoggingConfigsOutput struct {
// An array that contains one QueryLoggingConfig (https://docs.aws.amazon.com/Route53/latest/APIReference/API_QueryLoggingConfig.html)
// element for each configuration for DNS query logging that is associated with the
// current Amazon Web Services account.
//
// This member is required.
QueryLoggingConfigs []types.QueryLoggingConfig
// If a response includes the last of the query logging configurations that are
// associated with the current Amazon Web Services account, NextToken doesn't
// appear in the response. If a response doesn't include the last of the
// configurations, you can get more configurations by submitting another
// ListQueryLoggingConfigs (https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListQueryLoggingConfigs.html)
// request. Get the value of NextToken that Amazon Route 53 returned in the
// previous response and include it in NextToken in the next request.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListQueryLoggingConfigsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpListQueryLoggingConfigs{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpListQueryLoggingConfigs{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListQueryLoggingConfigs(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addSanitizeURLMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
// ListQueryLoggingConfigsAPIClient is a client that implements the
// ListQueryLoggingConfigs operation.
type ListQueryLoggingConfigsAPIClient interface {
ListQueryLoggingConfigs(context.Context, *ListQueryLoggingConfigsInput, ...func(*Options)) (*ListQueryLoggingConfigsOutput, error)
}
var _ ListQueryLoggingConfigsAPIClient = (*Client)(nil)
// ListQueryLoggingConfigsPaginatorOptions is the paginator options for
// ListQueryLoggingConfigs
type ListQueryLoggingConfigsPaginatorOptions struct {
// (Optional) The maximum number of query logging configurations that you want
// Amazon Route 53 to return in response to the current request. If the current
// Amazon Web Services account has more than MaxResults configurations, use the
// value of NextToken (https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListQueryLoggingConfigs.html#API_ListQueryLoggingConfigs_RequestSyntax)
// in the response to get the next page of results. If you don't specify a value
// for MaxResults , Route 53 returns up to 100 configurations.
Limit int32
// Set to true if pagination should stop if the service returns a pagination token
// that matches the most recent token provided to the service.
StopOnDuplicateToken bool
}
// ListQueryLoggingConfigsPaginator is a paginator for ListQueryLoggingConfigs
type ListQueryLoggingConfigsPaginator struct {
options ListQueryLoggingConfigsPaginatorOptions
client ListQueryLoggingConfigsAPIClient
params *ListQueryLoggingConfigsInput
nextToken *string
firstPage bool
}
// NewListQueryLoggingConfigsPaginator returns a new
// ListQueryLoggingConfigsPaginator
func NewListQueryLoggingConfigsPaginator(client ListQueryLoggingConfigsAPIClient, params *ListQueryLoggingConfigsInput, optFns ...func(*ListQueryLoggingConfigsPaginatorOptions)) *ListQueryLoggingConfigsPaginator {
if params == nil {
params = &ListQueryLoggingConfigsInput{}
}
options := ListQueryLoggingConfigsPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListQueryLoggingConfigsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListQueryLoggingConfigsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListQueryLoggingConfigs page.
func (p *ListQueryLoggingConfigsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListQueryLoggingConfigsOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.NextToken = p.nextToken
var limit *int32
if p.options.Limit > 0 {
limit = &p.options.Limit
}
params.MaxResults = limit
result, err := p.client.ListQueryLoggingConfigs(ctx, ¶ms, optFns...)
if err != nil {
return nil, err
}
p.firstPage = false
prevToken := p.nextToken
p.nextToken = result.NextToken
if p.options.StopOnDuplicateToken &&
prevToken != nil &&
p.nextToken != nil &&
*prevToken == *p.nextToken {
p.nextToken = nil
}
return result, nil
}
func newServiceMetadataMiddleware_opListQueryLoggingConfigs(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "ListQueryLoggingConfigs",
}
}
| 258 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists the resource record sets in a specified hosted zone.
// ListResourceRecordSets returns up to 300 resource record sets at a time in ASCII
// order, beginning at a position specified by the name and type elements. Sort
// order ListResourceRecordSets sorts results first by DNS name with the labels
// reversed, for example: com.example.www. Note the trailing dot, which can change
// the sort order when the record name contains characters that appear before .
// (decimal 46) in the ASCII table. These characters include the following: ! " #
// $ % & ' ( ) * + , - When multiple records have the same DNS name,
// ListResourceRecordSets sorts results by the record type. Specifying where to
// start listing records You can use the name and type elements to specify the
// resource record set that the list begins with: If you do not specify Name or
// Type The results begin with the first resource record set that the hosted zone
// contains. If you specify Name but not Type The results begin with the first
// resource record set in the list whose name is greater than or equal to Name . If
// you specify Type but not Name Amazon Route 53 returns the InvalidInput error.
// If you specify both Name and Type The results begin with the first resource
// record set in the list whose name is greater than or equal to Name , and whose
// type is greater than or equal to Type . Resource record sets that are PENDING
// This action returns the most current version of the records. This includes
// records that are PENDING , and that are not yet available on all Route 53 DNS
// servers. Changing resource record sets To ensure that you get an accurate
// listing of the resource record sets for a hosted zone at a point in time, do not
// submit a ChangeResourceRecordSets request while you're paging through the
// results of a ListResourceRecordSets request. If you do, some pages may display
// results without the latest changes while other pages display results with the
// latest changes. Displaying the next page of results If a ListResourceRecordSets
// command returns more than one page of results, the value of IsTruncated is true
// . To display the next page of results, get the values of NextRecordName ,
// NextRecordType , and NextRecordIdentifier (if any) from the response. Then
// submit another ListResourceRecordSets request, and specify those values for
// StartRecordName , StartRecordType , and StartRecordIdentifier .
func (c *Client) ListResourceRecordSets(ctx context.Context, params *ListResourceRecordSetsInput, optFns ...func(*Options)) (*ListResourceRecordSetsOutput, error) {
if params == nil {
params = &ListResourceRecordSetsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListResourceRecordSets", params, optFns, c.addOperationListResourceRecordSetsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListResourceRecordSetsOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request for the resource record sets that are associated with a specified
// hosted zone.
type ListResourceRecordSetsInput struct {
// The ID of the hosted zone that contains the resource record sets that you want
// to list.
//
// This member is required.
HostedZoneId *string
// (Optional) The maximum number of resource records sets to include in the
// response body for this request. If the response includes more than maxitems
// resource record sets, the value of the IsTruncated element in the response is
// true , and the values of the NextRecordName and NextRecordType elements in the
// response identify the first resource record set in the next group of maxitems
// resource record sets.
MaxItems *int32
// Resource record sets that have a routing policy other than simple: If results
// were truncated for a given DNS name and type, specify the value of
// NextRecordIdentifier from the previous response to get the next resource record
// set that has the current DNS name and type.
StartRecordIdentifier *string
// The first name in the lexicographic ordering of resource record sets that you
// want to list. If the specified record name doesn't exist, the results begin with
// the first resource record set that has a name greater than the value of name .
StartRecordName *string
// The type of resource record set to begin the record listing from. Valid values
// for basic resource record sets: A | AAAA | CAA | CNAME | MX | NAPTR | NS | PTR
// | SOA | SPF | SRV | TXT Values for weighted, latency, geolocation, and failover
// resource record sets: A | AAAA | CAA | CNAME | MX | NAPTR | PTR | SPF | SRV |
// TXT Values for alias resource record sets:
// - API Gateway custom regional API or edge-optimized API: A
// - CloudFront distribution: A or AAAA
// - Elastic Beanstalk environment that has a regionalized subdomain: A
// - Elastic Load Balancing load balancer: A | AAAA
// - S3 bucket: A
// - VPC interface VPC endpoint: A
// - Another resource record set in this hosted zone: The type of the resource
// record set that the alias references.
// Constraint: Specifying type without specifying name returns an InvalidInput
// error.
StartRecordType types.RRType
noSmithyDocumentSerde
}
// A complex type that contains list information for the resource record set.
type ListResourceRecordSetsOutput struct {
// A flag that indicates whether more resource record sets remain to be listed. If
// your results were truncated, you can make a follow-up pagination request by
// using the NextRecordName element.
//
// This member is required.
IsTruncated bool
// The maximum number of records you requested.
//
// This member is required.
MaxItems *int32
// Information about multiple resource record sets.
//
// This member is required.
ResourceRecordSets []types.ResourceRecordSet
// Resource record sets that have a routing policy other than simple: If results
// were truncated for a given DNS name and type, the value of SetIdentifier for
// the next resource record set that has the current DNS name and type. For
// information about routing policies, see Choosing a Routing Policy (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html)
// in the Amazon Route 53 Developer Guide.
NextRecordIdentifier *string
// If the results were truncated, the name of the next record in the list. This
// element is present only if IsTruncated is true.
NextRecordName *string
// If the results were truncated, the type of the next record in the list. This
// element is present only if IsTruncated is true.
NextRecordType types.RRType
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListResourceRecordSetsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpListResourceRecordSets{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpListResourceRecordSets{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpListResourceRecordSetsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResourceRecordSets(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addSanitizeURLMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opListResourceRecordSets(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "ListResourceRecordSets",
}
}
| 227 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Retrieves a list of the reusable delegation sets that are associated with the
// current Amazon Web Services account.
func (c *Client) ListReusableDelegationSets(ctx context.Context, params *ListReusableDelegationSetsInput, optFns ...func(*Options)) (*ListReusableDelegationSetsOutput, error) {
if params == nil {
params = &ListReusableDelegationSetsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListReusableDelegationSets", params, optFns, c.addOperationListReusableDelegationSetsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListReusableDelegationSetsOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to get a list of the reusable delegation sets that are associated
// with the current Amazon Web Services account.
type ListReusableDelegationSetsInput struct {
// If the value of IsTruncated in the previous response was true , you have more
// reusable delegation sets. To get another group, submit another
// ListReusableDelegationSets request. For the value of marker , specify the value
// of NextMarker from the previous response, which is the ID of the first reusable
// delegation set that Amazon Route 53 will return if you submit another request.
// If the value of IsTruncated in the previous response was false , there are no
// more reusable delegation sets to get.
Marker *string
// The number of reusable delegation sets that you want Amazon Route 53 to return
// in the response to this request. If you specify a value greater than 100, Route
// 53 returns only the first 100 reusable delegation sets.
MaxItems *int32
noSmithyDocumentSerde
}
// A complex type that contains information about the reusable delegation sets
// that are associated with the current Amazon Web Services account.
type ListReusableDelegationSetsOutput struct {
// A complex type that contains one DelegationSet element for each reusable
// delegation set that was created by the current Amazon Web Services account.
//
// This member is required.
DelegationSets []types.DelegationSet
// A flag that indicates whether there are more reusable delegation sets to be
// listed.
//
// This member is required.
IsTruncated bool
// For the second and subsequent calls to ListReusableDelegationSets , Marker is
// the value that you specified for the marker parameter in the request that
// produced the current response.
//
// This member is required.
Marker *string
// The value that you specified for the maxitems parameter in the call to
// ListReusableDelegationSets that produced the current response.
//
// This member is required.
MaxItems *int32
// If IsTruncated is true , the value of NextMarker identifies the next reusable
// delegation set that Amazon Route 53 will return if you submit another
// ListReusableDelegationSets request and specify the value of NextMarker in the
// marker parameter.
NextMarker *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListReusableDelegationSetsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpListReusableDelegationSets{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpListReusableDelegationSets{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReusableDelegationSets(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opListReusableDelegationSets(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "ListReusableDelegationSets",
}
}
| 164 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists tags for one health check or hosted zone. For information about using
// tags for cost allocation, see Using Cost Allocation Tags (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html)
// in the Billing and Cost Management User Guide.
func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) {
if params == nil {
params = &ListTagsForResourceInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListTagsForResourceOutput)
out.ResultMetadata = metadata
return out, nil
}
// A complex type containing information about a request for a list of the tags
// that are associated with an individual resource.
type ListTagsForResourceInput struct {
// The ID of the resource for which you want to retrieve tags.
//
// This member is required.
ResourceId *string
// The type of the resource.
// - The resource type for health checks is healthcheck .
// - The resource type for hosted zones is hostedzone .
//
// This member is required.
ResourceType types.TagResourceType
noSmithyDocumentSerde
}
// A complex type that contains information about the health checks or hosted
// zones for which you want to list tags.
type ListTagsForResourceOutput struct {
// A ResourceTagSet containing tags associated with the specified resource.
//
// This member is required.
ResourceTagSet *types.ResourceTagSet
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpListTagsForResource{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpListTagsForResource{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "ListTagsForResource",
}
}
| 140 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists tags for up to 10 health checks or hosted zones. For information about
// using tags for cost allocation, see Using Cost Allocation Tags (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html)
// in the Billing and Cost Management User Guide.
func (c *Client) ListTagsForResources(ctx context.Context, params *ListTagsForResourcesInput, optFns ...func(*Options)) (*ListTagsForResourcesOutput, error) {
if params == nil {
params = &ListTagsForResourcesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListTagsForResources", params, optFns, c.addOperationListTagsForResourcesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListTagsForResourcesOutput)
out.ResultMetadata = metadata
return out, nil
}
// A complex type that contains information about the health checks or hosted
// zones for which you want to list tags.
type ListTagsForResourcesInput struct {
// A complex type that contains the ResourceId element for each resource for which
// you want to get a list of tags.
//
// This member is required.
ResourceIds []string
// The type of the resources.
// - The resource type for health checks is healthcheck .
// - The resource type for hosted zones is hostedzone .
//
// This member is required.
ResourceType types.TagResourceType
noSmithyDocumentSerde
}
// A complex type containing tags for the specified resources.
type ListTagsForResourcesOutput struct {
// A list of ResourceTagSet s containing tags associated with the specified
// resources.
//
// This member is required.
ResourceTagSets []types.ResourceTagSet
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListTagsForResourcesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpListTagsForResources{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpListTagsForResources{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpListTagsForResourcesValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResources(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opListTagsForResources(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "ListTagsForResources",
}
}
| 141 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Gets information about the latest version for every traffic policy that is
// associated with the current Amazon Web Services account. Policies are listed in
// the order that they were created in. For information about how of deleting a
// traffic policy affects the response from ListTrafficPolicies , see
// DeleteTrafficPolicy (https://docs.aws.amazon.com/Route53/latest/APIReference/API_DeleteTrafficPolicy.html)
// .
func (c *Client) ListTrafficPolicies(ctx context.Context, params *ListTrafficPoliciesInput, optFns ...func(*Options)) (*ListTrafficPoliciesOutput, error) {
if params == nil {
params = &ListTrafficPoliciesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListTrafficPolicies", params, optFns, c.addOperationListTrafficPoliciesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListTrafficPoliciesOutput)
out.ResultMetadata = metadata
return out, nil
}
// A complex type that contains the information about the request to list the
// traffic policies that are associated with the current Amazon Web Services
// account.
type ListTrafficPoliciesInput struct {
// (Optional) The maximum number of traffic policies that you want Amazon Route 53
// to return in response to this request. If you have more than MaxItems traffic
// policies, the value of IsTruncated in the response is true , and the value of
// TrafficPolicyIdMarker is the ID of the first traffic policy that Route 53 will
// return if you submit another request.
MaxItems *int32
// (Conditional) For your first request to ListTrafficPolicies , don't include the
// TrafficPolicyIdMarker parameter. If you have more traffic policies than the
// value of MaxItems , ListTrafficPolicies returns only the first MaxItems traffic
// policies. To get the next group of policies, submit another request to
// ListTrafficPolicies . For the value of TrafficPolicyIdMarker , specify the value
// of TrafficPolicyIdMarker that was returned in the previous response.
TrafficPolicyIdMarker *string
noSmithyDocumentSerde
}
// A complex type that contains the response information for the request.
type ListTrafficPoliciesOutput struct {
// A flag that indicates whether there are more traffic policies to be listed. If
// the response was truncated, you can get the next group of traffic policies by
// submitting another ListTrafficPolicies request and specifying the value of
// TrafficPolicyIdMarker in the TrafficPolicyIdMarker request parameter.
//
// This member is required.
IsTruncated bool
// The value that you specified for the MaxItems parameter in the
// ListTrafficPolicies request that produced the current response.
//
// This member is required.
MaxItems *int32
// If the value of IsTruncated is true , TrafficPolicyIdMarker is the ID of the
// first traffic policy in the next group of MaxItems traffic policies.
//
// This member is required.
TrafficPolicyIdMarker *string
// A list that contains one TrafficPolicySummary element for each traffic policy
// that was created by the current Amazon Web Services account.
//
// This member is required.
TrafficPolicySummaries []types.TrafficPolicySummary
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListTrafficPoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpListTrafficPolicies{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpListTrafficPolicies{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrafficPolicies(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opListTrafficPolicies(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "ListTrafficPolicies",
}
}
| 164 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Gets information about the traffic policy instances that you created by using
// the current Amazon Web Services account. After you submit an
// UpdateTrafficPolicyInstance request, there's a brief delay while Amazon Route 53
// creates the resource record sets that are specified in the traffic policy
// definition. For more information, see the State response element. Route 53
// returns a maximum of 100 items in each response. If you have a lot of traffic
// policy instances, you can use the MaxItems parameter to list them in groups of
// up to 100.
func (c *Client) ListTrafficPolicyInstances(ctx context.Context, params *ListTrafficPolicyInstancesInput, optFns ...func(*Options)) (*ListTrafficPolicyInstancesOutput, error) {
if params == nil {
params = &ListTrafficPolicyInstancesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListTrafficPolicyInstances", params, optFns, c.addOperationListTrafficPolicyInstancesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListTrafficPolicyInstancesOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to get information about the traffic policy instances that you
// created by using the current Amazon Web Services account.
type ListTrafficPolicyInstancesInput struct {
// If the value of IsTruncated in the previous response was true , you have more
// traffic policy instances. To get more traffic policy instances, submit another
// ListTrafficPolicyInstances request. For the value of HostedZoneId , specify the
// value of HostedZoneIdMarker from the previous response, which is the hosted
// zone ID of the first traffic policy instance in the next group of traffic policy
// instances. If the value of IsTruncated in the previous response was false ,
// there are no more traffic policy instances to get.
HostedZoneIdMarker *string
// The maximum number of traffic policy instances that you want Amazon Route 53 to
// return in response to a ListTrafficPolicyInstances request. If you have more
// than MaxItems traffic policy instances, the value of the IsTruncated element in
// the response is true , and the values of HostedZoneIdMarker ,
// TrafficPolicyInstanceNameMarker , and TrafficPolicyInstanceTypeMarker represent
// the first traffic policy instance in the next group of MaxItems traffic policy
// instances.
MaxItems *int32
// If the value of IsTruncated in the previous response was true , you have more
// traffic policy instances. To get more traffic policy instances, submit another
// ListTrafficPolicyInstances request. For the value of trafficpolicyinstancename ,
// specify the value of TrafficPolicyInstanceNameMarker from the previous
// response, which is the name of the first traffic policy instance in the next
// group of traffic policy instances. If the value of IsTruncated in the previous
// response was false , there are no more traffic policy instances to get.
TrafficPolicyInstanceNameMarker *string
// If the value of IsTruncated in the previous response was true , you have more
// traffic policy instances. To get more traffic policy instances, submit another
// ListTrafficPolicyInstances request. For the value of trafficpolicyinstancetype ,
// specify the value of TrafficPolicyInstanceTypeMarker from the previous
// response, which is the type of the first traffic policy instance in the next
// group of traffic policy instances. If the value of IsTruncated in the previous
// response was false , there are no more traffic policy instances to get.
TrafficPolicyInstanceTypeMarker types.RRType
noSmithyDocumentSerde
}
// A complex type that contains the response information for the request.
type ListTrafficPolicyInstancesOutput struct {
// A flag that indicates whether there are more traffic policy instances to be
// listed. If the response was truncated, you can get more traffic policy instances
// by calling ListTrafficPolicyInstances again and specifying the values of the
// HostedZoneIdMarker , TrafficPolicyInstanceNameMarker , and
// TrafficPolicyInstanceTypeMarker in the corresponding request parameters.
//
// This member is required.
IsTruncated bool
// The value that you specified for the MaxItems parameter in the call to
// ListTrafficPolicyInstances that produced the current response.
//
// This member is required.
MaxItems *int32
// A list that contains one TrafficPolicyInstance element for each traffic policy
// instance that matches the elements in the request.
//
// This member is required.
TrafficPolicyInstances []types.TrafficPolicyInstance
// If IsTruncated is true , HostedZoneIdMarker is the ID of the hosted zone of the
// first traffic policy instance that Route 53 will return if you submit another
// ListTrafficPolicyInstances request.
HostedZoneIdMarker *string
// If IsTruncated is true , TrafficPolicyInstanceNameMarker is the name of the
// first traffic policy instance that Route 53 will return if you submit another
// ListTrafficPolicyInstances request.
TrafficPolicyInstanceNameMarker *string
// If IsTruncated is true , TrafficPolicyInstanceTypeMarker is the DNS type of the
// resource record sets that are associated with the first traffic policy instance
// that Amazon Route 53 will return if you submit another
// ListTrafficPolicyInstances request.
TrafficPolicyInstanceTypeMarker types.RRType
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListTrafficPolicyInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpListTrafficPolicyInstances{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpListTrafficPolicyInstances{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrafficPolicyInstances(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addSanitizeURLMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opListTrafficPolicyInstances(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "ListTrafficPolicyInstances",
}
}
| 200 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Gets information about the traffic policy instances that you created in a
// specified hosted zone. After you submit a CreateTrafficPolicyInstance or an
// UpdateTrafficPolicyInstance request, there's a brief delay while Amazon Route 53
// creates the resource record sets that are specified in the traffic policy
// definition. For more information, see the State response element. Route 53
// returns a maximum of 100 items in each response. If you have a lot of traffic
// policy instances, you can use the MaxItems parameter to list them in groups of
// up to 100.
func (c *Client) ListTrafficPolicyInstancesByHostedZone(ctx context.Context, params *ListTrafficPolicyInstancesByHostedZoneInput, optFns ...func(*Options)) (*ListTrafficPolicyInstancesByHostedZoneOutput, error) {
if params == nil {
params = &ListTrafficPolicyInstancesByHostedZoneInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListTrafficPolicyInstancesByHostedZone", params, optFns, c.addOperationListTrafficPolicyInstancesByHostedZoneMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListTrafficPolicyInstancesByHostedZoneOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request for the traffic policy instances that you created in a specified
// hosted zone.
type ListTrafficPolicyInstancesByHostedZoneInput struct {
// The ID of the hosted zone that you want to list traffic policy instances for.
//
// This member is required.
HostedZoneId *string
// The maximum number of traffic policy instances to be included in the response
// body for this request. If you have more than MaxItems traffic policy instances,
// the value of the IsTruncated element in the response is true , and the values of
// HostedZoneIdMarker , TrafficPolicyInstanceNameMarker , and
// TrafficPolicyInstanceTypeMarker represent the first traffic policy instance that
// Amazon Route 53 will return if you submit another request.
MaxItems *int32
// If the value of IsTruncated in the previous response is true, you have more
// traffic policy instances. To get more traffic policy instances, submit another
// ListTrafficPolicyInstances request. For the value of trafficpolicyinstancename ,
// specify the value of TrafficPolicyInstanceNameMarker from the previous
// response, which is the name of the first traffic policy instance in the next
// group of traffic policy instances. If the value of IsTruncated in the previous
// response was false , there are no more traffic policy instances to get.
TrafficPolicyInstanceNameMarker *string
// If the value of IsTruncated in the previous response is true, you have more
// traffic policy instances. To get more traffic policy instances, submit another
// ListTrafficPolicyInstances request. For the value of trafficpolicyinstancetype ,
// specify the value of TrafficPolicyInstanceTypeMarker from the previous
// response, which is the type of the first traffic policy instance in the next
// group of traffic policy instances. If the value of IsTruncated in the previous
// response was false , there are no more traffic policy instances to get.
TrafficPolicyInstanceTypeMarker types.RRType
noSmithyDocumentSerde
}
// A complex type that contains the response information for the request.
type ListTrafficPolicyInstancesByHostedZoneOutput struct {
// A flag that indicates whether there are more traffic policy instances to be
// listed. If the response was truncated, you can get the next group of traffic
// policy instances by submitting another ListTrafficPolicyInstancesByHostedZone
// request and specifying the values of HostedZoneIdMarker ,
// TrafficPolicyInstanceNameMarker , and TrafficPolicyInstanceTypeMarker in the
// corresponding request parameters.
//
// This member is required.
IsTruncated bool
// The value that you specified for the MaxItems parameter in the
// ListTrafficPolicyInstancesByHostedZone request that produced the current
// response.
//
// This member is required.
MaxItems *int32
// A list that contains one TrafficPolicyInstance element for each traffic policy
// instance that matches the elements in the request.
//
// This member is required.
TrafficPolicyInstances []types.TrafficPolicyInstance
// If IsTruncated is true , TrafficPolicyInstanceNameMarker is the name of the
// first traffic policy instance in the next group of traffic policy instances.
TrafficPolicyInstanceNameMarker *string
// If IsTruncated is true, TrafficPolicyInstanceTypeMarker is the DNS type of the
// resource record sets that are associated with the first traffic policy instance
// in the next group of traffic policy instances.
TrafficPolicyInstanceTypeMarker types.RRType
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListTrafficPolicyInstancesByHostedZoneMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpListTrafficPolicyInstancesByHostedZone{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpListTrafficPolicyInstancesByHostedZone{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpListTrafficPolicyInstancesByHostedZoneValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrafficPolicyInstancesByHostedZone(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addSanitizeURLMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opListTrafficPolicyInstancesByHostedZone(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "ListTrafficPolicyInstancesByHostedZone",
}
}
| 193 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Gets information about the traffic policy instances that you created by using a
// specify traffic policy version. After you submit a CreateTrafficPolicyInstance
// or an UpdateTrafficPolicyInstance request, there's a brief delay while Amazon
// Route 53 creates the resource record sets that are specified in the traffic
// policy definition. For more information, see the State response element. Route
// 53 returns a maximum of 100 items in each response. If you have a lot of traffic
// policy instances, you can use the MaxItems parameter to list them in groups of
// up to 100.
func (c *Client) ListTrafficPolicyInstancesByPolicy(ctx context.Context, params *ListTrafficPolicyInstancesByPolicyInput, optFns ...func(*Options)) (*ListTrafficPolicyInstancesByPolicyOutput, error) {
if params == nil {
params = &ListTrafficPolicyInstancesByPolicyInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListTrafficPolicyInstancesByPolicy", params, optFns, c.addOperationListTrafficPolicyInstancesByPolicyMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListTrafficPolicyInstancesByPolicyOutput)
out.ResultMetadata = metadata
return out, nil
}
// A complex type that contains the information about the request to list your
// traffic policy instances.
type ListTrafficPolicyInstancesByPolicyInput struct {
// The ID of the traffic policy for which you want to list traffic policy
// instances.
//
// This member is required.
TrafficPolicyId *string
// The version of the traffic policy for which you want to list traffic policy
// instances. The version must be associated with the traffic policy that is
// specified by TrafficPolicyId .
//
// This member is required.
TrafficPolicyVersion *int32
// If the value of IsTruncated in the previous response was true , you have more
// traffic policy instances. To get more traffic policy instances, submit another
// ListTrafficPolicyInstancesByPolicy request. For the value of hostedzoneid ,
// specify the value of HostedZoneIdMarker from the previous response, which is
// the hosted zone ID of the first traffic policy instance that Amazon Route 53
// will return if you submit another request. If the value of IsTruncated in the
// previous response was false , there are no more traffic policy instances to get.
HostedZoneIdMarker *string
// The maximum number of traffic policy instances to be included in the response
// body for this request. If you have more than MaxItems traffic policy instances,
// the value of the IsTruncated element in the response is true , and the values of
// HostedZoneIdMarker , TrafficPolicyInstanceNameMarker , and
// TrafficPolicyInstanceTypeMarker represent the first traffic policy instance that
// Amazon Route 53 will return if you submit another request.
MaxItems *int32
// If the value of IsTruncated in the previous response was true , you have more
// traffic policy instances. To get more traffic policy instances, submit another
// ListTrafficPolicyInstancesByPolicy request. For the value of
// trafficpolicyinstancename , specify the value of TrafficPolicyInstanceNameMarker
// from the previous response, which is the name of the first traffic policy
// instance that Amazon Route 53 will return if you submit another request. If the
// value of IsTruncated in the previous response was false , there are no more
// traffic policy instances to get.
TrafficPolicyInstanceNameMarker *string
// If the value of IsTruncated in the previous response was true , you have more
// traffic policy instances. To get more traffic policy instances, submit another
// ListTrafficPolicyInstancesByPolicy request. For the value of
// trafficpolicyinstancetype , specify the value of TrafficPolicyInstanceTypeMarker
// from the previous response, which is the name of the first traffic policy
// instance that Amazon Route 53 will return if you submit another request. If the
// value of IsTruncated in the previous response was false , there are no more
// traffic policy instances to get.
TrafficPolicyInstanceTypeMarker types.RRType
noSmithyDocumentSerde
}
// A complex type that contains the response information for the request.
type ListTrafficPolicyInstancesByPolicyOutput struct {
// A flag that indicates whether there are more traffic policy instances to be
// listed. If the response was truncated, you can get the next group of traffic
// policy instances by calling ListTrafficPolicyInstancesByPolicy again and
// specifying the values of the HostedZoneIdMarker ,
// TrafficPolicyInstanceNameMarker , and TrafficPolicyInstanceTypeMarker elements
// in the corresponding request parameters.
//
// This member is required.
IsTruncated bool
// The value that you specified for the MaxItems parameter in the call to
// ListTrafficPolicyInstancesByPolicy that produced the current response.
//
// This member is required.
MaxItems *int32
// A list that contains one TrafficPolicyInstance element for each traffic policy
// instance that matches the elements in the request.
//
// This member is required.
TrafficPolicyInstances []types.TrafficPolicyInstance
// If IsTruncated is true , HostedZoneIdMarker is the ID of the hosted zone of the
// first traffic policy instance in the next group of traffic policy instances.
HostedZoneIdMarker *string
// If IsTruncated is true , TrafficPolicyInstanceNameMarker is the name of the
// first traffic policy instance in the next group of MaxItems traffic policy
// instances.
TrafficPolicyInstanceNameMarker *string
// If IsTruncated is true , TrafficPolicyInstanceTypeMarker is the DNS type of the
// resource record sets that are associated with the first traffic policy instance
// in the next group of MaxItems traffic policy instances.
TrafficPolicyInstanceTypeMarker types.RRType
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListTrafficPolicyInstancesByPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpListTrafficPolicyInstancesByPolicy{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpListTrafficPolicyInstancesByPolicy{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpListTrafficPolicyInstancesByPolicyValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrafficPolicyInstancesByPolicy(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addSanitizeURLMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opListTrafficPolicyInstancesByPolicy(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "ListTrafficPolicyInstancesByPolicy",
}
}
| 216 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Gets information about all of the versions for a specified traffic policy.
// Traffic policy versions are listed in numerical order by VersionNumber .
func (c *Client) ListTrafficPolicyVersions(ctx context.Context, params *ListTrafficPolicyVersionsInput, optFns ...func(*Options)) (*ListTrafficPolicyVersionsOutput, error) {
if params == nil {
params = &ListTrafficPolicyVersionsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListTrafficPolicyVersions", params, optFns, c.addOperationListTrafficPolicyVersionsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListTrafficPolicyVersionsOutput)
out.ResultMetadata = metadata
return out, nil
}
// A complex type that contains the information about the request to list your
// traffic policies.
type ListTrafficPolicyVersionsInput struct {
// Specify the value of Id of the traffic policy for which you want to list all
// versions.
//
// This member is required.
Id *string
// The maximum number of traffic policy versions that you want Amazon Route 53 to
// include in the response body for this request. If the specified traffic policy
// has more than MaxItems versions, the value of IsTruncated in the response is
// true , and the value of the TrafficPolicyVersionMarker element is the ID of the
// first version that Route 53 will return if you submit another request.
MaxItems *int32
// For your first request to ListTrafficPolicyVersions , don't include the
// TrafficPolicyVersionMarker parameter. If you have more traffic policy versions
// than the value of MaxItems , ListTrafficPolicyVersions returns only the first
// group of MaxItems versions. To get more traffic policy versions, submit another
// ListTrafficPolicyVersions request. For the value of TrafficPolicyVersionMarker ,
// specify the value of TrafficPolicyVersionMarker in the previous response.
TrafficPolicyVersionMarker *string
noSmithyDocumentSerde
}
// A complex type that contains the response information for the request.
type ListTrafficPolicyVersionsOutput struct {
// A flag that indicates whether there are more traffic policies to be listed. If
// the response was truncated, you can get the next group of traffic policies by
// submitting another ListTrafficPolicyVersions request and specifying the value
// of NextMarker in the marker parameter.
//
// This member is required.
IsTruncated bool
// The value that you specified for the maxitems parameter in the
// ListTrafficPolicyVersions request that produced the current response.
//
// This member is required.
MaxItems *int32
// A list that contains one TrafficPolicy element for each traffic policy version
// that is associated with the specified traffic policy.
//
// This member is required.
TrafficPolicies []types.TrafficPolicy
// If IsTruncated is true , the value of TrafficPolicyVersionMarker identifies the
// first traffic policy that Amazon Route 53 will return if you submit another
// request. Call ListTrafficPolicyVersions again and specify the value of
// TrafficPolicyVersionMarker in the TrafficPolicyVersionMarker request parameter.
// This element is present only if IsTruncated is true .
//
// This member is required.
TrafficPolicyVersionMarker *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListTrafficPolicyVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpListTrafficPolicyVersions{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpListTrafficPolicyVersions{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpListTrafficPolicyVersionsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrafficPolicyVersions(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opListTrafficPolicyVersions(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "ListTrafficPolicyVersions",
}
}
| 171 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Gets a list of the VPCs that were created by other accounts and that can be
// associated with a specified hosted zone because you've submitted one or more
// CreateVPCAssociationAuthorization requests. The response includes a VPCs
// element with a VPC child element for each VPC that can be associated with the
// hosted zone.
func (c *Client) ListVPCAssociationAuthorizations(ctx context.Context, params *ListVPCAssociationAuthorizationsInput, optFns ...func(*Options)) (*ListVPCAssociationAuthorizationsOutput, error) {
if params == nil {
params = &ListVPCAssociationAuthorizationsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListVPCAssociationAuthorizations", params, optFns, c.addOperationListVPCAssociationAuthorizationsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListVPCAssociationAuthorizationsOutput)
out.ResultMetadata = metadata
return out, nil
}
// A complex type that contains information about that can be associated with your
// hosted zone.
type ListVPCAssociationAuthorizationsInput struct {
// The ID of the hosted zone for which you want a list of VPCs that can be
// associated with the hosted zone.
//
// This member is required.
HostedZoneId *string
// Optional: An integer that specifies the maximum number of VPCs that you want
// Amazon Route 53 to return. If you don't specify a value for MaxResults , Route
// 53 returns up to 50 VPCs per page.
MaxResults *int32
// Optional: If a response includes a NextToken element, there are more VPCs that
// can be associated with the specified hosted zone. To get the next page of
// results, submit another request, and include the value of NextToken from the
// response in the nexttoken parameter in another ListVPCAssociationAuthorizations
// request.
NextToken *string
noSmithyDocumentSerde
}
// A complex type that contains the response information for the request.
type ListVPCAssociationAuthorizationsOutput struct {
// The ID of the hosted zone that you can associate the listed VPCs with.
//
// This member is required.
HostedZoneId *string
// The list of VPCs that are authorized to be associated with the specified hosted
// zone.
//
// This member is required.
VPCs []types.VPC
// When the response includes a NextToken element, there are more VPCs that can be
// associated with the specified hosted zone. To get the next page of VPCs, submit
// another ListVPCAssociationAuthorizations request, and include the value of the
// NextToken element from the response in the nexttoken request parameter.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListVPCAssociationAuthorizationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpListVPCAssociationAuthorizations{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpListVPCAssociationAuthorizations{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpListVPCAssociationAuthorizationsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVPCAssociationAuthorizations(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addSanitizeURLMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opListVPCAssociationAuthorizations(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "ListVPCAssociationAuthorizations",
}
}
| 162 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Gets the value that Amazon Route 53 returns in response to a DNS request for a
// specified record name and type. You can optionally specify the IP address of a
// DNS resolver, an EDNS0 client subnet IP address, and a subnet mask. This call
// only supports querying public hosted zones.
func (c *Client) TestDNSAnswer(ctx context.Context, params *TestDNSAnswerInput, optFns ...func(*Options)) (*TestDNSAnswerOutput, error) {
if params == nil {
params = &TestDNSAnswerInput{}
}
result, metadata, err := c.invokeOperation(ctx, "TestDNSAnswer", params, optFns, c.addOperationTestDNSAnswerMiddlewares)
if err != nil {
return nil, err
}
out := result.(*TestDNSAnswerOutput)
out.ResultMetadata = metadata
return out, nil
}
// Gets the value that Amazon Route 53 returns in response to a DNS request for a
// specified record name and type. You can optionally specify the IP address of a
// DNS resolver, an EDNS0 client subnet IP address, and a subnet mask.
type TestDNSAnswerInput struct {
// The ID of the hosted zone that you want Amazon Route 53 to simulate a query for.
//
// This member is required.
HostedZoneId *string
// The name of the resource record set that you want Amazon Route 53 to simulate a
// query for.
//
// This member is required.
RecordName *string
// The type of the resource record set.
//
// This member is required.
RecordType types.RRType
// If the resolver that you specified for resolverip supports EDNS0, specify the
// IPv4 or IPv6 address of a client in the applicable location, for example,
// 192.0.2.44 or 2001:db8:85a3::8a2e:370:7334 .
EDNS0ClientSubnetIP *string
// If you specify an IP address for edns0clientsubnetip , you can optionally
// specify the number of bits of the IP address that you want the checking tool to
// include in the DNS query. For example, if you specify 192.0.2.44 for
// edns0clientsubnetip and 24 for edns0clientsubnetmask , the checking tool will
// simulate a request from 192.0.2.0/24. The default value is 24 bits for IPv4
// addresses and 64 bits for IPv6 addresses. The range of valid values depends on
// whether edns0clientsubnetip is an IPv4 or an IPv6 address:
// - IPv4: Specify a value between 0 and 32
// - IPv6: Specify a value between 0 and 128
EDNS0ClientSubnetMask *string
// If you want to simulate a request from a specific DNS resolver, specify the IP
// address for that resolver. If you omit this value, TestDnsAnswer uses the IP
// address of a DNS resolver in the Amazon Web Services US East (N. Virginia)
// Region ( us-east-1 ).
ResolverIP *string
noSmithyDocumentSerde
}
// A complex type that contains the response to a TestDNSAnswer request.
type TestDNSAnswerOutput struct {
// The Amazon Route 53 name server used to respond to the request.
//
// This member is required.
Nameserver *string
// The protocol that Amazon Route 53 used to respond to the request, either UDP or
// TCP .
//
// This member is required.
Protocol *string
// A list that contains values that Amazon Route 53 returned for this resource
// record set.
//
// This member is required.
RecordData []string
// The name of the resource record set that you submitted a request for.
//
// This member is required.
RecordName *string
// The type of the resource record set that you submitted a request for.
//
// This member is required.
RecordType types.RRType
// A code that indicates whether the request is valid or not. The most common
// response code is NOERROR , meaning that the request is valid. If the response is
// not valid, Amazon Route 53 returns a response code that describes the error. For
// a list of possible response codes, see DNS RCODES (http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6)
// on the IANA website.
//
// This member is required.
ResponseCode *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationTestDNSAnswerMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpTestDNSAnswer{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpTestDNSAnswer{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpTestDNSAnswerValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTestDNSAnswer(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addSanitizeURLMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opTestDNSAnswer(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "TestDNSAnswer",
}
}
| 201 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates an existing health check. Note that some values can't be updated. For
// more information about updating health checks, see Creating, Updating, and
// Deleting Health Checks (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/health-checks-creating-deleting.html)
// in the Amazon Route 53 Developer Guide.
func (c *Client) UpdateHealthCheck(ctx context.Context, params *UpdateHealthCheckInput, optFns ...func(*Options)) (*UpdateHealthCheckOutput, error) {
if params == nil {
params = &UpdateHealthCheckInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateHealthCheck", params, optFns, c.addOperationUpdateHealthCheckMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateHealthCheckOutput)
out.ResultMetadata = metadata
return out, nil
}
// A complex type that contains information about a request to update a health
// check.
type UpdateHealthCheckInput struct {
// The ID for the health check for which you want detailed information. When you
// created the health check, CreateHealthCheck returned the ID in the response, in
// the HealthCheckId element.
//
// This member is required.
HealthCheckId *string
// A complex type that identifies the CloudWatch alarm that you want Amazon Route
// 53 health checkers to use to determine whether the specified health check is
// healthy.
AlarmIdentifier *types.AlarmIdentifier
// A complex type that contains one ChildHealthCheck element for each health check
// that you want to associate with a CALCULATED health check.
ChildHealthChecks []string
// Stops Route 53 from performing health checks. When you disable a health check,
// here's what happens:
// - Health checks that check the health of endpoints: Route 53 stops submitting
// requests to your application, server, or other resource.
// - Calculated health checks: Route 53 stops aggregating the status of the
// referenced health checks.
// - Health checks that monitor CloudWatch alarms: Route 53 stops monitoring the
// corresponding CloudWatch metrics.
// After you disable a health check, Route 53 considers the status of the health
// check to always be healthy. If you configured DNS failover, Route 53 continues
// to route traffic to the corresponding resources. If you want to stop routing
// traffic to a resource, change the value of Inverted (https://docs.aws.amazon.com/Route53/latest/APIReference/API_UpdateHealthCheck.html#Route53-UpdateHealthCheck-request-Inverted)
// . Charges for a health check still apply when the health check is disabled. For
// more information, see Amazon Route 53 Pricing (http://aws.amazon.com/route53/pricing/)
// .
Disabled *bool
// Specify whether you want Amazon Route 53 to send the value of
// FullyQualifiedDomainName to the endpoint in the client_hello message during TLS
// negotiation. This allows the endpoint to respond to HTTPS health check requests
// with the applicable SSL/TLS certificate. Some endpoints require that HTTPS
// requests include the host name in the client_hello message. If you don't enable
// SNI, the status of the health check will be SSL alert handshake_failure . A
// health check can also have that status for other reasons. If SNI is enabled and
// you're still getting the error, check the SSL/TLS configuration on your endpoint
// and confirm that your certificate is valid. The SSL/TLS certificate on your
// endpoint includes a domain name in the Common Name field and possibly several
// more in the Subject Alternative Names field. One of the domain names in the
// certificate should match the value that you specify for FullyQualifiedDomainName
// . If the endpoint responds to the client_hello message with a certificate that
// does not include the domain name that you specified in FullyQualifiedDomainName
// , a health checker will retry the handshake. In the second attempt, the health
// checker will omit FullyQualifiedDomainName from the client_hello message.
EnableSNI *bool
// The number of consecutive health checks that an endpoint must pass or fail for
// Amazon Route 53 to change the current status of the endpoint from unhealthy to
// healthy or vice versa. For more information, see How Amazon Route 53 Determines
// Whether an Endpoint Is Healthy (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html)
// in the Amazon Route 53 Developer Guide. If you don't specify a value for
// FailureThreshold , the default value is three health checks.
FailureThreshold *int32
// Amazon Route 53 behavior depends on whether you specify a value for IPAddress .
// If a health check already has a value for IPAddress , you can change the value.
// However, you can't update an existing health check to add or remove the value of
// IPAddress . If you specify a value for IPAddress : Route 53 sends health check
// requests to the specified IPv4 or IPv6 address and passes the value of
// FullyQualifiedDomainName in the Host header for all health checks except TCP
// health checks. This is typically the fully qualified DNS name of the endpoint on
// which you want Route 53 to perform health checks. When Route 53 checks the
// health of an endpoint, here is how it constructs the Host header:
// - If you specify a value of 80 for Port and HTTP or HTTP_STR_MATCH for Type ,
// Route 53 passes the value of FullyQualifiedDomainName to the endpoint in the
// Host header.
// - If you specify a value of 443 for Port and HTTPS or HTTPS_STR_MATCH for Type
// , Route 53 passes the value of FullyQualifiedDomainName to the endpoint in the
// Host header.
// - If you specify another value for Port and any value except TCP for Type ,
// Route 53 passes FullyQualifiedDomainName : Port to the endpoint in the Host
// header.
// If you don't specify a value for FullyQualifiedDomainName , Route 53 substitutes
// the value of IPAddress in the Host header in each of the above cases. If you
// don't specify a value for IPAddress : If you don't specify a value for IPAddress
// , Route 53 sends a DNS request to the domain that you specify in
// FullyQualifiedDomainName at the interval you specify in RequestInterval . Using
// an IPv4 address that is returned by DNS, Route 53 then checks the health of the
// endpoint. If you don't specify a value for IPAddress , Route 53 uses only IPv4
// to send health checks to the endpoint. If there's no resource record set with a
// type of A for the name that you specify for FullyQualifiedDomainName , the
// health check fails with a "DNS resolution failed" error. If you want to check
// the health of weighted, latency, or failover resource record sets and you choose
// to specify the endpoint only by FullyQualifiedDomainName , we recommend that you
// create a separate health check for each endpoint. For example, create a health
// check for each HTTP server that is serving content for www.example.com. For the
// value of FullyQualifiedDomainName , specify the domain name of the server (such
// as us-east-2-www.example.com ), not the name of the resource record sets
// (www.example.com). In this configuration, if the value of
// FullyQualifiedDomainName matches the name of the resource record sets and you
// then associate the health check with those resource record sets, health check
// results will be unpredictable. In addition, if the value of Type is HTTP , HTTPS
// , HTTP_STR_MATCH , or HTTPS_STR_MATCH , Route 53 passes the value of
// FullyQualifiedDomainName in the Host header, as it does when you specify a
// value for IPAddress . If the value of Type is TCP , Route 53 doesn't pass a Host
// header.
FullyQualifiedDomainName *string
// A sequential counter that Amazon Route 53 sets to 1 when you create a health
// check and increments by 1 each time you update settings for the health check. We
// recommend that you use GetHealthCheck or ListHealthChecks to get the current
// value of HealthCheckVersion for the health check that you want to update, and
// that you include that value in your UpdateHealthCheck request. This prevents
// Route 53 from overwriting an intervening update:
// - If the value in the UpdateHealthCheck request matches the value of
// HealthCheckVersion in the health check, Route 53 updates the health check with
// the new settings.
// - If the value of HealthCheckVersion in the health check is greater, the
// health check was changed after you got the version number. Route 53 does not
// update the health check, and it returns a HealthCheckVersionMismatch error.
HealthCheckVersion *int64
// The number of child health checks that are associated with a CALCULATED health
// that Amazon Route 53 must consider healthy for the CALCULATED health check to
// be considered healthy. To specify the child health checks that you want to
// associate with a CALCULATED health check, use the ChildHealthChecks and
// ChildHealthCheck elements. Note the following:
// - If you specify a number greater than the number of child health checks,
// Route 53 always considers this health check to be unhealthy.
// - If you specify 0 , Route 53 always considers this health check to be
// healthy.
HealthThreshold *int32
// The IPv4 or IPv6 IP address for the endpoint that you want Amazon Route 53 to
// perform health checks on. If you don't specify a value for IPAddress , Route 53
// sends a DNS request to resolve the domain name that you specify in
// FullyQualifiedDomainName at the interval that you specify in RequestInterval .
// Using an IP address that is returned by DNS, Route 53 then checks the health of
// the endpoint. Use one of the following formats for the value of IPAddress :
// - IPv4 address: four values between 0 and 255, separated by periods (.), for
// example, 192.0.2.44 .
// - IPv6 address: eight groups of four hexadecimal values, separated by colons
// (:), for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345 . You can also
// shorten IPv6 addresses as described in RFC 5952, for example,
// 2001:db8:85a3::abcd:1:2345 .
// If the endpoint is an EC2 instance, we recommend that you create an Elastic IP
// address, associate it with your EC2 instance, and specify the Elastic IP address
// for IPAddress . This ensures that the IP address of your instance never changes.
// For more information, see the applicable documentation:
// - Linux: Elastic IP Addresses (EIP) (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html)
// in the Amazon EC2 User Guide for Linux Instances
// - Windows: Elastic IP Addresses (EIP) (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-ip-addresses-eip.html)
// in the Amazon EC2 User Guide for Windows Instances
// If a health check already has a value for IPAddress , you can change the value.
// However, you can't update an existing health check to add or remove the value of
// IPAddress . For more information, see FullyQualifiedDomainName (https://docs.aws.amazon.com/Route53/latest/APIReference/API_UpdateHealthCheck.html#Route53-UpdateHealthCheck-request-FullyQualifiedDomainName)
// . Constraints: Route 53 can't check the health of endpoints for which the IP
// address is in local, private, non-routable, or multicast ranges. For more
// information about IP addresses for which you can't create health checks, see the
// following documents:
// - RFC 5735, Special Use IPv4 Addresses (https://tools.ietf.org/html/rfc5735)
// - RFC 6598, IANA-Reserved IPv4 Prefix for Shared Address Space (https://tools.ietf.org/html/rfc6598)
// - RFC 5156, Special-Use IPv6 Addresses (https://tools.ietf.org/html/rfc5156)
IPAddress *string
// When CloudWatch has insufficient data about the metric to determine the alarm
// state, the status that you want Amazon Route 53 to assign to the health check:
// - Healthy : Route 53 considers the health check to be healthy.
// - Unhealthy : Route 53 considers the health check to be unhealthy.
// - LastKnownStatus : By default, Route 53 uses the status of the health check
// from the last time CloudWatch had sufficient data to determine the alarm state.
// For new health checks that have no last known status, the status for the health
// check is healthy.
InsufficientDataHealthStatus types.InsufficientDataHealthStatus
// Specify whether you want Amazon Route 53 to invert the status of a health
// check, for example, to consider a health check unhealthy when it otherwise would
// be considered healthy.
Inverted *bool
// The port on the endpoint that you want Amazon Route 53 to perform health checks
// on. Don't specify a value for Port when you specify a value for Type of
// CLOUDWATCH_METRIC or CALCULATED .
Port *int32
// A complex type that contains one Region element for each region that you want
// Amazon Route 53 health checkers to check the specified endpoint from.
Regions []types.HealthCheckRegion
// A complex type that contains one ResettableElementName element for each element
// that you want to reset to the default value. Valid values for
// ResettableElementName include the following:
// - ChildHealthChecks : Amazon Route 53 resets ChildHealthChecks (https://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-ChildHealthChecks)
// to null.
// - FullyQualifiedDomainName : Route 53 resets FullyQualifiedDomainName (https://docs.aws.amazon.com/Route53/latest/APIReference/API_UpdateHealthCheck.html#Route53-UpdateHealthCheck-request-FullyQualifiedDomainName)
// . to null.
// - Regions : Route 53 resets the Regions (https://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-Regions)
// list to the default set of regions.
// - ResourcePath : Route 53 resets ResourcePath (https://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-ResourcePath)
// to null.
ResetElements []types.ResettableElementName
// The path that you want Amazon Route 53 to request when performing health
// checks. The path can be any value for which your endpoint will return an HTTP
// status code of 2xx or 3xx when the endpoint is healthy, for example the file
// /docs/route53-health-check.html. You can also include query string parameters,
// for example, /welcome.html?language=jp&login=y . Specify this value only if you
// want to change it.
ResourcePath *string
// If the value of Type is HTTP_STR_MATCH or HTTPS_STR_MATCH , the string that you
// want Amazon Route 53 to search for in the response body from the specified
// resource. If the string appears in the response body, Route 53 considers the
// resource healthy. (You can't change the value of Type when you update a health
// check.)
SearchString *string
noSmithyDocumentSerde
}
// A complex type that contains the response to the UpdateHealthCheck request.
type UpdateHealthCheckOutput struct {
// A complex type that contains the response to an UpdateHealthCheck request.
//
// This member is required.
HealthCheck *types.HealthCheck
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateHealthCheckMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateHealthCheck{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateHealthCheck{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateHealthCheckValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateHealthCheck(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opUpdateHealthCheck(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "UpdateHealthCheck",
}
}
| 340 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates the comment for a specified hosted zone.
func (c *Client) UpdateHostedZoneComment(ctx context.Context, params *UpdateHostedZoneCommentInput, optFns ...func(*Options)) (*UpdateHostedZoneCommentOutput, error) {
if params == nil {
params = &UpdateHostedZoneCommentInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateHostedZoneComment", params, optFns, c.addOperationUpdateHostedZoneCommentMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateHostedZoneCommentOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to update the comment for a hosted zone.
type UpdateHostedZoneCommentInput struct {
// The ID for the hosted zone that you want to update the comment for.
//
// This member is required.
Id *string
// The new comment for the hosted zone. If you don't specify a value for Comment ,
// Amazon Route 53 deletes the existing value of the Comment element, if any.
Comment *string
noSmithyDocumentSerde
}
// A complex type that contains the response to the UpdateHostedZoneComment
// request.
type UpdateHostedZoneCommentOutput struct {
// A complex type that contains the response to the UpdateHostedZoneComment
// request.
//
// This member is required.
HostedZone *types.HostedZone
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateHostedZoneCommentMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateHostedZoneComment{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateHostedZoneComment{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateHostedZoneCommentValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateHostedZoneComment(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addSanitizeURLMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opUpdateHostedZoneComment(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "UpdateHostedZoneComment",
}
}
| 138 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates the comment for a specified traffic policy version.
func (c *Client) UpdateTrafficPolicyComment(ctx context.Context, params *UpdateTrafficPolicyCommentInput, optFns ...func(*Options)) (*UpdateTrafficPolicyCommentOutput, error) {
if params == nil {
params = &UpdateTrafficPolicyCommentInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateTrafficPolicyComment", params, optFns, c.addOperationUpdateTrafficPolicyCommentMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateTrafficPolicyCommentOutput)
out.ResultMetadata = metadata
return out, nil
}
// A complex type that contains information about the traffic policy that you want
// to update the comment for.
type UpdateTrafficPolicyCommentInput struct {
// The new comment for the specified traffic policy and version.
//
// This member is required.
Comment *string
// The value of Id for the traffic policy that you want to update the comment for.
//
// This member is required.
Id *string
// The value of Version for the traffic policy that you want to update the comment
// for.
//
// This member is required.
Version *int32
noSmithyDocumentSerde
}
// A complex type that contains the response information for the traffic policy.
type UpdateTrafficPolicyCommentOutput struct {
// A complex type that contains settings for the specified traffic policy.
//
// This member is required.
TrafficPolicy *types.TrafficPolicy
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateTrafficPolicyCommentMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateTrafficPolicyComment{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateTrafficPolicyComment{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateTrafficPolicyCommentValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateTrafficPolicyComment(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opUpdateTrafficPolicyComment(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "UpdateTrafficPolicyComment",
}
}
| 141 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates the resource record sets in a specified hosted zone that were created
// based on the settings in a specified traffic policy version. When you update a
// traffic policy instance, Amazon Route 53 continues to respond to DNS queries for
// the root resource record set name (such as example.com) while it replaces one
// group of resource record sets with another. Route 53 performs the following
// operations:
// - Route 53 creates a new group of resource record sets based on the specified
// traffic policy. This is true regardless of how significant the differences are
// between the existing resource record sets and the new resource record sets.
// - When all of the new resource record sets have been created, Route 53 starts
// to respond to DNS queries for the root resource record set name (such as
// example.com) by using the new resource record sets.
// - Route 53 deletes the old group of resource record sets that are associated
// with the root resource record set name.
func (c *Client) UpdateTrafficPolicyInstance(ctx context.Context, params *UpdateTrafficPolicyInstanceInput, optFns ...func(*Options)) (*UpdateTrafficPolicyInstanceOutput, error) {
if params == nil {
params = &UpdateTrafficPolicyInstanceInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateTrafficPolicyInstance", params, optFns, c.addOperationUpdateTrafficPolicyInstanceMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateTrafficPolicyInstanceOutput)
out.ResultMetadata = metadata
return out, nil
}
// A complex type that contains information about the resource record sets that
// you want to update based on a specified traffic policy instance.
type UpdateTrafficPolicyInstanceInput struct {
// The ID of the traffic policy instance that you want to update.
//
// This member is required.
Id *string
// The TTL that you want Amazon Route 53 to assign to all of the updated resource
// record sets.
//
// This member is required.
TTL *int64
// The ID of the traffic policy that you want Amazon Route 53 to use to update
// resource record sets for the specified traffic policy instance.
//
// This member is required.
TrafficPolicyId *string
// The version of the traffic policy that you want Amazon Route 53 to use to
// update resource record sets for the specified traffic policy instance.
//
// This member is required.
TrafficPolicyVersion *int32
noSmithyDocumentSerde
}
// A complex type that contains information about the resource record sets that
// Amazon Route 53 created based on a specified traffic policy.
type UpdateTrafficPolicyInstanceOutput struct {
// A complex type that contains settings for the updated traffic policy instance.
//
// This member is required.
TrafficPolicyInstance *types.TrafficPolicyInstance
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateTrafficPolicyInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateTrafficPolicyInstance{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateTrafficPolicyInstance{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateTrafficPolicyInstanceValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateTrafficPolicyInstance(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opUpdateTrafficPolicyInstance(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53",
OperationName: "UpdateTrafficPolicyInstance",
}
}
| 162 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
// Package route53 provides the API client, operations, and parameter types for
// Amazon Route 53.
//
// Amazon Route 53 is a highly available and scalable Domain Name System (DNS) web
// service. You can use Route 53 to:
// - Register domain names. For more information, see How domain registration
// works (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/welcome-domain-registration.html)
// .
// - Route internet traffic to the resources for your domain For more
// information, see How internet traffic is routed to your website or web
// application (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/welcome-dns-service.html)
// .
// - Check the health of your resources. For more information, see How Route 53
// checks the health of your resources (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/welcome-health-checks.html)
// .
package route53
| 19 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
"errors"
"fmt"
"github.com/aws/aws-sdk-go-v2/aws"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
internalendpoints "github.com/aws/aws-sdk-go-v2/service/route53/internal/endpoints"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"net/url"
"strings"
)
// EndpointResolverOptions is the service endpoint resolver options
type EndpointResolverOptions = internalendpoints.Options
// EndpointResolver interface for resolving service endpoints.
type EndpointResolver interface {
ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
}
var _ EndpointResolver = &internalendpoints.Resolver{}
// NewDefaultEndpointResolver constructs a new service endpoint resolver
func NewDefaultEndpointResolver() *internalendpoints.Resolver {
return internalendpoints.New()
}
// EndpointResolverFunc is a helper utility that wraps a function so it satisfies
// the EndpointResolver interface. This is useful when you want to add additional
// endpoint resolving logic, or stub out specific endpoints with custom values.
type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error)
func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
return fn(region, options)
}
func resolveDefaultEndpointConfiguration(o *Options) {
if o.EndpointResolver != nil {
return
}
o.EndpointResolver = NewDefaultEndpointResolver()
}
// EndpointResolverFromURL returns an EndpointResolver configured using the
// provided endpoint url. By default, the resolved endpoint resolver uses the
// client region as signing region, and the endpoint source is set to
// EndpointSourceCustom.You can provide functional options to configure endpoint
// values for the resolved endpoint.
func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver {
e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom}
for _, fn := range optFns {
fn(&e)
}
return EndpointResolverFunc(
func(region string, options EndpointResolverOptions) (aws.Endpoint, error) {
if len(e.SigningRegion) == 0 {
e.SigningRegion = region
}
return e, nil
},
)
}
type ResolveEndpoint struct {
Resolver EndpointResolver
Options EndpointResolverOptions
}
func (*ResolveEndpoint) ID() string {
return "ResolveEndpoint"
}
func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
req, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
}
if m.Resolver == nil {
return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
}
eo := m.Options
eo.Logger = middleware.GetLogger(ctx)
var endpoint aws.Endpoint
endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo)
if err != nil {
return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
}
req.URL, err = url.Parse(endpoint.URL)
if err != nil {
return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err)
}
if len(awsmiddleware.GetSigningName(ctx)) == 0 {
signingName := endpoint.SigningName
if len(signingName) == 0 {
signingName = "route53"
}
ctx = awsmiddleware.SetSigningName(ctx, signingName)
}
ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source)
ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable)
ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion)
ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID)
return next.HandleSerialize(ctx, in)
}
func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error {
return stack.Serialize.Insert(&ResolveEndpoint{
Resolver: o.EndpointResolver,
Options: o.EndpointOptions,
}, "OperationSerializer", middleware.Before)
}
func removeResolveEndpointMiddleware(stack *middleware.Stack) error {
_, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID())
return err
}
type wrappedEndpointResolver struct {
awsResolver aws.EndpointResolverWithOptions
resolver EndpointResolver
}
func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
if w.awsResolver == nil {
goto fallback
}
endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options)
if err == nil {
return endpoint, nil
}
if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) {
return endpoint, err
}
fallback:
if w.resolver == nil {
return endpoint, fmt.Errorf("default endpoint resolver provided was nil")
}
return w.resolver.ResolveEndpoint(region, options)
}
type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error)
func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) {
return a(service, region)
}
var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil)
// withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver.
// If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided
// fallbackResolver for resolution.
//
// fallbackResolver must not be nil
func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver {
var resolver aws.EndpointResolverWithOptions
if awsResolverWithOptions != nil {
resolver = awsResolverWithOptions
} else if awsResolver != nil {
resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint)
}
return &wrappedEndpointResolver{
awsResolver: resolver,
resolver: fallbackResolver,
}
}
func finalizeClientEndpointResolverOptions(options *Options) {
options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage()
if len(options.EndpointOptions.ResolvedRegion) == 0 {
const fipsInfix = "-fips-"
const fipsPrefix = "fips-"
const fipsSuffix = "-fips"
if strings.Contains(options.Region, fipsInfix) ||
strings.Contains(options.Region, fipsPrefix) ||
strings.Contains(options.Region, fipsSuffix) {
options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll(
options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "")
options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled
}
}
}
| 201 |
aws-sdk-go-v2 | aws | Go | // Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
package route53
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.28.3"
| 7 |
aws-sdk-go-v2 | aws | Go | package route53
import (
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
)
// ListResourceRecordSetsAPIClient is a client that implements the ListResourceRecordSets
// operation
type ListResourceRecordSetsAPIClient interface {
ListResourceRecordSets(context.Context, *ListResourceRecordSetsInput, ...func(*Options)) (*ListResourceRecordSetsOutput, error)
}
var _ ListResourceRecordSetsAPIClient = (*Client)(nil)
// ListResourceRecordSetsPaginatorOptions is the paginator options for ListResourceRecordSets
type ListResourceRecordSetsPaginatorOptions struct {
// (Optional) The maximum number of ResourceRecordSets that you want Amazon Route 53 to
// return.
Limit int32
// Set to true if pagination should stop if the service returns a pagination token
// that matches the most recent token provided to the service.
StopOnDuplicateToken bool
}
// ListResourceRecordSetsPaginator is a paginator for ListResourceRecordSets
type ListResourceRecordSetsPaginator struct {
options ListResourceRecordSetsPaginatorOptions
client ListResourceRecordSetsAPIClient
params *ListResourceRecordSetsInput
firstPage bool
startRecordName *string
startRecordType types.RRType
startRecordIdentifier *string
isTruncated bool
}
// NewListResourceRecordSetsPaginator returns a new ListResourceRecordSetsPaginator
func NewListResourceRecordSetsPaginator(client ListResourceRecordSetsAPIClient, params *ListResourceRecordSetsInput, optFns ...func(*ListResourceRecordSetsPaginatorOptions)) *ListResourceRecordSetsPaginator {
if params == nil {
params = &ListResourceRecordSetsInput{}
}
options := ListResourceRecordSetsPaginatorOptions{}
if params.MaxItems != nil {
options.Limit = *params.MaxItems
}
for _, fn := range optFns {
fn(&options)
}
return &ListResourceRecordSetsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
startRecordName: params.StartRecordName,
startRecordType: params.StartRecordType,
startRecordIdentifier: params.StartRecordIdentifier,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListResourceRecordSetsPaginator) HasMorePages() bool {
return p.firstPage || p.isTruncated
}
// NextPage retrieves the next ListResourceRecordSets page.
func (p *ListResourceRecordSetsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListResourceRecordSetsOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.StartRecordName = p.startRecordName
params.StartRecordIdentifier = p.startRecordIdentifier
params.StartRecordType = p.startRecordType
var limit *int32
if p.options.Limit > 0 {
limit = &p.options.Limit
}
params.MaxItems = limit
result, err := p.client.ListResourceRecordSets(ctx, ¶ms, optFns...)
if err != nil {
return nil, err
}
p.firstPage = false
prevToken := p.startRecordName
p.isTruncated = result.IsTruncated
p.startRecordName = nil
p.startRecordIdentifier = nil
p.startRecordType = ""
if result.IsTruncated {
p.startRecordName = result.NextRecordName
p.startRecordIdentifier = result.NextRecordIdentifier
p.startRecordType = result.NextRecordType
}
if p.options.StopOnDuplicateToken &&
prevToken != nil &&
p.startRecordName != nil &&
*prevToken == *p.startRecordName {
p.isTruncated = false
}
return result, nil
}
| 114 |
aws-sdk-go-v2 | aws | Go | package route53
import (
"context"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"testing"
)
type mockListResourceRecordSetsClient struct {
outputs []*ListResourceRecordSetsOutput
inputs []*ListResourceRecordSetsInput
t *testing.T
}
func (c *mockListResourceRecordSetsClient) ListResourceRecordSets(ctx context.Context, input *ListResourceRecordSetsInput, optFns ...func(*Options)) (*ListResourceRecordSetsOutput, error) {
c.inputs = append(c.inputs, input)
requestCnt := len(c.inputs)
if *input.MaxItems != *c.outputs[requestCnt-1].MaxItems {
c.t.Errorf("Expect page limit to be %d, got %d", *c.outputs[requestCnt-1].MaxItems, *input.MaxItems)
}
if outputLen := len(c.outputs); requestCnt > outputLen {
c.t.Errorf("Paginator calls client more than expected %d times", outputLen)
}
return c.outputs[requestCnt-1], nil
}
type listRRSTestCase struct {
limit int32
requestCnt int
stopOnDuplicationToken bool
outputs []*ListResourceRecordSetsOutput
}
func TestListResourceRecordSetsPaginator(t *testing.T) {
cases := map[string]listRRSTestCase{
"page limit 5": {
limit: 5,
requestCnt: 3,
outputs: []*ListResourceRecordSetsOutput{
{
MaxItems: aws.Int32(5),
NextRecordName: aws.String("testRecord1"),
NextRecordIdentifier: aws.String("testID1"),
NextRecordType: types.RRTypeA,
IsTruncated: true,
},
{
MaxItems: aws.Int32(5),
NextRecordName: aws.String("testRecord2"),
NextRecordIdentifier: aws.String("testID2"),
NextRecordType: types.RRTypeA,
IsTruncated: true,
},
{
MaxItems: aws.Int32(5),
NextRecordName: aws.String("testRecord3"),
NextRecordIdentifier: aws.String("testID3"),
NextRecordType: types.RRTypeA,
IsTruncated: false,
},
},
},
"page limit 10 with duplicate record": {
limit: 10,
requestCnt: 4,
stopOnDuplicationToken: true,
outputs: []*ListResourceRecordSetsOutput{
{
MaxItems: aws.Int32(10),
NextRecordName: aws.String("testRecord1"),
NextRecordIdentifier: aws.String("testID1"),
NextRecordType: types.RRTypeA,
IsTruncated: true,
},
{
MaxItems: aws.Int32(10),
NextRecordName: aws.String("testRecord2"),
NextRecordIdentifier: aws.String("testID2"),
NextRecordType: types.RRTypeA,
IsTruncated: true,
},
{
MaxItems: aws.Int32(10),
NextRecordName: aws.String("testRecord3"),
NextRecordIdentifier: aws.String("testID3"),
NextRecordType: types.RRTypeA,
IsTruncated: true,
},
{
MaxItems: aws.Int32(10),
NextRecordName: aws.String("testRecord3"),
NextRecordIdentifier: aws.String("testID3"),
NextRecordType: types.RRTypeA,
IsTruncated: true,
},
{
MaxItems: aws.Int32(10),
NextRecordName: aws.String("testRecord5"),
NextRecordIdentifier: aws.String("testID5"),
NextRecordType: types.RRTypeA,
IsTruncated: false,
},
},
},
}
for name, c := range cases {
t.Run(name, func(t *testing.T) {
client := mockListResourceRecordSetsClient{
inputs: []*ListResourceRecordSetsInput{},
outputs: c.outputs,
t: t,
}
paginator := NewListResourceRecordSetsPaginator(&client, &ListResourceRecordSetsInput{}, func(options *ListResourceRecordSetsPaginatorOptions) {
options.Limit = c.limit
options.StopOnDuplicateToken = c.stopOnDuplicationToken
})
for paginator.HasMorePages() {
_, err := paginator.NextPage(context.TODO())
if err != nil {
t.Errorf("error: %v", err)
}
}
inputLen := len(client.inputs)
if inputLen != c.requestCnt {
t.Errorf("Expect total request number to be %d, got %d", c.requestCnt, inputLen)
}
for i := 1; i < inputLen; i++ {
if *client.inputs[i].StartRecordName != *c.outputs[i-1].NextRecordName {
t.Errorf("Expect next input's RecordName to be eaqul to %s, got %s",
*c.outputs[i-1].NextRecordName, *client.inputs[i].StartRecordName)
}
if *client.inputs[i].StartRecordIdentifier != *c.outputs[i-1].NextRecordIdentifier {
t.Errorf("Expect next input's RecordIdentifier to be eaqul to %s, got %s",
*c.outputs[i-1].NextRecordIdentifier, *client.inputs[i].StartRecordIdentifier)
}
if client.inputs[i].StartRecordType != c.outputs[i-1].NextRecordType {
t.Errorf("Expect next input's RecordType to be eaqul to %s, got %s",
c.outputs[i-1].NextRecordType, client.inputs[i].StartRecordType)
}
}
})
}
}
| 148 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
| 4 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"bytes"
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
smithy "github.com/aws/smithy-go"
"github.com/aws/smithy-go/encoding/httpbinding"
smithyxml "github.com/aws/smithy-go/encoding/xml"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
type awsRestxml_serializeOpActivateKeySigningKey struct {
}
func (*awsRestxml_serializeOpActivateKeySigningKey) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpActivateKeySigningKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*ActivateKeySigningKeyInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/activate")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsActivateKeySigningKeyInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsActivateKeySigningKeyInput(v *ActivateKeySigningKeyInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")}
}
if v.HostedZoneId != nil {
if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil {
return err
}
}
if v.Name == nil || len(*v.Name) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
}
if v.Name != nil {
if err := encoder.SetURI("Name").String(*v.Name); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpAssociateVPCWithHostedZone struct {
}
func (*awsRestxml_serializeOpAssociateVPCWithHostedZone) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpAssociateVPCWithHostedZone) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*AssociateVPCWithHostedZoneInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/associatevpc")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsAssociateVPCWithHostedZoneInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
restEncoder.SetHeader("Content-Type").String("application/xml")
xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "AssociateVPCWithHostedZoneRequest",
},
Attr: rootAttr,
}
root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/"))
if err := awsRestxml_serializeOpDocumentAssociateVPCWithHostedZoneInput(input, xmlEncoder.RootElement(root)); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsAssociateVPCWithHostedZoneInput(v *AssociateVPCWithHostedZoneInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")}
}
if v.HostedZoneId != nil {
if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil {
return err
}
}
return nil
}
func awsRestxml_serializeOpDocumentAssociateVPCWithHostedZoneInput(v *AssociateVPCWithHostedZoneInput, value smithyxml.Value) error {
defer value.Close()
if v.Comment != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Comment",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.Comment)
}
if v.VPC != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "VPC",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
if err := awsRestxml_serializeDocumentVPC(v.VPC, el); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpChangeCidrCollection struct {
}
func (*awsRestxml_serializeOpChangeCidrCollection) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpChangeCidrCollection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*ChangeCidrCollectionInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/cidrcollection/{Id}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsChangeCidrCollectionInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
restEncoder.SetHeader("Content-Type").String("application/xml")
xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ChangeCidrCollectionRequest",
},
Attr: rootAttr,
}
root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/"))
if err := awsRestxml_serializeOpDocumentChangeCidrCollectionInput(input, xmlEncoder.RootElement(root)); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsChangeCidrCollectionInput(v *ChangeCidrCollectionInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Id == nil || len(*v.Id) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
}
if v.Id != nil {
if err := encoder.SetURI("Id").String(*v.Id); err != nil {
return err
}
}
return nil
}
func awsRestxml_serializeOpDocumentChangeCidrCollectionInput(v *ChangeCidrCollectionInput, value smithyxml.Value) error {
defer value.Close()
if v.Changes != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Changes",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
if err := awsRestxml_serializeDocumentCidrCollectionChanges(v.Changes, el); err != nil {
return err
}
}
if v.CollectionVersion != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CollectionVersion",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.Long(*v.CollectionVersion)
}
return nil
}
type awsRestxml_serializeOpChangeResourceRecordSets struct {
}
func (*awsRestxml_serializeOpChangeResourceRecordSets) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpChangeResourceRecordSets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*ChangeResourceRecordSetsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/rrset")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsChangeResourceRecordSetsInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
restEncoder.SetHeader("Content-Type").String("application/xml")
xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ChangeResourceRecordSetsRequest",
},
Attr: rootAttr,
}
root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/"))
if err := awsRestxml_serializeOpDocumentChangeResourceRecordSetsInput(input, xmlEncoder.RootElement(root)); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsChangeResourceRecordSetsInput(v *ChangeResourceRecordSetsInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")}
}
if v.HostedZoneId != nil {
if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil {
return err
}
}
return nil
}
func awsRestxml_serializeOpDocumentChangeResourceRecordSetsInput(v *ChangeResourceRecordSetsInput, value smithyxml.Value) error {
defer value.Close()
if v.ChangeBatch != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ChangeBatch",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
if err := awsRestxml_serializeDocumentChangeBatch(v.ChangeBatch, el); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpChangeTagsForResource struct {
}
func (*awsRestxml_serializeOpChangeTagsForResource) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpChangeTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*ChangeTagsForResourceInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/tags/{ResourceType}/{ResourceId}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsChangeTagsForResourceInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
restEncoder.SetHeader("Content-Type").String("application/xml")
xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ChangeTagsForResourceRequest",
},
Attr: rootAttr,
}
root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/"))
if err := awsRestxml_serializeOpDocumentChangeTagsForResourceInput(input, xmlEncoder.RootElement(root)); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsChangeTagsForResourceInput(v *ChangeTagsForResourceInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.ResourceId == nil || len(*v.ResourceId) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceId must not be empty")}
}
if v.ResourceId != nil {
if err := encoder.SetURI("ResourceId").String(*v.ResourceId); err != nil {
return err
}
}
if len(v.ResourceType) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceType must not be empty")}
}
if len(v.ResourceType) > 0 {
if err := encoder.SetURI("ResourceType").String(string(v.ResourceType)); err != nil {
return err
}
}
return nil
}
func awsRestxml_serializeOpDocumentChangeTagsForResourceInput(v *ChangeTagsForResourceInput, value smithyxml.Value) error {
defer value.Close()
if v.AddTags != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "AddTags",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
if err := awsRestxml_serializeDocumentTagList(v.AddTags, el); err != nil {
return err
}
}
if v.RemoveTagKeys != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "RemoveTagKeys",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
if err := awsRestxml_serializeDocumentTagKeyList(v.RemoveTagKeys, el); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpCreateCidrCollection struct {
}
func (*awsRestxml_serializeOpCreateCidrCollection) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpCreateCidrCollection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*CreateCidrCollectionInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/cidrcollection")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
restEncoder.SetHeader("Content-Type").String("application/xml")
xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CreateCidrCollectionRequest",
},
Attr: rootAttr,
}
root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/"))
if err := awsRestxml_serializeOpDocumentCreateCidrCollectionInput(input, xmlEncoder.RootElement(root)); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsCreateCidrCollectionInput(v *CreateCidrCollectionInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
return nil
}
func awsRestxml_serializeOpDocumentCreateCidrCollectionInput(v *CreateCidrCollectionInput, value smithyxml.Value) error {
defer value.Close()
if v.CallerReference != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CallerReference",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.CallerReference)
}
if v.Name != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Name",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.Name)
}
return nil
}
type awsRestxml_serializeOpCreateHealthCheck struct {
}
func (*awsRestxml_serializeOpCreateHealthCheck) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpCreateHealthCheck) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*CreateHealthCheckInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
restEncoder.SetHeader("Content-Type").String("application/xml")
xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CreateHealthCheckRequest",
},
Attr: rootAttr,
}
root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/"))
if err := awsRestxml_serializeOpDocumentCreateHealthCheckInput(input, xmlEncoder.RootElement(root)); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsCreateHealthCheckInput(v *CreateHealthCheckInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
return nil
}
func awsRestxml_serializeOpDocumentCreateHealthCheckInput(v *CreateHealthCheckInput, value smithyxml.Value) error {
defer value.Close()
if v.CallerReference != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CallerReference",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.CallerReference)
}
if v.HealthCheckConfig != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "HealthCheckConfig",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
if err := awsRestxml_serializeDocumentHealthCheckConfig(v.HealthCheckConfig, el); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpCreateHostedZone struct {
}
func (*awsRestxml_serializeOpCreateHostedZone) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpCreateHostedZone) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*CreateHostedZoneInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
restEncoder.SetHeader("Content-Type").String("application/xml")
xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CreateHostedZoneRequest",
},
Attr: rootAttr,
}
root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/"))
if err := awsRestxml_serializeOpDocumentCreateHostedZoneInput(input, xmlEncoder.RootElement(root)); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsCreateHostedZoneInput(v *CreateHostedZoneInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
return nil
}
func awsRestxml_serializeOpDocumentCreateHostedZoneInput(v *CreateHostedZoneInput, value smithyxml.Value) error {
defer value.Close()
if v.CallerReference != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CallerReference",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.CallerReference)
}
if v.DelegationSetId != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "DelegationSetId",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.DelegationSetId)
}
if v.HostedZoneConfig != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "HostedZoneConfig",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
if err := awsRestxml_serializeDocumentHostedZoneConfig(v.HostedZoneConfig, el); err != nil {
return err
}
}
if v.Name != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Name",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.Name)
}
if v.VPC != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "VPC",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
if err := awsRestxml_serializeDocumentVPC(v.VPC, el); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpCreateKeySigningKey struct {
}
func (*awsRestxml_serializeOpCreateKeySigningKey) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpCreateKeySigningKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*CreateKeySigningKeyInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/keysigningkey")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
restEncoder.SetHeader("Content-Type").String("application/xml")
xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CreateKeySigningKeyRequest",
},
Attr: rootAttr,
}
root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/"))
if err := awsRestxml_serializeOpDocumentCreateKeySigningKeyInput(input, xmlEncoder.RootElement(root)); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsCreateKeySigningKeyInput(v *CreateKeySigningKeyInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
return nil
}
func awsRestxml_serializeOpDocumentCreateKeySigningKeyInput(v *CreateKeySigningKeyInput, value smithyxml.Value) error {
defer value.Close()
if v.CallerReference != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CallerReference",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.CallerReference)
}
if v.HostedZoneId != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "HostedZoneId",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.HostedZoneId)
}
if v.KeyManagementServiceArn != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "KeyManagementServiceArn",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.KeyManagementServiceArn)
}
if v.Name != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Name",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.Name)
}
if v.Status != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Status",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.Status)
}
return nil
}
type awsRestxml_serializeOpCreateQueryLoggingConfig struct {
}
func (*awsRestxml_serializeOpCreateQueryLoggingConfig) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpCreateQueryLoggingConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*CreateQueryLoggingConfigInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/queryloggingconfig")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
restEncoder.SetHeader("Content-Type").String("application/xml")
xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CreateQueryLoggingConfigRequest",
},
Attr: rootAttr,
}
root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/"))
if err := awsRestxml_serializeOpDocumentCreateQueryLoggingConfigInput(input, xmlEncoder.RootElement(root)); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsCreateQueryLoggingConfigInput(v *CreateQueryLoggingConfigInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
return nil
}
func awsRestxml_serializeOpDocumentCreateQueryLoggingConfigInput(v *CreateQueryLoggingConfigInput, value smithyxml.Value) error {
defer value.Close()
if v.CloudWatchLogsLogGroupArn != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CloudWatchLogsLogGroupArn",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.CloudWatchLogsLogGroupArn)
}
if v.HostedZoneId != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "HostedZoneId",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.HostedZoneId)
}
return nil
}
type awsRestxml_serializeOpCreateReusableDelegationSet struct {
}
func (*awsRestxml_serializeOpCreateReusableDelegationSet) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpCreateReusableDelegationSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*CreateReusableDelegationSetInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/delegationset")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
restEncoder.SetHeader("Content-Type").String("application/xml")
xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CreateReusableDelegationSetRequest",
},
Attr: rootAttr,
}
root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/"))
if err := awsRestxml_serializeOpDocumentCreateReusableDelegationSetInput(input, xmlEncoder.RootElement(root)); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsCreateReusableDelegationSetInput(v *CreateReusableDelegationSetInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
return nil
}
func awsRestxml_serializeOpDocumentCreateReusableDelegationSetInput(v *CreateReusableDelegationSetInput, value smithyxml.Value) error {
defer value.Close()
if v.CallerReference != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CallerReference",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.CallerReference)
}
if v.HostedZoneId != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "HostedZoneId",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.HostedZoneId)
}
return nil
}
type awsRestxml_serializeOpCreateTrafficPolicy struct {
}
func (*awsRestxml_serializeOpCreateTrafficPolicy) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpCreateTrafficPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*CreateTrafficPolicyInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicy")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
restEncoder.SetHeader("Content-Type").String("application/xml")
xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CreateTrafficPolicyRequest",
},
Attr: rootAttr,
}
root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/"))
if err := awsRestxml_serializeOpDocumentCreateTrafficPolicyInput(input, xmlEncoder.RootElement(root)); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsCreateTrafficPolicyInput(v *CreateTrafficPolicyInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
return nil
}
func awsRestxml_serializeOpDocumentCreateTrafficPolicyInput(v *CreateTrafficPolicyInput, value smithyxml.Value) error {
defer value.Close()
if v.Comment != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Comment",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.Comment)
}
if v.Document != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Document",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.Document)
}
if v.Name != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Name",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.Name)
}
return nil
}
type awsRestxml_serializeOpCreateTrafficPolicyInstance struct {
}
func (*awsRestxml_serializeOpCreateTrafficPolicyInstance) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpCreateTrafficPolicyInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*CreateTrafficPolicyInstanceInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstance")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
restEncoder.SetHeader("Content-Type").String("application/xml")
xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CreateTrafficPolicyInstanceRequest",
},
Attr: rootAttr,
}
root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/"))
if err := awsRestxml_serializeOpDocumentCreateTrafficPolicyInstanceInput(input, xmlEncoder.RootElement(root)); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsCreateTrafficPolicyInstanceInput(v *CreateTrafficPolicyInstanceInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
return nil
}
func awsRestxml_serializeOpDocumentCreateTrafficPolicyInstanceInput(v *CreateTrafficPolicyInstanceInput, value smithyxml.Value) error {
defer value.Close()
if v.HostedZoneId != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "HostedZoneId",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.HostedZoneId)
}
if v.Name != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Name",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.Name)
}
if v.TrafficPolicyId != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "TrafficPolicyId",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.TrafficPolicyId)
}
if v.TrafficPolicyVersion != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "TrafficPolicyVersion",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.Integer(*v.TrafficPolicyVersion)
}
if v.TTL != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "TTL",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.Long(*v.TTL)
}
return nil
}
type awsRestxml_serializeOpCreateTrafficPolicyVersion struct {
}
func (*awsRestxml_serializeOpCreateTrafficPolicyVersion) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpCreateTrafficPolicyVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*CreateTrafficPolicyVersionInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicy/{Id}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsCreateTrafficPolicyVersionInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
restEncoder.SetHeader("Content-Type").String("application/xml")
xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CreateTrafficPolicyVersionRequest",
},
Attr: rootAttr,
}
root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/"))
if err := awsRestxml_serializeOpDocumentCreateTrafficPolicyVersionInput(input, xmlEncoder.RootElement(root)); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsCreateTrafficPolicyVersionInput(v *CreateTrafficPolicyVersionInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Id == nil || len(*v.Id) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
}
if v.Id != nil {
if err := encoder.SetURI("Id").String(*v.Id); err != nil {
return err
}
}
return nil
}
func awsRestxml_serializeOpDocumentCreateTrafficPolicyVersionInput(v *CreateTrafficPolicyVersionInput, value smithyxml.Value) error {
defer value.Close()
if v.Comment != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Comment",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.Comment)
}
if v.Document != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Document",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.Document)
}
return nil
}
type awsRestxml_serializeOpCreateVPCAssociationAuthorization struct {
}
func (*awsRestxml_serializeOpCreateVPCAssociationAuthorization) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpCreateVPCAssociationAuthorization) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*CreateVPCAssociationAuthorizationInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsCreateVPCAssociationAuthorizationInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
restEncoder.SetHeader("Content-Type").String("application/xml")
xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CreateVPCAssociationAuthorizationRequest",
},
Attr: rootAttr,
}
root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/"))
if err := awsRestxml_serializeOpDocumentCreateVPCAssociationAuthorizationInput(input, xmlEncoder.RootElement(root)); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsCreateVPCAssociationAuthorizationInput(v *CreateVPCAssociationAuthorizationInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")}
}
if v.HostedZoneId != nil {
if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil {
return err
}
}
return nil
}
func awsRestxml_serializeOpDocumentCreateVPCAssociationAuthorizationInput(v *CreateVPCAssociationAuthorizationInput, value smithyxml.Value) error {
defer value.Close()
if v.VPC != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "VPC",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
if err := awsRestxml_serializeDocumentVPC(v.VPC, el); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpDeactivateKeySigningKey struct {
}
func (*awsRestxml_serializeOpDeactivateKeySigningKey) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpDeactivateKeySigningKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*DeactivateKeySigningKeyInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/deactivate")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsDeactivateKeySigningKeyInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsDeactivateKeySigningKeyInput(v *DeactivateKeySigningKeyInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")}
}
if v.HostedZoneId != nil {
if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil {
return err
}
}
if v.Name == nil || len(*v.Name) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
}
if v.Name != nil {
if err := encoder.SetURI("Name").String(*v.Name); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpDeleteCidrCollection struct {
}
func (*awsRestxml_serializeOpDeleteCidrCollection) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpDeleteCidrCollection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*DeleteCidrCollectionInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/cidrcollection/{Id}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "DELETE"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsDeleteCidrCollectionInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsDeleteCidrCollectionInput(v *DeleteCidrCollectionInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Id == nil || len(*v.Id) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
}
if v.Id != nil {
if err := encoder.SetURI("Id").String(*v.Id); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpDeleteHealthCheck struct {
}
func (*awsRestxml_serializeOpDeleteHealthCheck) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpDeleteHealthCheck) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*DeleteHealthCheckInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck/{HealthCheckId}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "DELETE"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsDeleteHealthCheckInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsDeleteHealthCheckInput(v *DeleteHealthCheckInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.HealthCheckId == nil || len(*v.HealthCheckId) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member HealthCheckId must not be empty")}
}
if v.HealthCheckId != nil {
if err := encoder.SetURI("HealthCheckId").String(*v.HealthCheckId); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpDeleteHostedZone struct {
}
func (*awsRestxml_serializeOpDeleteHostedZone) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpDeleteHostedZone) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*DeleteHostedZoneInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{Id}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "DELETE"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsDeleteHostedZoneInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsDeleteHostedZoneInput(v *DeleteHostedZoneInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Id == nil || len(*v.Id) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
}
if v.Id != nil {
if err := encoder.SetURI("Id").String(*v.Id); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpDeleteKeySigningKey struct {
}
func (*awsRestxml_serializeOpDeleteKeySigningKey) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpDeleteKeySigningKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*DeleteKeySigningKeyInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "DELETE"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsDeleteKeySigningKeyInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsDeleteKeySigningKeyInput(v *DeleteKeySigningKeyInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")}
}
if v.HostedZoneId != nil {
if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil {
return err
}
}
if v.Name == nil || len(*v.Name) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
}
if v.Name != nil {
if err := encoder.SetURI("Name").String(*v.Name); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpDeleteQueryLoggingConfig struct {
}
func (*awsRestxml_serializeOpDeleteQueryLoggingConfig) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpDeleteQueryLoggingConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*DeleteQueryLoggingConfigInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/queryloggingconfig/{Id}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "DELETE"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsDeleteQueryLoggingConfigInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsDeleteQueryLoggingConfigInput(v *DeleteQueryLoggingConfigInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Id == nil || len(*v.Id) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
}
if v.Id != nil {
if err := encoder.SetURI("Id").String(*v.Id); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpDeleteReusableDelegationSet struct {
}
func (*awsRestxml_serializeOpDeleteReusableDelegationSet) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpDeleteReusableDelegationSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*DeleteReusableDelegationSetInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/delegationset/{Id}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "DELETE"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsDeleteReusableDelegationSetInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsDeleteReusableDelegationSetInput(v *DeleteReusableDelegationSetInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Id == nil || len(*v.Id) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
}
if v.Id != nil {
if err := encoder.SetURI("Id").String(*v.Id); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpDeleteTrafficPolicy struct {
}
func (*awsRestxml_serializeOpDeleteTrafficPolicy) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpDeleteTrafficPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*DeleteTrafficPolicyInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicy/{Id}/{Version}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "DELETE"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsDeleteTrafficPolicyInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsDeleteTrafficPolicyInput(v *DeleteTrafficPolicyInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Id == nil || len(*v.Id) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
}
if v.Id != nil {
if err := encoder.SetURI("Id").String(*v.Id); err != nil {
return err
}
}
if v.Version == nil {
return &smithy.SerializationError{Err: fmt.Errorf("input member Version must not be empty")}
}
if v.Version != nil {
if err := encoder.SetURI("Version").Integer(*v.Version); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpDeleteTrafficPolicyInstance struct {
}
func (*awsRestxml_serializeOpDeleteTrafficPolicyInstance) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpDeleteTrafficPolicyInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*DeleteTrafficPolicyInstanceInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstance/{Id}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "DELETE"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsDeleteTrafficPolicyInstanceInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsDeleteTrafficPolicyInstanceInput(v *DeleteTrafficPolicyInstanceInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Id == nil || len(*v.Id) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
}
if v.Id != nil {
if err := encoder.SetURI("Id").String(*v.Id); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpDeleteVPCAssociationAuthorization struct {
}
func (*awsRestxml_serializeOpDeleteVPCAssociationAuthorization) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpDeleteVPCAssociationAuthorization) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*DeleteVPCAssociationAuthorizationInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/deauthorizevpcassociation")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsDeleteVPCAssociationAuthorizationInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
restEncoder.SetHeader("Content-Type").String("application/xml")
xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "DeleteVPCAssociationAuthorizationRequest",
},
Attr: rootAttr,
}
root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/"))
if err := awsRestxml_serializeOpDocumentDeleteVPCAssociationAuthorizationInput(input, xmlEncoder.RootElement(root)); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsDeleteVPCAssociationAuthorizationInput(v *DeleteVPCAssociationAuthorizationInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")}
}
if v.HostedZoneId != nil {
if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil {
return err
}
}
return nil
}
func awsRestxml_serializeOpDocumentDeleteVPCAssociationAuthorizationInput(v *DeleteVPCAssociationAuthorizationInput, value smithyxml.Value) error {
defer value.Close()
if v.VPC != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "VPC",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
if err := awsRestxml_serializeDocumentVPC(v.VPC, el); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpDisableHostedZoneDNSSEC struct {
}
func (*awsRestxml_serializeOpDisableHostedZoneDNSSEC) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpDisableHostedZoneDNSSEC) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*DisableHostedZoneDNSSECInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/disable-dnssec")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsDisableHostedZoneDNSSECInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsDisableHostedZoneDNSSECInput(v *DisableHostedZoneDNSSECInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")}
}
if v.HostedZoneId != nil {
if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpDisassociateVPCFromHostedZone struct {
}
func (*awsRestxml_serializeOpDisassociateVPCFromHostedZone) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpDisassociateVPCFromHostedZone) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*DisassociateVPCFromHostedZoneInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/disassociatevpc")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsDisassociateVPCFromHostedZoneInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
restEncoder.SetHeader("Content-Type").String("application/xml")
xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "DisassociateVPCFromHostedZoneRequest",
},
Attr: rootAttr,
}
root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/"))
if err := awsRestxml_serializeOpDocumentDisassociateVPCFromHostedZoneInput(input, xmlEncoder.RootElement(root)); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsDisassociateVPCFromHostedZoneInput(v *DisassociateVPCFromHostedZoneInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")}
}
if v.HostedZoneId != nil {
if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil {
return err
}
}
return nil
}
func awsRestxml_serializeOpDocumentDisassociateVPCFromHostedZoneInput(v *DisassociateVPCFromHostedZoneInput, value smithyxml.Value) error {
defer value.Close()
if v.Comment != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Comment",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.Comment)
}
if v.VPC != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "VPC",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
if err := awsRestxml_serializeDocumentVPC(v.VPC, el); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpEnableHostedZoneDNSSEC struct {
}
func (*awsRestxml_serializeOpEnableHostedZoneDNSSEC) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpEnableHostedZoneDNSSEC) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*EnableHostedZoneDNSSECInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/enable-dnssec")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsEnableHostedZoneDNSSECInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsEnableHostedZoneDNSSECInput(v *EnableHostedZoneDNSSECInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")}
}
if v.HostedZoneId != nil {
if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpGetAccountLimit struct {
}
func (*awsRestxml_serializeOpGetAccountLimit) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpGetAccountLimit) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*GetAccountLimitInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/accountlimit/{Type}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsGetAccountLimitInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsGetAccountLimitInput(v *GetAccountLimitInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if len(v.Type) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Type must not be empty")}
}
if len(v.Type) > 0 {
if err := encoder.SetURI("Type").String(string(v.Type)); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpGetChange struct {
}
func (*awsRestxml_serializeOpGetChange) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpGetChange) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*GetChangeInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/change/{Id}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsGetChangeInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsGetChangeInput(v *GetChangeInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Id == nil || len(*v.Id) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
}
if v.Id != nil {
if err := encoder.SetURI("Id").String(*v.Id); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpGetCheckerIpRanges struct {
}
func (*awsRestxml_serializeOpGetCheckerIpRanges) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpGetCheckerIpRanges) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*GetCheckerIpRangesInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/checkeripranges")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsGetCheckerIpRangesInput(v *GetCheckerIpRangesInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
return nil
}
type awsRestxml_serializeOpGetDNSSEC struct {
}
func (*awsRestxml_serializeOpGetDNSSEC) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpGetDNSSEC) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*GetDNSSECInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/dnssec")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsGetDNSSECInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsGetDNSSECInput(v *GetDNSSECInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")}
}
if v.HostedZoneId != nil {
if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpGetGeoLocation struct {
}
func (*awsRestxml_serializeOpGetGeoLocation) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpGetGeoLocation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*GetGeoLocationInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/geolocation")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsGetGeoLocationInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsGetGeoLocationInput(v *GetGeoLocationInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.ContinentCode != nil {
encoder.SetQuery("continentcode").String(*v.ContinentCode)
}
if v.CountryCode != nil {
encoder.SetQuery("countrycode").String(*v.CountryCode)
}
if v.SubdivisionCode != nil {
encoder.SetQuery("subdivisioncode").String(*v.SubdivisionCode)
}
return nil
}
type awsRestxml_serializeOpGetHealthCheck struct {
}
func (*awsRestxml_serializeOpGetHealthCheck) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpGetHealthCheck) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*GetHealthCheckInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck/{HealthCheckId}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsGetHealthCheckInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsGetHealthCheckInput(v *GetHealthCheckInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.HealthCheckId == nil || len(*v.HealthCheckId) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member HealthCheckId must not be empty")}
}
if v.HealthCheckId != nil {
if err := encoder.SetURI("HealthCheckId").String(*v.HealthCheckId); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpGetHealthCheckCount struct {
}
func (*awsRestxml_serializeOpGetHealthCheckCount) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpGetHealthCheckCount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*GetHealthCheckCountInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheckcount")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsGetHealthCheckCountInput(v *GetHealthCheckCountInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
return nil
}
type awsRestxml_serializeOpGetHealthCheckLastFailureReason struct {
}
func (*awsRestxml_serializeOpGetHealthCheckLastFailureReason) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpGetHealthCheckLastFailureReason) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*GetHealthCheckLastFailureReasonInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck/{HealthCheckId}/lastfailurereason")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsGetHealthCheckLastFailureReasonInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsGetHealthCheckLastFailureReasonInput(v *GetHealthCheckLastFailureReasonInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.HealthCheckId == nil || len(*v.HealthCheckId) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member HealthCheckId must not be empty")}
}
if v.HealthCheckId != nil {
if err := encoder.SetURI("HealthCheckId").String(*v.HealthCheckId); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpGetHealthCheckStatus struct {
}
func (*awsRestxml_serializeOpGetHealthCheckStatus) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpGetHealthCheckStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*GetHealthCheckStatusInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck/{HealthCheckId}/status")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsGetHealthCheckStatusInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsGetHealthCheckStatusInput(v *GetHealthCheckStatusInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.HealthCheckId == nil || len(*v.HealthCheckId) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member HealthCheckId must not be empty")}
}
if v.HealthCheckId != nil {
if err := encoder.SetURI("HealthCheckId").String(*v.HealthCheckId); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpGetHostedZone struct {
}
func (*awsRestxml_serializeOpGetHostedZone) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpGetHostedZone) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*GetHostedZoneInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{Id}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsGetHostedZoneInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsGetHostedZoneInput(v *GetHostedZoneInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Id == nil || len(*v.Id) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
}
if v.Id != nil {
if err := encoder.SetURI("Id").String(*v.Id); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpGetHostedZoneCount struct {
}
func (*awsRestxml_serializeOpGetHostedZoneCount) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpGetHostedZoneCount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*GetHostedZoneCountInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzonecount")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsGetHostedZoneCountInput(v *GetHostedZoneCountInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
return nil
}
type awsRestxml_serializeOpGetHostedZoneLimit struct {
}
func (*awsRestxml_serializeOpGetHostedZoneLimit) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpGetHostedZoneLimit) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*GetHostedZoneLimitInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzonelimit/{HostedZoneId}/{Type}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsGetHostedZoneLimitInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsGetHostedZoneLimitInput(v *GetHostedZoneLimitInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")}
}
if v.HostedZoneId != nil {
if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil {
return err
}
}
if len(v.Type) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Type must not be empty")}
}
if len(v.Type) > 0 {
if err := encoder.SetURI("Type").String(string(v.Type)); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpGetQueryLoggingConfig struct {
}
func (*awsRestxml_serializeOpGetQueryLoggingConfig) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpGetQueryLoggingConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*GetQueryLoggingConfigInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/queryloggingconfig/{Id}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsGetQueryLoggingConfigInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsGetQueryLoggingConfigInput(v *GetQueryLoggingConfigInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Id == nil || len(*v.Id) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
}
if v.Id != nil {
if err := encoder.SetURI("Id").String(*v.Id); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpGetReusableDelegationSet struct {
}
func (*awsRestxml_serializeOpGetReusableDelegationSet) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpGetReusableDelegationSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*GetReusableDelegationSetInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/delegationset/{Id}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsGetReusableDelegationSetInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsGetReusableDelegationSetInput(v *GetReusableDelegationSetInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Id == nil || len(*v.Id) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
}
if v.Id != nil {
if err := encoder.SetURI("Id").String(*v.Id); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpGetReusableDelegationSetLimit struct {
}
func (*awsRestxml_serializeOpGetReusableDelegationSetLimit) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpGetReusableDelegationSetLimit) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*GetReusableDelegationSetLimitInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/reusabledelegationsetlimit/{DelegationSetId}/{Type}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsGetReusableDelegationSetLimitInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsGetReusableDelegationSetLimitInput(v *GetReusableDelegationSetLimitInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.DelegationSetId == nil || len(*v.DelegationSetId) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member DelegationSetId must not be empty")}
}
if v.DelegationSetId != nil {
if err := encoder.SetURI("DelegationSetId").String(*v.DelegationSetId); err != nil {
return err
}
}
if len(v.Type) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Type must not be empty")}
}
if len(v.Type) > 0 {
if err := encoder.SetURI("Type").String(string(v.Type)); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpGetTrafficPolicy struct {
}
func (*awsRestxml_serializeOpGetTrafficPolicy) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpGetTrafficPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*GetTrafficPolicyInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicy/{Id}/{Version}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsGetTrafficPolicyInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsGetTrafficPolicyInput(v *GetTrafficPolicyInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Id == nil || len(*v.Id) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
}
if v.Id != nil {
if err := encoder.SetURI("Id").String(*v.Id); err != nil {
return err
}
}
if v.Version == nil {
return &smithy.SerializationError{Err: fmt.Errorf("input member Version must not be empty")}
}
if v.Version != nil {
if err := encoder.SetURI("Version").Integer(*v.Version); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpGetTrafficPolicyInstance struct {
}
func (*awsRestxml_serializeOpGetTrafficPolicyInstance) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpGetTrafficPolicyInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*GetTrafficPolicyInstanceInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstance/{Id}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsGetTrafficPolicyInstanceInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsGetTrafficPolicyInstanceInput(v *GetTrafficPolicyInstanceInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Id == nil || len(*v.Id) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
}
if v.Id != nil {
if err := encoder.SetURI("Id").String(*v.Id); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpGetTrafficPolicyInstanceCount struct {
}
func (*awsRestxml_serializeOpGetTrafficPolicyInstanceCount) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpGetTrafficPolicyInstanceCount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*GetTrafficPolicyInstanceCountInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstancecount")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsGetTrafficPolicyInstanceCountInput(v *GetTrafficPolicyInstanceCountInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
return nil
}
type awsRestxml_serializeOpListCidrBlocks struct {
}
func (*awsRestxml_serializeOpListCidrBlocks) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpListCidrBlocks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*ListCidrBlocksInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/cidrcollection/{CollectionId}/cidrblocks")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsListCidrBlocksInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsListCidrBlocksInput(v *ListCidrBlocksInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.CollectionId == nil || len(*v.CollectionId) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member CollectionId must not be empty")}
}
if v.CollectionId != nil {
if err := encoder.SetURI("CollectionId").String(*v.CollectionId); err != nil {
return err
}
}
if v.LocationName != nil {
encoder.SetQuery("location").String(*v.LocationName)
}
if v.MaxResults != nil {
encoder.SetQuery("maxresults").Integer(*v.MaxResults)
}
if v.NextToken != nil {
encoder.SetQuery("nexttoken").String(*v.NextToken)
}
return nil
}
type awsRestxml_serializeOpListCidrCollections struct {
}
func (*awsRestxml_serializeOpListCidrCollections) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpListCidrCollections) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*ListCidrCollectionsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/cidrcollection")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsListCidrCollectionsInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsListCidrCollectionsInput(v *ListCidrCollectionsInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.MaxResults != nil {
encoder.SetQuery("maxresults").Integer(*v.MaxResults)
}
if v.NextToken != nil {
encoder.SetQuery("nexttoken").String(*v.NextToken)
}
return nil
}
type awsRestxml_serializeOpListCidrLocations struct {
}
func (*awsRestxml_serializeOpListCidrLocations) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpListCidrLocations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*ListCidrLocationsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/cidrcollection/{CollectionId}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsListCidrLocationsInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsListCidrLocationsInput(v *ListCidrLocationsInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.CollectionId == nil || len(*v.CollectionId) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member CollectionId must not be empty")}
}
if v.CollectionId != nil {
if err := encoder.SetURI("CollectionId").String(*v.CollectionId); err != nil {
return err
}
}
if v.MaxResults != nil {
encoder.SetQuery("maxresults").Integer(*v.MaxResults)
}
if v.NextToken != nil {
encoder.SetQuery("nexttoken").String(*v.NextToken)
}
return nil
}
type awsRestxml_serializeOpListGeoLocations struct {
}
func (*awsRestxml_serializeOpListGeoLocations) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpListGeoLocations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*ListGeoLocationsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/geolocations")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsListGeoLocationsInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsListGeoLocationsInput(v *ListGeoLocationsInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.MaxItems != nil {
encoder.SetQuery("maxitems").Integer(*v.MaxItems)
}
if v.StartContinentCode != nil {
encoder.SetQuery("startcontinentcode").String(*v.StartContinentCode)
}
if v.StartCountryCode != nil {
encoder.SetQuery("startcountrycode").String(*v.StartCountryCode)
}
if v.StartSubdivisionCode != nil {
encoder.SetQuery("startsubdivisioncode").String(*v.StartSubdivisionCode)
}
return nil
}
type awsRestxml_serializeOpListHealthChecks struct {
}
func (*awsRestxml_serializeOpListHealthChecks) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpListHealthChecks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*ListHealthChecksInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsListHealthChecksInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsListHealthChecksInput(v *ListHealthChecksInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Marker != nil {
encoder.SetQuery("marker").String(*v.Marker)
}
if v.MaxItems != nil {
encoder.SetQuery("maxitems").Integer(*v.MaxItems)
}
return nil
}
type awsRestxml_serializeOpListHostedZones struct {
}
func (*awsRestxml_serializeOpListHostedZones) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpListHostedZones) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*ListHostedZonesInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsListHostedZonesInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsListHostedZonesInput(v *ListHostedZonesInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.DelegationSetId != nil {
encoder.SetQuery("delegationsetid").String(*v.DelegationSetId)
}
if v.Marker != nil {
encoder.SetQuery("marker").String(*v.Marker)
}
if v.MaxItems != nil {
encoder.SetQuery("maxitems").Integer(*v.MaxItems)
}
return nil
}
type awsRestxml_serializeOpListHostedZonesByName struct {
}
func (*awsRestxml_serializeOpListHostedZonesByName) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpListHostedZonesByName) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*ListHostedZonesByNameInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzonesbyname")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsListHostedZonesByNameInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsListHostedZonesByNameInput(v *ListHostedZonesByNameInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.DNSName != nil {
encoder.SetQuery("dnsname").String(*v.DNSName)
}
if v.HostedZoneId != nil {
encoder.SetQuery("hostedzoneid").String(*v.HostedZoneId)
}
if v.MaxItems != nil {
encoder.SetQuery("maxitems").Integer(*v.MaxItems)
}
return nil
}
type awsRestxml_serializeOpListHostedZonesByVPC struct {
}
func (*awsRestxml_serializeOpListHostedZonesByVPC) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpListHostedZonesByVPC) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*ListHostedZonesByVPCInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzonesbyvpc")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsListHostedZonesByVPCInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsListHostedZonesByVPCInput(v *ListHostedZonesByVPCInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.MaxItems != nil {
encoder.SetQuery("maxitems").Integer(*v.MaxItems)
}
if v.NextToken != nil {
encoder.SetQuery("nexttoken").String(*v.NextToken)
}
if v.VPCId != nil {
encoder.SetQuery("vpcid").String(*v.VPCId)
}
if len(v.VPCRegion) > 0 {
encoder.SetQuery("vpcregion").String(string(v.VPCRegion))
}
return nil
}
type awsRestxml_serializeOpListQueryLoggingConfigs struct {
}
func (*awsRestxml_serializeOpListQueryLoggingConfigs) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpListQueryLoggingConfigs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*ListQueryLoggingConfigsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/queryloggingconfig")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsListQueryLoggingConfigsInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsListQueryLoggingConfigsInput(v *ListQueryLoggingConfigsInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.HostedZoneId != nil {
encoder.SetQuery("hostedzoneid").String(*v.HostedZoneId)
}
if v.MaxResults != nil {
encoder.SetQuery("maxresults").Integer(*v.MaxResults)
}
if v.NextToken != nil {
encoder.SetQuery("nexttoken").String(*v.NextToken)
}
return nil
}
type awsRestxml_serializeOpListResourceRecordSets struct {
}
func (*awsRestxml_serializeOpListResourceRecordSets) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpListResourceRecordSets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*ListResourceRecordSetsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/rrset")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsListResourceRecordSetsInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsListResourceRecordSetsInput(v *ListResourceRecordSetsInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")}
}
if v.HostedZoneId != nil {
if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil {
return err
}
}
if v.MaxItems != nil {
encoder.SetQuery("maxitems").Integer(*v.MaxItems)
}
if v.StartRecordIdentifier != nil {
encoder.SetQuery("identifier").String(*v.StartRecordIdentifier)
}
if v.StartRecordName != nil {
encoder.SetQuery("name").String(*v.StartRecordName)
}
if len(v.StartRecordType) > 0 {
encoder.SetQuery("type").String(string(v.StartRecordType))
}
return nil
}
type awsRestxml_serializeOpListReusableDelegationSets struct {
}
func (*awsRestxml_serializeOpListReusableDelegationSets) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpListReusableDelegationSets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*ListReusableDelegationSetsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/delegationset")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsListReusableDelegationSetsInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsListReusableDelegationSetsInput(v *ListReusableDelegationSetsInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Marker != nil {
encoder.SetQuery("marker").String(*v.Marker)
}
if v.MaxItems != nil {
encoder.SetQuery("maxitems").Integer(*v.MaxItems)
}
return nil
}
type awsRestxml_serializeOpListTagsForResource struct {
}
func (*awsRestxml_serializeOpListTagsForResource) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*ListTagsForResourceInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/tags/{ResourceType}/{ResourceId}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.ResourceId == nil || len(*v.ResourceId) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceId must not be empty")}
}
if v.ResourceId != nil {
if err := encoder.SetURI("ResourceId").String(*v.ResourceId); err != nil {
return err
}
}
if len(v.ResourceType) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceType must not be empty")}
}
if len(v.ResourceType) > 0 {
if err := encoder.SetURI("ResourceType").String(string(v.ResourceType)); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpListTagsForResources struct {
}
func (*awsRestxml_serializeOpListTagsForResources) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpListTagsForResources) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*ListTagsForResourcesInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/tags/{ResourceType}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsListTagsForResourcesInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
restEncoder.SetHeader("Content-Type").String("application/xml")
xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ListTagsForResourcesRequest",
},
Attr: rootAttr,
}
root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/"))
if err := awsRestxml_serializeOpDocumentListTagsForResourcesInput(input, xmlEncoder.RootElement(root)); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsListTagsForResourcesInput(v *ListTagsForResourcesInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if len(v.ResourceType) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceType must not be empty")}
}
if len(v.ResourceType) > 0 {
if err := encoder.SetURI("ResourceType").String(string(v.ResourceType)); err != nil {
return err
}
}
return nil
}
func awsRestxml_serializeOpDocumentListTagsForResourcesInput(v *ListTagsForResourcesInput, value smithyxml.Value) error {
defer value.Close()
if v.ResourceIds != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ResourceIds",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
if err := awsRestxml_serializeDocumentTagResourceIdList(v.ResourceIds, el); err != nil {
return err
}
}
return nil
}
type awsRestxml_serializeOpListTrafficPolicies struct {
}
func (*awsRestxml_serializeOpListTrafficPolicies) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpListTrafficPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*ListTrafficPoliciesInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicies")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsListTrafficPoliciesInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsListTrafficPoliciesInput(v *ListTrafficPoliciesInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.MaxItems != nil {
encoder.SetQuery("maxitems").Integer(*v.MaxItems)
}
if v.TrafficPolicyIdMarker != nil {
encoder.SetQuery("trafficpolicyid").String(*v.TrafficPolicyIdMarker)
}
return nil
}
type awsRestxml_serializeOpListTrafficPolicyInstances struct {
}
func (*awsRestxml_serializeOpListTrafficPolicyInstances) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpListTrafficPolicyInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*ListTrafficPolicyInstancesInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstances")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsListTrafficPolicyInstancesInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsListTrafficPolicyInstancesInput(v *ListTrafficPolicyInstancesInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.HostedZoneIdMarker != nil {
encoder.SetQuery("hostedzoneid").String(*v.HostedZoneIdMarker)
}
if v.MaxItems != nil {
encoder.SetQuery("maxitems").Integer(*v.MaxItems)
}
if v.TrafficPolicyInstanceNameMarker != nil {
encoder.SetQuery("trafficpolicyinstancename").String(*v.TrafficPolicyInstanceNameMarker)
}
if len(v.TrafficPolicyInstanceTypeMarker) > 0 {
encoder.SetQuery("trafficpolicyinstancetype").String(string(v.TrafficPolicyInstanceTypeMarker))
}
return nil
}
type awsRestxml_serializeOpListTrafficPolicyInstancesByHostedZone struct {
}
func (*awsRestxml_serializeOpListTrafficPolicyInstancesByHostedZone) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpListTrafficPolicyInstancesByHostedZone) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*ListTrafficPolicyInstancesByHostedZoneInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstances/hostedzone")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsListTrafficPolicyInstancesByHostedZoneInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsListTrafficPolicyInstancesByHostedZoneInput(v *ListTrafficPolicyInstancesByHostedZoneInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.HostedZoneId != nil {
encoder.SetQuery("id").String(*v.HostedZoneId)
}
if v.MaxItems != nil {
encoder.SetQuery("maxitems").Integer(*v.MaxItems)
}
if v.TrafficPolicyInstanceNameMarker != nil {
encoder.SetQuery("trafficpolicyinstancename").String(*v.TrafficPolicyInstanceNameMarker)
}
if len(v.TrafficPolicyInstanceTypeMarker) > 0 {
encoder.SetQuery("trafficpolicyinstancetype").String(string(v.TrafficPolicyInstanceTypeMarker))
}
return nil
}
type awsRestxml_serializeOpListTrafficPolicyInstancesByPolicy struct {
}
func (*awsRestxml_serializeOpListTrafficPolicyInstancesByPolicy) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpListTrafficPolicyInstancesByPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*ListTrafficPolicyInstancesByPolicyInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstances/trafficpolicy")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsListTrafficPolicyInstancesByPolicyInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsListTrafficPolicyInstancesByPolicyInput(v *ListTrafficPolicyInstancesByPolicyInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.HostedZoneIdMarker != nil {
encoder.SetQuery("hostedzoneid").String(*v.HostedZoneIdMarker)
}
if v.MaxItems != nil {
encoder.SetQuery("maxitems").Integer(*v.MaxItems)
}
if v.TrafficPolicyId != nil {
encoder.SetQuery("id").String(*v.TrafficPolicyId)
}
if v.TrafficPolicyInstanceNameMarker != nil {
encoder.SetQuery("trafficpolicyinstancename").String(*v.TrafficPolicyInstanceNameMarker)
}
if len(v.TrafficPolicyInstanceTypeMarker) > 0 {
encoder.SetQuery("trafficpolicyinstancetype").String(string(v.TrafficPolicyInstanceTypeMarker))
}
if v.TrafficPolicyVersion != nil {
encoder.SetQuery("version").Integer(*v.TrafficPolicyVersion)
}
return nil
}
type awsRestxml_serializeOpListTrafficPolicyVersions struct {
}
func (*awsRestxml_serializeOpListTrafficPolicyVersions) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpListTrafficPolicyVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*ListTrafficPolicyVersionsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicies/{Id}/versions")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsListTrafficPolicyVersionsInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsListTrafficPolicyVersionsInput(v *ListTrafficPolicyVersionsInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Id == nil || len(*v.Id) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
}
if v.Id != nil {
if err := encoder.SetURI("Id").String(*v.Id); err != nil {
return err
}
}
if v.MaxItems != nil {
encoder.SetQuery("maxitems").Integer(*v.MaxItems)
}
if v.TrafficPolicyVersionMarker != nil {
encoder.SetQuery("trafficpolicyversion").String(*v.TrafficPolicyVersionMarker)
}
return nil
}
type awsRestxml_serializeOpListVPCAssociationAuthorizations struct {
}
func (*awsRestxml_serializeOpListVPCAssociationAuthorizations) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpListVPCAssociationAuthorizations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*ListVPCAssociationAuthorizationsInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsListVPCAssociationAuthorizationsInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsListVPCAssociationAuthorizationsInput(v *ListVPCAssociationAuthorizationsInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")}
}
if v.HostedZoneId != nil {
if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil {
return err
}
}
if v.MaxResults != nil {
encoder.SetQuery("maxresults").Integer(*v.MaxResults)
}
if v.NextToken != nil {
encoder.SetQuery("nexttoken").String(*v.NextToken)
}
return nil
}
type awsRestxml_serializeOpTestDNSAnswer struct {
}
func (*awsRestxml_serializeOpTestDNSAnswer) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpTestDNSAnswer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*TestDNSAnswerInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/testdnsanswer")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "GET"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsTestDNSAnswerInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsTestDNSAnswerInput(v *TestDNSAnswerInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.EDNS0ClientSubnetIP != nil {
encoder.SetQuery("edns0clientsubnetip").String(*v.EDNS0ClientSubnetIP)
}
if v.EDNS0ClientSubnetMask != nil {
encoder.SetQuery("edns0clientsubnetmask").String(*v.EDNS0ClientSubnetMask)
}
if v.HostedZoneId != nil {
encoder.SetQuery("hostedzoneid").String(*v.HostedZoneId)
}
if v.RecordName != nil {
encoder.SetQuery("recordname").String(*v.RecordName)
}
if len(v.RecordType) > 0 {
encoder.SetQuery("recordtype").String(string(v.RecordType))
}
if v.ResolverIP != nil {
encoder.SetQuery("resolverip").String(*v.ResolverIP)
}
return nil
}
type awsRestxml_serializeOpUpdateHealthCheck struct {
}
func (*awsRestxml_serializeOpUpdateHealthCheck) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpUpdateHealthCheck) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*UpdateHealthCheckInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck/{HealthCheckId}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsUpdateHealthCheckInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
restEncoder.SetHeader("Content-Type").String("application/xml")
xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "UpdateHealthCheckRequest",
},
Attr: rootAttr,
}
root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/"))
if err := awsRestxml_serializeOpDocumentUpdateHealthCheckInput(input, xmlEncoder.RootElement(root)); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsUpdateHealthCheckInput(v *UpdateHealthCheckInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.HealthCheckId == nil || len(*v.HealthCheckId) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member HealthCheckId must not be empty")}
}
if v.HealthCheckId != nil {
if err := encoder.SetURI("HealthCheckId").String(*v.HealthCheckId); err != nil {
return err
}
}
return nil
}
func awsRestxml_serializeOpDocumentUpdateHealthCheckInput(v *UpdateHealthCheckInput, value smithyxml.Value) error {
defer value.Close()
if v.AlarmIdentifier != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "AlarmIdentifier",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
if err := awsRestxml_serializeDocumentAlarmIdentifier(v.AlarmIdentifier, el); err != nil {
return err
}
}
if v.ChildHealthChecks != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ChildHealthChecks",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
if err := awsRestxml_serializeDocumentChildHealthCheckList(v.ChildHealthChecks, el); err != nil {
return err
}
}
if v.Disabled != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Disabled",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.Boolean(*v.Disabled)
}
if v.EnableSNI != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "EnableSNI",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.Boolean(*v.EnableSNI)
}
if v.FailureThreshold != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "FailureThreshold",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.Integer(*v.FailureThreshold)
}
if v.FullyQualifiedDomainName != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "FullyQualifiedDomainName",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.FullyQualifiedDomainName)
}
if v.HealthCheckVersion != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "HealthCheckVersion",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.Long(*v.HealthCheckVersion)
}
if v.HealthThreshold != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "HealthThreshold",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.Integer(*v.HealthThreshold)
}
if len(v.InsufficientDataHealthStatus) > 0 {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "InsufficientDataHealthStatus",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(string(v.InsufficientDataHealthStatus))
}
if v.Inverted != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Inverted",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.Boolean(*v.Inverted)
}
if v.IPAddress != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "IPAddress",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.IPAddress)
}
if v.Port != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Port",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.Integer(*v.Port)
}
if v.Regions != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Regions",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
if err := awsRestxml_serializeDocumentHealthCheckRegionList(v.Regions, el); err != nil {
return err
}
}
if v.ResetElements != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ResetElements",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
if err := awsRestxml_serializeDocumentResettableElementNameList(v.ResetElements, el); err != nil {
return err
}
}
if v.ResourcePath != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ResourcePath",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.ResourcePath)
}
if v.SearchString != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "SearchString",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.SearchString)
}
return nil
}
type awsRestxml_serializeOpUpdateHostedZoneComment struct {
}
func (*awsRestxml_serializeOpUpdateHostedZoneComment) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpUpdateHostedZoneComment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*UpdateHostedZoneCommentInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{Id}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsUpdateHostedZoneCommentInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
restEncoder.SetHeader("Content-Type").String("application/xml")
xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "UpdateHostedZoneCommentRequest",
},
Attr: rootAttr,
}
root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/"))
if err := awsRestxml_serializeOpDocumentUpdateHostedZoneCommentInput(input, xmlEncoder.RootElement(root)); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsUpdateHostedZoneCommentInput(v *UpdateHostedZoneCommentInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Id == nil || len(*v.Id) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
}
if v.Id != nil {
if err := encoder.SetURI("Id").String(*v.Id); err != nil {
return err
}
}
return nil
}
func awsRestxml_serializeOpDocumentUpdateHostedZoneCommentInput(v *UpdateHostedZoneCommentInput, value smithyxml.Value) error {
defer value.Close()
if v.Comment != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Comment",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.Comment)
}
return nil
}
type awsRestxml_serializeOpUpdateTrafficPolicyComment struct {
}
func (*awsRestxml_serializeOpUpdateTrafficPolicyComment) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpUpdateTrafficPolicyComment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*UpdateTrafficPolicyCommentInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicy/{Id}/{Version}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsUpdateTrafficPolicyCommentInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
restEncoder.SetHeader("Content-Type").String("application/xml")
xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "UpdateTrafficPolicyCommentRequest",
},
Attr: rootAttr,
}
root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/"))
if err := awsRestxml_serializeOpDocumentUpdateTrafficPolicyCommentInput(input, xmlEncoder.RootElement(root)); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsUpdateTrafficPolicyCommentInput(v *UpdateTrafficPolicyCommentInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Id == nil || len(*v.Id) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
}
if v.Id != nil {
if err := encoder.SetURI("Id").String(*v.Id); err != nil {
return err
}
}
if v.Version == nil {
return &smithy.SerializationError{Err: fmt.Errorf("input member Version must not be empty")}
}
if v.Version != nil {
if err := encoder.SetURI("Version").Integer(*v.Version); err != nil {
return err
}
}
return nil
}
func awsRestxml_serializeOpDocumentUpdateTrafficPolicyCommentInput(v *UpdateTrafficPolicyCommentInput, value smithyxml.Value) error {
defer value.Close()
if v.Comment != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Comment",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.Comment)
}
return nil
}
type awsRestxml_serializeOpUpdateTrafficPolicyInstance struct {
}
func (*awsRestxml_serializeOpUpdateTrafficPolicyInstance) ID() string {
return "OperationSerializer"
}
func (m *awsRestxml_serializeOpUpdateTrafficPolicyInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
request, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
}
input, ok := in.Parameters.(*UpdateTrafficPolicyInstanceInput)
_ = input
if !ok {
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
}
opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstance/{Id}")
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
request.Method = "POST"
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
if err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if err := awsRestxml_serializeOpHttpBindingsUpdateTrafficPolicyInstanceInput(input, restEncoder); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
restEncoder.SetHeader("Content-Type").String("application/xml")
xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "UpdateTrafficPolicyInstanceRequest",
},
Attr: rootAttr,
}
root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/"))
if err := awsRestxml_serializeOpDocumentUpdateTrafficPolicyInstanceInput(input, xmlEncoder.RootElement(root)); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
return out, metadata, &smithy.SerializationError{Err: err}
}
in.Request = request
return next.HandleSerialize(ctx, in)
}
func awsRestxml_serializeOpHttpBindingsUpdateTrafficPolicyInstanceInput(v *UpdateTrafficPolicyInstanceInput, encoder *httpbinding.Encoder) error {
if v == nil {
return fmt.Errorf("unsupported serialization of nil %T", v)
}
if v.Id == nil || len(*v.Id) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")}
}
if v.Id != nil {
if err := encoder.SetURI("Id").String(*v.Id); err != nil {
return err
}
}
return nil
}
func awsRestxml_serializeOpDocumentUpdateTrafficPolicyInstanceInput(v *UpdateTrafficPolicyInstanceInput, value smithyxml.Value) error {
defer value.Close()
if v.TrafficPolicyId != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "TrafficPolicyId",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.TrafficPolicyId)
}
if v.TrafficPolicyVersion != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "TrafficPolicyVersion",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.Integer(*v.TrafficPolicyVersion)
}
if v.TTL != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "TTL",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.Long(*v.TTL)
}
return nil
}
func awsRestxml_serializeDocumentAlarmIdentifier(v *types.AlarmIdentifier, value smithyxml.Value) error {
defer value.Close()
if v.Name != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Name",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.Name)
}
if len(v.Region) > 0 {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Region",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(string(v.Region))
}
return nil
}
func awsRestxml_serializeDocumentAliasTarget(v *types.AliasTarget, value smithyxml.Value) error {
defer value.Close()
if v.DNSName != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "DNSName",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.DNSName)
}
{
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "EvaluateTargetHealth",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.Boolean(v.EvaluateTargetHealth)
}
if v.HostedZoneId != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "HostedZoneId",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.HostedZoneId)
}
return nil
}
func awsRestxml_serializeDocumentChange(v *types.Change, value smithyxml.Value) error {
defer value.Close()
if len(v.Action) > 0 {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Action",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(string(v.Action))
}
if v.ResourceRecordSet != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ResourceRecordSet",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
if err := awsRestxml_serializeDocumentResourceRecordSet(v.ResourceRecordSet, el); err != nil {
return err
}
}
return nil
}
func awsRestxml_serializeDocumentChangeBatch(v *types.ChangeBatch, value smithyxml.Value) error {
defer value.Close()
if v.Changes != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Changes",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
if err := awsRestxml_serializeDocumentChanges(v.Changes, el); err != nil {
return err
}
}
if v.Comment != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Comment",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.Comment)
}
return nil
}
func awsRestxml_serializeDocumentChanges(v []types.Change, value smithyxml.Value) error {
var array *smithyxml.Array
if !value.IsFlattened() {
defer value.Close()
}
customMemberNameAttr := []smithyxml.Attr{}
customMemberName := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Change",
},
Attr: customMemberNameAttr,
}
array = value.ArrayWithCustomName(customMemberName)
for i := range v {
am := array.Member()
if err := awsRestxml_serializeDocumentChange(&v[i], am); err != nil {
return err
}
}
return nil
}
func awsRestxml_serializeDocumentChildHealthCheckList(v []string, value smithyxml.Value) error {
var array *smithyxml.Array
if !value.IsFlattened() {
defer value.Close()
}
customMemberNameAttr := []smithyxml.Attr{}
customMemberName := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ChildHealthCheck",
},
Attr: customMemberNameAttr,
}
array = value.ArrayWithCustomName(customMemberName)
for i := range v {
am := array.Member()
am.String(v[i])
}
return nil
}
func awsRestxml_serializeDocumentCidrCollectionChange(v *types.CidrCollectionChange, value smithyxml.Value) error {
defer value.Close()
if len(v.Action) > 0 {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Action",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(string(v.Action))
}
if v.CidrList != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CidrList",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
if err := awsRestxml_serializeDocumentCidrList(v.CidrList, el); err != nil {
return err
}
}
if v.LocationName != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "LocationName",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.LocationName)
}
return nil
}
func awsRestxml_serializeDocumentCidrCollectionChanges(v []types.CidrCollectionChange, value smithyxml.Value) error {
var array *smithyxml.Array
if !value.IsFlattened() {
defer value.Close()
}
array = value.Array()
for i := range v {
am := array.Member()
if err := awsRestxml_serializeDocumentCidrCollectionChange(&v[i], am); err != nil {
return err
}
}
return nil
}
func awsRestxml_serializeDocumentCidrList(v []string, value smithyxml.Value) error {
var array *smithyxml.Array
if !value.IsFlattened() {
defer value.Close()
}
customMemberNameAttr := []smithyxml.Attr{}
customMemberName := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Cidr",
},
Attr: customMemberNameAttr,
}
array = value.ArrayWithCustomName(customMemberName)
for i := range v {
am := array.Member()
am.String(v[i])
}
return nil
}
func awsRestxml_serializeDocumentCidrRoutingConfig(v *types.CidrRoutingConfig, value smithyxml.Value) error {
defer value.Close()
if v.CollectionId != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CollectionId",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.CollectionId)
}
if v.LocationName != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "LocationName",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.LocationName)
}
return nil
}
func awsRestxml_serializeDocumentGeoLocation(v *types.GeoLocation, value smithyxml.Value) error {
defer value.Close()
if v.ContinentCode != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ContinentCode",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.ContinentCode)
}
if v.CountryCode != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CountryCode",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.CountryCode)
}
if v.SubdivisionCode != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "SubdivisionCode",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.SubdivisionCode)
}
return nil
}
func awsRestxml_serializeDocumentHealthCheckConfig(v *types.HealthCheckConfig, value smithyxml.Value) error {
defer value.Close()
if v.AlarmIdentifier != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "AlarmIdentifier",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
if err := awsRestxml_serializeDocumentAlarmIdentifier(v.AlarmIdentifier, el); err != nil {
return err
}
}
if v.ChildHealthChecks != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ChildHealthChecks",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
if err := awsRestxml_serializeDocumentChildHealthCheckList(v.ChildHealthChecks, el); err != nil {
return err
}
}
if v.Disabled != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Disabled",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.Boolean(*v.Disabled)
}
if v.EnableSNI != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "EnableSNI",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.Boolean(*v.EnableSNI)
}
if v.FailureThreshold != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "FailureThreshold",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.Integer(*v.FailureThreshold)
}
if v.FullyQualifiedDomainName != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "FullyQualifiedDomainName",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.FullyQualifiedDomainName)
}
if v.HealthThreshold != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "HealthThreshold",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.Integer(*v.HealthThreshold)
}
if len(v.InsufficientDataHealthStatus) > 0 {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "InsufficientDataHealthStatus",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(string(v.InsufficientDataHealthStatus))
}
if v.Inverted != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Inverted",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.Boolean(*v.Inverted)
}
if v.IPAddress != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "IPAddress",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.IPAddress)
}
if v.MeasureLatency != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "MeasureLatency",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.Boolean(*v.MeasureLatency)
}
if v.Port != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Port",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.Integer(*v.Port)
}
if v.Regions != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Regions",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
if err := awsRestxml_serializeDocumentHealthCheckRegionList(v.Regions, el); err != nil {
return err
}
}
if v.RequestInterval != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "RequestInterval",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.Integer(*v.RequestInterval)
}
if v.ResourcePath != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ResourcePath",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.ResourcePath)
}
if v.RoutingControlArn != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "RoutingControlArn",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.RoutingControlArn)
}
if v.SearchString != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "SearchString",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.SearchString)
}
if len(v.Type) > 0 {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Type",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(string(v.Type))
}
return nil
}
func awsRestxml_serializeDocumentHealthCheckRegionList(v []types.HealthCheckRegion, value smithyxml.Value) error {
var array *smithyxml.Array
if !value.IsFlattened() {
defer value.Close()
}
customMemberNameAttr := []smithyxml.Attr{}
customMemberName := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Region",
},
Attr: customMemberNameAttr,
}
array = value.ArrayWithCustomName(customMemberName)
for i := range v {
am := array.Member()
am.String(string(v[i]))
}
return nil
}
func awsRestxml_serializeDocumentHostedZoneConfig(v *types.HostedZoneConfig, value smithyxml.Value) error {
defer value.Close()
if v.Comment != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Comment",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.Comment)
}
if v.PrivateZone {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "PrivateZone",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.Boolean(v.PrivateZone)
}
return nil
}
func awsRestxml_serializeDocumentResettableElementNameList(v []types.ResettableElementName, value smithyxml.Value) error {
var array *smithyxml.Array
if !value.IsFlattened() {
defer value.Close()
}
customMemberNameAttr := []smithyxml.Attr{}
customMemberName := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ResettableElementName",
},
Attr: customMemberNameAttr,
}
array = value.ArrayWithCustomName(customMemberName)
for i := range v {
am := array.Member()
am.String(string(v[i]))
}
return nil
}
func awsRestxml_serializeDocumentResourceRecord(v *types.ResourceRecord, value smithyxml.Value) error {
defer value.Close()
if v.Value != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Value",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.Value)
}
return nil
}
func awsRestxml_serializeDocumentResourceRecords(v []types.ResourceRecord, value smithyxml.Value) error {
var array *smithyxml.Array
if !value.IsFlattened() {
defer value.Close()
}
customMemberNameAttr := []smithyxml.Attr{}
customMemberName := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ResourceRecord",
},
Attr: customMemberNameAttr,
}
array = value.ArrayWithCustomName(customMemberName)
for i := range v {
am := array.Member()
if err := awsRestxml_serializeDocumentResourceRecord(&v[i], am); err != nil {
return err
}
}
return nil
}
func awsRestxml_serializeDocumentResourceRecordSet(v *types.ResourceRecordSet, value smithyxml.Value) error {
defer value.Close()
if v.AliasTarget != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "AliasTarget",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
if err := awsRestxml_serializeDocumentAliasTarget(v.AliasTarget, el); err != nil {
return err
}
}
if v.CidrRoutingConfig != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "CidrRoutingConfig",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
if err := awsRestxml_serializeDocumentCidrRoutingConfig(v.CidrRoutingConfig, el); err != nil {
return err
}
}
if len(v.Failover) > 0 {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Failover",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(string(v.Failover))
}
if v.GeoLocation != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "GeoLocation",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
if err := awsRestxml_serializeDocumentGeoLocation(v.GeoLocation, el); err != nil {
return err
}
}
if v.HealthCheckId != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "HealthCheckId",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.HealthCheckId)
}
if v.MultiValueAnswer != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "MultiValueAnswer",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.Boolean(*v.MultiValueAnswer)
}
if v.Name != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Name",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.Name)
}
if len(v.Region) > 0 {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Region",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(string(v.Region))
}
if v.ResourceRecords != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ResourceRecords",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
if err := awsRestxml_serializeDocumentResourceRecords(v.ResourceRecords, el); err != nil {
return err
}
}
if v.SetIdentifier != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "SetIdentifier",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.SetIdentifier)
}
if v.TrafficPolicyInstanceId != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "TrafficPolicyInstanceId",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.TrafficPolicyInstanceId)
}
if v.TTL != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "TTL",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.Long(*v.TTL)
}
if len(v.Type) > 0 {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Type",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(string(v.Type))
}
if v.Weight != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Weight",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.Long(*v.Weight)
}
return nil
}
func awsRestxml_serializeDocumentTag(v *types.Tag, value smithyxml.Value) error {
defer value.Close()
if v.Key != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Key",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.Key)
}
if v.Value != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Value",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.Value)
}
return nil
}
func awsRestxml_serializeDocumentTagKeyList(v []string, value smithyxml.Value) error {
var array *smithyxml.Array
if !value.IsFlattened() {
defer value.Close()
}
customMemberNameAttr := []smithyxml.Attr{}
customMemberName := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Key",
},
Attr: customMemberNameAttr,
}
array = value.ArrayWithCustomName(customMemberName)
for i := range v {
am := array.Member()
am.String(v[i])
}
return nil
}
func awsRestxml_serializeDocumentTagList(v []types.Tag, value smithyxml.Value) error {
var array *smithyxml.Array
if !value.IsFlattened() {
defer value.Close()
}
customMemberNameAttr := []smithyxml.Attr{}
customMemberName := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "Tag",
},
Attr: customMemberNameAttr,
}
array = value.ArrayWithCustomName(customMemberName)
for i := range v {
am := array.Member()
if err := awsRestxml_serializeDocumentTag(&v[i], am); err != nil {
return err
}
}
return nil
}
func awsRestxml_serializeDocumentTagResourceIdList(v []string, value smithyxml.Value) error {
var array *smithyxml.Array
if !value.IsFlattened() {
defer value.Close()
}
customMemberNameAttr := []smithyxml.Attr{}
customMemberName := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "ResourceId",
},
Attr: customMemberNameAttr,
}
array = value.ArrayWithCustomName(customMemberName)
for i := range v {
am := array.Member()
am.String(v[i])
}
return nil
}
func awsRestxml_serializeDocumentVPC(v *types.VPC, value smithyxml.Value) error {
defer value.Close()
if v.VPCId != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "VPCId",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(*v.VPCId)
}
if len(v.VPCRegion) > 0 {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
Name: smithyxml.Name{
Local: "VPCRegion",
},
Attr: rootAttr,
}
el := value.MemberElement(root)
el.String(string(v.VPCRegion))
}
return nil
}
| 6,216 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53
import (
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
smithy "github.com/aws/smithy-go"
"github.com/aws/smithy-go/middleware"
)
type validateOpActivateKeySigningKey struct {
}
func (*validateOpActivateKeySigningKey) ID() string {
return "OperationInputValidation"
}
func (m *validateOpActivateKeySigningKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ActivateKeySigningKeyInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpActivateKeySigningKeyInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpAssociateVPCWithHostedZone struct {
}
func (*validateOpAssociateVPCWithHostedZone) ID() string {
return "OperationInputValidation"
}
func (m *validateOpAssociateVPCWithHostedZone) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*AssociateVPCWithHostedZoneInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpAssociateVPCWithHostedZoneInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpChangeCidrCollection struct {
}
func (*validateOpChangeCidrCollection) ID() string {
return "OperationInputValidation"
}
func (m *validateOpChangeCidrCollection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ChangeCidrCollectionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpChangeCidrCollectionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpChangeResourceRecordSets struct {
}
func (*validateOpChangeResourceRecordSets) ID() string {
return "OperationInputValidation"
}
func (m *validateOpChangeResourceRecordSets) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ChangeResourceRecordSetsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpChangeResourceRecordSetsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpChangeTagsForResource struct {
}
func (*validateOpChangeTagsForResource) ID() string {
return "OperationInputValidation"
}
func (m *validateOpChangeTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ChangeTagsForResourceInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpChangeTagsForResourceInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateCidrCollection struct {
}
func (*validateOpCreateCidrCollection) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateCidrCollection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateCidrCollectionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateCidrCollectionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateHealthCheck struct {
}
func (*validateOpCreateHealthCheck) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateHealthCheck) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateHealthCheckInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateHealthCheckInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateHostedZone struct {
}
func (*validateOpCreateHostedZone) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateHostedZone) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateHostedZoneInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateHostedZoneInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateKeySigningKey struct {
}
func (*validateOpCreateKeySigningKey) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateKeySigningKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateKeySigningKeyInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateKeySigningKeyInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateQueryLoggingConfig struct {
}
func (*validateOpCreateQueryLoggingConfig) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateQueryLoggingConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateQueryLoggingConfigInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateQueryLoggingConfigInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateReusableDelegationSet struct {
}
func (*validateOpCreateReusableDelegationSet) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateReusableDelegationSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateReusableDelegationSetInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateReusableDelegationSetInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateTrafficPolicy struct {
}
func (*validateOpCreateTrafficPolicy) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateTrafficPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateTrafficPolicyInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateTrafficPolicyInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateTrafficPolicyInstance struct {
}
func (*validateOpCreateTrafficPolicyInstance) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateTrafficPolicyInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateTrafficPolicyInstanceInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateTrafficPolicyInstanceInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateTrafficPolicyVersion struct {
}
func (*validateOpCreateTrafficPolicyVersion) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateTrafficPolicyVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateTrafficPolicyVersionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateTrafficPolicyVersionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateVPCAssociationAuthorization struct {
}
func (*validateOpCreateVPCAssociationAuthorization) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateVPCAssociationAuthorization) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateVPCAssociationAuthorizationInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateVPCAssociationAuthorizationInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeactivateKeySigningKey struct {
}
func (*validateOpDeactivateKeySigningKey) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeactivateKeySigningKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeactivateKeySigningKeyInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeactivateKeySigningKeyInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteCidrCollection struct {
}
func (*validateOpDeleteCidrCollection) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteCidrCollection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteCidrCollectionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteCidrCollectionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteHealthCheck struct {
}
func (*validateOpDeleteHealthCheck) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteHealthCheck) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteHealthCheckInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteHealthCheckInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteHostedZone struct {
}
func (*validateOpDeleteHostedZone) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteHostedZone) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteHostedZoneInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteHostedZoneInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteKeySigningKey struct {
}
func (*validateOpDeleteKeySigningKey) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteKeySigningKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteKeySigningKeyInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteKeySigningKeyInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteQueryLoggingConfig struct {
}
func (*validateOpDeleteQueryLoggingConfig) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteQueryLoggingConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteQueryLoggingConfigInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteQueryLoggingConfigInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteReusableDelegationSet struct {
}
func (*validateOpDeleteReusableDelegationSet) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteReusableDelegationSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteReusableDelegationSetInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteReusableDelegationSetInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteTrafficPolicy struct {
}
func (*validateOpDeleteTrafficPolicy) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteTrafficPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteTrafficPolicyInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteTrafficPolicyInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteTrafficPolicyInstance struct {
}
func (*validateOpDeleteTrafficPolicyInstance) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteTrafficPolicyInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteTrafficPolicyInstanceInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteTrafficPolicyInstanceInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteVPCAssociationAuthorization struct {
}
func (*validateOpDeleteVPCAssociationAuthorization) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteVPCAssociationAuthorization) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteVPCAssociationAuthorizationInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteVPCAssociationAuthorizationInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDisableHostedZoneDNSSEC struct {
}
func (*validateOpDisableHostedZoneDNSSEC) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDisableHostedZoneDNSSEC) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DisableHostedZoneDNSSECInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDisableHostedZoneDNSSECInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDisassociateVPCFromHostedZone struct {
}
func (*validateOpDisassociateVPCFromHostedZone) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDisassociateVPCFromHostedZone) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DisassociateVPCFromHostedZoneInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDisassociateVPCFromHostedZoneInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpEnableHostedZoneDNSSEC struct {
}
func (*validateOpEnableHostedZoneDNSSEC) ID() string {
return "OperationInputValidation"
}
func (m *validateOpEnableHostedZoneDNSSEC) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*EnableHostedZoneDNSSECInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpEnableHostedZoneDNSSECInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetAccountLimit struct {
}
func (*validateOpGetAccountLimit) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetAccountLimit) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetAccountLimitInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetAccountLimitInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetChange struct {
}
func (*validateOpGetChange) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetChange) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetChangeInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetChangeInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetDNSSEC struct {
}
func (*validateOpGetDNSSEC) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetDNSSEC) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetDNSSECInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetDNSSECInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetHealthCheck struct {
}
func (*validateOpGetHealthCheck) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetHealthCheck) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetHealthCheckInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetHealthCheckInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetHealthCheckLastFailureReason struct {
}
func (*validateOpGetHealthCheckLastFailureReason) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetHealthCheckLastFailureReason) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetHealthCheckLastFailureReasonInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetHealthCheckLastFailureReasonInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetHealthCheckStatus struct {
}
func (*validateOpGetHealthCheckStatus) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetHealthCheckStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetHealthCheckStatusInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetHealthCheckStatusInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetHostedZone struct {
}
func (*validateOpGetHostedZone) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetHostedZone) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetHostedZoneInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetHostedZoneInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetHostedZoneLimit struct {
}
func (*validateOpGetHostedZoneLimit) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetHostedZoneLimit) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetHostedZoneLimitInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetHostedZoneLimitInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetQueryLoggingConfig struct {
}
func (*validateOpGetQueryLoggingConfig) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetQueryLoggingConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetQueryLoggingConfigInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetQueryLoggingConfigInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetReusableDelegationSet struct {
}
func (*validateOpGetReusableDelegationSet) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetReusableDelegationSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetReusableDelegationSetInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetReusableDelegationSetInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetReusableDelegationSetLimit struct {
}
func (*validateOpGetReusableDelegationSetLimit) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetReusableDelegationSetLimit) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetReusableDelegationSetLimitInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetReusableDelegationSetLimitInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetTrafficPolicy struct {
}
func (*validateOpGetTrafficPolicy) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetTrafficPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetTrafficPolicyInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetTrafficPolicyInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetTrafficPolicyInstance struct {
}
func (*validateOpGetTrafficPolicyInstance) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetTrafficPolicyInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetTrafficPolicyInstanceInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetTrafficPolicyInstanceInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListCidrBlocks struct {
}
func (*validateOpListCidrBlocks) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListCidrBlocks) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListCidrBlocksInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListCidrBlocksInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListCidrLocations struct {
}
func (*validateOpListCidrLocations) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListCidrLocations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListCidrLocationsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListCidrLocationsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListHostedZonesByVPC struct {
}
func (*validateOpListHostedZonesByVPC) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListHostedZonesByVPC) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListHostedZonesByVPCInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListHostedZonesByVPCInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListResourceRecordSets struct {
}
func (*validateOpListResourceRecordSets) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListResourceRecordSets) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListResourceRecordSetsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListResourceRecordSetsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListTagsForResource struct {
}
func (*validateOpListTagsForResource) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListTagsForResourceInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListTagsForResourceInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListTagsForResources struct {
}
func (*validateOpListTagsForResources) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListTagsForResources) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListTagsForResourcesInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListTagsForResourcesInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListTrafficPolicyInstancesByHostedZone struct {
}
func (*validateOpListTrafficPolicyInstancesByHostedZone) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListTrafficPolicyInstancesByHostedZone) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListTrafficPolicyInstancesByHostedZoneInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListTrafficPolicyInstancesByHostedZoneInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListTrafficPolicyInstancesByPolicy struct {
}
func (*validateOpListTrafficPolicyInstancesByPolicy) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListTrafficPolicyInstancesByPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListTrafficPolicyInstancesByPolicyInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListTrafficPolicyInstancesByPolicyInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListTrafficPolicyVersions struct {
}
func (*validateOpListTrafficPolicyVersions) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListTrafficPolicyVersions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListTrafficPolicyVersionsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListTrafficPolicyVersionsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListVPCAssociationAuthorizations struct {
}
func (*validateOpListVPCAssociationAuthorizations) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListVPCAssociationAuthorizations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListVPCAssociationAuthorizationsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListVPCAssociationAuthorizationsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpTestDNSAnswer struct {
}
func (*validateOpTestDNSAnswer) ID() string {
return "OperationInputValidation"
}
func (m *validateOpTestDNSAnswer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*TestDNSAnswerInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpTestDNSAnswerInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateHealthCheck struct {
}
func (*validateOpUpdateHealthCheck) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateHealthCheck) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateHealthCheckInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateHealthCheckInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateHostedZoneComment struct {
}
func (*validateOpUpdateHostedZoneComment) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateHostedZoneComment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateHostedZoneCommentInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateHostedZoneCommentInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateTrafficPolicyComment struct {
}
func (*validateOpUpdateTrafficPolicyComment) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateTrafficPolicyComment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateTrafficPolicyCommentInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateTrafficPolicyCommentInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateTrafficPolicyInstance struct {
}
func (*validateOpUpdateTrafficPolicyInstance) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateTrafficPolicyInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateTrafficPolicyInstanceInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateTrafficPolicyInstanceInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
func addOpActivateKeySigningKeyValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpActivateKeySigningKey{}, middleware.After)
}
func addOpAssociateVPCWithHostedZoneValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpAssociateVPCWithHostedZone{}, middleware.After)
}
func addOpChangeCidrCollectionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpChangeCidrCollection{}, middleware.After)
}
func addOpChangeResourceRecordSetsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpChangeResourceRecordSets{}, middleware.After)
}
func addOpChangeTagsForResourceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpChangeTagsForResource{}, middleware.After)
}
func addOpCreateCidrCollectionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateCidrCollection{}, middleware.After)
}
func addOpCreateHealthCheckValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateHealthCheck{}, middleware.After)
}
func addOpCreateHostedZoneValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateHostedZone{}, middleware.After)
}
func addOpCreateKeySigningKeyValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateKeySigningKey{}, middleware.After)
}
func addOpCreateQueryLoggingConfigValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateQueryLoggingConfig{}, middleware.After)
}
func addOpCreateReusableDelegationSetValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateReusableDelegationSet{}, middleware.After)
}
func addOpCreateTrafficPolicyValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateTrafficPolicy{}, middleware.After)
}
func addOpCreateTrafficPolicyInstanceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateTrafficPolicyInstance{}, middleware.After)
}
func addOpCreateTrafficPolicyVersionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateTrafficPolicyVersion{}, middleware.After)
}
func addOpCreateVPCAssociationAuthorizationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateVPCAssociationAuthorization{}, middleware.After)
}
func addOpDeactivateKeySigningKeyValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeactivateKeySigningKey{}, middleware.After)
}
func addOpDeleteCidrCollectionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteCidrCollection{}, middleware.After)
}
func addOpDeleteHealthCheckValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteHealthCheck{}, middleware.After)
}
func addOpDeleteHostedZoneValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteHostedZone{}, middleware.After)
}
func addOpDeleteKeySigningKeyValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteKeySigningKey{}, middleware.After)
}
func addOpDeleteQueryLoggingConfigValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteQueryLoggingConfig{}, middleware.After)
}
func addOpDeleteReusableDelegationSetValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteReusableDelegationSet{}, middleware.After)
}
func addOpDeleteTrafficPolicyValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteTrafficPolicy{}, middleware.After)
}
func addOpDeleteTrafficPolicyInstanceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteTrafficPolicyInstance{}, middleware.After)
}
func addOpDeleteVPCAssociationAuthorizationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteVPCAssociationAuthorization{}, middleware.After)
}
func addOpDisableHostedZoneDNSSECValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDisableHostedZoneDNSSEC{}, middleware.After)
}
func addOpDisassociateVPCFromHostedZoneValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDisassociateVPCFromHostedZone{}, middleware.After)
}
func addOpEnableHostedZoneDNSSECValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpEnableHostedZoneDNSSEC{}, middleware.After)
}
func addOpGetAccountLimitValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetAccountLimit{}, middleware.After)
}
func addOpGetChangeValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetChange{}, middleware.After)
}
func addOpGetDNSSECValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetDNSSEC{}, middleware.After)
}
func addOpGetHealthCheckValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetHealthCheck{}, middleware.After)
}
func addOpGetHealthCheckLastFailureReasonValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetHealthCheckLastFailureReason{}, middleware.After)
}
func addOpGetHealthCheckStatusValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetHealthCheckStatus{}, middleware.After)
}
func addOpGetHostedZoneValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetHostedZone{}, middleware.After)
}
func addOpGetHostedZoneLimitValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetHostedZoneLimit{}, middleware.After)
}
func addOpGetQueryLoggingConfigValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetQueryLoggingConfig{}, middleware.After)
}
func addOpGetReusableDelegationSetValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetReusableDelegationSet{}, middleware.After)
}
func addOpGetReusableDelegationSetLimitValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetReusableDelegationSetLimit{}, middleware.After)
}
func addOpGetTrafficPolicyValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetTrafficPolicy{}, middleware.After)
}
func addOpGetTrafficPolicyInstanceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetTrafficPolicyInstance{}, middleware.After)
}
func addOpListCidrBlocksValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListCidrBlocks{}, middleware.After)
}
func addOpListCidrLocationsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListCidrLocations{}, middleware.After)
}
func addOpListHostedZonesByVPCValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListHostedZonesByVPC{}, middleware.After)
}
func addOpListResourceRecordSetsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListResourceRecordSets{}, middleware.After)
}
func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After)
}
func addOpListTagsForResourcesValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListTagsForResources{}, middleware.After)
}
func addOpListTrafficPolicyInstancesByHostedZoneValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListTrafficPolicyInstancesByHostedZone{}, middleware.After)
}
func addOpListTrafficPolicyInstancesByPolicyValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListTrafficPolicyInstancesByPolicy{}, middleware.After)
}
func addOpListTrafficPolicyVersionsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListTrafficPolicyVersions{}, middleware.After)
}
func addOpListVPCAssociationAuthorizationsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListVPCAssociationAuthorizations{}, middleware.After)
}
func addOpTestDNSAnswerValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpTestDNSAnswer{}, middleware.After)
}
func addOpUpdateHealthCheckValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateHealthCheck{}, middleware.After)
}
func addOpUpdateHostedZoneCommentValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateHostedZoneComment{}, middleware.After)
}
func addOpUpdateTrafficPolicyCommentValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateTrafficPolicyComment{}, middleware.After)
}
func addOpUpdateTrafficPolicyInstanceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateTrafficPolicyInstance{}, middleware.After)
}
func validateAlarmIdentifier(v *types.AlarmIdentifier) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AlarmIdentifier"}
if len(v.Region) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("Region"))
}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateAliasTarget(v *types.AliasTarget) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AliasTarget"}
if v.HostedZoneId == nil {
invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId"))
}
if v.DNSName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DNSName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateChange(v *types.Change) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "Change"}
if len(v.Action) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("Action"))
}
if v.ResourceRecordSet == nil {
invalidParams.Add(smithy.NewErrParamRequired("ResourceRecordSet"))
} else if v.ResourceRecordSet != nil {
if err := validateResourceRecordSet(v.ResourceRecordSet); err != nil {
invalidParams.AddNested("ResourceRecordSet", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateChangeBatch(v *types.ChangeBatch) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ChangeBatch"}
if v.Changes == nil {
invalidParams.Add(smithy.NewErrParamRequired("Changes"))
} else if v.Changes != nil {
if err := validateChanges(v.Changes); err != nil {
invalidParams.AddNested("Changes", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateChanges(v []types.Change) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "Changes"}
for i := range v {
if err := validateChange(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateCidrCollectionChange(v *types.CidrCollectionChange) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CidrCollectionChange"}
if v.LocationName == nil {
invalidParams.Add(smithy.NewErrParamRequired("LocationName"))
}
if len(v.Action) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("Action"))
}
if v.CidrList == nil {
invalidParams.Add(smithy.NewErrParamRequired("CidrList"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateCidrCollectionChanges(v []types.CidrCollectionChange) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CidrCollectionChanges"}
for i := range v {
if err := validateCidrCollectionChange(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateCidrRoutingConfig(v *types.CidrRoutingConfig) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CidrRoutingConfig"}
if v.CollectionId == nil {
invalidParams.Add(smithy.NewErrParamRequired("CollectionId"))
}
if v.LocationName == nil {
invalidParams.Add(smithy.NewErrParamRequired("LocationName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateHealthCheckConfig(v *types.HealthCheckConfig) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "HealthCheckConfig"}
if len(v.Type) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("Type"))
}
if v.AlarmIdentifier != nil {
if err := validateAlarmIdentifier(v.AlarmIdentifier); err != nil {
invalidParams.AddNested("AlarmIdentifier", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateResourceRecord(v *types.ResourceRecord) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ResourceRecord"}
if v.Value == nil {
invalidParams.Add(smithy.NewErrParamRequired("Value"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateResourceRecords(v []types.ResourceRecord) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ResourceRecords"}
for i := range v {
if err := validateResourceRecord(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateResourceRecordSet(v *types.ResourceRecordSet) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ResourceRecordSet"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if len(v.Type) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("Type"))
}
if v.ResourceRecords != nil {
if err := validateResourceRecords(v.ResourceRecords); err != nil {
invalidParams.AddNested("ResourceRecords", err.(smithy.InvalidParamsError))
}
}
if v.AliasTarget != nil {
if err := validateAliasTarget(v.AliasTarget); err != nil {
invalidParams.AddNested("AliasTarget", err.(smithy.InvalidParamsError))
}
}
if v.CidrRoutingConfig != nil {
if err := validateCidrRoutingConfig(v.CidrRoutingConfig); err != nil {
invalidParams.AddNested("CidrRoutingConfig", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpActivateKeySigningKeyInput(v *ActivateKeySigningKeyInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ActivateKeySigningKeyInput"}
if v.HostedZoneId == nil {
invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId"))
}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpAssociateVPCWithHostedZoneInput(v *AssociateVPCWithHostedZoneInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AssociateVPCWithHostedZoneInput"}
if v.HostedZoneId == nil {
invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId"))
}
if v.VPC == nil {
invalidParams.Add(smithy.NewErrParamRequired("VPC"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpChangeCidrCollectionInput(v *ChangeCidrCollectionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ChangeCidrCollectionInput"}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if v.Changes == nil {
invalidParams.Add(smithy.NewErrParamRequired("Changes"))
} else if v.Changes != nil {
if err := validateCidrCollectionChanges(v.Changes); err != nil {
invalidParams.AddNested("Changes", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpChangeResourceRecordSetsInput(v *ChangeResourceRecordSetsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ChangeResourceRecordSetsInput"}
if v.HostedZoneId == nil {
invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId"))
}
if v.ChangeBatch == nil {
invalidParams.Add(smithy.NewErrParamRequired("ChangeBatch"))
} else if v.ChangeBatch != nil {
if err := validateChangeBatch(v.ChangeBatch); err != nil {
invalidParams.AddNested("ChangeBatch", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpChangeTagsForResourceInput(v *ChangeTagsForResourceInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ChangeTagsForResourceInput"}
if len(v.ResourceType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("ResourceType"))
}
if v.ResourceId == nil {
invalidParams.Add(smithy.NewErrParamRequired("ResourceId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateCidrCollectionInput(v *CreateCidrCollectionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateCidrCollectionInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.CallerReference == nil {
invalidParams.Add(smithy.NewErrParamRequired("CallerReference"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateHealthCheckInput(v *CreateHealthCheckInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateHealthCheckInput"}
if v.CallerReference == nil {
invalidParams.Add(smithy.NewErrParamRequired("CallerReference"))
}
if v.HealthCheckConfig == nil {
invalidParams.Add(smithy.NewErrParamRequired("HealthCheckConfig"))
} else if v.HealthCheckConfig != nil {
if err := validateHealthCheckConfig(v.HealthCheckConfig); err != nil {
invalidParams.AddNested("HealthCheckConfig", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateHostedZoneInput(v *CreateHostedZoneInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateHostedZoneInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.CallerReference == nil {
invalidParams.Add(smithy.NewErrParamRequired("CallerReference"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateKeySigningKeyInput(v *CreateKeySigningKeyInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateKeySigningKeyInput"}
if v.CallerReference == nil {
invalidParams.Add(smithy.NewErrParamRequired("CallerReference"))
}
if v.HostedZoneId == nil {
invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId"))
}
if v.KeyManagementServiceArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("KeyManagementServiceArn"))
}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.Status == nil {
invalidParams.Add(smithy.NewErrParamRequired("Status"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateQueryLoggingConfigInput(v *CreateQueryLoggingConfigInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateQueryLoggingConfigInput"}
if v.HostedZoneId == nil {
invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId"))
}
if v.CloudWatchLogsLogGroupArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("CloudWatchLogsLogGroupArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateReusableDelegationSetInput(v *CreateReusableDelegationSetInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateReusableDelegationSetInput"}
if v.CallerReference == nil {
invalidParams.Add(smithy.NewErrParamRequired("CallerReference"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateTrafficPolicyInput(v *CreateTrafficPolicyInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateTrafficPolicyInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.Document == nil {
invalidParams.Add(smithy.NewErrParamRequired("Document"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateTrafficPolicyInstanceInput(v *CreateTrafficPolicyInstanceInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateTrafficPolicyInstanceInput"}
if v.HostedZoneId == nil {
invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId"))
}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.TTL == nil {
invalidParams.Add(smithy.NewErrParamRequired("TTL"))
}
if v.TrafficPolicyId == nil {
invalidParams.Add(smithy.NewErrParamRequired("TrafficPolicyId"))
}
if v.TrafficPolicyVersion == nil {
invalidParams.Add(smithy.NewErrParamRequired("TrafficPolicyVersion"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateTrafficPolicyVersionInput(v *CreateTrafficPolicyVersionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateTrafficPolicyVersionInput"}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if v.Document == nil {
invalidParams.Add(smithy.NewErrParamRequired("Document"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateVPCAssociationAuthorizationInput(v *CreateVPCAssociationAuthorizationInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateVPCAssociationAuthorizationInput"}
if v.HostedZoneId == nil {
invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId"))
}
if v.VPC == nil {
invalidParams.Add(smithy.NewErrParamRequired("VPC"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeactivateKeySigningKeyInput(v *DeactivateKeySigningKeyInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeactivateKeySigningKeyInput"}
if v.HostedZoneId == nil {
invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId"))
}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteCidrCollectionInput(v *DeleteCidrCollectionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteCidrCollectionInput"}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteHealthCheckInput(v *DeleteHealthCheckInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteHealthCheckInput"}
if v.HealthCheckId == nil {
invalidParams.Add(smithy.NewErrParamRequired("HealthCheckId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteHostedZoneInput(v *DeleteHostedZoneInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteHostedZoneInput"}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteKeySigningKeyInput(v *DeleteKeySigningKeyInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteKeySigningKeyInput"}
if v.HostedZoneId == nil {
invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId"))
}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteQueryLoggingConfigInput(v *DeleteQueryLoggingConfigInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteQueryLoggingConfigInput"}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteReusableDelegationSetInput(v *DeleteReusableDelegationSetInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteReusableDelegationSetInput"}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteTrafficPolicyInput(v *DeleteTrafficPolicyInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteTrafficPolicyInput"}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if v.Version == nil {
invalidParams.Add(smithy.NewErrParamRequired("Version"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteTrafficPolicyInstanceInput(v *DeleteTrafficPolicyInstanceInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteTrafficPolicyInstanceInput"}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteVPCAssociationAuthorizationInput(v *DeleteVPCAssociationAuthorizationInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteVPCAssociationAuthorizationInput"}
if v.HostedZoneId == nil {
invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId"))
}
if v.VPC == nil {
invalidParams.Add(smithy.NewErrParamRequired("VPC"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDisableHostedZoneDNSSECInput(v *DisableHostedZoneDNSSECInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DisableHostedZoneDNSSECInput"}
if v.HostedZoneId == nil {
invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDisassociateVPCFromHostedZoneInput(v *DisassociateVPCFromHostedZoneInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DisassociateVPCFromHostedZoneInput"}
if v.HostedZoneId == nil {
invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId"))
}
if v.VPC == nil {
invalidParams.Add(smithy.NewErrParamRequired("VPC"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpEnableHostedZoneDNSSECInput(v *EnableHostedZoneDNSSECInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "EnableHostedZoneDNSSECInput"}
if v.HostedZoneId == nil {
invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetAccountLimitInput(v *GetAccountLimitInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetAccountLimitInput"}
if len(v.Type) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("Type"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetChangeInput(v *GetChangeInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetChangeInput"}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetDNSSECInput(v *GetDNSSECInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetDNSSECInput"}
if v.HostedZoneId == nil {
invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetHealthCheckInput(v *GetHealthCheckInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetHealthCheckInput"}
if v.HealthCheckId == nil {
invalidParams.Add(smithy.NewErrParamRequired("HealthCheckId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetHealthCheckLastFailureReasonInput(v *GetHealthCheckLastFailureReasonInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetHealthCheckLastFailureReasonInput"}
if v.HealthCheckId == nil {
invalidParams.Add(smithy.NewErrParamRequired("HealthCheckId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetHealthCheckStatusInput(v *GetHealthCheckStatusInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetHealthCheckStatusInput"}
if v.HealthCheckId == nil {
invalidParams.Add(smithy.NewErrParamRequired("HealthCheckId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetHostedZoneInput(v *GetHostedZoneInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetHostedZoneInput"}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetHostedZoneLimitInput(v *GetHostedZoneLimitInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetHostedZoneLimitInput"}
if len(v.Type) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("Type"))
}
if v.HostedZoneId == nil {
invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetQueryLoggingConfigInput(v *GetQueryLoggingConfigInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetQueryLoggingConfigInput"}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetReusableDelegationSetInput(v *GetReusableDelegationSetInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetReusableDelegationSetInput"}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetReusableDelegationSetLimitInput(v *GetReusableDelegationSetLimitInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetReusableDelegationSetLimitInput"}
if len(v.Type) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("Type"))
}
if v.DelegationSetId == nil {
invalidParams.Add(smithy.NewErrParamRequired("DelegationSetId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetTrafficPolicyInput(v *GetTrafficPolicyInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetTrafficPolicyInput"}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if v.Version == nil {
invalidParams.Add(smithy.NewErrParamRequired("Version"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetTrafficPolicyInstanceInput(v *GetTrafficPolicyInstanceInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetTrafficPolicyInstanceInput"}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListCidrBlocksInput(v *ListCidrBlocksInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListCidrBlocksInput"}
if v.CollectionId == nil {
invalidParams.Add(smithy.NewErrParamRequired("CollectionId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListCidrLocationsInput(v *ListCidrLocationsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListCidrLocationsInput"}
if v.CollectionId == nil {
invalidParams.Add(smithy.NewErrParamRequired("CollectionId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListHostedZonesByVPCInput(v *ListHostedZonesByVPCInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListHostedZonesByVPCInput"}
if v.VPCId == nil {
invalidParams.Add(smithy.NewErrParamRequired("VPCId"))
}
if len(v.VPCRegion) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("VPCRegion"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListResourceRecordSetsInput(v *ListResourceRecordSetsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListResourceRecordSetsInput"}
if v.HostedZoneId == nil {
invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"}
if len(v.ResourceType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("ResourceType"))
}
if v.ResourceId == nil {
invalidParams.Add(smithy.NewErrParamRequired("ResourceId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListTagsForResourcesInput(v *ListTagsForResourcesInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourcesInput"}
if len(v.ResourceType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("ResourceType"))
}
if v.ResourceIds == nil {
invalidParams.Add(smithy.NewErrParamRequired("ResourceIds"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListTrafficPolicyInstancesByHostedZoneInput(v *ListTrafficPolicyInstancesByHostedZoneInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListTrafficPolicyInstancesByHostedZoneInput"}
if v.HostedZoneId == nil {
invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListTrafficPolicyInstancesByPolicyInput(v *ListTrafficPolicyInstancesByPolicyInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListTrafficPolicyInstancesByPolicyInput"}
if v.TrafficPolicyId == nil {
invalidParams.Add(smithy.NewErrParamRequired("TrafficPolicyId"))
}
if v.TrafficPolicyVersion == nil {
invalidParams.Add(smithy.NewErrParamRequired("TrafficPolicyVersion"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListTrafficPolicyVersionsInput(v *ListTrafficPolicyVersionsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListTrafficPolicyVersionsInput"}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListVPCAssociationAuthorizationsInput(v *ListVPCAssociationAuthorizationsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListVPCAssociationAuthorizationsInput"}
if v.HostedZoneId == nil {
invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpTestDNSAnswerInput(v *TestDNSAnswerInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "TestDNSAnswerInput"}
if v.HostedZoneId == nil {
invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId"))
}
if v.RecordName == nil {
invalidParams.Add(smithy.NewErrParamRequired("RecordName"))
}
if len(v.RecordType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("RecordType"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateHealthCheckInput(v *UpdateHealthCheckInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateHealthCheckInput"}
if v.HealthCheckId == nil {
invalidParams.Add(smithy.NewErrParamRequired("HealthCheckId"))
}
if v.AlarmIdentifier != nil {
if err := validateAlarmIdentifier(v.AlarmIdentifier); err != nil {
invalidParams.AddNested("AlarmIdentifier", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateHostedZoneCommentInput(v *UpdateHostedZoneCommentInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateHostedZoneCommentInput"}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateTrafficPolicyCommentInput(v *UpdateTrafficPolicyCommentInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateTrafficPolicyCommentInput"}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if v.Version == nil {
invalidParams.Add(smithy.NewErrParamRequired("Version"))
}
if v.Comment == nil {
invalidParams.Add(smithy.NewErrParamRequired("Comment"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateTrafficPolicyInstanceInput(v *UpdateTrafficPolicyInstanceInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateTrafficPolicyInstanceInput"}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if v.TTL == nil {
invalidParams.Add(smithy.NewErrParamRequired("TTL"))
}
if v.TrafficPolicyId == nil {
invalidParams.Add(smithy.NewErrParamRequired("TrafficPolicyId"))
}
if v.TrafficPolicyVersion == nil {
invalidParams.Add(smithy.NewErrParamRequired("TrafficPolicyVersion"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
| 2,565 |
aws-sdk-go-v2 | aws | Go | package customizations
import (
"bytes"
"context"
"encoding/xml"
"fmt"
"io"
"io/ioutil"
"strings"
"github.com/aws/smithy-go"
smithyxml "github.com/aws/smithy-go/encoding/xml"
"github.com/aws/smithy-go/middleware"
"github.com/aws/smithy-go/ptr"
smithyhttp "github.com/aws/smithy-go/transport/http"
awsmiddle "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
)
// HandleCustomErrorDeserialization check if Route53 response is an error and needs
// custom error deserialization.
func HandleCustomErrorDeserialization(stack *middleware.Stack) error {
return stack.Deserialize.Insert(&processResponse{}, "OperationDeserializer", middleware.After)
}
// middleware to process raw response and look for error response with InvalidChangeBatch error tag
type processResponse struct{}
// ID returns the middleware ID.
func (*processResponse) ID() string {
return "Route53:ProcessResponseForCustomErrorResponse"
}
func (m *processResponse) HandleDeserialize(
ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
if err != nil {
return out, metadata, err
}
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
// check if success response
if response.StatusCode >= 200 && response.StatusCode < 300 {
return
}
var readBuff bytes.Buffer
body := io.TeeReader(response.Body, &readBuff)
rootDecoder := xml.NewDecoder(body)
t, err := smithyxml.FetchRootElement(rootDecoder)
if err == io.EOF {
return out, metadata, nil
}
// rewind response body
response.Body = ioutil.NopCloser(io.MultiReader(&readBuff, response.Body))
// if start tag is "InvalidChangeBatch", the error response needs custom unmarshaling.
if strings.EqualFold(t.Name.Local, "InvalidChangeBatch") {
return out, metadata, route53CustomErrorDeser(&metadata, response)
}
return out, metadata, err
}
// error type for invalidChangeBatchError
type invalidChangeBatchError struct {
Messages []string `xml:"Messages>Message"`
RequestID string `xml:"RequestId"`
}
func route53CustomErrorDeser(metadata *middleware.Metadata, response *smithyhttp.Response) error {
err := invalidChangeBatchError{}
xml.NewDecoder(response.Body).Decode(&err)
// set request id in metadata
if len(err.RequestID) != 0 {
awsmiddle.SetRequestIDMetadata(metadata, err.RequestID)
}
return &types.InvalidChangeBatch{
Message: ptr.String("ChangeBatch errors occurred"),
Messages: err.Messages,
}
}
| 95 |
aws-sdk-go-v2 | aws | Go | package customizations_test
import (
"context"
"errors"
"net/http"
"net/http/httptest"
"strings"
"testing"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/route53"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
)
func TestCustomErrorDeserialization(t *testing.T) {
cases := map[string]struct {
responseStatus int
responseBody []byte
expectedError string
expectedRequestID string
expectedResponseID string
}{
"invalidChangeBatchError": {
responseStatus: 500,
responseBody: []byte(`<?xml version="1.0" encoding="UTF-8"?>
<InvalidChangeBatch xmlns="https://route53.amazonaws.com/doc/2013-04-01/">
<Messages>
<Message>Tried to create resource record set duplicate.example.com. type A, but it already exists</Message>
</Messages>
<RequestId>b25f48e8-84fd-11e6-80d9-574e0c4664cb</RequestId>
</InvalidChangeBatch>`),
expectedError: "InvalidChangeBatch: ChangeBatch errors occurred",
expectedRequestID: "b25f48e8-84fd-11e6-80d9-574e0c4664cb",
},
"standardRestXMLError": {
responseStatus: 500,
responseBody: []byte(`<?xml version="1.0"?>
<ErrorResponse xmlns="http://route53.amazonaws.com/doc/2016-09-07/">
<Error>
<Type>Sender</Type>
<Code>MalformedXML</Code>
<Message>1 validation error detected: Value null at 'route53#ChangeSet' failed to satisfy constraint: Member must not be null</Message>
</Error>
<RequestId>b25f48e8-84fd-11e6-80d9-574e0c4664cb</RequestId>
</ErrorResponse>
`),
expectedError: "1 validation error detected:",
expectedRequestID: "b25f48e8-84fd-11e6-80d9-574e0c4664cb",
},
"Success response": {
responseStatus: 200,
responseBody: []byte(`<?xml version="1.0" encoding="UTF-8"?>
<ChangeResourceRecordSetsResponse>
<ChangeInfo>
<Comment>mockComment</Comment>
<Id>mockID</Id>
</ChangeInfo>
</ChangeResourceRecordSetsResponse>`),
expectedResponseID: "mockID",
},
}
for name, c := range cases {
server := httptest.NewServer(http.HandlerFunc(
func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(c.responseStatus)
w.Write(c.responseBody)
}))
defer server.Close()
t.Run(name, func(t *testing.T) {
svc := route53.NewFromConfig(aws.Config{
Region: "us-east-1",
EndpointResolver: aws.EndpointResolverFunc(func(service, region string) (aws.Endpoint, error) {
return aws.Endpoint{
URL: server.URL,
SigningName: "route53",
}, nil
}),
Retryer: func() aws.Retryer {
return aws.NopRetryer{}
},
})
resp, err := svc.ChangeResourceRecordSets(context.Background(), &route53.ChangeResourceRecordSetsInput{
ChangeBatch: &types.ChangeBatch{
Changes: []types.Change{},
Comment: aws.String("mock"),
},
HostedZoneId: aws.String("zone"),
})
if err == nil && len(c.expectedError) != 0 {
t.Fatalf("expected err, got none")
}
if len(c.expectedError) != 0 {
if e, a := c.expectedError, err.Error(); !strings.Contains(a, e) {
t.Fatalf("expected error to be %s, got %s", e, a)
}
var responseError interface {
ServiceRequestID() string
}
if !errors.As(err, &responseError) {
t.Fatalf("expected error to be of type %T, was not", responseError)
}
if e, a := c.expectedRequestID, responseError.ServiceRequestID(); !strings.EqualFold(e, a) {
t.Fatalf("expected request id to be %s, got %s", e, a)
}
}
if len(c.expectedResponseID) != 0 {
if e, a := c.expectedResponseID, *resp.ChangeInfo.Id; !strings.EqualFold(e, a) {
t.Fatalf("expected response to have id %v, got %v", e, a)
}
}
})
}
}
| 126 |
aws-sdk-go-v2 | aws | Go | // Package customizations provides customizations for the Amazon Route53 API client.
//
// This package provides support for following customizations
//
// Process Response Middleware: used for custom error deserializing
// Sanitize URL Middleware: used for sanitizing url with HostedZoneID member
//
// # Process Response Middleware
//
// Route53 operation "ChangeResourceRecordSets" can have an error response returned in
// a slightly different format. This customization is only applicable to
// ChangeResourceRecordSets operation of Route53.
//
// Here's a sample error response:
//
// <?xml version="1.0" encoding="UTF-8"?>
// <InvalidChangeBatch xmlns="https://route53.amazonaws.com/doc/2013-04-01/">
// <Messages>
// <Message>Tried to create resource record set duplicate.example.com. type A, but it already exists</Message>
// </Messages>
// </InvalidChangeBatch>
//
// The processResponse middleware customizations enables SDK to check for an error
// response starting with "InvalidChangeBatch" tag prior to deserialization.
//
// As this check in error response needs to be performed earlier than response
// deserialization. Since the behavior of Deserialization is in
// reverse order to the other stack steps its easier to consider that "after" means
// "before".
//
// Middleware layering:
//
// HTTP Response -> process response error -> deserialize
//
// In case the returned error response has `InvalidChangeBatch` format, the error is
// deserialized and returned. The operation deserializer does not attempt to deserialize
// as an error is returned by the process response error middleware.
//
// # Sanitize URL Middleware
//
// Route53 operations may return a response containing an id member value appended with
// a string, for example. an id 1234 may be returned as 'foo/1234'. While round-tripping such response
// id value into another operation request, SDK must strip out the additional prefix if any.
// The Sanitize URL Middleware strips out such additionally prepended string to the id.
//
// The Id member with such prepended strings target shape 'ResourceId' or 'DelegationSetId'.
// This customization thus is applied only for operations with id's targeting those target shapes.
// This customization has to be applied before the input is serialized.
//
// Middleware layering:
//
// Input -> Sanitize URL Middleware -> serialize -> next
package customizations
| 54 |
aws-sdk-go-v2 | aws | Go | package customizations
import (
"context"
"fmt"
"github.com/aws/smithy-go"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// AddSanitizeURLMiddlewareOptions provides the options for Route53SanitizeURL middleware setup
type AddSanitizeURLMiddlewareOptions struct {
// functional pointer to sanitize hosted zone id member
// The function is intended to take an input value,
// look for hosted zone id input member and sanitize the value
// to strip out an excess `/hostedzone/` prefix that can be present in
// the hosted zone id input member.
//
// returns an error if any.
SanitizeURLInput func(interface{}) error
}
// AddSanitizeURLMiddleware add the middleware necessary to modify Route53 input before op serialization.
func AddSanitizeURLMiddleware(stack *middleware.Stack, options AddSanitizeURLMiddlewareOptions) error {
return stack.Serialize.Insert(&sanitizeURL{
sanitizeURLInput: options.SanitizeURLInput,
}, "OperationSerializer", middleware.Before)
}
// sanitizeURL cleans up potential formatting issues in the Route53 path.
//
// Notably it will strip out an excess `/hostedzone/` prefix that can be present in
// the hosted zone id input member. That excess prefix is there because some route53 apis return
// the id in that format, so this middleware enables round-tripping those values.
type sanitizeURL struct {
sanitizeURLInput func(interface{}) error
}
// ID returns the id for the middleware.
func (*sanitizeURL) ID() string {
return "Route53:SanitizeURL"
}
// HandleSerialize implements the SerializeMiddleware interface.
func (m *sanitizeURL) HandleSerialize(
ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler,
) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
_, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, &smithy.SerializationError{
Err: fmt.Errorf("unknown request type %T", in.Request),
}
}
if err := m.sanitizeURLInput(in.Parameters); err != nil {
return out, metadata, err
}
return next.HandleSerialize(ctx, in)
}
| 64 |
aws-sdk-go-v2 | aws | Go | package customizations_test
import (
"context"
"fmt"
"strings"
"testing"
"github.com/aws/smithy-go/middleware"
"github.com/aws/smithy-go/transport/http"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awstesting/unit"
"github.com/aws/aws-sdk-go-v2/service/route53"
)
func TestSanitizeURLMiddleware(t *testing.T) {
cases := map[string]struct {
Given string
ExpectedURL string
}{
"includes hostedzone": {
Given: "hostedzone/ABCDEFG",
ExpectedURL: "https://route53.amazonaws.com/2013-04-01/delegationset/ABCDEFG",
},
"excludes hostedzone": {
Given: "ABCDEFG",
ExpectedURL: "https://route53.amazonaws.com/2013-04-01/delegationset/ABCDEFG",
},
"includes leading / in hostedzone": {
Given: "/hostedzone/ABCDEFG",
ExpectedURL: "https://route53.amazonaws.com/2013-04-01/delegationset/ABCDEFG",
},
}
for name, c := range cases {
t.Run(name, func(t *testing.T) {
cfg := aws.Config{
Credentials: unit.StubCredentialsProvider{},
Retryer: func() aws.Retryer {
return aws.NopRetryer{}
},
Region: "mock-region",
}
fm := requestRetrieverMiddleware{}
svc := route53.NewFromConfig(cfg)
svc.DeleteReusableDelegationSet(context.Background(), &route53.DeleteReusableDelegationSetInput{
Id: &c.Given,
}, func(options *route53.Options) {
options.APIOptions = append(options.APIOptions, func(stack *middleware.Stack) error {
stack.Serialize.Insert(&fm, "OperationSerializer", middleware.After)
return nil
})
})
if fm.request == nil {
t.Fatalf("expected request to be serialized, got none")
}
if e, a := c.ExpectedURL, fm.request.URL.String(); !strings.EqualFold(e, a) {
t.Fatalf("Expected url to be serialized as %v, got %v", e, a)
}
})
}
}
type requestRetrieverMiddleware struct {
request *http.Request
}
func (*requestRetrieverMiddleware) ID() string { return "Route53:requestRetrieverMiddleware" }
func (rm *requestRetrieverMiddleware) HandleSerialize(
ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler,
) (
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
) {
req, ok := in.Request.(*http.Request)
if !ok {
return out, metadata, fmt.Errorf("unknown request type %T", req)
}
rm.request = req
return next.HandleSerialize(ctx, in)
}
| 87 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package endpoints
import (
"github.com/aws/aws-sdk-go-v2/aws"
endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2"
"github.com/aws/smithy-go/logging"
"regexp"
)
// Options is the endpoint resolver configuration options
type Options struct {
// Logger is a logging implementation that log events should be sent to.
Logger logging.Logger
// LogDeprecated indicates that deprecated endpoints should be logged to the
// provided logger.
LogDeprecated bool
// ResolvedRegion is used to override the region to be resolved, rather then the
// using the value passed to the ResolveEndpoint method. This value is used by the
// SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative
// name. You must not set this value directly in your application.
ResolvedRegion string
// DisableHTTPS informs the resolver to return an endpoint that does not use the
// HTTPS scheme.
DisableHTTPS bool
// UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint.
UseDualStackEndpoint aws.DualStackEndpointState
// UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint.
UseFIPSEndpoint aws.FIPSEndpointState
}
func (o Options) GetResolvedRegion() string {
return o.ResolvedRegion
}
func (o Options) GetDisableHTTPS() bool {
return o.DisableHTTPS
}
func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState {
return o.UseDualStackEndpoint
}
func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState {
return o.UseFIPSEndpoint
}
func transformToSharedOptions(options Options) endpoints.Options {
return endpoints.Options{
Logger: options.Logger,
LogDeprecated: options.LogDeprecated,
ResolvedRegion: options.ResolvedRegion,
DisableHTTPS: options.DisableHTTPS,
UseDualStackEndpoint: options.UseDualStackEndpoint,
UseFIPSEndpoint: options.UseFIPSEndpoint,
}
}
// Resolver Route 53 endpoint resolver
type Resolver struct {
partitions endpoints.Partitions
}
// ResolveEndpoint resolves the service endpoint for the given region and options
func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) {
if len(region) == 0 {
return endpoint, &aws.MissingRegionError{}
}
opt := transformToSharedOptions(options)
return r.partitions.ResolveEndpoint(region, opt)
}
// New returns a new Resolver
func New() *Resolver {
return &Resolver{
partitions: defaultPartitions,
}
}
var partitionRegexp = struct {
Aws *regexp.Regexp
AwsCn *regexp.Regexp
AwsIso *regexp.Regexp
AwsIsoB *regexp.Regexp
AwsIsoE *regexp.Regexp
AwsIsoF *regexp.Regexp
AwsUsGov *regexp.Regexp
}{
Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"),
AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"),
AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"),
AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"),
AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"),
AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"),
AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"),
}
var defaultPartitions = endpoints.Partitions{
{
ID: "aws",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.DualStackVariant,
}: {
Hostname: "route53.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "route53-fips.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "route53-fips.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "route53.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.Aws,
IsRegionalized: false,
PartitionEndpoint: "aws-global",
Endpoints: endpoints.Endpoints{
endpoints.EndpointKey{
Region: "aws-global",
}: endpoints.Endpoint{
Hostname: "route53.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-east-1",
},
},
endpoints.EndpointKey{
Region: "aws-global",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "route53-fips.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-east-1",
},
},
endpoints.EndpointKey{
Region: "fips-aws-global",
}: endpoints.Endpoint{
Hostname: "route53-fips.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-east-1",
},
Deprecated: aws.TrueTernary,
},
},
},
{
ID: "aws-cn",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.DualStackVariant,
}: {
Hostname: "route53.{region}.api.amazonwebservices.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "route53-fips.{region}.amazonaws.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "route53-fips.{region}.api.amazonwebservices.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "route53.{region}.amazonaws.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsCn,
IsRegionalized: false,
PartitionEndpoint: "aws-cn-global",
Endpoints: endpoints.Endpoints{
endpoints.EndpointKey{
Region: "aws-cn-global",
}: endpoints.Endpoint{
Hostname: "route53.amazonaws.com.cn",
CredentialScope: endpoints.CredentialScope{
Region: "cn-northwest-1",
},
},
},
},
{
ID: "aws-iso",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "route53-fips.{region}.c2s.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "route53.{region}.c2s.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsIso,
IsRegionalized: false,
PartitionEndpoint: "aws-iso-global",
Endpoints: endpoints.Endpoints{
endpoints.EndpointKey{
Region: "aws-iso-global",
}: endpoints.Endpoint{
Hostname: "route53.c2s.ic.gov",
CredentialScope: endpoints.CredentialScope{
Region: "us-iso-east-1",
},
},
},
},
{
ID: "aws-iso-b",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "route53-fips.{region}.sc2s.sgov.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "route53.{region}.sc2s.sgov.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsIsoB,
IsRegionalized: false,
PartitionEndpoint: "aws-iso-b-global",
Endpoints: endpoints.Endpoints{
endpoints.EndpointKey{
Region: "aws-iso-b-global",
}: endpoints.Endpoint{
Hostname: "route53.sc2s.sgov.gov",
CredentialScope: endpoints.CredentialScope{
Region: "us-isob-east-1",
},
},
},
},
{
ID: "aws-iso-e",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "route53-fips.{region}.cloud.adc-e.uk",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "route53.{region}.cloud.adc-e.uk",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsIsoE,
IsRegionalized: true,
},
{
ID: "aws-iso-f",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "route53-fips.{region}.csp.hci.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "route53.{region}.csp.hci.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsIsoF,
IsRegionalized: true,
},
{
ID: "aws-us-gov",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.DualStackVariant,
}: {
Hostname: "route53.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "route53-fips.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "route53-fips.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "route53.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsUsGov,
IsRegionalized: false,
PartitionEndpoint: "aws-us-gov-global",
Endpoints: endpoints.Endpoints{
endpoints.EndpointKey{
Region: "aws-us-gov-global",
}: endpoints.Endpoint{
Hostname: "route53.us-gov.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-gov-west-1",
},
},
endpoints.EndpointKey{
Region: "aws-us-gov-global",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "route53.us-gov.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-gov-west-1",
},
},
endpoints.EndpointKey{
Region: "fips-aws-us-gov-global",
}: endpoints.Endpoint{
Hostname: "route53.us-gov.amazonaws.com",
CredentialScope: endpoints.CredentialScope{
Region: "us-gov-west-1",
},
Deprecated: aws.TrueTernary,
},
},
},
}
| 388 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package endpoints
import (
"testing"
)
func TestRegexCompile(t *testing.T) {
_ = defaultPartitions
}
| 12 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package types
type AccountLimitType string
// Enum values for AccountLimitType
const (
AccountLimitTypeMaxHealthChecksByOwner AccountLimitType = "MAX_HEALTH_CHECKS_BY_OWNER"
AccountLimitTypeMaxHostedZonesByOwner AccountLimitType = "MAX_HOSTED_ZONES_BY_OWNER"
AccountLimitTypeMaxTrafficPolicyInstancesByOwner AccountLimitType = "MAX_TRAFFIC_POLICY_INSTANCES_BY_OWNER"
AccountLimitTypeMaxReusableDelegationSetsByOwner AccountLimitType = "MAX_REUSABLE_DELEGATION_SETS_BY_OWNER"
AccountLimitTypeMaxTrafficPoliciesByOwner AccountLimitType = "MAX_TRAFFIC_POLICIES_BY_OWNER"
)
// Values returns all known values for AccountLimitType. Note that this can be
// expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (AccountLimitType) Values() []AccountLimitType {
return []AccountLimitType{
"MAX_HEALTH_CHECKS_BY_OWNER",
"MAX_HOSTED_ZONES_BY_OWNER",
"MAX_TRAFFIC_POLICY_INSTANCES_BY_OWNER",
"MAX_REUSABLE_DELEGATION_SETS_BY_OWNER",
"MAX_TRAFFIC_POLICIES_BY_OWNER",
}
}
type ChangeAction string
// Enum values for ChangeAction
const (
ChangeActionCreate ChangeAction = "CREATE"
ChangeActionDelete ChangeAction = "DELETE"
ChangeActionUpsert ChangeAction = "UPSERT"
)
// Values returns all known values for ChangeAction. Note that this can be
// expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (ChangeAction) Values() []ChangeAction {
return []ChangeAction{
"CREATE",
"DELETE",
"UPSERT",
}
}
type ChangeStatus string
// Enum values for ChangeStatus
const (
ChangeStatusPending ChangeStatus = "PENDING"
ChangeStatusInsync ChangeStatus = "INSYNC"
)
// Values returns all known values for ChangeStatus. Note that this can be
// expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (ChangeStatus) Values() []ChangeStatus {
return []ChangeStatus{
"PENDING",
"INSYNC",
}
}
type CidrCollectionChangeAction string
// Enum values for CidrCollectionChangeAction
const (
CidrCollectionChangeActionPut CidrCollectionChangeAction = "PUT"
CidrCollectionChangeActionDeleteIfExists CidrCollectionChangeAction = "DELETE_IF_EXISTS"
)
// Values returns all known values for CidrCollectionChangeAction. Note that this
// can be expanded in the future, and so it is only as up to date as the client.
// The ordering of this slice is not guaranteed to be stable across updates.
func (CidrCollectionChangeAction) Values() []CidrCollectionChangeAction {
return []CidrCollectionChangeAction{
"PUT",
"DELETE_IF_EXISTS",
}
}
type CloudWatchRegion string
// Enum values for CloudWatchRegion
const (
CloudWatchRegionUsEast1 CloudWatchRegion = "us-east-1"
CloudWatchRegionUsEast2 CloudWatchRegion = "us-east-2"
CloudWatchRegionUsWest1 CloudWatchRegion = "us-west-1"
CloudWatchRegionUsWest2 CloudWatchRegion = "us-west-2"
CloudWatchRegionCaCentral1 CloudWatchRegion = "ca-central-1"
CloudWatchRegionEuCentral1 CloudWatchRegion = "eu-central-1"
CloudWatchRegionEuCentral2 CloudWatchRegion = "eu-central-2"
CloudWatchRegionEuWest1 CloudWatchRegion = "eu-west-1"
CloudWatchRegionEuWest2 CloudWatchRegion = "eu-west-2"
CloudWatchRegionEuWest3 CloudWatchRegion = "eu-west-3"
CloudWatchRegionApEast1 CloudWatchRegion = "ap-east-1"
CloudWatchRegionMeSouth1 CloudWatchRegion = "me-south-1"
CloudWatchRegionMeCentral1 CloudWatchRegion = "me-central-1"
CloudWatchRegionApSouth1 CloudWatchRegion = "ap-south-1"
CloudWatchRegionApSouth2 CloudWatchRegion = "ap-south-2"
CloudWatchRegionApSoutheast1 CloudWatchRegion = "ap-southeast-1"
CloudWatchRegionApSoutheast2 CloudWatchRegion = "ap-southeast-2"
CloudWatchRegionApSoutheast3 CloudWatchRegion = "ap-southeast-3"
CloudWatchRegionApNortheast1 CloudWatchRegion = "ap-northeast-1"
CloudWatchRegionApNortheast2 CloudWatchRegion = "ap-northeast-2"
CloudWatchRegionApNortheast3 CloudWatchRegion = "ap-northeast-3"
CloudWatchRegionEuNorth1 CloudWatchRegion = "eu-north-1"
CloudWatchRegionSaEast1 CloudWatchRegion = "sa-east-1"
CloudWatchRegionCnNorthwest1 CloudWatchRegion = "cn-northwest-1"
CloudWatchRegionCnNorth1 CloudWatchRegion = "cn-north-1"
CloudWatchRegionAfSouth1 CloudWatchRegion = "af-south-1"
CloudWatchRegionEuSouth1 CloudWatchRegion = "eu-south-1"
CloudWatchRegionEuSouth2 CloudWatchRegion = "eu-south-2"
CloudWatchRegionUsGovWest1 CloudWatchRegion = "us-gov-west-1"
CloudWatchRegionUsGovEast1 CloudWatchRegion = "us-gov-east-1"
CloudWatchRegionUsIsoEast1 CloudWatchRegion = "us-iso-east-1"
CloudWatchRegionUsIsoWest1 CloudWatchRegion = "us-iso-west-1"
CloudWatchRegionUsIsobEast1 CloudWatchRegion = "us-isob-east-1"
CloudWatchRegionApSoutheast4 CloudWatchRegion = "ap-southeast-4"
)
// Values returns all known values for CloudWatchRegion. Note that this can be
// expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (CloudWatchRegion) Values() []CloudWatchRegion {
return []CloudWatchRegion{
"us-east-1",
"us-east-2",
"us-west-1",
"us-west-2",
"ca-central-1",
"eu-central-1",
"eu-central-2",
"eu-west-1",
"eu-west-2",
"eu-west-3",
"ap-east-1",
"me-south-1",
"me-central-1",
"ap-south-1",
"ap-south-2",
"ap-southeast-1",
"ap-southeast-2",
"ap-southeast-3",
"ap-northeast-1",
"ap-northeast-2",
"ap-northeast-3",
"eu-north-1",
"sa-east-1",
"cn-northwest-1",
"cn-north-1",
"af-south-1",
"eu-south-1",
"eu-south-2",
"us-gov-west-1",
"us-gov-east-1",
"us-iso-east-1",
"us-iso-west-1",
"us-isob-east-1",
"ap-southeast-4",
}
}
type ComparisonOperator string
// Enum values for ComparisonOperator
const (
ComparisonOperatorGreaterThanOrEqualToThreshold ComparisonOperator = "GreaterThanOrEqualToThreshold"
ComparisonOperatorGreaterThanThreshold ComparisonOperator = "GreaterThanThreshold"
ComparisonOperatorLessThanThreshold ComparisonOperator = "LessThanThreshold"
ComparisonOperatorLessThanOrEqualToThreshold ComparisonOperator = "LessThanOrEqualToThreshold"
)
// Values returns all known values for ComparisonOperator. Note that this can be
// expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (ComparisonOperator) Values() []ComparisonOperator {
return []ComparisonOperator{
"GreaterThanOrEqualToThreshold",
"GreaterThanThreshold",
"LessThanThreshold",
"LessThanOrEqualToThreshold",
}
}
type HealthCheckRegion string
// Enum values for HealthCheckRegion
const (
HealthCheckRegionUsEast1 HealthCheckRegion = "us-east-1"
HealthCheckRegionUsWest1 HealthCheckRegion = "us-west-1"
HealthCheckRegionUsWest2 HealthCheckRegion = "us-west-2"
HealthCheckRegionEuWest1 HealthCheckRegion = "eu-west-1"
HealthCheckRegionApSoutheast1 HealthCheckRegion = "ap-southeast-1"
HealthCheckRegionApSoutheast2 HealthCheckRegion = "ap-southeast-2"
HealthCheckRegionApNortheast1 HealthCheckRegion = "ap-northeast-1"
HealthCheckRegionSaEast1 HealthCheckRegion = "sa-east-1"
)
// Values returns all known values for HealthCheckRegion. Note that this can be
// expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (HealthCheckRegion) Values() []HealthCheckRegion {
return []HealthCheckRegion{
"us-east-1",
"us-west-1",
"us-west-2",
"eu-west-1",
"ap-southeast-1",
"ap-southeast-2",
"ap-northeast-1",
"sa-east-1",
}
}
type HealthCheckType string
// Enum values for HealthCheckType
const (
HealthCheckTypeHttp HealthCheckType = "HTTP"
HealthCheckTypeHttps HealthCheckType = "HTTPS"
HealthCheckTypeHttpStrMatch HealthCheckType = "HTTP_STR_MATCH"
HealthCheckTypeHttpsStrMatch HealthCheckType = "HTTPS_STR_MATCH"
HealthCheckTypeTcp HealthCheckType = "TCP"
HealthCheckTypeCalculated HealthCheckType = "CALCULATED"
HealthCheckTypeCloudwatchMetric HealthCheckType = "CLOUDWATCH_METRIC"
HealthCheckTypeRecoveryControl HealthCheckType = "RECOVERY_CONTROL"
)
// Values returns all known values for HealthCheckType. Note that this can be
// expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (HealthCheckType) Values() []HealthCheckType {
return []HealthCheckType{
"HTTP",
"HTTPS",
"HTTP_STR_MATCH",
"HTTPS_STR_MATCH",
"TCP",
"CALCULATED",
"CLOUDWATCH_METRIC",
"RECOVERY_CONTROL",
}
}
type HostedZoneLimitType string
// Enum values for HostedZoneLimitType
const (
HostedZoneLimitTypeMaxRrsetsByZone HostedZoneLimitType = "MAX_RRSETS_BY_ZONE"
HostedZoneLimitTypeMaxVpcsAssociatedByZone HostedZoneLimitType = "MAX_VPCS_ASSOCIATED_BY_ZONE"
)
// Values returns all known values for HostedZoneLimitType. Note that this can be
// expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (HostedZoneLimitType) Values() []HostedZoneLimitType {
return []HostedZoneLimitType{
"MAX_RRSETS_BY_ZONE",
"MAX_VPCS_ASSOCIATED_BY_ZONE",
}
}
type InsufficientDataHealthStatus string
// Enum values for InsufficientDataHealthStatus
const (
InsufficientDataHealthStatusHealthy InsufficientDataHealthStatus = "Healthy"
InsufficientDataHealthStatusUnhealthy InsufficientDataHealthStatus = "Unhealthy"
InsufficientDataHealthStatusLastKnownStatus InsufficientDataHealthStatus = "LastKnownStatus"
)
// Values returns all known values for InsufficientDataHealthStatus. Note that
// this can be expanded in the future, and so it is only as up to date as the
// client. The ordering of this slice is not guaranteed to be stable across
// updates.
func (InsufficientDataHealthStatus) Values() []InsufficientDataHealthStatus {
return []InsufficientDataHealthStatus{
"Healthy",
"Unhealthy",
"LastKnownStatus",
}
}
type ResettableElementName string
// Enum values for ResettableElementName
const (
ResettableElementNameFullyQualifiedDomainName ResettableElementName = "FullyQualifiedDomainName"
ResettableElementNameRegions ResettableElementName = "Regions"
ResettableElementNameResourcePath ResettableElementName = "ResourcePath"
ResettableElementNameChildHealthChecks ResettableElementName = "ChildHealthChecks"
)
// Values returns all known values for ResettableElementName. Note that this can
// be expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (ResettableElementName) Values() []ResettableElementName {
return []ResettableElementName{
"FullyQualifiedDomainName",
"Regions",
"ResourcePath",
"ChildHealthChecks",
}
}
type ResourceRecordSetFailover string
// Enum values for ResourceRecordSetFailover
const (
ResourceRecordSetFailoverPrimary ResourceRecordSetFailover = "PRIMARY"
ResourceRecordSetFailoverSecondary ResourceRecordSetFailover = "SECONDARY"
)
// Values returns all known values for ResourceRecordSetFailover. Note that this
// can be expanded in the future, and so it is only as up to date as the client.
// The ordering of this slice is not guaranteed to be stable across updates.
func (ResourceRecordSetFailover) Values() []ResourceRecordSetFailover {
return []ResourceRecordSetFailover{
"PRIMARY",
"SECONDARY",
}
}
type ResourceRecordSetRegion string
// Enum values for ResourceRecordSetRegion
const (
ResourceRecordSetRegionUsEast1 ResourceRecordSetRegion = "us-east-1"
ResourceRecordSetRegionUsEast2 ResourceRecordSetRegion = "us-east-2"
ResourceRecordSetRegionUsWest1 ResourceRecordSetRegion = "us-west-1"
ResourceRecordSetRegionUsWest2 ResourceRecordSetRegion = "us-west-2"
ResourceRecordSetRegionCaCentral1 ResourceRecordSetRegion = "ca-central-1"
ResourceRecordSetRegionEuWest1 ResourceRecordSetRegion = "eu-west-1"
ResourceRecordSetRegionEuWest2 ResourceRecordSetRegion = "eu-west-2"
ResourceRecordSetRegionEuWest3 ResourceRecordSetRegion = "eu-west-3"
ResourceRecordSetRegionEuCentral1 ResourceRecordSetRegion = "eu-central-1"
ResourceRecordSetRegionEuCentral2 ResourceRecordSetRegion = "eu-central-2"
ResourceRecordSetRegionApSoutheast1 ResourceRecordSetRegion = "ap-southeast-1"
ResourceRecordSetRegionApSoutheast2 ResourceRecordSetRegion = "ap-southeast-2"
ResourceRecordSetRegionApSoutheast3 ResourceRecordSetRegion = "ap-southeast-3"
ResourceRecordSetRegionApNortheast1 ResourceRecordSetRegion = "ap-northeast-1"
ResourceRecordSetRegionApNortheast2 ResourceRecordSetRegion = "ap-northeast-2"
ResourceRecordSetRegionApNortheast3 ResourceRecordSetRegion = "ap-northeast-3"
ResourceRecordSetRegionEuNorth1 ResourceRecordSetRegion = "eu-north-1"
ResourceRecordSetRegionSaEast1 ResourceRecordSetRegion = "sa-east-1"
ResourceRecordSetRegionCnNorth1 ResourceRecordSetRegion = "cn-north-1"
ResourceRecordSetRegionCnNorthwest1 ResourceRecordSetRegion = "cn-northwest-1"
ResourceRecordSetRegionApEast1 ResourceRecordSetRegion = "ap-east-1"
ResourceRecordSetRegionMeSouth1 ResourceRecordSetRegion = "me-south-1"
ResourceRecordSetRegionMeCentral1 ResourceRecordSetRegion = "me-central-1"
ResourceRecordSetRegionApSouth1 ResourceRecordSetRegion = "ap-south-1"
ResourceRecordSetRegionApSouth2 ResourceRecordSetRegion = "ap-south-2"
ResourceRecordSetRegionAfSouth1 ResourceRecordSetRegion = "af-south-1"
ResourceRecordSetRegionEuSouth1 ResourceRecordSetRegion = "eu-south-1"
ResourceRecordSetRegionEuSouth2 ResourceRecordSetRegion = "eu-south-2"
ResourceRecordSetRegionApSoutheast4 ResourceRecordSetRegion = "ap-southeast-4"
)
// Values returns all known values for ResourceRecordSetRegion. Note that this can
// be expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (ResourceRecordSetRegion) Values() []ResourceRecordSetRegion {
return []ResourceRecordSetRegion{
"us-east-1",
"us-east-2",
"us-west-1",
"us-west-2",
"ca-central-1",
"eu-west-1",
"eu-west-2",
"eu-west-3",
"eu-central-1",
"eu-central-2",
"ap-southeast-1",
"ap-southeast-2",
"ap-southeast-3",
"ap-northeast-1",
"ap-northeast-2",
"ap-northeast-3",
"eu-north-1",
"sa-east-1",
"cn-north-1",
"cn-northwest-1",
"ap-east-1",
"me-south-1",
"me-central-1",
"ap-south-1",
"ap-south-2",
"af-south-1",
"eu-south-1",
"eu-south-2",
"ap-southeast-4",
}
}
type ReusableDelegationSetLimitType string
// Enum values for ReusableDelegationSetLimitType
const (
ReusableDelegationSetLimitTypeMaxZonesByReusableDelegationSet ReusableDelegationSetLimitType = "MAX_ZONES_BY_REUSABLE_DELEGATION_SET"
)
// Values returns all known values for ReusableDelegationSetLimitType. Note that
// this can be expanded in the future, and so it is only as up to date as the
// client. The ordering of this slice is not guaranteed to be stable across
// updates.
func (ReusableDelegationSetLimitType) Values() []ReusableDelegationSetLimitType {
return []ReusableDelegationSetLimitType{
"MAX_ZONES_BY_REUSABLE_DELEGATION_SET",
}
}
type RRType string
// Enum values for RRType
const (
RRTypeSoa RRType = "SOA"
RRTypeA RRType = "A"
RRTypeTxt RRType = "TXT"
RRTypeNs RRType = "NS"
RRTypeCname RRType = "CNAME"
RRTypeMx RRType = "MX"
RRTypeNaptr RRType = "NAPTR"
RRTypePtr RRType = "PTR"
RRTypeSrv RRType = "SRV"
RRTypeSpf RRType = "SPF"
RRTypeAaaa RRType = "AAAA"
RRTypeCaa RRType = "CAA"
RRTypeDs RRType = "DS"
)
// Values returns all known values for RRType. Note that this can be expanded in
// the future, and so it is only as up to date as the client. The ordering of this
// slice is not guaranteed to be stable across updates.
func (RRType) Values() []RRType {
return []RRType{
"SOA",
"A",
"TXT",
"NS",
"CNAME",
"MX",
"NAPTR",
"PTR",
"SRV",
"SPF",
"AAAA",
"CAA",
"DS",
}
}
type Statistic string
// Enum values for Statistic
const (
StatisticAverage Statistic = "Average"
StatisticSum Statistic = "Sum"
StatisticSampleCount Statistic = "SampleCount"
StatisticMaximum Statistic = "Maximum"
StatisticMinimum Statistic = "Minimum"
)
// Values returns all known values for Statistic. Note that this can be expanded
// in the future, and so it is only as up to date as the client. The ordering of
// this slice is not guaranteed to be stable across updates.
func (Statistic) Values() []Statistic {
return []Statistic{
"Average",
"Sum",
"SampleCount",
"Maximum",
"Minimum",
}
}
type TagResourceType string
// Enum values for TagResourceType
const (
TagResourceTypeHealthcheck TagResourceType = "healthcheck"
TagResourceTypeHostedzone TagResourceType = "hostedzone"
)
// Values returns all known values for TagResourceType. Note that this can be
// expanded in the future, and so it is only as up to date as the client. The
// ordering of this slice is not guaranteed to be stable across updates.
func (TagResourceType) Values() []TagResourceType {
return []TagResourceType{
"healthcheck",
"hostedzone",
}
}
type VPCRegion string
// Enum values for VPCRegion
const (
VPCRegionUsEast1 VPCRegion = "us-east-1"
VPCRegionUsEast2 VPCRegion = "us-east-2"
VPCRegionUsWest1 VPCRegion = "us-west-1"
VPCRegionUsWest2 VPCRegion = "us-west-2"
VPCRegionEuWest1 VPCRegion = "eu-west-1"
VPCRegionEuWest2 VPCRegion = "eu-west-2"
VPCRegionEuWest3 VPCRegion = "eu-west-3"
VPCRegionEuCentral1 VPCRegion = "eu-central-1"
VPCRegionEuCentral2 VPCRegion = "eu-central-2"
VPCRegionApEast1 VPCRegion = "ap-east-1"
VPCRegionMeSouth1 VPCRegion = "me-south-1"
VPCRegionUsGovWest1 VPCRegion = "us-gov-west-1"
VPCRegionUsGovEast1 VPCRegion = "us-gov-east-1"
VPCRegionUsIsoEast1 VPCRegion = "us-iso-east-1"
VPCRegionUsIsoWest1 VPCRegion = "us-iso-west-1"
VPCRegionUsIsobEast1 VPCRegion = "us-isob-east-1"
VPCRegionMeCentral1 VPCRegion = "me-central-1"
VPCRegionApSoutheast1 VPCRegion = "ap-southeast-1"
VPCRegionApSoutheast2 VPCRegion = "ap-southeast-2"
VPCRegionApSoutheast3 VPCRegion = "ap-southeast-3"
VPCRegionApSouth1 VPCRegion = "ap-south-1"
VPCRegionApSouth2 VPCRegion = "ap-south-2"
VPCRegionApNortheast1 VPCRegion = "ap-northeast-1"
VPCRegionApNortheast2 VPCRegion = "ap-northeast-2"
VPCRegionApNortheast3 VPCRegion = "ap-northeast-3"
VPCRegionEuNorth1 VPCRegion = "eu-north-1"
VPCRegionSaEast1 VPCRegion = "sa-east-1"
VPCRegionCaCentral1 VPCRegion = "ca-central-1"
VPCRegionCnNorth1 VPCRegion = "cn-north-1"
VPCRegionAfSouth1 VPCRegion = "af-south-1"
VPCRegionEuSouth1 VPCRegion = "eu-south-1"
VPCRegionEuSouth2 VPCRegion = "eu-south-2"
VPCRegionApSoutheast4 VPCRegion = "ap-southeast-4"
)
// Values returns all known values for VPCRegion. Note that this can be expanded
// in the future, and so it is only as up to date as the client. The ordering of
// this slice is not guaranteed to be stable across updates.
func (VPCRegion) Values() []VPCRegion {
return []VPCRegion{
"us-east-1",
"us-east-2",
"us-west-1",
"us-west-2",
"eu-west-1",
"eu-west-2",
"eu-west-3",
"eu-central-1",
"eu-central-2",
"ap-east-1",
"me-south-1",
"us-gov-west-1",
"us-gov-east-1",
"us-iso-east-1",
"us-iso-west-1",
"us-isob-east-1",
"me-central-1",
"ap-southeast-1",
"ap-southeast-2",
"ap-southeast-3",
"ap-south-1",
"ap-south-2",
"ap-northeast-1",
"ap-northeast-2",
"ap-northeast-3",
"eu-north-1",
"sa-east-1",
"ca-central-1",
"cn-north-1",
"af-south-1",
"eu-south-1",
"eu-south-2",
"ap-southeast-4",
}
}
| 578 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package types
import (
"fmt"
smithy "github.com/aws/smithy-go"
)
// This CIDR block is already in use.
type CidrBlockInUseException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *CidrBlockInUseException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *CidrBlockInUseException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *CidrBlockInUseException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "CidrBlockInUseException"
}
return *e.ErrorCodeOverride
}
func (e *CidrBlockInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// A CIDR collection with this name and a different caller reference already
// exists in this account.
type CidrCollectionAlreadyExistsException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *CidrCollectionAlreadyExistsException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *CidrCollectionAlreadyExistsException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *CidrCollectionAlreadyExistsException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "CidrCollectionAlreadyExistsException"
}
return *e.ErrorCodeOverride
}
func (e *CidrCollectionAlreadyExistsException) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// This CIDR collection is in use, and isn't empty.
type CidrCollectionInUseException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *CidrCollectionInUseException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *CidrCollectionInUseException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *CidrCollectionInUseException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "CidrCollectionInUseException"
}
return *e.ErrorCodeOverride
}
func (e *CidrCollectionInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The CIDR collection version you provided, doesn't match the one in the
// ListCidrCollections operation.
type CidrCollectionVersionMismatchException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *CidrCollectionVersionMismatchException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *CidrCollectionVersionMismatchException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *CidrCollectionVersionMismatchException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "CidrCollectionVersionMismatchException"
}
return *e.ErrorCodeOverride
}
func (e *CidrCollectionVersionMismatchException) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// Another user submitted a request to create, update, or delete the object at the
// same time that you did. Retry the request.
type ConcurrentModification struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ConcurrentModification) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ConcurrentModification) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ConcurrentModification) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ConcurrentModification"
}
return *e.ErrorCodeOverride
}
func (e *ConcurrentModification) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The cause of this error depends on the operation that you're performing:
// - Create a public hosted zone: Two hosted zones that have the same name or
// that have a parent/child relationship (example.com and test.example.com) can't
// have any common name servers. You tried to create a hosted zone that has the
// same name as an existing hosted zone or that's the parent or child of an
// existing hosted zone, and you specified a delegation set that shares one or more
// name servers with the existing hosted zone. For more information, see
// CreateReusableDelegationSet (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateReusableDelegationSet.html)
// .
// - Create a private hosted zone: A hosted zone with the specified name already
// exists and is already associated with the Amazon VPC that you specified.
// - Associate VPCs with a private hosted zone: The VPC that you specified is
// already associated with another hosted zone that has the same name.
type ConflictingDomainExists struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ConflictingDomainExists) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ConflictingDomainExists) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ConflictingDomainExists) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ConflictingDomainExists"
}
return *e.ErrorCodeOverride
}
func (e *ConflictingDomainExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// You tried to update a traffic policy instance by using a traffic policy version
// that has a different DNS type than the current type for the instance. You
// specified the type in the JSON document in the CreateTrafficPolicy or
// CreateTrafficPolicyVersion request.
type ConflictingTypes struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ConflictingTypes) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ConflictingTypes) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ConflictingTypes) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ConflictingTypes"
}
return *e.ErrorCodeOverride
}
func (e *ConflictingTypes) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// A delegation set with the same owner and caller reference combination has
// already been created.
type DelegationSetAlreadyCreated struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DelegationSetAlreadyCreated) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DelegationSetAlreadyCreated) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DelegationSetAlreadyCreated) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DelegationSetAlreadyCreated"
}
return *e.ErrorCodeOverride
}
func (e *DelegationSetAlreadyCreated) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified delegation set has already been marked as reusable.
type DelegationSetAlreadyReusable struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DelegationSetAlreadyReusable) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DelegationSetAlreadyReusable) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DelegationSetAlreadyReusable) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DelegationSetAlreadyReusable"
}
return *e.ErrorCodeOverride
}
func (e *DelegationSetAlreadyReusable) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified delegation contains associated hosted zones which must be deleted
// before the reusable delegation set can be deleted.
type DelegationSetInUse struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DelegationSetInUse) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DelegationSetInUse) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DelegationSetInUse) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DelegationSetInUse"
}
return *e.ErrorCodeOverride
}
func (e *DelegationSetInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// You can create a hosted zone that has the same name as an existing hosted zone
// (example.com is common), but there is a limit to the number of hosted zones that
// have the same name. If you get this error, Amazon Route 53 has reached that
// limit. If you own the domain name and Route 53 generates this error, contact
// Customer Support.
type DelegationSetNotAvailable struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DelegationSetNotAvailable) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DelegationSetNotAvailable) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DelegationSetNotAvailable) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DelegationSetNotAvailable"
}
return *e.ErrorCodeOverride
}
func (e *DelegationSetNotAvailable) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// A reusable delegation set with the specified ID does not exist.
type DelegationSetNotReusable struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DelegationSetNotReusable) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DelegationSetNotReusable) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DelegationSetNotReusable) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DelegationSetNotReusable"
}
return *e.ErrorCodeOverride
}
func (e *DelegationSetNotReusable) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The hosted zone doesn't have any DNSSEC resources.
type DNSSECNotFound struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DNSSECNotFound) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DNSSECNotFound) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DNSSECNotFound) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DNSSECNotFound"
}
return *e.ErrorCodeOverride
}
func (e *DNSSECNotFound) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The health check you're attempting to create already exists. Amazon Route 53
// returns this error when you submit a request that has the following values:
// - The same value for CallerReference as an existing health check, and one or
// more values that differ from the existing health check that has the same caller
// reference.
// - The same value for CallerReference as a health check that you created and
// later deleted, regardless of the other settings in the request.
type HealthCheckAlreadyExists struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *HealthCheckAlreadyExists) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *HealthCheckAlreadyExists) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *HealthCheckAlreadyExists) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "HealthCheckAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *HealthCheckAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// This error code is not in use.
type HealthCheckInUse struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *HealthCheckInUse) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *HealthCheckInUse) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *HealthCheckInUse) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "HealthCheckInUse"
}
return *e.ErrorCodeOverride
}
func (e *HealthCheckInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The value of HealthCheckVersion in the request doesn't match the value of
// HealthCheckVersion in the health check.
type HealthCheckVersionMismatch struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *HealthCheckVersionMismatch) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *HealthCheckVersionMismatch) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *HealthCheckVersionMismatch) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "HealthCheckVersionMismatch"
}
return *e.ErrorCodeOverride
}
func (e *HealthCheckVersionMismatch) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The hosted zone you're trying to create already exists. Amazon Route 53 returns
// this error when a hosted zone has already been created with the specified
// CallerReference .
type HostedZoneAlreadyExists struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *HostedZoneAlreadyExists) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *HostedZoneAlreadyExists) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *HostedZoneAlreadyExists) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "HostedZoneAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *HostedZoneAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The hosted zone contains resource records that are not SOA or NS records.
type HostedZoneNotEmpty struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *HostedZoneNotEmpty) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *HostedZoneNotEmpty) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *HostedZoneNotEmpty) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "HostedZoneNotEmpty"
}
return *e.ErrorCodeOverride
}
func (e *HostedZoneNotEmpty) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified HostedZone can't be found.
type HostedZoneNotFound struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *HostedZoneNotFound) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *HostedZoneNotFound) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *HostedZoneNotFound) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "HostedZoneNotFound"
}
return *e.ErrorCodeOverride
}
func (e *HostedZoneNotFound) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified hosted zone is a public hosted zone, not a private hosted zone.
type HostedZoneNotPrivate struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *HostedZoneNotPrivate) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *HostedZoneNotPrivate) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *HostedZoneNotPrivate) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "HostedZoneNotPrivate"
}
return *e.ErrorCodeOverride
}
func (e *HostedZoneNotPrivate) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The hosted zone nameservers don't match the parent nameservers. The hosted zone
// and parent must have the same nameservers.
type HostedZonePartiallyDelegated struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *HostedZonePartiallyDelegated) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *HostedZonePartiallyDelegated) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *HostedZonePartiallyDelegated) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "HostedZonePartiallyDelegated"
}
return *e.ErrorCodeOverride
}
func (e *HostedZonePartiallyDelegated) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The resource you're trying to access is unsupported on this Amazon Route 53
// endpoint.
type IncompatibleVersion struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *IncompatibleVersion) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *IncompatibleVersion) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *IncompatibleVersion) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "IncompatibleVersion"
}
return *e.ErrorCodeOverride
}
func (e *IncompatibleVersion) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Amazon Route 53 doesn't have the permissions required to create log streams and
// send query logs to log streams. Possible causes include the following:
// - There is no resource policy that specifies the log group ARN in the value
// for Resource .
// - The resource policy that includes the log group ARN in the value for
// Resource doesn't have the necessary permissions.
// - The resource policy hasn't finished propagating yet.
// - The Key management service (KMS) key you specified doesn’t exist or it
// can’t be used with the log group associated with query log. Update or provide a
// resource policy to grant permissions for the KMS key.
// - The Key management service (KMS) key you specified is marked as disabled
// for the log group associated with query log. Update or provide a resource policy
// to grant permissions for the KMS key.
type InsufficientCloudWatchLogsResourcePolicy struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InsufficientCloudWatchLogsResourcePolicy) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InsufficientCloudWatchLogsResourcePolicy) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InsufficientCloudWatchLogsResourcePolicy) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InsufficientCloudWatchLogsResourcePolicy"
}
return *e.ErrorCodeOverride
}
func (e *InsufficientCloudWatchLogsResourcePolicy) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// Parameter name is not valid.
type InvalidArgument struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidArgument) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidArgument) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidArgument) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidArgument"
}
return *e.ErrorCodeOverride
}
func (e *InvalidArgument) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// This exception contains a list of messages that might contain one or more error
// messages. Each error message indicates one error in the change batch.
type InvalidChangeBatch struct {
Message *string
ErrorCodeOverride *string
Messages []string
noSmithyDocumentSerde
}
func (e *InvalidChangeBatch) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidChangeBatch) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidChangeBatch) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidChangeBatch"
}
return *e.ErrorCodeOverride
}
func (e *InvalidChangeBatch) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified domain name is not valid.
type InvalidDomainName struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidDomainName) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidDomainName) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidDomainName) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidDomainName"
}
return *e.ErrorCodeOverride
}
func (e *InvalidDomainName) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The input is not valid.
type InvalidInput struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidInput) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidInput) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidInput) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidInput"
}
return *e.ErrorCodeOverride
}
func (e *InvalidInput) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The key-signing key (KSK) name that you specified isn't a valid name.
type InvalidKeySigningKeyName struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidKeySigningKeyName) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidKeySigningKeyName) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidKeySigningKeyName) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidKeySigningKeyName"
}
return *e.ErrorCodeOverride
}
func (e *InvalidKeySigningKeyName) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The key-signing key (KSK) status isn't valid or another KSK has the status
// INTERNAL_FAILURE .
type InvalidKeySigningKeyStatus struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidKeySigningKeyStatus) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidKeySigningKeyStatus) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidKeySigningKeyStatus) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidKeySigningKeyStatus"
}
return *e.ErrorCodeOverride
}
func (e *InvalidKeySigningKeyStatus) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The KeyManagementServiceArn that you specified isn't valid to use with DNSSEC
// signing.
type InvalidKMSArn struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidKMSArn) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidKMSArn) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidKMSArn) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidKMSArn"
}
return *e.ErrorCodeOverride
}
func (e *InvalidKMSArn) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The value that you specified to get the second or subsequent page of results is
// invalid.
type InvalidPaginationToken struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidPaginationToken) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidPaginationToken) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidPaginationToken) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidPaginationToken"
}
return *e.ErrorCodeOverride
}
func (e *InvalidPaginationToken) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Your hosted zone status isn't valid for this operation. In the hosted zone,
// change the status to enable DNSSEC or disable DNSSEC .
type InvalidSigningStatus struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidSigningStatus) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidSigningStatus) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidSigningStatus) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidSigningStatus"
}
return *e.ErrorCodeOverride
}
func (e *InvalidSigningStatus) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The format of the traffic policy document that you specified in the Document
// element is not valid.
type InvalidTrafficPolicyDocument struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidTrafficPolicyDocument) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidTrafficPolicyDocument) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidTrafficPolicyDocument) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidTrafficPolicyDocument"
}
return *e.ErrorCodeOverride
}
func (e *InvalidTrafficPolicyDocument) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The VPC ID that you specified either isn't a valid ID or the current account is
// not authorized to access this VPC.
type InvalidVPCId struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidVPCId) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidVPCId) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidVPCId) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidVPCId"
}
return *e.ErrorCodeOverride
}
func (e *InvalidVPCId) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// You've already created a key-signing key (KSK) with this name or with the same
// customer managed key ARN.
type KeySigningKeyAlreadyExists struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *KeySigningKeyAlreadyExists) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *KeySigningKeyAlreadyExists) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *KeySigningKeyAlreadyExists) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "KeySigningKeyAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *KeySigningKeyAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The key-signing key (KSK) is specified in a parent DS record.
type KeySigningKeyInParentDSRecord struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *KeySigningKeyInParentDSRecord) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *KeySigningKeyInParentDSRecord) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *KeySigningKeyInParentDSRecord) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "KeySigningKeyInParentDSRecord"
}
return *e.ErrorCodeOverride
}
func (e *KeySigningKeyInParentDSRecord) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The key-signing key (KSK) that you specified can't be deactivated because it's
// the only KSK for a currently-enabled DNSSEC. Disable DNSSEC signing, or add or
// enable another KSK.
type KeySigningKeyInUse struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *KeySigningKeyInUse) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *KeySigningKeyInUse) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *KeySigningKeyInUse) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "KeySigningKeyInUse"
}
return *e.ErrorCodeOverride
}
func (e *KeySigningKeyInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// A key-signing key (KSK) with ACTIVE status wasn't found.
type KeySigningKeyWithActiveStatusNotFound struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *KeySigningKeyWithActiveStatusNotFound) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *KeySigningKeyWithActiveStatusNotFound) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *KeySigningKeyWithActiveStatusNotFound) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "KeySigningKeyWithActiveStatusNotFound"
}
return *e.ErrorCodeOverride
}
func (e *KeySigningKeyWithActiveStatusNotFound) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The VPC that you're trying to disassociate from the private hosted zone is the
// last VPC that is associated with the hosted zone. Amazon Route 53 doesn't
// support disassociating the last VPC from a hosted zone.
type LastVPCAssociation struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *LastVPCAssociation) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *LastVPCAssociation) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *LastVPCAssociation) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "LastVPCAssociation"
}
return *e.ErrorCodeOverride
}
func (e *LastVPCAssociation) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// This operation can't be completed because the current account has reached the
// limit on the resource you are trying to create. To request a higher limit,
// create a case (http://aws.amazon.com/route53-request) with the Amazon Web
// Services Support Center.
type LimitsExceeded struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *LimitsExceeded) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *LimitsExceeded) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *LimitsExceeded) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "LimitsExceeded"
}
return *e.ErrorCodeOverride
}
func (e *LimitsExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// A change with the specified change ID does not exist.
type NoSuchChange struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *NoSuchChange) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *NoSuchChange) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *NoSuchChange) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "NoSuchChange"
}
return *e.ErrorCodeOverride
}
func (e *NoSuchChange) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The CIDR collection you specified, doesn't exist.
type NoSuchCidrCollectionException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *NoSuchCidrCollectionException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *NoSuchCidrCollectionException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *NoSuchCidrCollectionException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "NoSuchCidrCollectionException"
}
return *e.ErrorCodeOverride
}
func (e *NoSuchCidrCollectionException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The CIDR collection location doesn't match any locations in your account.
type NoSuchCidrLocationException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *NoSuchCidrLocationException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *NoSuchCidrLocationException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *NoSuchCidrLocationException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "NoSuchCidrLocationException"
}
return *e.ErrorCodeOverride
}
func (e *NoSuchCidrLocationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// There is no CloudWatch Logs log group with the specified ARN.
type NoSuchCloudWatchLogsLogGroup struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *NoSuchCloudWatchLogsLogGroup) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *NoSuchCloudWatchLogsLogGroup) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *NoSuchCloudWatchLogsLogGroup) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "NoSuchCloudWatchLogsLogGroup"
}
return *e.ErrorCodeOverride
}
func (e *NoSuchCloudWatchLogsLogGroup) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// A reusable delegation set with the specified ID does not exist.
type NoSuchDelegationSet struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *NoSuchDelegationSet) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *NoSuchDelegationSet) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *NoSuchDelegationSet) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "NoSuchDelegationSet"
}
return *e.ErrorCodeOverride
}
func (e *NoSuchDelegationSet) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Amazon Route 53 doesn't support the specified geographic location. For a list
// of supported geolocation codes, see the GeoLocation (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GeoLocation.html)
// data type.
type NoSuchGeoLocation struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *NoSuchGeoLocation) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *NoSuchGeoLocation) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *NoSuchGeoLocation) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "NoSuchGeoLocation"
}
return *e.ErrorCodeOverride
}
func (e *NoSuchGeoLocation) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// No health check exists with the specified ID.
type NoSuchHealthCheck struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *NoSuchHealthCheck) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *NoSuchHealthCheck) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *NoSuchHealthCheck) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "NoSuchHealthCheck"
}
return *e.ErrorCodeOverride
}
func (e *NoSuchHealthCheck) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// No hosted zone exists with the ID that you specified.
type NoSuchHostedZone struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *NoSuchHostedZone) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *NoSuchHostedZone) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *NoSuchHostedZone) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "NoSuchHostedZone"
}
return *e.ErrorCodeOverride
}
func (e *NoSuchHostedZone) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified key-signing key (KSK) doesn't exist.
type NoSuchKeySigningKey struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *NoSuchKeySigningKey) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *NoSuchKeySigningKey) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *NoSuchKeySigningKey) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "NoSuchKeySigningKey"
}
return *e.ErrorCodeOverride
}
func (e *NoSuchKeySigningKey) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// There is no DNS query logging configuration with the specified ID.
type NoSuchQueryLoggingConfig struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *NoSuchQueryLoggingConfig) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *NoSuchQueryLoggingConfig) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *NoSuchQueryLoggingConfig) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "NoSuchQueryLoggingConfig"
}
return *e.ErrorCodeOverride
}
func (e *NoSuchQueryLoggingConfig) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// No traffic policy exists with the specified ID.
type NoSuchTrafficPolicy struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *NoSuchTrafficPolicy) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *NoSuchTrafficPolicy) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *NoSuchTrafficPolicy) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "NoSuchTrafficPolicy"
}
return *e.ErrorCodeOverride
}
func (e *NoSuchTrafficPolicy) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// No traffic policy instance exists with the specified ID.
type NoSuchTrafficPolicyInstance struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *NoSuchTrafficPolicyInstance) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *NoSuchTrafficPolicyInstance) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *NoSuchTrafficPolicyInstance) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "NoSuchTrafficPolicyInstance"
}
return *e.ErrorCodeOverride
}
func (e *NoSuchTrafficPolicyInstance) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// Associating the specified VPC with the specified hosted zone has not been
// authorized.
type NotAuthorizedException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *NotAuthorizedException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *NotAuthorizedException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *NotAuthorizedException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "NotAuthorizedException"
}
return *e.ErrorCodeOverride
}
func (e *NotAuthorizedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// If Amazon Route 53 can't process a request before the next request arrives, it
// will reject subsequent requests for the same hosted zone and return an HTTP 400
// error ( Bad request ). If Route 53 returns this error repeatedly for the same
// request, we recommend that you wait, in intervals of increasing duration, before
// you try the request again.
type PriorRequestNotComplete struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *PriorRequestNotComplete) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *PriorRequestNotComplete) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *PriorRequestNotComplete) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "PriorRequestNotComplete"
}
return *e.ErrorCodeOverride
}
func (e *PriorRequestNotComplete) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// You're trying to associate a VPC with a public hosted zone. Amazon Route 53
// doesn't support associating a VPC with a public hosted zone.
type PublicZoneVPCAssociation struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *PublicZoneVPCAssociation) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *PublicZoneVPCAssociation) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *PublicZoneVPCAssociation) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "PublicZoneVPCAssociation"
}
return *e.ErrorCodeOverride
}
func (e *PublicZoneVPCAssociation) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// You can create only one query logging configuration for a hosted zone, and a
// query logging configuration already exists for this hosted zone.
type QueryLoggingConfigAlreadyExists struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *QueryLoggingConfigAlreadyExists) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *QueryLoggingConfigAlreadyExists) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *QueryLoggingConfigAlreadyExists) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "QueryLoggingConfigAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *QueryLoggingConfigAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The limit on the number of requests per second was exceeded.
type ThrottlingException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ThrottlingException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ThrottlingException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ThrottlingException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ThrottlingException"
}
return *e.ErrorCodeOverride
}
func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// This health check can't be created because the current account has reached the
// limit on the number of active health checks. For information about default
// limits, see Limits (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html)
// in the Amazon Route 53 Developer Guide. For information about how to get the
// current limit for an account, see GetAccountLimit (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetAccountLimit.html)
// . To request a higher limit, create a case (http://aws.amazon.com/route53-request)
// with the Amazon Web Services Support Center. You have reached the maximum number
// of active health checks for an Amazon Web Services account. To request a higher
// limit, create a case (http://aws.amazon.com/route53-request) with the Amazon
// Web Services Support Center.
type TooManyHealthChecks struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *TooManyHealthChecks) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *TooManyHealthChecks) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *TooManyHealthChecks) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "TooManyHealthChecks"
}
return *e.ErrorCodeOverride
}
func (e *TooManyHealthChecks) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// This operation can't be completed either because the current account has
// reached the limit on the number of hosted zones or because you've reached the
// limit on the number of hosted zones that can be associated with a reusable
// delegation set. For information about default limits, see Limits (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html)
// in the Amazon Route 53 Developer Guide. To get the current limit on hosted zones
// that can be created by an account, see GetAccountLimit (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetAccountLimit.html)
// . To get the current limit on hosted zones that can be associated with a
// reusable delegation set, see GetReusableDelegationSetLimit (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetReusableDelegationSetLimit.html)
// . To request a higher limit, create a case (http://aws.amazon.com/route53-request)
// with the Amazon Web Services Support Center.
type TooManyHostedZones struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *TooManyHostedZones) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *TooManyHostedZones) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *TooManyHostedZones) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "TooManyHostedZones"
}
return *e.ErrorCodeOverride
}
func (e *TooManyHostedZones) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// You've reached the limit for the number of key-signing keys (KSKs). Remove at
// least one KSK, and then try again.
type TooManyKeySigningKeys struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *TooManyKeySigningKeys) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *TooManyKeySigningKeys) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *TooManyKeySigningKeys) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "TooManyKeySigningKeys"
}
return *e.ErrorCodeOverride
}
func (e *TooManyKeySigningKeys) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// This traffic policy can't be created because the current account has reached
// the limit on the number of traffic policies. For information about default
// limits, see Limits (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html)
// in the Amazon Route 53 Developer Guide. To get the current limit for an account,
// see GetAccountLimit (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetAccountLimit.html)
// . To request a higher limit, create a case (http://aws.amazon.com/route53-request)
// with the Amazon Web Services Support Center.
type TooManyTrafficPolicies struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *TooManyTrafficPolicies) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *TooManyTrafficPolicies) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *TooManyTrafficPolicies) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "TooManyTrafficPolicies"
}
return *e.ErrorCodeOverride
}
func (e *TooManyTrafficPolicies) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// This traffic policy instance can't be created because the current account has
// reached the limit on the number of traffic policy instances. For information
// about default limits, see Limits (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html)
// in the Amazon Route 53 Developer Guide. For information about how to get the
// current limit for an account, see GetAccountLimit (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetAccountLimit.html)
// . To request a higher limit, create a case (http://aws.amazon.com/route53-request)
// with the Amazon Web Services Support Center.
type TooManyTrafficPolicyInstances struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *TooManyTrafficPolicyInstances) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *TooManyTrafficPolicyInstances) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *TooManyTrafficPolicyInstances) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "TooManyTrafficPolicyInstances"
}
return *e.ErrorCodeOverride
}
func (e *TooManyTrafficPolicyInstances) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// This traffic policy version can't be created because you've reached the limit
// of 1000 on the number of versions that you can create for the current traffic
// policy. To create more traffic policy versions, you can use GetTrafficPolicy (https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetTrafficPolicy.html)
// to get the traffic policy document for a specified traffic policy version, and
// then use CreateTrafficPolicy (https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateTrafficPolicy.html)
// to create a new traffic policy using the traffic policy document.
type TooManyTrafficPolicyVersionsForCurrentPolicy struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *TooManyTrafficPolicyVersionsForCurrentPolicy) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *TooManyTrafficPolicyVersionsForCurrentPolicy) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *TooManyTrafficPolicyVersionsForCurrentPolicy) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "TooManyTrafficPolicyVersionsForCurrentPolicy"
}
return *e.ErrorCodeOverride
}
func (e *TooManyTrafficPolicyVersionsForCurrentPolicy) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// You've created the maximum number of authorizations that can be created for the
// specified hosted zone. To authorize another VPC to be associated with the hosted
// zone, submit a DeleteVPCAssociationAuthorization request to remove an existing
// authorization. To get a list of existing authorizations, submit a
// ListVPCAssociationAuthorizations request.
type TooManyVPCAssociationAuthorizations struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *TooManyVPCAssociationAuthorizations) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *TooManyVPCAssociationAuthorizations) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *TooManyVPCAssociationAuthorizations) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "TooManyVPCAssociationAuthorizations"
}
return *e.ErrorCodeOverride
}
func (e *TooManyVPCAssociationAuthorizations) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// A traffic policy that has the same value for Name already exists.
type TrafficPolicyAlreadyExists struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *TrafficPolicyAlreadyExists) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *TrafficPolicyAlreadyExists) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *TrafficPolicyAlreadyExists) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "TrafficPolicyAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *TrafficPolicyAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// There is already a traffic policy instance with the specified ID.
type TrafficPolicyInstanceAlreadyExists struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *TrafficPolicyInstanceAlreadyExists) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *TrafficPolicyInstanceAlreadyExists) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *TrafficPolicyInstanceAlreadyExists) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "TrafficPolicyInstanceAlreadyExists"
}
return *e.ErrorCodeOverride
}
func (e *TrafficPolicyInstanceAlreadyExists) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// One or more traffic policy instances were created by using the specified
// traffic policy.
type TrafficPolicyInUse struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *TrafficPolicyInUse) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *TrafficPolicyInUse) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *TrafficPolicyInUse) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "TrafficPolicyInUse"
}
return *e.ErrorCodeOverride
}
func (e *TrafficPolicyInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The VPC that you specified is not authorized to be associated with the hosted
// zone.
type VPCAssociationAuthorizationNotFound struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *VPCAssociationAuthorizationNotFound) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *VPCAssociationAuthorizationNotFound) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *VPCAssociationAuthorizationNotFound) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "VPCAssociationAuthorizationNotFound"
}
return *e.ErrorCodeOverride
}
func (e *VPCAssociationAuthorizationNotFound) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The specified VPC and hosted zone are not currently associated.
type VPCAssociationNotFound struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *VPCAssociationNotFound) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *VPCAssociationNotFound) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *VPCAssociationNotFound) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "VPCAssociationNotFound"
}
return *e.ErrorCodeOverride
}
func (e *VPCAssociationNotFound) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
| 1,934 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53domains
import (
"context"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/aws/defaults"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/retry"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
smithy "github.com/aws/smithy-go"
smithydocument "github.com/aws/smithy-go/document"
"github.com/aws/smithy-go/logging"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"net"
"net/http"
"time"
)
const ServiceID = "Route 53 Domains"
const ServiceAPIVersion = "2014-05-15"
// Client provides the API client to make operations call for Amazon Route 53
// Domains.
type Client struct {
options Options
}
// New returns an initialized Client based on the functional options. Provide
// additional functional options to further configure the behavior of the client,
// such as changing the client's endpoint or adding custom middleware behavior.
func New(options Options, optFns ...func(*Options)) *Client {
options = options.Copy()
resolveDefaultLogger(&options)
setResolvedDefaultsMode(&options)
resolveRetryer(&options)
resolveHTTPClient(&options)
resolveHTTPSignerV4(&options)
resolveDefaultEndpointConfiguration(&options)
for _, fn := range optFns {
fn(&options)
}
client := &Client{
options: options,
}
return client
}
type Options struct {
// Set of options to modify how an operation is invoked. These apply to all
// operations invoked for this client. Use functional options on operation call to
// modify this list for per operation behavior.
APIOptions []func(*middleware.Stack) error
// Configures the events that will be sent to the configured logger.
ClientLogMode aws.ClientLogMode
// The credentials object to use when signing requests.
Credentials aws.CredentialsProvider
// The configuration DefaultsMode that the SDK should use when constructing the
// clients initial default settings.
DefaultsMode aws.DefaultsMode
// The endpoint options to be used when attempting to resolve an endpoint.
EndpointOptions EndpointResolverOptions
// The service endpoint resolver.
EndpointResolver EndpointResolver
// Signature Version 4 (SigV4) Signer
HTTPSignerV4 HTTPSignerV4
// The logger writer interface to write logging messages to.
Logger logging.Logger
// The region to send requests to. (Required)
Region string
// RetryMaxAttempts specifies the maximum number attempts an API client will call
// an operation that fails with a retryable error. A value of 0 is ignored, and
// will not be used to configure the API client created default retryer, or modify
// per operation call's retry max attempts. When creating a new API Clients this
// member will only be used if the Retryer Options member is nil. This value will
// be ignored if Retryer is not nil. If specified in an operation call's functional
// options with a value that is different than the constructed client's Options,
// the Client's Retryer will be wrapped to use the operation's specific
// RetryMaxAttempts value.
RetryMaxAttempts int
// RetryMode specifies the retry mode the API client will be created with, if
// Retryer option is not also specified. When creating a new API Clients this
// member will only be used if the Retryer Options member is nil. This value will
// be ignored if Retryer is not nil. Currently does not support per operation call
// overrides, may in the future.
RetryMode aws.RetryMode
// Retryer guides how HTTP requests should be retried in case of recoverable
// failures. When nil the API client will use a default retryer. The kind of
// default retry created by the API client can be changed with the RetryMode
// option.
Retryer aws.Retryer
// The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
// to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You
// should not populate this structure programmatically, or rely on the values here
// within your applications.
RuntimeEnvironment aws.RuntimeEnvironment
// The initial DefaultsMode used when the client options were constructed. If the
// DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved
// value was at that point in time. Currently does not support per operation call
// overrides, may in the future.
resolvedDefaultsMode aws.DefaultsMode
// The HTTP client to invoke API calls with. Defaults to client's default HTTP
// implementation if nil.
HTTPClient HTTPClient
}
// WithAPIOptions returns a functional option for setting the Client's APIOptions
// option.
func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) {
return func(o *Options) {
o.APIOptions = append(o.APIOptions, optFns...)
}
}
// WithEndpointResolver returns a functional option for setting the Client's
// EndpointResolver option.
func WithEndpointResolver(v EndpointResolver) func(*Options) {
return func(o *Options) {
o.EndpointResolver = v
}
}
type HTTPClient interface {
Do(*http.Request) (*http.Response, error)
}
// Copy creates a clone where the APIOptions list is deep copied.
func (o Options) Copy() Options {
to := o
to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions))
copy(to.APIOptions, o.APIOptions)
return to
}
func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) {
ctx = middleware.ClearStackValues(ctx)
stack := middleware.NewStack(opID, smithyhttp.NewStackRequest)
options := c.options.Copy()
for _, fn := range optFns {
fn(&options)
}
finalizeRetryMaxAttemptOptions(&options, *c)
finalizeClientEndpointResolverOptions(&options)
for _, fn := range stackFns {
if err := fn(stack, options); err != nil {
return nil, metadata, err
}
}
for _, fn := range options.APIOptions {
if err := fn(stack); err != nil {
return nil, metadata, err
}
}
handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack)
result, metadata, err = handler.Handle(ctx, params)
if err != nil {
err = &smithy.OperationError{
ServiceID: ServiceID,
OperationName: opID,
Err: err,
}
}
return result, metadata, err
}
type noSmithyDocumentSerde = smithydocument.NoSerde
func resolveDefaultLogger(o *Options) {
if o.Logger != nil {
return
}
o.Logger = logging.Nop{}
}
func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error {
return middleware.AddSetLoggerMiddleware(stack, o.Logger)
}
func setResolvedDefaultsMode(o *Options) {
if len(o.resolvedDefaultsMode) > 0 {
return
}
var mode aws.DefaultsMode
mode.SetFromString(string(o.DefaultsMode))
if mode == aws.DefaultsModeAuto {
mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment)
}
o.resolvedDefaultsMode = mode
}
// NewFromConfig returns a new client from the provided config.
func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
opts := Options{
Region: cfg.Region,
DefaultsMode: cfg.DefaultsMode,
RuntimeEnvironment: cfg.RuntimeEnvironment,
HTTPClient: cfg.HTTPClient,
Credentials: cfg.Credentials,
APIOptions: cfg.APIOptions,
Logger: cfg.Logger,
ClientLogMode: cfg.ClientLogMode,
}
resolveAWSRetryerProvider(cfg, &opts)
resolveAWSRetryMaxAttempts(cfg, &opts)
resolveAWSRetryMode(cfg, &opts)
resolveAWSEndpointResolver(cfg, &opts)
resolveUseDualStackEndpoint(cfg, &opts)
resolveUseFIPSEndpoint(cfg, &opts)
return New(opts, optFns...)
}
func resolveHTTPClient(o *Options) {
var buildable *awshttp.BuildableClient
if o.HTTPClient != nil {
var ok bool
buildable, ok = o.HTTPClient.(*awshttp.BuildableClient)
if !ok {
return
}
} else {
buildable = awshttp.NewBuildableClient()
}
modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
if err == nil {
buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) {
if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok {
dialer.Timeout = dialerTimeout
}
})
buildable = buildable.WithTransportOptions(func(transport *http.Transport) {
if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok {
transport.TLSHandshakeTimeout = tlsHandshakeTimeout
}
})
}
o.HTTPClient = buildable
}
func resolveRetryer(o *Options) {
if o.Retryer != nil {
return
}
if len(o.RetryMode) == 0 {
modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
if err == nil {
o.RetryMode = modeConfig.RetryMode
}
}
if len(o.RetryMode) == 0 {
o.RetryMode = aws.RetryModeStandard
}
var standardOptions []func(*retry.StandardOptions)
if v := o.RetryMaxAttempts; v != 0 {
standardOptions = append(standardOptions, func(so *retry.StandardOptions) {
so.MaxAttempts = v
})
}
switch o.RetryMode {
case aws.RetryModeAdaptive:
var adaptiveOptions []func(*retry.AdaptiveModeOptions)
if len(standardOptions) != 0 {
adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) {
ao.StandardOptions = append(ao.StandardOptions, standardOptions...)
})
}
o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...)
default:
o.Retryer = retry.NewStandard(standardOptions...)
}
}
func resolveAWSRetryerProvider(cfg aws.Config, o *Options) {
if cfg.Retryer == nil {
return
}
o.Retryer = cfg.Retryer()
}
func resolveAWSRetryMode(cfg aws.Config, o *Options) {
if len(cfg.RetryMode) == 0 {
return
}
o.RetryMode = cfg.RetryMode
}
func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) {
if cfg.RetryMaxAttempts == 0 {
return
}
o.RetryMaxAttempts = cfg.RetryMaxAttempts
}
func finalizeRetryMaxAttemptOptions(o *Options, client Client) {
if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts {
return
}
o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts)
}
func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil {
return
}
o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver())
}
func addClientUserAgent(stack *middleware.Stack) error {
return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "route53domains", goModuleVersion)(stack)
}
func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error {
mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{
CredentialsProvider: o.Credentials,
Signer: o.HTTPSignerV4,
LogSigning: o.ClientLogMode.IsSigning(),
})
return stack.Finalize.Add(mw, middleware.After)
}
type HTTPSignerV4 interface {
SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error
}
func resolveHTTPSignerV4(o *Options) {
if o.HTTPSignerV4 != nil {
return
}
o.HTTPSignerV4 = newDefaultV4Signer(*o)
}
func newDefaultV4Signer(o Options) *v4.Signer {
return v4.NewSigner(func(so *v4.SignerOptions) {
so.Logger = o.Logger
so.LogSigning = o.ClientLogMode.IsSigning()
})
}
func addRetryMiddlewares(stack *middleware.Stack, o Options) error {
mo := retry.AddRetryMiddlewaresOptions{
Retryer: o.Retryer,
LogRetryAttempts: o.ClientLogMode.IsRetries(),
}
return retry.AddRetryMiddlewares(stack, mo)
}
// resolves dual-stack endpoint configuration
func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error {
if len(cfg.ConfigSources) == 0 {
return nil
}
value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources)
if err != nil {
return err
}
if found {
o.EndpointOptions.UseDualStackEndpoint = value
}
return nil
}
// resolves FIPS endpoint configuration
func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error {
if len(cfg.ConfigSources) == 0 {
return nil
}
value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources)
if err != nil {
return err
}
if found {
o.EndpointOptions.UseFIPSEndpoint = value
}
return nil
}
func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error {
return awsmiddleware.AddRequestIDRetrieverMiddleware(stack)
}
func addResponseErrorMiddleware(stack *middleware.Stack) error {
return awshttp.AddResponseErrorMiddleware(stack)
}
func addRequestResponseLogging(stack *middleware.Stack, o Options) error {
return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{
LogRequest: o.ClientLogMode.IsRequest(),
LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(),
LogResponse: o.ClientLogMode.IsResponse(),
LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(),
}, middleware.After)
}
| 435 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53domains
import (
"context"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"io/ioutil"
"net/http"
"strings"
"testing"
)
func TestClient_resolveRetryOptions(t *testing.T) {
nopClient := smithyhttp.ClientDoFunc(func(_ *http.Request) (*http.Response, error) {
return &http.Response{
StatusCode: 200,
Header: http.Header{},
Body: ioutil.NopCloser(strings.NewReader("")),
}, nil
})
cases := map[string]struct {
defaultsMode aws.DefaultsMode
retryer aws.Retryer
retryMaxAttempts int
opRetryMaxAttempts *int
retryMode aws.RetryMode
expectClientRetryMode aws.RetryMode
expectClientMaxAttempts int
expectOpMaxAttempts int
}{
"defaults": {
defaultsMode: aws.DefaultsModeStandard,
expectClientRetryMode: aws.RetryModeStandard,
expectClientMaxAttempts: 3,
expectOpMaxAttempts: 3,
},
"custom default retry": {
retryMode: aws.RetryModeAdaptive,
retryMaxAttempts: 10,
expectClientRetryMode: aws.RetryModeAdaptive,
expectClientMaxAttempts: 10,
expectOpMaxAttempts: 10,
},
"custom op max attempts": {
retryMode: aws.RetryModeAdaptive,
retryMaxAttempts: 10,
opRetryMaxAttempts: aws.Int(2),
expectClientRetryMode: aws.RetryModeAdaptive,
expectClientMaxAttempts: 10,
expectOpMaxAttempts: 2,
},
"custom op no change max attempts": {
retryMode: aws.RetryModeAdaptive,
retryMaxAttempts: 10,
opRetryMaxAttempts: aws.Int(10),
expectClientRetryMode: aws.RetryModeAdaptive,
expectClientMaxAttempts: 10,
expectOpMaxAttempts: 10,
},
"custom op 0 max attempts": {
retryMode: aws.RetryModeAdaptive,
retryMaxAttempts: 10,
opRetryMaxAttempts: aws.Int(0),
expectClientRetryMode: aws.RetryModeAdaptive,
expectClientMaxAttempts: 10,
expectOpMaxAttempts: 10,
},
}
for name, c := range cases {
t.Run(name, func(t *testing.T) {
client := NewFromConfig(aws.Config{
DefaultsMode: c.defaultsMode,
Retryer: func() func() aws.Retryer {
if c.retryer == nil {
return nil
}
return func() aws.Retryer { return c.retryer }
}(),
HTTPClient: nopClient,
RetryMaxAttempts: c.retryMaxAttempts,
RetryMode: c.retryMode,
})
if e, a := c.expectClientRetryMode, client.options.RetryMode; e != a {
t.Errorf("expect %v retry mode, got %v", e, a)
}
if e, a := c.expectClientMaxAttempts, client.options.Retryer.MaxAttempts(); e != a {
t.Errorf("expect %v max attempts, got %v", e, a)
}
_, _, err := client.invokeOperation(context.Background(), "mockOperation", struct{}{},
[]func(*Options){
func(o *Options) {
if c.opRetryMaxAttempts == nil {
return
}
o.RetryMaxAttempts = *c.opRetryMaxAttempts
},
},
func(s *middleware.Stack, o Options) error {
s.Initialize.Clear()
s.Serialize.Clear()
s.Build.Clear()
s.Finalize.Clear()
s.Deserialize.Clear()
if e, a := c.expectOpMaxAttempts, o.Retryer.MaxAttempts(); e != a {
t.Errorf("expect %v op max attempts, got %v", e, a)
}
return nil
})
if err != nil {
t.Fatalf("expect no operation error, got %v", err)
}
})
}
}
| 124 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53domains
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Accepts the transfer of a domain from another Amazon Web Services account to
// the currentAmazon Web Services account. You initiate a transfer between Amazon
// Web Services accounts using TransferDomainToAnotherAwsAccount (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_TransferDomainToAnotherAwsAccount.html)
// . If you use the CLI command at accept-domain-transfer-from-another-aws-account (https://docs.aws.amazon.com/cli/latest/reference/route53domains/accept-domain-transfer-from-another-aws-account.html)
// , use JSON format as input instead of text because otherwise CLI will throw an
// error from domain transfer input that includes single quotes. Use either
// ListOperations (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_ListOperations.html)
// or GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html)
// to determine whether the operation succeeded. GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html)
// provides additional information, for example, Domain Transfer from Aws Account
// 111122223333 has been cancelled .
func (c *Client) AcceptDomainTransferFromAnotherAwsAccount(ctx context.Context, params *AcceptDomainTransferFromAnotherAwsAccountInput, optFns ...func(*Options)) (*AcceptDomainTransferFromAnotherAwsAccountOutput, error) {
if params == nil {
params = &AcceptDomainTransferFromAnotherAwsAccountInput{}
}
result, metadata, err := c.invokeOperation(ctx, "AcceptDomainTransferFromAnotherAwsAccount", params, optFns, c.addOperationAcceptDomainTransferFromAnotherAwsAccountMiddlewares)
if err != nil {
return nil, err
}
out := result.(*AcceptDomainTransferFromAnotherAwsAccountOutput)
out.ResultMetadata = metadata
return out, nil
}
// The AcceptDomainTransferFromAnotherAwsAccount request includes the following
// elements.
type AcceptDomainTransferFromAnotherAwsAccountInput struct {
// The name of the domain that was specified when another Amazon Web Services
// account submitted a TransferDomainToAnotherAwsAccount (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_TransferDomainToAnotherAwsAccount.html)
// request.
//
// This member is required.
DomainName *string
// The password that was returned by the TransferDomainToAnotherAwsAccount (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_TransferDomainToAnotherAwsAccount.html)
// request.
//
// This member is required.
Password *string
noSmithyDocumentSerde
}
// The AcceptDomainTransferFromAnotherAwsAccount response includes the following
// element.
type AcceptDomainTransferFromAnotherAwsAccountOutput struct {
// Identifier for tracking the progress of the request. To query the operation
// status, use GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html)
// .
OperationId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationAcceptDomainTransferFromAnotherAwsAccountMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpAcceptDomainTransferFromAnotherAwsAccount{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAcceptDomainTransferFromAnotherAwsAccount{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpAcceptDomainTransferFromAnotherAwsAccountValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAcceptDomainTransferFromAnotherAwsAccount(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opAcceptDomainTransferFromAnotherAwsAccount(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53domains",
OperationName: "AcceptDomainTransferFromAnotherAwsAccount",
}
}
| 148 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53domains
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53domains/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Creates a delegation signer (DS) record in the registry zone for this domain
// name. Note that creating DS record at the registry impacts DNSSEC validation of
// your DNS records. This action may render your domain name unavailable on the
// internet if the steps are completed in the wrong order, or with incorrect
// timing. For more information about DNSSEC signing, see Configuring DNSSEC
// signing (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-configuring-dnssec.html)
// in the Route 53 developer guide.
func (c *Client) AssociateDelegationSignerToDomain(ctx context.Context, params *AssociateDelegationSignerToDomainInput, optFns ...func(*Options)) (*AssociateDelegationSignerToDomainOutput, error) {
if params == nil {
params = &AssociateDelegationSignerToDomainInput{}
}
result, metadata, err := c.invokeOperation(ctx, "AssociateDelegationSignerToDomain", params, optFns, c.addOperationAssociateDelegationSignerToDomainMiddlewares)
if err != nil {
return nil, err
}
out := result.(*AssociateDelegationSignerToDomainOutput)
out.ResultMetadata = metadata
return out, nil
}
type AssociateDelegationSignerToDomainInput struct {
// The name of the domain.
//
// This member is required.
DomainName *string
// The information about a key, including the algorithm, public key-value, and
// flags.
//
// This member is required.
SigningAttributes *types.DnssecSigningAttributes
noSmithyDocumentSerde
}
type AssociateDelegationSignerToDomainOutput struct {
// The identifier for tracking the progress of the request. To query the operation
// status, use GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html)
// .
OperationId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationAssociateDelegationSignerToDomainMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpAssociateDelegationSignerToDomain{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAssociateDelegationSignerToDomain{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpAssociateDelegationSignerToDomainValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateDelegationSignerToDomain(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opAssociateDelegationSignerToDomain(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53domains",
OperationName: "AssociateDelegationSignerToDomain",
}
}
| 139 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53domains
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Cancels the transfer of a domain from the current Amazon Web Services account
// to another Amazon Web Services account. You initiate a transfer betweenAmazon
// Web Services accounts using TransferDomainToAnotherAwsAccount (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_TransferDomainToAnotherAwsAccount.html)
// . You must cancel the transfer before the other Amazon Web Services account
// accepts the transfer using AcceptDomainTransferFromAnotherAwsAccount (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_AcceptDomainTransferFromAnotherAwsAccount.html)
// . Use either ListOperations (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_ListOperations.html)
// or GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html)
// to determine whether the operation succeeded. GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html)
// provides additional information, for example, Domain Transfer from Aws Account
// 111122223333 has been cancelled .
func (c *Client) CancelDomainTransferToAnotherAwsAccount(ctx context.Context, params *CancelDomainTransferToAnotherAwsAccountInput, optFns ...func(*Options)) (*CancelDomainTransferToAnotherAwsAccountOutput, error) {
if params == nil {
params = &CancelDomainTransferToAnotherAwsAccountInput{}
}
result, metadata, err := c.invokeOperation(ctx, "CancelDomainTransferToAnotherAwsAccount", params, optFns, c.addOperationCancelDomainTransferToAnotherAwsAccountMiddlewares)
if err != nil {
return nil, err
}
out := result.(*CancelDomainTransferToAnotherAwsAccountOutput)
out.ResultMetadata = metadata
return out, nil
}
// The CancelDomainTransferToAnotherAwsAccount request includes the following
// element.
type CancelDomainTransferToAnotherAwsAccountInput struct {
// The name of the domain for which you want to cancel the transfer to another
// Amazon Web Services account.
//
// This member is required.
DomainName *string
noSmithyDocumentSerde
}
// The CancelDomainTransferToAnotherAwsAccount response includes the following
// element.
type CancelDomainTransferToAnotherAwsAccountOutput struct {
// The identifier that TransferDomainToAnotherAwsAccount returned to track the
// progress of the request. Because the transfer request was canceled, the value is
// no longer valid, and you can't use GetOperationDetail to query the operation
// status.
OperationId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationCancelDomainTransferToAnotherAwsAccountMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpCancelDomainTransferToAnotherAwsAccount{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCancelDomainTransferToAnotherAwsAccount{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpCancelDomainTransferToAnotherAwsAccountValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelDomainTransferToAnotherAwsAccount(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opCancelDomainTransferToAnotherAwsAccount(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53domains",
OperationName: "CancelDomainTransferToAnotherAwsAccount",
}
}
| 141 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53domains
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53domains/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// This operation checks the availability of one domain name. Note that if the
// availability status of a domain is pending, you must submit another request to
// determine the availability of the domain name.
func (c *Client) CheckDomainAvailability(ctx context.Context, params *CheckDomainAvailabilityInput, optFns ...func(*Options)) (*CheckDomainAvailabilityOutput, error) {
if params == nil {
params = &CheckDomainAvailabilityInput{}
}
result, metadata, err := c.invokeOperation(ctx, "CheckDomainAvailability", params, optFns, c.addOperationCheckDomainAvailabilityMiddlewares)
if err != nil {
return nil, err
}
out := result.(*CheckDomainAvailabilityOutput)
out.ResultMetadata = metadata
return out, nil
}
// The CheckDomainAvailability request contains the following elements.
type CheckDomainAvailabilityInput struct {
// The name of the domain that you want to get availability for. The top-level
// domain (TLD), such as .com, must be a TLD that Route 53 supports. For a list of
// supported TLDs, see Domains that You Can Register with Amazon Route 53 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html)
// in the Amazon Route 53 Developer Guide. The domain name can contain only the
// following characters:
// - Letters a through z. Domain names are not case sensitive.
// - Numbers 0 through 9.
// - Hyphen (-). You can't specify a hyphen at the beginning or end of a label.
// - Period (.) to separate the labels in the name, such as the . in example.com
// .
// Internationalized domain names are not supported for some top-level domains. To
// determine whether the TLD that you want to use supports internationalized domain
// names, see Domains that You Can Register with Amazon Route 53 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html)
// . For more information, see Formatting Internationalized Domain Names (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DomainNameFormat.html#domain-name-format-idns)
// .
//
// This member is required.
DomainName *string
// Reserved for future use.
IdnLangCode *string
noSmithyDocumentSerde
}
// The CheckDomainAvailability response includes the following elements.
type CheckDomainAvailabilityOutput struct {
// Whether the domain name is available for registering. You can register only
// domains designated as AVAILABLE . Valid values: AVAILABLE The domain name is
// available. AVAILABLE_RESERVED The domain name is reserved under specific
// conditions. AVAILABLE_PREORDER The domain name is available and can be
// preordered. DONT_KNOW The TLD registry didn't reply with a definitive answer
// about whether the domain name is available. Route 53 can return this response
// for a variety of reasons, for example, the registry is performing maintenance.
// Try again later. PENDING The TLD registry didn't return a response in the
// expected amount of time. When the response is delayed, it usually takes just a
// few extra seconds. You can resubmit the request immediately. RESERVED The domain
// name has been reserved for another person or organization. UNAVAILABLE The
// domain name is not available. UNAVAILABLE_PREMIUM The domain name is not
// available. UNAVAILABLE_RESTRICTED The domain name is forbidden.
Availability types.DomainAvailability
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationCheckDomainAvailabilityMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpCheckDomainAvailability{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCheckDomainAvailability{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpCheckDomainAvailabilityValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCheckDomainAvailability(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opCheckDomainAvailability(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53domains",
OperationName: "CheckDomainAvailability",
}
}
| 158 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53domains
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53domains/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Checks whether a domain name can be transferred to Amazon Route 53.
func (c *Client) CheckDomainTransferability(ctx context.Context, params *CheckDomainTransferabilityInput, optFns ...func(*Options)) (*CheckDomainTransferabilityOutput, error) {
if params == nil {
params = &CheckDomainTransferabilityInput{}
}
result, metadata, err := c.invokeOperation(ctx, "CheckDomainTransferability", params, optFns, c.addOperationCheckDomainTransferabilityMiddlewares)
if err != nil {
return nil, err
}
out := result.(*CheckDomainTransferabilityOutput)
out.ResultMetadata = metadata
return out, nil
}
// The CheckDomainTransferability request contains the following elements.
type CheckDomainTransferabilityInput struct {
// The name of the domain that you want to transfer to Route 53. The top-level
// domain (TLD), such as .com, must be a TLD that Route 53 supports. For a list of
// supported TLDs, see Domains that You Can Register with Amazon Route 53 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html)
// in the Amazon Route 53 Developer Guide. The domain name can contain only the
// following characters:
// - Letters a through z. Domain names are not case sensitive.
// - Numbers 0 through 9.
// - Hyphen (-). You can't specify a hyphen at the beginning or end of a label.
// - Period (.) to separate the labels in the name, such as the . in example.com
// .
//
// This member is required.
DomainName *string
// If the registrar for the top-level domain (TLD) requires an authorization code
// to transfer the domain, the code that you got from the current registrar for the
// domain.
AuthCode *string
noSmithyDocumentSerde
}
// The CheckDomainTransferability response includes the following elements.
type CheckDomainTransferabilityOutput struct {
// A complex type that contains information about whether the specified domain can
// be transferred to Route 53.
Transferability *types.DomainTransferability
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationCheckDomainTransferabilityMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpCheckDomainTransferability{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCheckDomainTransferability{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpCheckDomainTransferabilityValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCheckDomainTransferability(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opCheckDomainTransferability(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53domains",
OperationName: "CheckDomainTransferability",
}
}
| 142 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53domains
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// This operation deletes the specified domain. This action is permanent. For more
// information, see Deleting a domain name registration (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-delete.html)
// . To transfer the domain registration to another registrar, use the transfer
// process that’s provided by the registrar to which you want to transfer the
// registration. Otherwise, the following apply:
//
// - You can’t get a refund for the cost of a deleted domain registration.
//
// - The registry for the top-level domain might hold the domain name for a
// brief time before releasing it for other users to register (varies by registry).
//
// - When the registration has been deleted, we'll send you a confirmation to
// the registrant contact. The email will come from
// [email protected] or [email protected] .
func (c *Client) DeleteDomain(ctx context.Context, params *DeleteDomainInput, optFns ...func(*Options)) (*DeleteDomainOutput, error) {
if params == nil {
params = &DeleteDomainInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteDomain", params, optFns, c.addOperationDeleteDomainMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteDomainOutput)
out.ResultMetadata = metadata
return out, nil
}
type DeleteDomainInput struct {
// Name of the domain to be deleted.
//
// This member is required.
DomainName *string
noSmithyDocumentSerde
}
type DeleteDomainOutput struct {
// Identifier for tracking the progress of the request. To query the operation
// status, use GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html)
// .
OperationId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteDomainMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteDomain{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteDomain{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteDomainValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteDomain(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteDomain(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53domains",
OperationName: "DeleteDomain",
}
}
| 139 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53domains
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// This operation deletes the specified tags for a domain. All tag operations are
// eventually consistent; subsequent operations might not immediately represent all
// issued operations.
func (c *Client) DeleteTagsForDomain(ctx context.Context, params *DeleteTagsForDomainInput, optFns ...func(*Options)) (*DeleteTagsForDomainOutput, error) {
if params == nil {
params = &DeleteTagsForDomainInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DeleteTagsForDomain", params, optFns, c.addOperationDeleteTagsForDomainMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DeleteTagsForDomainOutput)
out.ResultMetadata = metadata
return out, nil
}
// The DeleteTagsForDomainRequest includes the following elements.
type DeleteTagsForDomainInput struct {
// The domain for which you want to delete one or more tags.
//
// This member is required.
DomainName *string
// A list of tag keys to delete.
//
// This member is required.
TagsToDelete []string
noSmithyDocumentSerde
}
type DeleteTagsForDomainOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDeleteTagsForDomainMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteTagsForDomain{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteTagsForDomain{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDeleteTagsForDomainValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTagsForDomain(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDeleteTagsForDomain(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53domains",
OperationName: "DeleteTagsForDomain",
}
}
| 128 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53domains
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// This operation disables automatic renewal of domain registration for the
// specified domain.
func (c *Client) DisableDomainAutoRenew(ctx context.Context, params *DisableDomainAutoRenewInput, optFns ...func(*Options)) (*DisableDomainAutoRenewOutput, error) {
if params == nil {
params = &DisableDomainAutoRenewInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DisableDomainAutoRenew", params, optFns, c.addOperationDisableDomainAutoRenewMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DisableDomainAutoRenewOutput)
out.ResultMetadata = metadata
return out, nil
}
type DisableDomainAutoRenewInput struct {
// The name of the domain that you want to disable automatic renewal for.
//
// This member is required.
DomainName *string
noSmithyDocumentSerde
}
type DisableDomainAutoRenewOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDisableDomainAutoRenewMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDisableDomainAutoRenew{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDisableDomainAutoRenew{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDisableDomainAutoRenewValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableDomainAutoRenew(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDisableDomainAutoRenew(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53domains",
OperationName: "DisableDomainAutoRenew",
}
}
| 121 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53domains
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// This operation removes the transfer lock on the domain (specifically the
// clientTransferProhibited status) to allow domain transfers. We recommend you
// refrain from performing this action unless you intend to transfer the domain to
// a different registrar. Successful submission returns an operation ID that you
// can use to track the progress and completion of the action. If the request is
// not completed successfully, the domain registrant will be notified by email.
func (c *Client) DisableDomainTransferLock(ctx context.Context, params *DisableDomainTransferLockInput, optFns ...func(*Options)) (*DisableDomainTransferLockOutput, error) {
if params == nil {
params = &DisableDomainTransferLockInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DisableDomainTransferLock", params, optFns, c.addOperationDisableDomainTransferLockMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DisableDomainTransferLockOutput)
out.ResultMetadata = metadata
return out, nil
}
// The DisableDomainTransferLock request includes the following element.
type DisableDomainTransferLockInput struct {
// The name of the domain that you want to remove the transfer lock for.
//
// This member is required.
DomainName *string
noSmithyDocumentSerde
}
// The DisableDomainTransferLock response includes the following element.
type DisableDomainTransferLockOutput struct {
// Identifier for tracking the progress of the request. To query the operation
// status, use GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html)
// .
OperationId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDisableDomainTransferLockMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDisableDomainTransferLock{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDisableDomainTransferLock{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDisableDomainTransferLockValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableDomainTransferLock(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDisableDomainTransferLock(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53domains",
OperationName: "DisableDomainTransferLock",
}
}
| 133 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53domains
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Deletes a delegation signer (DS) record in the registry zone for this domain
// name.
func (c *Client) DisassociateDelegationSignerFromDomain(ctx context.Context, params *DisassociateDelegationSignerFromDomainInput, optFns ...func(*Options)) (*DisassociateDelegationSignerFromDomainOutput, error) {
if params == nil {
params = &DisassociateDelegationSignerFromDomainInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DisassociateDelegationSignerFromDomain", params, optFns, c.addOperationDisassociateDelegationSignerFromDomainMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DisassociateDelegationSignerFromDomainOutput)
out.ResultMetadata = metadata
return out, nil
}
type DisassociateDelegationSignerFromDomainInput struct {
// Name of the domain.
//
// This member is required.
DomainName *string
// An internal identification number assigned to each DS record after it’s
// created. You can retrieve it as part of DNSSEC information returned by
// GetDomainDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetDomainDetail.html)
// .
//
// This member is required.
Id *string
noSmithyDocumentSerde
}
type DisassociateDelegationSignerFromDomainOutput struct {
// Identifier for tracking the progress of the request. To query the operation
// status, use GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html)
// .
OperationId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDisassociateDelegationSignerFromDomainMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDisassociateDelegationSignerFromDomain{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDisassociateDelegationSignerFromDomain{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDisassociateDelegationSignerFromDomainValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateDelegationSignerFromDomain(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opDisassociateDelegationSignerFromDomain(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53domains",
OperationName: "DisassociateDelegationSignerFromDomain",
}
}
| 135 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53domains
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// This operation configures Amazon Route 53 to automatically renew the specified
// domain before the domain registration expires. The cost of renewing your domain
// registration is billed to your Amazon Web Services account. The period during
// which you can renew a domain name varies by TLD. For a list of TLDs and their
// renewal policies, see Domains That You Can Register with Amazon Route 53 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html)
// in the Amazon Route 53 Developer Guide. Route 53 requires that you renew before
// the end of the renewal period so we can complete processing before the deadline.
func (c *Client) EnableDomainAutoRenew(ctx context.Context, params *EnableDomainAutoRenewInput, optFns ...func(*Options)) (*EnableDomainAutoRenewOutput, error) {
if params == nil {
params = &EnableDomainAutoRenewInput{}
}
result, metadata, err := c.invokeOperation(ctx, "EnableDomainAutoRenew", params, optFns, c.addOperationEnableDomainAutoRenewMiddlewares)
if err != nil {
return nil, err
}
out := result.(*EnableDomainAutoRenewOutput)
out.ResultMetadata = metadata
return out, nil
}
type EnableDomainAutoRenewInput struct {
// The name of the domain that you want to enable automatic renewal for.
//
// This member is required.
DomainName *string
noSmithyDocumentSerde
}
type EnableDomainAutoRenewOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationEnableDomainAutoRenewMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpEnableDomainAutoRenew{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpEnableDomainAutoRenew{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpEnableDomainAutoRenewValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableDomainAutoRenew(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opEnableDomainAutoRenew(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53domains",
OperationName: "EnableDomainAutoRenew",
}
}
| 126 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53domains
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// This operation sets the transfer lock on the domain (specifically the
// clientTransferProhibited status) to prevent domain transfers. Successful
// submission returns an operation ID that you can use to track the progress and
// completion of the action. If the request is not completed successfully, the
// domain registrant will be notified by email.
func (c *Client) EnableDomainTransferLock(ctx context.Context, params *EnableDomainTransferLockInput, optFns ...func(*Options)) (*EnableDomainTransferLockOutput, error) {
if params == nil {
params = &EnableDomainTransferLockInput{}
}
result, metadata, err := c.invokeOperation(ctx, "EnableDomainTransferLock", params, optFns, c.addOperationEnableDomainTransferLockMiddlewares)
if err != nil {
return nil, err
}
out := result.(*EnableDomainTransferLockOutput)
out.ResultMetadata = metadata
return out, nil
}
// A request to set the transfer lock for the specified domain.
type EnableDomainTransferLockInput struct {
// The name of the domain that you want to set the transfer lock for.
//
// This member is required.
DomainName *string
noSmithyDocumentSerde
}
// The EnableDomainTransferLock response includes the following elements.
type EnableDomainTransferLockOutput struct {
// Identifier for tracking the progress of the request. To use this ID to query
// the operation status, use GetOperationDetail.
OperationId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationEnableDomainTransferLockMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpEnableDomainTransferLock{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpEnableDomainTransferLock{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpEnableDomainTransferLockValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableDomainTransferLock(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opEnableDomainTransferLock(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53domains",
OperationName: "EnableDomainTransferLock",
}
}
| 131 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53domains
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53domains/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// For operations that require confirmation that the email address for the
// registrant contact is valid, such as registering a new domain, this operation
// returns information about whether the registrant contact has responded. If you
// want us to resend the email, use the ResendContactReachabilityEmail operation.
func (c *Client) GetContactReachabilityStatus(ctx context.Context, params *GetContactReachabilityStatusInput, optFns ...func(*Options)) (*GetContactReachabilityStatusOutput, error) {
if params == nil {
params = &GetContactReachabilityStatusInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetContactReachabilityStatus", params, optFns, c.addOperationGetContactReachabilityStatusMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetContactReachabilityStatusOutput)
out.ResultMetadata = metadata
return out, nil
}
type GetContactReachabilityStatusInput struct {
// The name of the domain for which you want to know whether the registrant
// contact has confirmed that the email address is valid.
DomainName *string
noSmithyDocumentSerde
}
type GetContactReachabilityStatusOutput struct {
// The domain name for which you requested the reachability status.
DomainName *string
// Whether the registrant contact has responded. Values include the following:
// PENDING We sent the confirmation email and haven't received a response yet. DONE
// We sent the email and got confirmation from the registrant contact. EXPIRED The
// time limit expired before the registrant contact responded.
Status types.ReachabilityStatus
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetContactReachabilityStatusMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetContactReachabilityStatus{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetContactReachabilityStatus{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetContactReachabilityStatus(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetContactReachabilityStatus(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53domains",
OperationName: "GetContactReachabilityStatus",
}
}
| 130 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53domains
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53domains/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// This operation returns detailed information about a specified domain that is
// associated with the current Amazon Web Services account. Contact information for
// the domain is also returned as part of the output.
func (c *Client) GetDomainDetail(ctx context.Context, params *GetDomainDetailInput, optFns ...func(*Options)) (*GetDomainDetailOutput, error) {
if params == nil {
params = &GetDomainDetailInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetDomainDetail", params, optFns, c.addOperationGetDomainDetailMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetDomainDetailOutput)
out.ResultMetadata = metadata
return out, nil
}
// The GetDomainDetail request includes the following element.
type GetDomainDetailInput struct {
// The name of the domain that you want to get detailed information about.
//
// This member is required.
DomainName *string
noSmithyDocumentSerde
}
// The GetDomainDetail response includes the following elements.
type GetDomainDetailOutput struct {
// Email address to contact to report incorrect contact information for a domain,
// to report that the domain is being used to send spam, to report that someone is
// cybersquatting on a domain name, or report some other type of abuse.
AbuseContactEmail *string
// Phone number for reporting abuse.
AbuseContactPhone *string
// Provides details about the domain administrative contact.
AdminContact *types.ContactDetail
// Specifies whether contact information is concealed from WHOIS queries. If the
// value is true , WHOIS ("who is") queries return contact information either for
// Amazon Registrar (for .com, .net, and .org domains) or for our registrar
// associate, Gandi (for all other TLDs). If the value is false , WHOIS queries
// return the information that you entered for the admin contact.
AdminPrivacy *bool
// Specifies whether the domain registration is set to renew automatically.
AutoRenew *bool
// The date when the domain was created as found in the response to a WHOIS query.
// The date and time is in Unix time format and Coordinated Universal time (UTC).
CreationDate *time.Time
// Deprecated.
DnsSec *string
// A complex type that contains information about the DNSSEC configuration.
DnssecKeys []types.DnssecKey
// The name of a domain.
DomainName *string
// The date when the registration for the domain is set to expire. The date and
// time is in Unix time format and Coordinated Universal time (UTC).
ExpirationDate *time.Time
// The name servers of the domain.
Nameservers []types.Nameserver
// Provides details about the domain registrant.
RegistrantContact *types.ContactDetail
// Specifies whether contact information is concealed from WHOIS queries. If the
// value is true , WHOIS ("who is") queries return contact information either for
// Amazon Registrar (for .com, .net, and .org domains) or for our registrar
// associate, Gandi (for all other TLDs). If the value is false , WHOIS queries
// return the information that you entered for the registrant contact (domain
// owner).
RegistrantPrivacy *bool
// Name of the registrar of the domain as identified in the registry. Domains with
// a .com, .net, or .org TLD are registered by Amazon Registrar. All other domains
// are registered by our registrar associate, Gandi. The value for domains that are
// registered by Gandi is "GANDI SAS" .
RegistrarName *string
// Web address of the registrar.
RegistrarUrl *string
// Reserved for future use.
RegistryDomainId *string
// Reseller of the domain. Domains registered or transferred using Route 53
// domains will have "Amazon" as the reseller.
Reseller *string
// An array of domain name status codes, also known as Extensible Provisioning
// Protocol (EPP) status codes. ICANN, the organization that maintains a central
// database of domain names, has developed a set of domain name status codes that
// tell you the status of a variety of operations on a domain name, for example,
// registering a domain name, transferring a domain name to another registrar,
// renewing the registration for a domain name, and so on. All registrars use this
// same set of status codes. For a current list of domain name status codes and an
// explanation of what each code means, go to the ICANN website (https://www.icann.org/)
// and search for epp status codes . (Search on the ICANN website; web searches
// sometimes return an old version of the document.)
StatusList []string
// Provides details about the domain technical contact.
TechContact *types.ContactDetail
// Specifies whether contact information is concealed from WHOIS queries. If the
// value is true , WHOIS ("who is") queries return contact information either for
// Amazon Registrar (for .com, .net, and .org domains) or for our registrar
// associate, Gandi (for all other TLDs). If the value is false , WHOIS queries
// return the information that you entered for the technical contact.
TechPrivacy *bool
// The last updated date of the domain as found in the response to a WHOIS query.
// The date and time is in Unix time format and Coordinated Universal time (UTC).
UpdatedDate *time.Time
// The fully qualified name of the WHOIS server that can answer the WHOIS query
// for the domain.
WhoIsServer *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetDomainDetailMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetDomainDetail{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetDomainDetail{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpGetDomainDetailValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDomainDetail(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetDomainDetail(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53domains",
OperationName: "GetDomainDetail",
}
}
| 225 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53domains
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53domains/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// The GetDomainSuggestions operation returns a list of suggested domain names.
func (c *Client) GetDomainSuggestions(ctx context.Context, params *GetDomainSuggestionsInput, optFns ...func(*Options)) (*GetDomainSuggestionsOutput, error) {
if params == nil {
params = &GetDomainSuggestionsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetDomainSuggestions", params, optFns, c.addOperationGetDomainSuggestionsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetDomainSuggestionsOutput)
out.ResultMetadata = metadata
return out, nil
}
type GetDomainSuggestionsInput struct {
// A domain name that you want to use as the basis for a list of possible domain
// names. The top-level domain (TLD), such as .com, must be a TLD that Route 53
// supports. For a list of supported TLDs, see Domains that You Can Register with
// Amazon Route 53 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html)
// in the Amazon Route 53 Developer Guide. The domain name can contain only the
// following characters:
// - Letters a through z. Domain names are not case sensitive.
// - Numbers 0 through 9.
// - Hyphen (-). You can't specify a hyphen at the beginning or end of a label.
// - Period (.) to separate the labels in the name, such as the . in example.com
// .
// Internationalized domain names are not supported for some top-level domains. To
// determine whether the TLD that you want to use supports internationalized domain
// names, see Domains that You Can Register with Amazon Route 53 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html)
// .
//
// This member is required.
DomainName *string
// If OnlyAvailable is true , Route 53 returns only domain names that are
// available. If OnlyAvailable is false , Route 53 returns domain names without
// checking whether they're available to be registered. To determine whether the
// domain is available, you can call checkDomainAvailability for each suggestion.
//
// This member is required.
OnlyAvailable *bool
// The number of suggested domain names that you want Route 53 to return. Specify
// a value between 1 and 50.
//
// This member is required.
SuggestionCount int32
noSmithyDocumentSerde
}
type GetDomainSuggestionsOutput struct {
// A list of possible domain names. If you specified true for OnlyAvailable in the
// request, the list contains only domains that are available for registration.
SuggestionsList []types.DomainSuggestion
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetDomainSuggestionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetDomainSuggestions{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetDomainSuggestions{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpGetDomainSuggestionsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDomainSuggestions(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetDomainSuggestions(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53domains",
OperationName: "GetDomainSuggestions",
}
}
| 154 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53domains
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53domains/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// This operation returns the current status of an operation that is not completed.
func (c *Client) GetOperationDetail(ctx context.Context, params *GetOperationDetailInput, optFns ...func(*Options)) (*GetOperationDetailOutput, error) {
if params == nil {
params = &GetOperationDetailInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetOperationDetail", params, optFns, c.addOperationGetOperationDetailMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetOperationDetailOutput)
out.ResultMetadata = metadata
return out, nil
}
// The GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html)
// request includes the following element.
type GetOperationDetailInput struct {
// The identifier for the operation for which you want to get the status. Route 53
// returned the identifier in the response to the original request.
//
// This member is required.
OperationId *string
noSmithyDocumentSerde
}
// The GetOperationDetail response includes the following elements.
type GetOperationDetailOutput struct {
// The name of a domain.
DomainName *string
// The date when the operation was last updated.
LastUpdatedDate *time.Time
// Detailed information on the status including possible errors.
Message *string
// The identifier for the operation.
OperationId *string
// The current status of the requested operation in the system.
Status types.OperationStatus
// Lists any outstanding operations that require customer action. Valid values
// are:
// - PENDING_ACCEPTANCE : The operation is waiting for acceptance from the
// account that is receiving the domain.
// - PENDING_CUSTOMER_ACTION : The operation is waiting for customer action, for
// example, returning an email.
// - PENDING_AUTHORIZATION : The operation is waiting for the form of
// authorization. For more information, see ResendOperationAuthorization (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_ResendOperationAuthorization.html)
// .
// - PENDING_PAYMENT_VERIFICATION : The operation is waiting for the payment
// method to validate.
// - PENDING_SUPPORT_CASE : The operation includes a support case and is waiting
// for its resolution.
StatusFlag types.StatusFlag
// The date when the request was submitted.
SubmittedDate *time.Time
// The type of operation that was requested.
Type types.OperationType
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetOperationDetailMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetOperationDetail{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetOperationDetail{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpGetOperationDetailValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetOperationDetail(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opGetOperationDetail(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53domains",
OperationName: "GetOperationDetail",
}
}
| 163 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53domains
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53domains/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// This operation returns all the domain names registered with Amazon Route 53 for
// the current Amazon Web Services account if no filtering conditions are used.
func (c *Client) ListDomains(ctx context.Context, params *ListDomainsInput, optFns ...func(*Options)) (*ListDomainsOutput, error) {
if params == nil {
params = &ListDomainsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListDomains", params, optFns, c.addOperationListDomainsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListDomainsOutput)
out.ResultMetadata = metadata
return out, nil
}
// The ListDomains request includes the following elements.
type ListDomainsInput struct {
// A complex type that contains information about the filters applied during the
// ListDomains request. The filter conditions can include domain name and domain
// expiration.
FilterConditions []types.FilterCondition
// For an initial request for a list of domains, omit this element. If the number
// of domains that are associated with the current Amazon Web Services account is
// greater than the value that you specified for MaxItems , you can use Marker to
// return additional domains. Get the value of NextPageMarker from the previous
// response, and submit another request that includes the value of NextPageMarker
// in the Marker element. Constraints: The marker must match the value specified
// in the previous request.
Marker *string
// Number of domains to be returned. Default: 20
MaxItems *int32
// A complex type that contains information about the requested ordering of
// domains in the returned list.
SortCondition *types.SortCondition
noSmithyDocumentSerde
}
// The ListDomains response includes the following elements.
type ListDomainsOutput struct {
// A list of domains.
Domains []types.DomainSummary
// If there are more domains than you specified for MaxItems in the request,
// submit another request and include the value of NextPageMarker in the value of
// Marker .
NextPageMarker *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListDomainsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpListDomains{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListDomains{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpListDomainsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDomains(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
// ListDomainsAPIClient is a client that implements the ListDomains operation.
type ListDomainsAPIClient interface {
ListDomains(context.Context, *ListDomainsInput, ...func(*Options)) (*ListDomainsOutput, error)
}
var _ ListDomainsAPIClient = (*Client)(nil)
// ListDomainsPaginatorOptions is the paginator options for ListDomains
type ListDomainsPaginatorOptions struct {
// Number of domains to be returned. Default: 20
Limit int32
// Set to true if pagination should stop if the service returns a pagination token
// that matches the most recent token provided to the service.
StopOnDuplicateToken bool
}
// ListDomainsPaginator is a paginator for ListDomains
type ListDomainsPaginator struct {
options ListDomainsPaginatorOptions
client ListDomainsAPIClient
params *ListDomainsInput
nextToken *string
firstPage bool
}
// NewListDomainsPaginator returns a new ListDomainsPaginator
func NewListDomainsPaginator(client ListDomainsAPIClient, params *ListDomainsInput, optFns ...func(*ListDomainsPaginatorOptions)) *ListDomainsPaginator {
if params == nil {
params = &ListDomainsInput{}
}
options := ListDomainsPaginatorOptions{}
if params.MaxItems != nil {
options.Limit = *params.MaxItems
}
for _, fn := range optFns {
fn(&options)
}
return &ListDomainsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListDomainsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListDomains page.
func (p *ListDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListDomainsOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.Marker = p.nextToken
var limit *int32
if p.options.Limit > 0 {
limit = &p.options.Limit
}
params.MaxItems = limit
result, err := p.client.ListDomains(ctx, ¶ms, optFns...)
if err != nil {
return nil, err
}
p.firstPage = false
prevToken := p.nextToken
p.nextToken = result.NextPageMarker
if p.options.StopOnDuplicateToken &&
prevToken != nil &&
p.nextToken != nil &&
*prevToken == *p.nextToken {
p.nextToken = nil
}
return result, nil
}
func newServiceMetadataMiddleware_opListDomains(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53domains",
OperationName: "ListDomains",
}
}
| 239 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53domains
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53domains/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Returns information about all of the operations that return an operation ID and
// that have ever been performed on domains that were registered by the current
// account. This command runs only in the us-east-1 Region.
func (c *Client) ListOperations(ctx context.Context, params *ListOperationsInput, optFns ...func(*Options)) (*ListOperationsOutput, error) {
if params == nil {
params = &ListOperationsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListOperations", params, optFns, c.addOperationListOperationsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListOperationsOutput)
out.ResultMetadata = metadata
return out, nil
}
// The ListOperations request includes the following elements.
type ListOperationsInput struct {
// For an initial request for a list of operations, omit this element. If the
// number of operations that are not yet complete is greater than the value that
// you specified for MaxItems , you can use Marker to return additional
// operations. Get the value of NextPageMarker from the previous response, and
// submit another request that includes the value of NextPageMarker in the Marker
// element.
Marker *string
// Number of domains to be returned. Default: 20
MaxItems *int32
// The sort type for returned values.
SortBy types.ListOperationsSortAttributeName
// The sort order ofr returned values, either ascending or descending.
SortOrder types.SortOrder
// The status of the operations.
Status []types.OperationStatus
// An optional parameter that lets you get information about all the operations
// that you submitted after a specified date and time. Specify the date and time in
// Unix time format and Coordinated Universal time (UTC).
SubmittedSince *time.Time
// An arrays of the domains operation types.
Type []types.OperationType
noSmithyDocumentSerde
}
// The ListOperations response includes the following elements.
type ListOperationsOutput struct {
// If there are more operations than you specified for MaxItems in the request,
// submit another request and include the value of NextPageMarker in the value of
// Marker .
NextPageMarker *string
// Lists summaries of the operations.
Operations []types.OperationSummary
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListOperationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpListOperations{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListOperations{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOperations(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
// ListOperationsAPIClient is a client that implements the ListOperations
// operation.
type ListOperationsAPIClient interface {
ListOperations(context.Context, *ListOperationsInput, ...func(*Options)) (*ListOperationsOutput, error)
}
var _ ListOperationsAPIClient = (*Client)(nil)
// ListOperationsPaginatorOptions is the paginator options for ListOperations
type ListOperationsPaginatorOptions struct {
// Number of domains to be returned. Default: 20
Limit int32
// Set to true if pagination should stop if the service returns a pagination token
// that matches the most recent token provided to the service.
StopOnDuplicateToken bool
}
// ListOperationsPaginator is a paginator for ListOperations
type ListOperationsPaginator struct {
options ListOperationsPaginatorOptions
client ListOperationsAPIClient
params *ListOperationsInput
nextToken *string
firstPage bool
}
// NewListOperationsPaginator returns a new ListOperationsPaginator
func NewListOperationsPaginator(client ListOperationsAPIClient, params *ListOperationsInput, optFns ...func(*ListOperationsPaginatorOptions)) *ListOperationsPaginator {
if params == nil {
params = &ListOperationsInput{}
}
options := ListOperationsPaginatorOptions{}
if params.MaxItems != nil {
options.Limit = *params.MaxItems
}
for _, fn := range optFns {
fn(&options)
}
return &ListOperationsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListOperationsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListOperations page.
func (p *ListOperationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListOperationsOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.Marker = p.nextToken
var limit *int32
if p.options.Limit > 0 {
limit = &p.options.Limit
}
params.MaxItems = limit
result, err := p.client.ListOperations(ctx, ¶ms, optFns...)
if err != nil {
return nil, err
}
p.firstPage = false
prevToken := p.nextToken
p.nextToken = result.NextPageMarker
if p.options.StopOnDuplicateToken &&
prevToken != nil &&
p.nextToken != nil &&
*prevToken == *p.nextToken {
p.nextToken = nil
}
return result, nil
}
func newServiceMetadataMiddleware_opListOperations(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53domains",
OperationName: "ListOperations",
}
}
| 246 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53domains
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53domains/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists the following prices for either all the TLDs supported by Route 53, or
// the specified TLD:
// - Registration
// - Transfer
// - Owner change
// - Domain renewal
// - Domain restoration
func (c *Client) ListPrices(ctx context.Context, params *ListPricesInput, optFns ...func(*Options)) (*ListPricesOutput, error) {
if params == nil {
params = &ListPricesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListPrices", params, optFns, c.addOperationListPricesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListPricesOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListPricesInput struct {
// For an initial request for a list of prices, omit this element. If the number
// of prices that are not yet complete is greater than the value that you specified
// for MaxItems , you can use Marker to return additional prices. Get the value of
// NextPageMarker from the previous response, and submit another request that
// includes the value of NextPageMarker in the Marker element. Used only for all
// TLDs. If you specify a TLD, don't specify a Marker .
Marker *string
// Number of Prices to be returned. Used only for all TLDs. If you specify a TLD,
// don't specify a MaxItems .
MaxItems *int32
// The TLD for which you want to receive the pricing information. For example. .net
// . If a Tld value is not provided, a list of prices for all TLDs supported by
// Route 53 is returned.
Tld *string
noSmithyDocumentSerde
}
type ListPricesOutput struct {
// If there are more prices than you specified for MaxItems in the request, submit
// another request and include the value of NextPageMarker in the value of Marker .
// Used only for all TLDs. If you specify a TLD, don't specify a NextPageMarker .
NextPageMarker *string
// A complex type that includes all the pricing information. If you specify a TLD,
// this array contains only the pricing for that TLD.
Prices []types.DomainPrice
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListPricesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpListPrices{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListPrices{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPrices(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
// ListPricesAPIClient is a client that implements the ListPrices operation.
type ListPricesAPIClient interface {
ListPrices(context.Context, *ListPricesInput, ...func(*Options)) (*ListPricesOutput, error)
}
var _ ListPricesAPIClient = (*Client)(nil)
// ListPricesPaginatorOptions is the paginator options for ListPrices
type ListPricesPaginatorOptions struct {
// Number of Prices to be returned. Used only for all TLDs. If you specify a TLD,
// don't specify a MaxItems .
Limit int32
// Set to true if pagination should stop if the service returns a pagination token
// that matches the most recent token provided to the service.
StopOnDuplicateToken bool
}
// ListPricesPaginator is a paginator for ListPrices
type ListPricesPaginator struct {
options ListPricesPaginatorOptions
client ListPricesAPIClient
params *ListPricesInput
nextToken *string
firstPage bool
}
// NewListPricesPaginator returns a new ListPricesPaginator
func NewListPricesPaginator(client ListPricesAPIClient, params *ListPricesInput, optFns ...func(*ListPricesPaginatorOptions)) *ListPricesPaginator {
if params == nil {
params = &ListPricesInput{}
}
options := ListPricesPaginatorOptions{}
if params.MaxItems != nil {
options.Limit = *params.MaxItems
}
for _, fn := range optFns {
fn(&options)
}
return &ListPricesPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListPricesPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListPrices page.
func (p *ListPricesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListPricesOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.Marker = p.nextToken
var limit *int32
if p.options.Limit > 0 {
limit = &p.options.Limit
}
params.MaxItems = limit
result, err := p.client.ListPrices(ctx, ¶ms, optFns...)
if err != nil {
return nil, err
}
p.firstPage = false
prevToken := p.nextToken
p.nextToken = result.NextPageMarker
if p.options.StopOnDuplicateToken &&
prevToken != nil &&
p.nextToken != nil &&
*prevToken == *p.nextToken {
p.nextToken = nil
}
return result, nil
}
func newServiceMetadataMiddleware_opListPrices(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53domains",
OperationName: "ListPrices",
}
}
| 237 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53domains
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53domains/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// This operation returns all of the tags that are associated with the specified
// domain. All tag operations are eventually consistent; subsequent operations
// might not immediately represent all issued operations.
func (c *Client) ListTagsForDomain(ctx context.Context, params *ListTagsForDomainInput, optFns ...func(*Options)) (*ListTagsForDomainOutput, error) {
if params == nil {
params = &ListTagsForDomainInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListTagsForDomain", params, optFns, c.addOperationListTagsForDomainMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListTagsForDomainOutput)
out.ResultMetadata = metadata
return out, nil
}
// The ListTagsForDomainRequest includes the following elements.
type ListTagsForDomainInput struct {
// The domain for which you want to get a list of tags.
//
// This member is required.
DomainName *string
noSmithyDocumentSerde
}
// The ListTagsForDomain response includes the following elements.
type ListTagsForDomainOutput struct {
// A list of the tags that are associated with the specified domain.
TagList []types.Tag
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListTagsForDomainMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpListTagsForDomain{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListTagsForDomain{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpListTagsForDomainValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForDomain(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opListTagsForDomain(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53domains",
OperationName: "ListTagsForDomain",
}
}
| 129 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53domains
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Moves a domain from Amazon Web Services to another registrar. Supported
// actions:
// - Changes the IPS tags of a .uk domain, and pushes it to transit. Transit
// means that the domain is ready to be transferred to another registrar.
func (c *Client) PushDomain(ctx context.Context, params *PushDomainInput, optFns ...func(*Options)) (*PushDomainOutput, error) {
if params == nil {
params = &PushDomainInput{}
}
result, metadata, err := c.invokeOperation(ctx, "PushDomain", params, optFns, c.addOperationPushDomainMiddlewares)
if err != nil {
return nil, err
}
out := result.(*PushDomainOutput)
out.ResultMetadata = metadata
return out, nil
}
type PushDomainInput struct {
// Name of the domain.
//
// This member is required.
DomainName *string
// New IPS tag for the domain.
//
// This member is required.
Target *string
noSmithyDocumentSerde
}
type PushDomainOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationPushDomainMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpPushDomain{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPushDomain{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpPushDomainValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPushDomain(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opPushDomain(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53domains",
OperationName: "PushDomain",
}
}
| 128 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53domains
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/route53domains/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// This operation registers a domain. For some top-level domains (TLDs), this
// operation requires extra parameters. When you register a domain, Amazon Route 53
// does the following:
// - Creates a Route 53 hosted zone that has the same name as the domain. Route
// 53 assigns four name servers to your hosted zone and automatically updates your
// domain registration with the names of these name servers.
// - Enables auto renew, so your domain registration will renew automatically
// each year. We'll notify you in advance of the renewal date so you can choose
// whether to renew the registration.
// - Optionally enables privacy protection, so WHOIS queries return contact for
// the registrar or the phrase "REDACTED FOR PRIVACY", or "On behalf of owner." If
// you don't enable privacy protection, WHOIS queries return the information that
// you entered for the administrative, registrant, and technical contacts. While
// some domains may allow different privacy settings per contact, we recommend
// specifying the same privacy setting for all contacts.
// - If registration is successful, returns an operation ID that you can use to
// track the progress and completion of the action. If the request is not completed
// successfully, the domain registrant is notified by email.
// - Charges your Amazon Web Services account an amount based on the top-level
// domain. For more information, see Amazon Route 53 Pricing (http://aws.amazon.com/route53/pricing/)
// .
func (c *Client) RegisterDomain(ctx context.Context, params *RegisterDomainInput, optFns ...func(*Options)) (*RegisterDomainOutput, error) {
if params == nil {
params = &RegisterDomainInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RegisterDomain", params, optFns, c.addOperationRegisterDomainMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RegisterDomainOutput)
out.ResultMetadata = metadata
return out, nil
}
// The RegisterDomain request includes the following elements.
type RegisterDomainInput struct {
// Provides detailed contact information. For information about the values that
// you specify for each element, see ContactDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_ContactDetail.html)
// .
//
// This member is required.
AdminContact *types.ContactDetail
// The domain name that you want to register. The top-level domain (TLD), such as
// .com, must be a TLD that Route 53 supports. For a list of supported TLDs, see
// Domains that You Can Register with Amazon Route 53 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html)
// in the Amazon Route 53 Developer Guide. The domain name can contain only the
// following characters:
// - Letters a through z. Domain names are not case sensitive.
// - Numbers 0 through 9.
// - Hyphen (-). You can't specify a hyphen at the beginning or end of a label.
// - Period (.) to separate the labels in the name, such as the . in example.com
// .
// Internationalized domain names are not supported for some top-level domains. To
// determine whether the TLD that you want to use supports internationalized domain
// names, see Domains that You Can Register with Amazon Route 53 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html)
// . For more information, see Formatting Internationalized Domain Names (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DomainNameFormat.html#domain-name-format-idns)
// .
//
// This member is required.
DomainName *string
// The number of years that you want to register the domain for. Domains are
// registered for a minimum of one year. The maximum period depends on the
// top-level domain. For the range of valid values for your domain, see Domains
// that You Can Register with Amazon Route 53 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html)
// in the Amazon Route 53 Developer Guide. Default: 1
//
// This member is required.
DurationInYears *int32
// Provides detailed contact information. For information about the values that
// you specify for each element, see ContactDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_ContactDetail.html)
// .
//
// This member is required.
RegistrantContact *types.ContactDetail
// Provides detailed contact information. For information about the values that
// you specify for each element, see ContactDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_ContactDetail.html)
// .
//
// This member is required.
TechContact *types.ContactDetail
// Indicates whether the domain will be automatically renewed ( true ) or not (
// false ). Auto renewal only takes effect after the account is charged. Default:
// true
AutoRenew *bool
// Reserved for future use.
IdnLangCode *string
// Whether you want to conceal contact information from WHOIS queries. If you
// specify true , WHOIS ("who is") queries return contact information either for
// Amazon Registrar (for .com, .net, and .org domains) or for our registrar
// associate, Gandi (for all other TLDs). If you specify false , WHOIS queries
// return the information that you entered for the admin contact. You must specify
// the same privacy setting for the administrative, registrant, and technical
// contacts. Default: true
PrivacyProtectAdminContact *bool
// Whether you want to conceal contact information from WHOIS queries. If you
// specify true , WHOIS ("who is") queries return contact information either for
// Amazon Registrar (for .com, .net, and .org domains) or for our registrar
// associate, Gandi (for all other TLDs). If you specify false , WHOIS queries
// return the information that you entered for the registrant contact (the domain
// owner). You must specify the same privacy setting for the administrative,
// registrant, and technical contacts. Default: true
PrivacyProtectRegistrantContact *bool
// Whether you want to conceal contact information from WHOIS queries. If you
// specify true , WHOIS ("who is") queries return contact information either for
// Amazon Registrar (for .com, .net, and .org domains) or for our registrar
// associate, Gandi (for all other TLDs). If you specify false , WHOIS queries
// return the information that you entered for the technical contact. You must
// specify the same privacy setting for the administrative, registrant, and
// technical contacts. Default: true
PrivacyProtectTechContact *bool
noSmithyDocumentSerde
}
// The RegisterDomain response includes the following element.
type RegisterDomainOutput struct {
// Identifier for tracking the progress of the request. To query the operation
// status, use GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html)
// .
OperationId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRegisterDomainMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpRegisterDomain{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRegisterDomain{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpRegisterDomainValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterDomain(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opRegisterDomain(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53domains",
OperationName: "RegisterDomain",
}
}
| 228 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53domains
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Rejects the transfer of a domain from another Amazon Web Services account to
// the current Amazon Web Services account. You initiate a transfer betweenAmazon
// Web Services accounts using TransferDomainToAnotherAwsAccount (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_TransferDomainToAnotherAwsAccount.html)
// . Use either ListOperations (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_ListOperations.html)
// or GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html)
// to determine whether the operation succeeded. GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html)
// provides additional information, for example, Domain Transfer from Aws Account
// 111122223333 has been cancelled .
func (c *Client) RejectDomainTransferFromAnotherAwsAccount(ctx context.Context, params *RejectDomainTransferFromAnotherAwsAccountInput, optFns ...func(*Options)) (*RejectDomainTransferFromAnotherAwsAccountOutput, error) {
if params == nil {
params = &RejectDomainTransferFromAnotherAwsAccountInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RejectDomainTransferFromAnotherAwsAccount", params, optFns, c.addOperationRejectDomainTransferFromAnotherAwsAccountMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RejectDomainTransferFromAnotherAwsAccountOutput)
out.ResultMetadata = metadata
return out, nil
}
// The RejectDomainTransferFromAnotherAwsAccount request includes the following
// element.
type RejectDomainTransferFromAnotherAwsAccountInput struct {
// The name of the domain that was specified when another Amazon Web Services
// account submitted a TransferDomainToAnotherAwsAccount (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_TransferDomainToAnotherAwsAccount.html)
// request.
//
// This member is required.
DomainName *string
noSmithyDocumentSerde
}
// The RejectDomainTransferFromAnotherAwsAccount response includes the following
// element.
type RejectDomainTransferFromAnotherAwsAccountOutput struct {
// The identifier that TransferDomainToAnotherAwsAccount returned to track the
// progress of the request. Because the transfer request was rejected, the value is
// no longer valid, and you can't use GetOperationDetail to query the operation
// status.
OperationId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRejectDomainTransferFromAnotherAwsAccountMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpRejectDomainTransferFromAnotherAwsAccount{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRejectDomainTransferFromAnotherAwsAccount{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpRejectDomainTransferFromAnotherAwsAccountValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRejectDomainTransferFromAnotherAwsAccount(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opRejectDomainTransferFromAnotherAwsAccount(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53domains",
OperationName: "RejectDomainTransferFromAnotherAwsAccount",
}
}
| 140 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package route53domains
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// This operation renews a domain for the specified number of years. The cost of
// renewing your domain is billed to your Amazon Web Services account. We recommend
// that you renew your domain several weeks before the expiration date. Some TLD
// registries delete domains before the expiration date if you haven't renewed far
// enough in advance. For more information about renewing domain registration, see
// Renewing Registration for a Domain (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-renew.html)
// in the Amazon Route 53 Developer Guide.
func (c *Client) RenewDomain(ctx context.Context, params *RenewDomainInput, optFns ...func(*Options)) (*RenewDomainOutput, error) {
if params == nil {
params = &RenewDomainInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RenewDomain", params, optFns, c.addOperationRenewDomainMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RenewDomainOutput)
out.ResultMetadata = metadata
return out, nil
}
// A RenewDomain request includes the number of years that you want to renew for
// and the current expiration year.
type RenewDomainInput struct {
// The year when the registration for the domain is set to expire. This value must
// match the current expiration date for the domain.
//
// This member is required.
CurrentExpiryYear int32
// The name of the domain that you want to renew.
//
// This member is required.
DomainName *string
// The number of years that you want to renew the domain for. The maximum number
// of years depends on the top-level domain. For the range of valid values for your
// domain, see Domains that You Can Register with Amazon Route 53 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html)
// in the Amazon Route 53 Developer Guide. Default: 1
DurationInYears *int32
noSmithyDocumentSerde
}
type RenewDomainOutput struct {
// Identifier for tracking the progress of the request. To query the operation
// status, use GetOperationDetail (https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html)
// .
OperationId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRenewDomainMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpRenewDomain{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRenewDomain{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpRenewDomainValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRenewDomain(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opRenewDomain(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "route53domains",
OperationName: "RenewDomain",
}
}
| 146 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.