mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-21 12:57:40 +00:00
Imported Upstream version 1.0.1
This commit is contained in:
+13686
File diff suppressed because it is too large
Load Diff
+42
@@ -0,0 +1,42 @@
|
||||
package route53
|
||||
|
||||
import (
|
||||
"net/url"
|
||||
"regexp"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws/awserr"
|
||||
"github.com/aws/aws-sdk-go/aws/client"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/private/protocol/restxml"
|
||||
)
|
||||
|
||||
func init() {
|
||||
initClient = func(c *client.Client) {
|
||||
c.Handlers.Build.PushBack(sanitizeURL)
|
||||
}
|
||||
|
||||
initRequest = func(r *request.Request) {
|
||||
switch r.Operation.Name {
|
||||
case opChangeResourceRecordSets:
|
||||
r.Handlers.UnmarshalError.Remove(restxml.UnmarshalErrorHandler)
|
||||
r.Handlers.UnmarshalError.PushBack(unmarshalChangeResourceRecordSetsError)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var reSanitizeURL = regexp.MustCompile(`\/%2F\w+%2F`)
|
||||
|
||||
func sanitizeURL(r *request.Request) {
|
||||
r.HTTPRequest.URL.RawPath =
|
||||
reSanitizeURL.ReplaceAllString(r.HTTPRequest.URL.RawPath, "/")
|
||||
|
||||
// Update Path so that it reflects the cleaned RawPath
|
||||
updated, err := url.Parse(r.HTTPRequest.URL.RawPath)
|
||||
if err != nil {
|
||||
r.Error = awserr.New("SerializationError", "failed to clean Route53 URL", err)
|
||||
return
|
||||
}
|
||||
|
||||
// Take the updated path so the requests's URL Path has parity with RawPath.
|
||||
r.HTTPRequest.URL.Path = updated.Path
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package route53_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/awstesting/unit"
|
||||
"github.com/aws/aws-sdk-go/service/route53"
|
||||
)
|
||||
|
||||
func TestBuildCorrectURI(t *testing.T) {
|
||||
const expectPath = "/2013-04-01/hostedzone/ABCDEFG"
|
||||
|
||||
svc := route53.New(unit.Session)
|
||||
svc.Handlers.Validate.Clear()
|
||||
req, _ := svc.GetHostedZoneRequest(&route53.GetHostedZoneInput{
|
||||
Id: aws.String("/hostedzone/ABCDEFG"),
|
||||
})
|
||||
|
||||
req.HTTPRequest.URL.RawQuery = "abc=123"
|
||||
|
||||
req.Build()
|
||||
|
||||
if a, e := req.HTTPRequest.URL.Path, expectPath; a != e {
|
||||
t.Errorf("expect path %q, got %q", e, a)
|
||||
}
|
||||
|
||||
if a, e := req.HTTPRequest.URL.RawPath, expectPath; a != e {
|
||||
t.Errorf("expect raw path %q, got %q", e, a)
|
||||
}
|
||||
|
||||
if a, e := req.HTTPRequest.URL.RawQuery, "abc=123"; a != e {
|
||||
t.Errorf("expect query to be %q, got %q", e, a)
|
||||
}
|
||||
}
|
||||
+321
@@ -0,0 +1,321 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
package route53
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeConcurrentModification for service response error code
|
||||
// "ConcurrentModification".
|
||||
//
|
||||
// Another user submitted a request to update the object at the same time that
|
||||
// you did. Retry the request.
|
||||
ErrCodeConcurrentModification = "ConcurrentModification"
|
||||
|
||||
// ErrCodeConflictingDomainExists for service response error code
|
||||
// "ConflictingDomainExists".
|
||||
//
|
||||
// You specified an Amazon VPC that you're already using for another hosted
|
||||
// zone, and the domain that you specified for one of the hosted zones is a
|
||||
// subdomain of the domain that you specified for the other hosted zone. For
|
||||
// example, you can't use the same Amazon VPC for the hosted zones for example.com
|
||||
// and test.example.com.
|
||||
ErrCodeConflictingDomainExists = "ConflictingDomainExists"
|
||||
|
||||
// ErrCodeConflictingTypes for service response error code
|
||||
// "ConflictingTypes".
|
||||
//
|
||||
// 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 CreateTrafficPolicyVersionrequest.
|
||||
ErrCodeConflictingTypes = "ConflictingTypes"
|
||||
|
||||
// ErrCodeDelegationSetAlreadyCreated for service response error code
|
||||
// "DelegationSetAlreadyCreated".
|
||||
//
|
||||
// A delegation set with the same owner and caller reference combination has
|
||||
// already been created.
|
||||
ErrCodeDelegationSetAlreadyCreated = "DelegationSetAlreadyCreated"
|
||||
|
||||
// ErrCodeDelegationSetAlreadyReusable for service response error code
|
||||
// "DelegationSetAlreadyReusable".
|
||||
//
|
||||
// The specified delegation set has already been marked as reusable.
|
||||
ErrCodeDelegationSetAlreadyReusable = "DelegationSetAlreadyReusable"
|
||||
|
||||
// ErrCodeDelegationSetInUse for service response error code
|
||||
// "DelegationSetInUse".
|
||||
//
|
||||
// The specified delegation contains associated hosted zones which must be deleted
|
||||
// before the reusable delegation set can be deleted.
|
||||
ErrCodeDelegationSetInUse = "DelegationSetInUse"
|
||||
|
||||
// ErrCodeDelegationSetNotAvailable for service response error code
|
||||
// "DelegationSetNotAvailable".
|
||||
//
|
||||
// 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 Amazon Route 53 generates
|
||||
// this error, contact Customer Support.
|
||||
ErrCodeDelegationSetNotAvailable = "DelegationSetNotAvailable"
|
||||
|
||||
// ErrCodeDelegationSetNotReusable for service response error code
|
||||
// "DelegationSetNotReusable".
|
||||
//
|
||||
// A reusable delegation set with the specified ID does not exist.
|
||||
ErrCodeDelegationSetNotReusable = "DelegationSetNotReusable"
|
||||
|
||||
// ErrCodeHealthCheckAlreadyExists for service response error code
|
||||
// "HealthCheckAlreadyExists".
|
||||
//
|
||||
// The health check you're attempting to create already exists. Amazon Route
|
||||
// 53 returns this error when a health check has already been created with the
|
||||
// specified value for CallerReference.
|
||||
ErrCodeHealthCheckAlreadyExists = "HealthCheckAlreadyExists"
|
||||
|
||||
// ErrCodeHealthCheckInUse for service response error code
|
||||
// "HealthCheckInUse".
|
||||
//
|
||||
// The health check ID for this health check is referenced in the HealthCheckId
|
||||
// element in one of the resource record sets in one of the hosted zones that
|
||||
// are owned by the current AWS account.
|
||||
ErrCodeHealthCheckInUse = "HealthCheckInUse"
|
||||
|
||||
// ErrCodeHealthCheckVersionMismatch for service response error code
|
||||
// "HealthCheckVersionMismatch".
|
||||
//
|
||||
// The value of HealthCheckVersion in the request doesn't match the value of
|
||||
// HealthCheckVersion in the health check.
|
||||
ErrCodeHealthCheckVersionMismatch = "HealthCheckVersionMismatch"
|
||||
|
||||
// ErrCodeHostedZoneAlreadyExists for service response error code
|
||||
// "HostedZoneAlreadyExists".
|
||||
//
|
||||
// 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.
|
||||
ErrCodeHostedZoneAlreadyExists = "HostedZoneAlreadyExists"
|
||||
|
||||
// ErrCodeHostedZoneNotEmpty for service response error code
|
||||
// "HostedZoneNotEmpty".
|
||||
//
|
||||
// The hosted zone contains resource records that are not SOA or NS records.
|
||||
ErrCodeHostedZoneNotEmpty = "HostedZoneNotEmpty"
|
||||
|
||||
// ErrCodeHostedZoneNotFound for service response error code
|
||||
// "HostedZoneNotFound".
|
||||
//
|
||||
// The specified HostedZone can't be found.
|
||||
ErrCodeHostedZoneNotFound = "HostedZoneNotFound"
|
||||
|
||||
// ErrCodeIncompatibleVersion for service response error code
|
||||
// "IncompatibleVersion".
|
||||
//
|
||||
// The resource you're trying to access is unsupported on this Amazon Route
|
||||
// 53 endpoint.
|
||||
ErrCodeIncompatibleVersion = "IncompatibleVersion"
|
||||
|
||||
// ErrCodeInvalidArgument for service response error code
|
||||
// "InvalidArgument".
|
||||
//
|
||||
// Parameter name is invalid.
|
||||
ErrCodeInvalidArgument = "InvalidArgument"
|
||||
|
||||
// ErrCodeInvalidChangeBatch for service response error code
|
||||
// "InvalidChangeBatch".
|
||||
//
|
||||
// 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.
|
||||
ErrCodeInvalidChangeBatch = "InvalidChangeBatch"
|
||||
|
||||
// ErrCodeInvalidDomainName for service response error code
|
||||
// "InvalidDomainName".
|
||||
//
|
||||
// The specified domain name is not valid.
|
||||
ErrCodeInvalidDomainName = "InvalidDomainName"
|
||||
|
||||
// ErrCodeInvalidInput for service response error code
|
||||
// "InvalidInput".
|
||||
//
|
||||
// The input is not valid.
|
||||
ErrCodeInvalidInput = "InvalidInput"
|
||||
|
||||
// ErrCodeInvalidPaginationToken for service response error code
|
||||
// "InvalidPaginationToken".
|
||||
ErrCodeInvalidPaginationToken = "InvalidPaginationToken"
|
||||
|
||||
// ErrCodeInvalidTrafficPolicyDocument for service response error code
|
||||
// "InvalidTrafficPolicyDocument".
|
||||
//
|
||||
// The format of the traffic policy document that you specified in the Document
|
||||
// element is invalid.
|
||||
ErrCodeInvalidTrafficPolicyDocument = "InvalidTrafficPolicyDocument"
|
||||
|
||||
// ErrCodeInvalidVPCId for service response error code
|
||||
// "InvalidVPCId".
|
||||
//
|
||||
// The VPC ID that you specified either isn't a valid ID or the current account
|
||||
// is not authorized to access this VPC.
|
||||
ErrCodeInvalidVPCId = "InvalidVPCId"
|
||||
|
||||
// ErrCodeLastVPCAssociation for service response error code
|
||||
// "LastVPCAssociation".
|
||||
//
|
||||
// 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.
|
||||
ErrCodeLastVPCAssociation = "LastVPCAssociation"
|
||||
|
||||
// ErrCodeLimitsExceeded for service response error code
|
||||
// "LimitsExceeded".
|
||||
//
|
||||
// The limits specified for a resource have been exceeded.
|
||||
ErrCodeLimitsExceeded = "LimitsExceeded"
|
||||
|
||||
// ErrCodeNoSuchChange for service response error code
|
||||
// "NoSuchChange".
|
||||
//
|
||||
// A change with the specified change ID does not exist.
|
||||
ErrCodeNoSuchChange = "NoSuchChange"
|
||||
|
||||
// ErrCodeNoSuchDelegationSet for service response error code
|
||||
// "NoSuchDelegationSet".
|
||||
//
|
||||
// A reusable delegation set with the specified ID does not exist.
|
||||
ErrCodeNoSuchDelegationSet = "NoSuchDelegationSet"
|
||||
|
||||
// ErrCodeNoSuchGeoLocation for service response error code
|
||||
// "NoSuchGeoLocation".
|
||||
//
|
||||
// Amazon Route 53 doesn't support the specified geolocation.
|
||||
ErrCodeNoSuchGeoLocation = "NoSuchGeoLocation"
|
||||
|
||||
// ErrCodeNoSuchHealthCheck for service response error code
|
||||
// "NoSuchHealthCheck".
|
||||
//
|
||||
// No health check exists with the ID that you specified in the DeleteHealthCheck
|
||||
// request.
|
||||
ErrCodeNoSuchHealthCheck = "NoSuchHealthCheck"
|
||||
|
||||
// ErrCodeNoSuchHostedZone for service response error code
|
||||
// "NoSuchHostedZone".
|
||||
//
|
||||
// No hosted zone exists with the ID that you specified.
|
||||
ErrCodeNoSuchHostedZone = "NoSuchHostedZone"
|
||||
|
||||
// ErrCodeNoSuchTrafficPolicy for service response error code
|
||||
// "NoSuchTrafficPolicy".
|
||||
//
|
||||
// No traffic policy exists with the specified ID.
|
||||
ErrCodeNoSuchTrafficPolicy = "NoSuchTrafficPolicy"
|
||||
|
||||
// ErrCodeNoSuchTrafficPolicyInstance for service response error code
|
||||
// "NoSuchTrafficPolicyInstance".
|
||||
//
|
||||
// No traffic policy instance exists with the specified ID.
|
||||
ErrCodeNoSuchTrafficPolicyInstance = "NoSuchTrafficPolicyInstance"
|
||||
|
||||
// ErrCodeNotAuthorizedException for service response error code
|
||||
// "NotAuthorizedException".
|
||||
//
|
||||
// Associating the specified VPC with the specified hosted zone has not been
|
||||
// authorized.
|
||||
ErrCodeNotAuthorizedException = "NotAuthorizedException"
|
||||
|
||||
// ErrCodePriorRequestNotComplete for service response error code
|
||||
// "PriorRequestNotComplete".
|
||||
//
|
||||
// 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 Amazon 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.
|
||||
ErrCodePriorRequestNotComplete = "PriorRequestNotComplete"
|
||||
|
||||
// ErrCodePublicZoneVPCAssociation for service response error code
|
||||
// "PublicZoneVPCAssociation".
|
||||
//
|
||||
// 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.
|
||||
ErrCodePublicZoneVPCAssociation = "PublicZoneVPCAssociation"
|
||||
|
||||
// ErrCodeThrottlingException for service response error code
|
||||
// "ThrottlingException".
|
||||
//
|
||||
// The limit on the number of requests per second was exceeded.
|
||||
ErrCodeThrottlingException = "ThrottlingException"
|
||||
|
||||
// ErrCodeTooManyHealthChecks for service response error code
|
||||
// "TooManyHealthChecks".
|
||||
//
|
||||
// You have reached the maximum number of active health checks for an AWS account.
|
||||
// The default limit is 100. To request a higher limit, create a case (http://aws.amazon.com/route53-request)
|
||||
// with the AWS Support Center.
|
||||
ErrCodeTooManyHealthChecks = "TooManyHealthChecks"
|
||||
|
||||
// ErrCodeTooManyHostedZones for service response error code
|
||||
// "TooManyHostedZones".
|
||||
//
|
||||
// This hosted zone can't be created because the hosted zone limit is exceeded.
|
||||
// To request a limit increase, go to the Amazon Route 53 Contact Us (http://aws.amazon.com/route53-request/)
|
||||
// page.
|
||||
ErrCodeTooManyHostedZones = "TooManyHostedZones"
|
||||
|
||||
// ErrCodeTooManyTrafficPolicies for service response error code
|
||||
// "TooManyTrafficPolicies".
|
||||
//
|
||||
// You've created the maximum number of traffic policies that can be created
|
||||
// for the current AWS account. You can request an increase to the limit on
|
||||
// the Contact Us (http://aws.amazon.com/route53-request/) page.
|
||||
ErrCodeTooManyTrafficPolicies = "TooManyTrafficPolicies"
|
||||
|
||||
// ErrCodeTooManyTrafficPolicyInstances for service response error code
|
||||
// "TooManyTrafficPolicyInstances".
|
||||
//
|
||||
// You've created the maximum number of traffic policy instances that can be
|
||||
// created for the current AWS account. You can request an increase to the limit
|
||||
// on the Contact Us (http://aws.amazon.com/route53-request/) page.
|
||||
ErrCodeTooManyTrafficPolicyInstances = "TooManyTrafficPolicyInstances"
|
||||
|
||||
// ErrCodeTooManyVPCAssociationAuthorizations for service response error code
|
||||
// "TooManyVPCAssociationAuthorizations".
|
||||
//
|
||||
// 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.
|
||||
ErrCodeTooManyVPCAssociationAuthorizations = "TooManyVPCAssociationAuthorizations"
|
||||
|
||||
// ErrCodeTrafficPolicyAlreadyExists for service response error code
|
||||
// "TrafficPolicyAlreadyExists".
|
||||
//
|
||||
// A traffic policy that has the same value for Name already exists.
|
||||
ErrCodeTrafficPolicyAlreadyExists = "TrafficPolicyAlreadyExists"
|
||||
|
||||
// ErrCodeTrafficPolicyInUse for service response error code
|
||||
// "TrafficPolicyInUse".
|
||||
//
|
||||
// One or more traffic policy instances were created by using the specified
|
||||
// traffic policy.
|
||||
ErrCodeTrafficPolicyInUse = "TrafficPolicyInUse"
|
||||
|
||||
// ErrCodeTrafficPolicyInstanceAlreadyExists for service response error code
|
||||
// "TrafficPolicyInstanceAlreadyExists".
|
||||
//
|
||||
// Traffic policy instance with given Id already exists.
|
||||
ErrCodeTrafficPolicyInstanceAlreadyExists = "TrafficPolicyInstanceAlreadyExists"
|
||||
|
||||
// ErrCodeVPCAssociationAuthorizationNotFound for service response error code
|
||||
// "VPCAssociationAuthorizationNotFound".
|
||||
//
|
||||
// The VPC that you specified is not authorized to be associated with the hosted
|
||||
// zone.
|
||||
ErrCodeVPCAssociationAuthorizationNotFound = "VPCAssociationAuthorizationNotFound"
|
||||
|
||||
// ErrCodeVPCAssociationNotFound for service response error code
|
||||
// "VPCAssociationNotFound".
|
||||
//
|
||||
// The specified VPC and hosted zone are not currently associated.
|
||||
ErrCodeVPCAssociationNotFound = "VPCAssociationNotFound"
|
||||
)
|
||||
+1221
File diff suppressed because it is too large
Load Diff
+272
@@ -0,0 +1,272 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
// Package route53iface provides an interface to enable mocking the Amazon Route 53 service client
|
||||
// for testing your code.
|
||||
//
|
||||
// It is important to note that this interface will have breaking changes
|
||||
// when the service model is updated and adds new API operations, paginators,
|
||||
// and waiters.
|
||||
package route53iface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/route53"
|
||||
)
|
||||
|
||||
// Route53API provides an interface to enable mocking the
|
||||
// route53.Route53 service client's API operation,
|
||||
// paginators, and waiters. This make unit testing your code that calls out
|
||||
// to the SDK's service client's calls easier.
|
||||
//
|
||||
// The best way to use this interface is so the SDK's service client's calls
|
||||
// can be stubbed out for unit testing your code with the SDK without needing
|
||||
// to inject custom request handlers into the the SDK's request pipeline.
|
||||
//
|
||||
// // myFunc uses an SDK service client to make a request to
|
||||
// // Amazon Route 53.
|
||||
// func myFunc(svc route53iface.Route53API) bool {
|
||||
// // Make svc.AssociateVPCWithHostedZone request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := route53.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockRoute53Client struct {
|
||||
// route53iface.Route53API
|
||||
// }
|
||||
// func (m *mockRoute53Client) AssociateVPCWithHostedZone(input *route53.AssociateVPCWithHostedZoneInput) (*route53.AssociateVPCWithHostedZoneOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockRoute53Client{}
|
||||
//
|
||||
// myfunc(mockSvc)
|
||||
//
|
||||
// // Verify myFunc's functionality
|
||||
// }
|
||||
//
|
||||
// It is important to note that this interface will have breaking changes
|
||||
// when the service model is updated and adds new API operations, paginators,
|
||||
// and waiters. Its suggested to use the pattern above for testing, or using
|
||||
// tooling to generate mocks to satisfy the interfaces.
|
||||
type Route53API interface {
|
||||
AssociateVPCWithHostedZone(*route53.AssociateVPCWithHostedZoneInput) (*route53.AssociateVPCWithHostedZoneOutput, error)
|
||||
AssociateVPCWithHostedZoneWithContext(aws.Context, *route53.AssociateVPCWithHostedZoneInput, ...request.Option) (*route53.AssociateVPCWithHostedZoneOutput, error)
|
||||
AssociateVPCWithHostedZoneRequest(*route53.AssociateVPCWithHostedZoneInput) (*request.Request, *route53.AssociateVPCWithHostedZoneOutput)
|
||||
|
||||
ChangeResourceRecordSets(*route53.ChangeResourceRecordSetsInput) (*route53.ChangeResourceRecordSetsOutput, error)
|
||||
ChangeResourceRecordSetsWithContext(aws.Context, *route53.ChangeResourceRecordSetsInput, ...request.Option) (*route53.ChangeResourceRecordSetsOutput, error)
|
||||
ChangeResourceRecordSetsRequest(*route53.ChangeResourceRecordSetsInput) (*request.Request, *route53.ChangeResourceRecordSetsOutput)
|
||||
|
||||
ChangeTagsForResource(*route53.ChangeTagsForResourceInput) (*route53.ChangeTagsForResourceOutput, error)
|
||||
ChangeTagsForResourceWithContext(aws.Context, *route53.ChangeTagsForResourceInput, ...request.Option) (*route53.ChangeTagsForResourceOutput, error)
|
||||
ChangeTagsForResourceRequest(*route53.ChangeTagsForResourceInput) (*request.Request, *route53.ChangeTagsForResourceOutput)
|
||||
|
||||
CreateHealthCheck(*route53.CreateHealthCheckInput) (*route53.CreateHealthCheckOutput, error)
|
||||
CreateHealthCheckWithContext(aws.Context, *route53.CreateHealthCheckInput, ...request.Option) (*route53.CreateHealthCheckOutput, error)
|
||||
CreateHealthCheckRequest(*route53.CreateHealthCheckInput) (*request.Request, *route53.CreateHealthCheckOutput)
|
||||
|
||||
CreateHostedZone(*route53.CreateHostedZoneInput) (*route53.CreateHostedZoneOutput, error)
|
||||
CreateHostedZoneWithContext(aws.Context, *route53.CreateHostedZoneInput, ...request.Option) (*route53.CreateHostedZoneOutput, error)
|
||||
CreateHostedZoneRequest(*route53.CreateHostedZoneInput) (*request.Request, *route53.CreateHostedZoneOutput)
|
||||
|
||||
CreateReusableDelegationSet(*route53.CreateReusableDelegationSetInput) (*route53.CreateReusableDelegationSetOutput, error)
|
||||
CreateReusableDelegationSetWithContext(aws.Context, *route53.CreateReusableDelegationSetInput, ...request.Option) (*route53.CreateReusableDelegationSetOutput, error)
|
||||
CreateReusableDelegationSetRequest(*route53.CreateReusableDelegationSetInput) (*request.Request, *route53.CreateReusableDelegationSetOutput)
|
||||
|
||||
CreateTrafficPolicy(*route53.CreateTrafficPolicyInput) (*route53.CreateTrafficPolicyOutput, error)
|
||||
CreateTrafficPolicyWithContext(aws.Context, *route53.CreateTrafficPolicyInput, ...request.Option) (*route53.CreateTrafficPolicyOutput, error)
|
||||
CreateTrafficPolicyRequest(*route53.CreateTrafficPolicyInput) (*request.Request, *route53.CreateTrafficPolicyOutput)
|
||||
|
||||
CreateTrafficPolicyInstance(*route53.CreateTrafficPolicyInstanceInput) (*route53.CreateTrafficPolicyInstanceOutput, error)
|
||||
CreateTrafficPolicyInstanceWithContext(aws.Context, *route53.CreateTrafficPolicyInstanceInput, ...request.Option) (*route53.CreateTrafficPolicyInstanceOutput, error)
|
||||
CreateTrafficPolicyInstanceRequest(*route53.CreateTrafficPolicyInstanceInput) (*request.Request, *route53.CreateTrafficPolicyInstanceOutput)
|
||||
|
||||
CreateTrafficPolicyVersion(*route53.CreateTrafficPolicyVersionInput) (*route53.CreateTrafficPolicyVersionOutput, error)
|
||||
CreateTrafficPolicyVersionWithContext(aws.Context, *route53.CreateTrafficPolicyVersionInput, ...request.Option) (*route53.CreateTrafficPolicyVersionOutput, error)
|
||||
CreateTrafficPolicyVersionRequest(*route53.CreateTrafficPolicyVersionInput) (*request.Request, *route53.CreateTrafficPolicyVersionOutput)
|
||||
|
||||
CreateVPCAssociationAuthorization(*route53.CreateVPCAssociationAuthorizationInput) (*route53.CreateVPCAssociationAuthorizationOutput, error)
|
||||
CreateVPCAssociationAuthorizationWithContext(aws.Context, *route53.CreateVPCAssociationAuthorizationInput, ...request.Option) (*route53.CreateVPCAssociationAuthorizationOutput, error)
|
||||
CreateVPCAssociationAuthorizationRequest(*route53.CreateVPCAssociationAuthorizationInput) (*request.Request, *route53.CreateVPCAssociationAuthorizationOutput)
|
||||
|
||||
DeleteHealthCheck(*route53.DeleteHealthCheckInput) (*route53.DeleteHealthCheckOutput, error)
|
||||
DeleteHealthCheckWithContext(aws.Context, *route53.DeleteHealthCheckInput, ...request.Option) (*route53.DeleteHealthCheckOutput, error)
|
||||
DeleteHealthCheckRequest(*route53.DeleteHealthCheckInput) (*request.Request, *route53.DeleteHealthCheckOutput)
|
||||
|
||||
DeleteHostedZone(*route53.DeleteHostedZoneInput) (*route53.DeleteHostedZoneOutput, error)
|
||||
DeleteHostedZoneWithContext(aws.Context, *route53.DeleteHostedZoneInput, ...request.Option) (*route53.DeleteHostedZoneOutput, error)
|
||||
DeleteHostedZoneRequest(*route53.DeleteHostedZoneInput) (*request.Request, *route53.DeleteHostedZoneOutput)
|
||||
|
||||
DeleteReusableDelegationSet(*route53.DeleteReusableDelegationSetInput) (*route53.DeleteReusableDelegationSetOutput, error)
|
||||
DeleteReusableDelegationSetWithContext(aws.Context, *route53.DeleteReusableDelegationSetInput, ...request.Option) (*route53.DeleteReusableDelegationSetOutput, error)
|
||||
DeleteReusableDelegationSetRequest(*route53.DeleteReusableDelegationSetInput) (*request.Request, *route53.DeleteReusableDelegationSetOutput)
|
||||
|
||||
DeleteTrafficPolicy(*route53.DeleteTrafficPolicyInput) (*route53.DeleteTrafficPolicyOutput, error)
|
||||
DeleteTrafficPolicyWithContext(aws.Context, *route53.DeleteTrafficPolicyInput, ...request.Option) (*route53.DeleteTrafficPolicyOutput, error)
|
||||
DeleteTrafficPolicyRequest(*route53.DeleteTrafficPolicyInput) (*request.Request, *route53.DeleteTrafficPolicyOutput)
|
||||
|
||||
DeleteTrafficPolicyInstance(*route53.DeleteTrafficPolicyInstanceInput) (*route53.DeleteTrafficPolicyInstanceOutput, error)
|
||||
DeleteTrafficPolicyInstanceWithContext(aws.Context, *route53.DeleteTrafficPolicyInstanceInput, ...request.Option) (*route53.DeleteTrafficPolicyInstanceOutput, error)
|
||||
DeleteTrafficPolicyInstanceRequest(*route53.DeleteTrafficPolicyInstanceInput) (*request.Request, *route53.DeleteTrafficPolicyInstanceOutput)
|
||||
|
||||
DeleteVPCAssociationAuthorization(*route53.DeleteVPCAssociationAuthorizationInput) (*route53.DeleteVPCAssociationAuthorizationOutput, error)
|
||||
DeleteVPCAssociationAuthorizationWithContext(aws.Context, *route53.DeleteVPCAssociationAuthorizationInput, ...request.Option) (*route53.DeleteVPCAssociationAuthorizationOutput, error)
|
||||
DeleteVPCAssociationAuthorizationRequest(*route53.DeleteVPCAssociationAuthorizationInput) (*request.Request, *route53.DeleteVPCAssociationAuthorizationOutput)
|
||||
|
||||
DisassociateVPCFromHostedZone(*route53.DisassociateVPCFromHostedZoneInput) (*route53.DisassociateVPCFromHostedZoneOutput, error)
|
||||
DisassociateVPCFromHostedZoneWithContext(aws.Context, *route53.DisassociateVPCFromHostedZoneInput, ...request.Option) (*route53.DisassociateVPCFromHostedZoneOutput, error)
|
||||
DisassociateVPCFromHostedZoneRequest(*route53.DisassociateVPCFromHostedZoneInput) (*request.Request, *route53.DisassociateVPCFromHostedZoneOutput)
|
||||
|
||||
GetChange(*route53.GetChangeInput) (*route53.GetChangeOutput, error)
|
||||
GetChangeWithContext(aws.Context, *route53.GetChangeInput, ...request.Option) (*route53.GetChangeOutput, error)
|
||||
GetChangeRequest(*route53.GetChangeInput) (*request.Request, *route53.GetChangeOutput)
|
||||
|
||||
GetCheckerIpRanges(*route53.GetCheckerIpRangesInput) (*route53.GetCheckerIpRangesOutput, error)
|
||||
GetCheckerIpRangesWithContext(aws.Context, *route53.GetCheckerIpRangesInput, ...request.Option) (*route53.GetCheckerIpRangesOutput, error)
|
||||
GetCheckerIpRangesRequest(*route53.GetCheckerIpRangesInput) (*request.Request, *route53.GetCheckerIpRangesOutput)
|
||||
|
||||
GetGeoLocation(*route53.GetGeoLocationInput) (*route53.GetGeoLocationOutput, error)
|
||||
GetGeoLocationWithContext(aws.Context, *route53.GetGeoLocationInput, ...request.Option) (*route53.GetGeoLocationOutput, error)
|
||||
GetGeoLocationRequest(*route53.GetGeoLocationInput) (*request.Request, *route53.GetGeoLocationOutput)
|
||||
|
||||
GetHealthCheck(*route53.GetHealthCheckInput) (*route53.GetHealthCheckOutput, error)
|
||||
GetHealthCheckWithContext(aws.Context, *route53.GetHealthCheckInput, ...request.Option) (*route53.GetHealthCheckOutput, error)
|
||||
GetHealthCheckRequest(*route53.GetHealthCheckInput) (*request.Request, *route53.GetHealthCheckOutput)
|
||||
|
||||
GetHealthCheckCount(*route53.GetHealthCheckCountInput) (*route53.GetHealthCheckCountOutput, error)
|
||||
GetHealthCheckCountWithContext(aws.Context, *route53.GetHealthCheckCountInput, ...request.Option) (*route53.GetHealthCheckCountOutput, error)
|
||||
GetHealthCheckCountRequest(*route53.GetHealthCheckCountInput) (*request.Request, *route53.GetHealthCheckCountOutput)
|
||||
|
||||
GetHealthCheckLastFailureReason(*route53.GetHealthCheckLastFailureReasonInput) (*route53.GetHealthCheckLastFailureReasonOutput, error)
|
||||
GetHealthCheckLastFailureReasonWithContext(aws.Context, *route53.GetHealthCheckLastFailureReasonInput, ...request.Option) (*route53.GetHealthCheckLastFailureReasonOutput, error)
|
||||
GetHealthCheckLastFailureReasonRequest(*route53.GetHealthCheckLastFailureReasonInput) (*request.Request, *route53.GetHealthCheckLastFailureReasonOutput)
|
||||
|
||||
GetHealthCheckStatus(*route53.GetHealthCheckStatusInput) (*route53.GetHealthCheckStatusOutput, error)
|
||||
GetHealthCheckStatusWithContext(aws.Context, *route53.GetHealthCheckStatusInput, ...request.Option) (*route53.GetHealthCheckStatusOutput, error)
|
||||
GetHealthCheckStatusRequest(*route53.GetHealthCheckStatusInput) (*request.Request, *route53.GetHealthCheckStatusOutput)
|
||||
|
||||
GetHostedZone(*route53.GetHostedZoneInput) (*route53.GetHostedZoneOutput, error)
|
||||
GetHostedZoneWithContext(aws.Context, *route53.GetHostedZoneInput, ...request.Option) (*route53.GetHostedZoneOutput, error)
|
||||
GetHostedZoneRequest(*route53.GetHostedZoneInput) (*request.Request, *route53.GetHostedZoneOutput)
|
||||
|
||||
GetHostedZoneCount(*route53.GetHostedZoneCountInput) (*route53.GetHostedZoneCountOutput, error)
|
||||
GetHostedZoneCountWithContext(aws.Context, *route53.GetHostedZoneCountInput, ...request.Option) (*route53.GetHostedZoneCountOutput, error)
|
||||
GetHostedZoneCountRequest(*route53.GetHostedZoneCountInput) (*request.Request, *route53.GetHostedZoneCountOutput)
|
||||
|
||||
GetReusableDelegationSet(*route53.GetReusableDelegationSetInput) (*route53.GetReusableDelegationSetOutput, error)
|
||||
GetReusableDelegationSetWithContext(aws.Context, *route53.GetReusableDelegationSetInput, ...request.Option) (*route53.GetReusableDelegationSetOutput, error)
|
||||
GetReusableDelegationSetRequest(*route53.GetReusableDelegationSetInput) (*request.Request, *route53.GetReusableDelegationSetOutput)
|
||||
|
||||
GetTrafficPolicy(*route53.GetTrafficPolicyInput) (*route53.GetTrafficPolicyOutput, error)
|
||||
GetTrafficPolicyWithContext(aws.Context, *route53.GetTrafficPolicyInput, ...request.Option) (*route53.GetTrafficPolicyOutput, error)
|
||||
GetTrafficPolicyRequest(*route53.GetTrafficPolicyInput) (*request.Request, *route53.GetTrafficPolicyOutput)
|
||||
|
||||
GetTrafficPolicyInstance(*route53.GetTrafficPolicyInstanceInput) (*route53.GetTrafficPolicyInstanceOutput, error)
|
||||
GetTrafficPolicyInstanceWithContext(aws.Context, *route53.GetTrafficPolicyInstanceInput, ...request.Option) (*route53.GetTrafficPolicyInstanceOutput, error)
|
||||
GetTrafficPolicyInstanceRequest(*route53.GetTrafficPolicyInstanceInput) (*request.Request, *route53.GetTrafficPolicyInstanceOutput)
|
||||
|
||||
GetTrafficPolicyInstanceCount(*route53.GetTrafficPolicyInstanceCountInput) (*route53.GetTrafficPolicyInstanceCountOutput, error)
|
||||
GetTrafficPolicyInstanceCountWithContext(aws.Context, *route53.GetTrafficPolicyInstanceCountInput, ...request.Option) (*route53.GetTrafficPolicyInstanceCountOutput, error)
|
||||
GetTrafficPolicyInstanceCountRequest(*route53.GetTrafficPolicyInstanceCountInput) (*request.Request, *route53.GetTrafficPolicyInstanceCountOutput)
|
||||
|
||||
ListGeoLocations(*route53.ListGeoLocationsInput) (*route53.ListGeoLocationsOutput, error)
|
||||
ListGeoLocationsWithContext(aws.Context, *route53.ListGeoLocationsInput, ...request.Option) (*route53.ListGeoLocationsOutput, error)
|
||||
ListGeoLocationsRequest(*route53.ListGeoLocationsInput) (*request.Request, *route53.ListGeoLocationsOutput)
|
||||
|
||||
ListHealthChecks(*route53.ListHealthChecksInput) (*route53.ListHealthChecksOutput, error)
|
||||
ListHealthChecksWithContext(aws.Context, *route53.ListHealthChecksInput, ...request.Option) (*route53.ListHealthChecksOutput, error)
|
||||
ListHealthChecksRequest(*route53.ListHealthChecksInput) (*request.Request, *route53.ListHealthChecksOutput)
|
||||
|
||||
ListHealthChecksPages(*route53.ListHealthChecksInput, func(*route53.ListHealthChecksOutput, bool) bool) error
|
||||
ListHealthChecksPagesWithContext(aws.Context, *route53.ListHealthChecksInput, func(*route53.ListHealthChecksOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListHostedZones(*route53.ListHostedZonesInput) (*route53.ListHostedZonesOutput, error)
|
||||
ListHostedZonesWithContext(aws.Context, *route53.ListHostedZonesInput, ...request.Option) (*route53.ListHostedZonesOutput, error)
|
||||
ListHostedZonesRequest(*route53.ListHostedZonesInput) (*request.Request, *route53.ListHostedZonesOutput)
|
||||
|
||||
ListHostedZonesPages(*route53.ListHostedZonesInput, func(*route53.ListHostedZonesOutput, bool) bool) error
|
||||
ListHostedZonesPagesWithContext(aws.Context, *route53.ListHostedZonesInput, func(*route53.ListHostedZonesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListHostedZonesByName(*route53.ListHostedZonesByNameInput) (*route53.ListHostedZonesByNameOutput, error)
|
||||
ListHostedZonesByNameWithContext(aws.Context, *route53.ListHostedZonesByNameInput, ...request.Option) (*route53.ListHostedZonesByNameOutput, error)
|
||||
ListHostedZonesByNameRequest(*route53.ListHostedZonesByNameInput) (*request.Request, *route53.ListHostedZonesByNameOutput)
|
||||
|
||||
ListResourceRecordSets(*route53.ListResourceRecordSetsInput) (*route53.ListResourceRecordSetsOutput, error)
|
||||
ListResourceRecordSetsWithContext(aws.Context, *route53.ListResourceRecordSetsInput, ...request.Option) (*route53.ListResourceRecordSetsOutput, error)
|
||||
ListResourceRecordSetsRequest(*route53.ListResourceRecordSetsInput) (*request.Request, *route53.ListResourceRecordSetsOutput)
|
||||
|
||||
ListResourceRecordSetsPages(*route53.ListResourceRecordSetsInput, func(*route53.ListResourceRecordSetsOutput, bool) bool) error
|
||||
ListResourceRecordSetsPagesWithContext(aws.Context, *route53.ListResourceRecordSetsInput, func(*route53.ListResourceRecordSetsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListReusableDelegationSets(*route53.ListReusableDelegationSetsInput) (*route53.ListReusableDelegationSetsOutput, error)
|
||||
ListReusableDelegationSetsWithContext(aws.Context, *route53.ListReusableDelegationSetsInput, ...request.Option) (*route53.ListReusableDelegationSetsOutput, error)
|
||||
ListReusableDelegationSetsRequest(*route53.ListReusableDelegationSetsInput) (*request.Request, *route53.ListReusableDelegationSetsOutput)
|
||||
|
||||
ListTagsForResource(*route53.ListTagsForResourceInput) (*route53.ListTagsForResourceOutput, error)
|
||||
ListTagsForResourceWithContext(aws.Context, *route53.ListTagsForResourceInput, ...request.Option) (*route53.ListTagsForResourceOutput, error)
|
||||
ListTagsForResourceRequest(*route53.ListTagsForResourceInput) (*request.Request, *route53.ListTagsForResourceOutput)
|
||||
|
||||
ListTagsForResources(*route53.ListTagsForResourcesInput) (*route53.ListTagsForResourcesOutput, error)
|
||||
ListTagsForResourcesWithContext(aws.Context, *route53.ListTagsForResourcesInput, ...request.Option) (*route53.ListTagsForResourcesOutput, error)
|
||||
ListTagsForResourcesRequest(*route53.ListTagsForResourcesInput) (*request.Request, *route53.ListTagsForResourcesOutput)
|
||||
|
||||
ListTrafficPolicies(*route53.ListTrafficPoliciesInput) (*route53.ListTrafficPoliciesOutput, error)
|
||||
ListTrafficPoliciesWithContext(aws.Context, *route53.ListTrafficPoliciesInput, ...request.Option) (*route53.ListTrafficPoliciesOutput, error)
|
||||
ListTrafficPoliciesRequest(*route53.ListTrafficPoliciesInput) (*request.Request, *route53.ListTrafficPoliciesOutput)
|
||||
|
||||
ListTrafficPolicyInstances(*route53.ListTrafficPolicyInstancesInput) (*route53.ListTrafficPolicyInstancesOutput, error)
|
||||
ListTrafficPolicyInstancesWithContext(aws.Context, *route53.ListTrafficPolicyInstancesInput, ...request.Option) (*route53.ListTrafficPolicyInstancesOutput, error)
|
||||
ListTrafficPolicyInstancesRequest(*route53.ListTrafficPolicyInstancesInput) (*request.Request, *route53.ListTrafficPolicyInstancesOutput)
|
||||
|
||||
ListTrafficPolicyInstancesByHostedZone(*route53.ListTrafficPolicyInstancesByHostedZoneInput) (*route53.ListTrafficPolicyInstancesByHostedZoneOutput, error)
|
||||
ListTrafficPolicyInstancesByHostedZoneWithContext(aws.Context, *route53.ListTrafficPolicyInstancesByHostedZoneInput, ...request.Option) (*route53.ListTrafficPolicyInstancesByHostedZoneOutput, error)
|
||||
ListTrafficPolicyInstancesByHostedZoneRequest(*route53.ListTrafficPolicyInstancesByHostedZoneInput) (*request.Request, *route53.ListTrafficPolicyInstancesByHostedZoneOutput)
|
||||
|
||||
ListTrafficPolicyInstancesByPolicy(*route53.ListTrafficPolicyInstancesByPolicyInput) (*route53.ListTrafficPolicyInstancesByPolicyOutput, error)
|
||||
ListTrafficPolicyInstancesByPolicyWithContext(aws.Context, *route53.ListTrafficPolicyInstancesByPolicyInput, ...request.Option) (*route53.ListTrafficPolicyInstancesByPolicyOutput, error)
|
||||
ListTrafficPolicyInstancesByPolicyRequest(*route53.ListTrafficPolicyInstancesByPolicyInput) (*request.Request, *route53.ListTrafficPolicyInstancesByPolicyOutput)
|
||||
|
||||
ListTrafficPolicyVersions(*route53.ListTrafficPolicyVersionsInput) (*route53.ListTrafficPolicyVersionsOutput, error)
|
||||
ListTrafficPolicyVersionsWithContext(aws.Context, *route53.ListTrafficPolicyVersionsInput, ...request.Option) (*route53.ListTrafficPolicyVersionsOutput, error)
|
||||
ListTrafficPolicyVersionsRequest(*route53.ListTrafficPolicyVersionsInput) (*request.Request, *route53.ListTrafficPolicyVersionsOutput)
|
||||
|
||||
ListVPCAssociationAuthorizations(*route53.ListVPCAssociationAuthorizationsInput) (*route53.ListVPCAssociationAuthorizationsOutput, error)
|
||||
ListVPCAssociationAuthorizationsWithContext(aws.Context, *route53.ListVPCAssociationAuthorizationsInput, ...request.Option) (*route53.ListVPCAssociationAuthorizationsOutput, error)
|
||||
ListVPCAssociationAuthorizationsRequest(*route53.ListVPCAssociationAuthorizationsInput) (*request.Request, *route53.ListVPCAssociationAuthorizationsOutput)
|
||||
|
||||
TestDNSAnswer(*route53.TestDNSAnswerInput) (*route53.TestDNSAnswerOutput, error)
|
||||
TestDNSAnswerWithContext(aws.Context, *route53.TestDNSAnswerInput, ...request.Option) (*route53.TestDNSAnswerOutput, error)
|
||||
TestDNSAnswerRequest(*route53.TestDNSAnswerInput) (*request.Request, *route53.TestDNSAnswerOutput)
|
||||
|
||||
UpdateHealthCheck(*route53.UpdateHealthCheckInput) (*route53.UpdateHealthCheckOutput, error)
|
||||
UpdateHealthCheckWithContext(aws.Context, *route53.UpdateHealthCheckInput, ...request.Option) (*route53.UpdateHealthCheckOutput, error)
|
||||
UpdateHealthCheckRequest(*route53.UpdateHealthCheckInput) (*request.Request, *route53.UpdateHealthCheckOutput)
|
||||
|
||||
UpdateHostedZoneComment(*route53.UpdateHostedZoneCommentInput) (*route53.UpdateHostedZoneCommentOutput, error)
|
||||
UpdateHostedZoneCommentWithContext(aws.Context, *route53.UpdateHostedZoneCommentInput, ...request.Option) (*route53.UpdateHostedZoneCommentOutput, error)
|
||||
UpdateHostedZoneCommentRequest(*route53.UpdateHostedZoneCommentInput) (*request.Request, *route53.UpdateHostedZoneCommentOutput)
|
||||
|
||||
UpdateTrafficPolicyComment(*route53.UpdateTrafficPolicyCommentInput) (*route53.UpdateTrafficPolicyCommentOutput, error)
|
||||
UpdateTrafficPolicyCommentWithContext(aws.Context, *route53.UpdateTrafficPolicyCommentInput, ...request.Option) (*route53.UpdateTrafficPolicyCommentOutput, error)
|
||||
UpdateTrafficPolicyCommentRequest(*route53.UpdateTrafficPolicyCommentInput) (*request.Request, *route53.UpdateTrafficPolicyCommentOutput)
|
||||
|
||||
UpdateTrafficPolicyInstance(*route53.UpdateTrafficPolicyInstanceInput) (*route53.UpdateTrafficPolicyInstanceOutput, error)
|
||||
UpdateTrafficPolicyInstanceWithContext(aws.Context, *route53.UpdateTrafficPolicyInstanceInput, ...request.Option) (*route53.UpdateTrafficPolicyInstanceOutput, error)
|
||||
UpdateTrafficPolicyInstanceRequest(*route53.UpdateTrafficPolicyInstanceInput) (*request.Request, *route53.UpdateTrafficPolicyInstanceOutput)
|
||||
|
||||
WaitUntilResourceRecordSetsChanged(*route53.GetChangeInput) error
|
||||
WaitUntilResourceRecordSetsChangedWithContext(aws.Context, *route53.GetChangeInput, ...request.WaiterOption) error
|
||||
}
|
||||
|
||||
var _ Route53API = (*route53.Route53)(nil)
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
package route53
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/client"
|
||||
"github.com/aws/aws-sdk-go/aws/client/metadata"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go/private/protocol/restxml"
|
||||
)
|
||||
|
||||
// Route53 is a client for Route 53.
|
||||
// The service client's operations are safe to be used concurrently.
|
||||
// It is not safe to mutate any of the client's properties though.
|
||||
// Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01
|
||||
type Route53 struct {
|
||||
*client.Client
|
||||
}
|
||||
|
||||
// Used for custom client initialization logic
|
||||
var initClient func(*client.Client)
|
||||
|
||||
// Used for custom request initialization logic
|
||||
var initRequest func(*request.Request)
|
||||
|
||||
// Service information constants
|
||||
const (
|
||||
ServiceName = "route53" // Service endpoint prefix API calls made to.
|
||||
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
|
||||
)
|
||||
|
||||
// New creates a new instance of the Route53 client with a session.
|
||||
// If additional configuration is needed for the client instance use the optional
|
||||
// aws.Config parameter to add your extra config.
|
||||
//
|
||||
// Example:
|
||||
// // Create a Route53 client from just a session.
|
||||
// svc := route53.New(mySession)
|
||||
//
|
||||
// // Create a Route53 client with additional configuration
|
||||
// svc := route53.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *Route53 {
|
||||
c := p.ClientConfig(EndpointsID, cfgs...)
|
||||
return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
|
||||
}
|
||||
|
||||
// newClient creates, initializes and returns a new service client instance.
|
||||
func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Route53 {
|
||||
svc := &Route53{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2013-04-01",
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
}
|
||||
|
||||
// Handlers
|
||||
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
|
||||
svc.Handlers.Build.PushBackNamed(restxml.BuildHandler)
|
||||
svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler)
|
||||
svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler)
|
||||
svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler)
|
||||
|
||||
// Run custom client initialization if present
|
||||
if initClient != nil {
|
||||
initClient(svc.Client)
|
||||
}
|
||||
|
||||
return svc
|
||||
}
|
||||
|
||||
// newRequest creates a new request for a Route53 operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *Route53) newRequest(op *request.Operation, params, data interface{}) *request.Request {
|
||||
req := c.NewRequest(op, params, data)
|
||||
|
||||
// Run custom request initialization if present
|
||||
if initRequest != nil {
|
||||
initRequest(req)
|
||||
}
|
||||
|
||||
return req
|
||||
}
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
package route53
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/xml"
|
||||
"io/ioutil"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws/awserr"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/private/protocol/restxml"
|
||||
)
|
||||
|
||||
type baseXMLErrorResponse struct {
|
||||
XMLName xml.Name
|
||||
}
|
||||
|
||||
type standardXMLErrorResponse struct {
|
||||
XMLName xml.Name `xml:"ErrorResponse"`
|
||||
Code string `xml:"Error>Code"`
|
||||
Message string `xml:"Error>Message"`
|
||||
RequestID string `xml:"RequestId"`
|
||||
}
|
||||
|
||||
type invalidChangeBatchXMLErrorResponse struct {
|
||||
XMLName xml.Name `xml:"InvalidChangeBatch"`
|
||||
Messages []string `xml:"Messages>Message"`
|
||||
}
|
||||
|
||||
func unmarshalChangeResourceRecordSetsError(r *request.Request) {
|
||||
defer r.HTTPResponse.Body.Close()
|
||||
|
||||
responseBody, err := ioutil.ReadAll(r.HTTPResponse.Body)
|
||||
|
||||
if err != nil {
|
||||
r.Error = awserr.New("SerializationError", "failed to read Route53 XML error response", err)
|
||||
return
|
||||
}
|
||||
|
||||
baseError := &baseXMLErrorResponse{}
|
||||
|
||||
if err := xml.Unmarshal(responseBody, baseError); err != nil {
|
||||
r.Error = awserr.New("SerializationError", "failed to decode Route53 XML error response", err)
|
||||
return
|
||||
}
|
||||
|
||||
switch baseError.XMLName.Local {
|
||||
case "InvalidChangeBatch":
|
||||
unmarshalInvalidChangeBatchError(r, responseBody)
|
||||
default:
|
||||
r.HTTPResponse.Body = ioutil.NopCloser(bytes.NewReader(responseBody))
|
||||
restxml.UnmarshalError(r)
|
||||
}
|
||||
}
|
||||
|
||||
func unmarshalInvalidChangeBatchError(r *request.Request, requestBody []byte) {
|
||||
resp := &invalidChangeBatchXMLErrorResponse{}
|
||||
err := xml.Unmarshal(requestBody, resp)
|
||||
|
||||
if err != nil {
|
||||
r.Error = awserr.New("SerializationError", "failed to decode query XML error response", err)
|
||||
return
|
||||
}
|
||||
|
||||
const errorCode = "InvalidChangeBatch"
|
||||
errors := []error{}
|
||||
|
||||
for _, msg := range resp.Messages {
|
||||
errors = append(errors, awserr.New(errorCode, msg, nil))
|
||||
}
|
||||
|
||||
r.Error = awserr.NewRequestFailure(
|
||||
awserr.NewBatchError(errorCode, "ChangeBatch errors occurred", errors),
|
||||
r.HTTPResponse.StatusCode,
|
||||
r.RequestID,
|
||||
)
|
||||
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package route53
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/awstesting"
|
||||
)
|
||||
|
||||
func TestUnmarhsalErrorLeak(t *testing.T) {
|
||||
req := &request.Request{
|
||||
Operation: &request.Operation{
|
||||
Name: opChangeResourceRecordSets,
|
||||
},
|
||||
HTTPRequest: &http.Request{
|
||||
Header: make(http.Header),
|
||||
Body: &awstesting.ReadCloser{Size: 2048},
|
||||
},
|
||||
}
|
||||
req.HTTPResponse = &http.Response{
|
||||
Body: &awstesting.ReadCloser{Size: 2048},
|
||||
Header: http.Header{
|
||||
"X-Amzn-Requestid": []string{"1"},
|
||||
},
|
||||
StatusCode: http.StatusOK,
|
||||
}
|
||||
|
||||
reader := req.HTTPResponse.Body.(*awstesting.ReadCloser)
|
||||
unmarshalChangeResourceRecordSetsError(req)
|
||||
|
||||
assert.NotNil(t, req.Error)
|
||||
assert.Equal(t, reader.Closed, true)
|
||||
assert.Equal(t, reader.Size, 0)
|
||||
}
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
package route53_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/awserr"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/awstesting/unit"
|
||||
"github.com/aws/aws-sdk-go/service/route53"
|
||||
)
|
||||
|
||||
func makeClientWithResponse(response string) *route53.Route53 {
|
||||
r := route53.New(unit.Session)
|
||||
r.Handlers.Send.Clear()
|
||||
r.Handlers.Send.PushBack(func(r *request.Request) {
|
||||
body := ioutil.NopCloser(bytes.NewReader([]byte(response)))
|
||||
r.HTTPResponse = &http.Response{
|
||||
ContentLength: int64(len(response)),
|
||||
StatusCode: 400,
|
||||
Status: "Bad Request",
|
||||
Body: body,
|
||||
}
|
||||
})
|
||||
|
||||
return r
|
||||
}
|
||||
|
||||
func TestUnmarshalStandardError(t *testing.T) {
|
||||
const errorResponse = `<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ErrorResponse xmlns="https://route53.amazonaws.com/doc/2013-04-01/">
|
||||
<Error>
|
||||
<Code>InvalidDomainName</Code>
|
||||
<Message>The domain name is invalid</Message>
|
||||
</Error>
|
||||
<RequestId>12345</RequestId>
|
||||
</ErrorResponse>
|
||||
`
|
||||
|
||||
r := makeClientWithResponse(errorResponse)
|
||||
|
||||
_, err := r.CreateHostedZone(&route53.CreateHostedZoneInput{
|
||||
CallerReference: aws.String("test"),
|
||||
Name: aws.String("test_zone"),
|
||||
})
|
||||
|
||||
assert.Error(t, err)
|
||||
assert.Equal(t, "InvalidDomainName", err.(awserr.Error).Code())
|
||||
assert.Equal(t, "The domain name is invalid", err.(awserr.Error).Message())
|
||||
}
|
||||
|
||||
func TestUnmarshalInvalidChangeBatch(t *testing.T) {
|
||||
const errorMessage = `
|
||||
Tried to create resource record set duplicate.example.com. type A,
|
||||
but it already exists
|
||||
`
|
||||
const errorResponse = `<?xml version="1.0" encoding="UTF-8"?>
|
||||
<InvalidChangeBatch xmlns="https://route53.amazonaws.com/doc/2013-04-01/">
|
||||
<Messages>
|
||||
<Message>` + errorMessage + `</Message>
|
||||
</Messages>
|
||||
</InvalidChangeBatch>
|
||||
`
|
||||
|
||||
r := makeClientWithResponse(errorResponse)
|
||||
|
||||
req := &route53.ChangeResourceRecordSetsInput{
|
||||
HostedZoneId: aws.String("zoneId"),
|
||||
ChangeBatch: &route53.ChangeBatch{
|
||||
Changes: []*route53.Change{
|
||||
{
|
||||
Action: aws.String("CREATE"),
|
||||
ResourceRecordSet: &route53.ResourceRecordSet{
|
||||
Name: aws.String("domain"),
|
||||
Type: aws.String("CNAME"),
|
||||
TTL: aws.Int64(120),
|
||||
ResourceRecords: []*route53.ResourceRecord{
|
||||
{
|
||||
Value: aws.String("cname"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
_, err := r.ChangeResourceRecordSets(req)
|
||||
assert.Error(t, err)
|
||||
|
||||
if reqErr, ok := err.(awserr.RequestFailure); ok {
|
||||
assert.Error(t, reqErr)
|
||||
assert.Equal(t, 400, reqErr.StatusCode())
|
||||
} else {
|
||||
assert.Fail(t, "returned error is not a RequestFailure")
|
||||
}
|
||||
|
||||
if batchErr, ok := err.(awserr.BatchedErrors); ok {
|
||||
errs := batchErr.OrigErrs()
|
||||
assert.Len(t, errs, 1)
|
||||
assert.Equal(t, "InvalidChangeBatch", errs[0].(awserr.Error).Code())
|
||||
assert.Equal(t, errorMessage, errs[0].(awserr.Error).Message())
|
||||
} else {
|
||||
assert.Fail(t, "returned error is not a BatchedErrors")
|
||||
}
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
package route53
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
)
|
||||
|
||||
// WaitUntilResourceRecordSetsChanged uses the Route 53 API operation
|
||||
// GetChange to wait for a condition to be met before returning.
|
||||
// If the condition is not meet within the max attempt window an error will
|
||||
// be returned.
|
||||
func (c *Route53) WaitUntilResourceRecordSetsChanged(input *GetChangeInput) error {
|
||||
return c.WaitUntilResourceRecordSetsChangedWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilResourceRecordSetsChangedWithContext is an extended version of WaitUntilResourceRecordSetsChanged.
|
||||
// With the support for passing in a context and options to configure the
|
||||
// Waiter and the underlying request options.
|
||||
//
|
||||
// The context must be non-nil and will be used for request cancellation. If
|
||||
// the context is nil a panic will occur. In the future the SDK may create
|
||||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||||
// for more information on using Contexts.
|
||||
func (c *Route53) WaitUntilResourceRecordSetsChangedWithContext(ctx aws.Context, input *GetChangeInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilResourceRecordSetsChanged",
|
||||
MaxAttempts: 60,
|
||||
Delay: request.ConstantWaiterDelay(30 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathWaiterMatch, Argument: "ChangeInfo.Status",
|
||||
Expected: "INSYNC",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
req, _ := c.GetChangeRequest(input)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
||||
Reference in New Issue
Block a user