route53

package
v1.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 29 Imported by: 0

README

Route 53

Parity grade: A · SDK aws-sdk-go-v2/service/route53@v1.62.3 · last audited 2026-07-12 (ee7d2bae)

Coverage

Metric Value
Operations audited 67 (66 ok, 1 partial)
Feature families 4 (4 ok)
Known gaps 2
Deferred items 4
Resource leaks clean
Known gaps
  • AssociateVPCWithHostedZone returns generic InvalidInput for a duplicate VPC association; could not confirm the real AWS behavior (error vs. idempotent no-op) with high confidence this pass either — the real ConflictingDomainExists error shape's documented cause ("the VPC is already associated with another hosted zone with the same name") rules it out as the error for this exact same-VPC-same-zone case, which is weak evidence AWS may treat re-association as an idempotent no-op rather than an error, but not strong enough to change behavior without a live-AWS check (bd: gopherstack-8l0.5)
  • CreateReusableDelegationSet's HostedZoneId param (mark an existing hosted zone's current delegation set as reusable) is still unimplemented/ignored — only the CallerReference-only "brand new reusable set" mode works. This pass implemented the CreateHostedZone -> reusable-delegation-set linkage in the other direction (DelegationSetId on CreateHostedZone), which was the bigger gap (bd: gopherstack-8l0.3)
Deferred
  • TestDNSAnswer / selectAnswer / collectRoutingCandidates / resolveAlias / multiValueAnswer: routing-policy answer-selection algorithms not re-derived line-by-line against AWS docs this pass (bd: gopherstack-8l0.4)
  • SDK-driven integration tests (test/integration/*_parity_test.go) not run for route53 this pass — this pass's fixes are proven by unit/handler tests only, which parity-principles.md notes is not full parity proof (bd: gopherstack-8l0.4)
  • CreateKeySigningKey does not validate kmsArn as a well-formed KMS ARN (InvalidKMSArn never returned)
  • Alias target cycle/depth handling (rrsValues/resolveAlias depth param) not stress-tested against pathological alias chains this pass

More

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrHostedZoneNotFound    = errors.New("NoSuchHostedZone")
	ErrInvalidInput          = errors.New("InvalidInput")
	ErrInvalidAction         = errors.New("InvalidChangeBatch")
	ErrHealthCheckNotFound   = errors.New("NoSuchHealthCheck")
	ErrKeySigningKeyNotFound = errors.New("NoSuchKeySigningKey")
	// ErrCidrCollectionNotFound wire code intentionally carries the "Exception"
	// suffix — that is the literal AWS error code for this shape (unlike most
	// Route 53 NoSuch* errors), confirmed against aws-sdk-go-v2 route53 model.
	ErrCidrCollectionNotFound          = errors.New("NoSuchCidrCollectionException")
	ErrQueryLoggingConfigNotFound      = errors.New("NoSuchQueryLoggingConfig")
	ErrDelegationSetNotFound           = errors.New("NoSuchDelegationSet")
	ErrTrafficPolicyNotFound           = errors.New("NoSuchTrafficPolicy")
	ErrTrafficPolicyInstNotFound       = errors.New("NoSuchTrafficPolicyInstance")
	ErrChangeNotFound                  = errors.New("NoSuchChange")
	ErrNoSuchGeoLocation               = errors.New("NoSuchGeoLocation")
	ErrQueryLoggingConfigAlreadyExists = errors.New("QueryLoggingConfigAlreadyExists")
	ErrPublicZoneVPCAssociation        = errors.New("PublicZoneVPCAssociation")
	ErrVPCAssociationAuthorizationNF   = errors.New("VPCAssociationAuthorizationNotFound")
	ErrKeySigningKeyWithActiveStatusNF = errors.New("KeySigningKeyWithActiveStatusNotFound")
	ErrInvalidARecord                  = errors.New("invalid A record value")
	ErrInvalidAAAARecord               = errors.New("invalid AAAA record value")
	ErrInvalidMXRecord                 = errors.New("invalid MX record value")
	ErrInvalidSRVRecord                = errors.New("invalid SRV record value")
	ErrInvalidCAARecord                = errors.New("invalid CAA record value")
	ErrInvalidTXTRecord                = errors.New("invalid TXT record value")
	ErrInvalidCNAMERecord              = errors.New("invalid CNAME record value")
	ErrInvalidNSRecord                 = errors.New("invalid NS record value")
	ErrInvalidPTRRecord                = errors.New("invalid PTR record value")
	ErrInvalidNAPTRRecord              = errors.New("invalid NAPTR record value")
	ErrInvalidDSRecord                 = errors.New("invalid DS record value")
	ErrInvalidSPFRecord                = errors.New("invalid SPF record value")
	ErrTrafficPolicyInUse              = errors.New("TrafficPolicyInUse")
	// ErrInvalidKeySigningKeyStatus is returned when a KSK operation is attempted
	// while the key is in a status that does not permit it (e.g. deleting an
	// ACTIVE key). This is the real AWS wire error code — Route 53 has no
	// "KeySigningKeyNotInactive" error.
	ErrInvalidKeySigningKeyStatus = errors.New("InvalidKeySigningKeyStatus")
	ErrTrafficPolicyAlreadyExists = errors.New("TrafficPolicyAlreadyExists")
	ErrHostedZoneNotEmpty         = errors.New("HostedZoneNotEmpty")
	ErrLastVPCAssociation         = errors.New("LastVPCAssociation")
	// ErrHostedZoneAlreadyExists is returned when CreateHostedZone reuses a
	// CallerReference already associated with a hosted zone that has different
	// Name/Comment/PrivateZone values (AWS: HostedZoneAlreadyExists, 409).
	ErrHostedZoneAlreadyExists = errors.New("HostedZoneAlreadyExists")
	// ErrHealthCheckAlreadyExists is returned when CreateHealthCheck reuses a
	// CallerReference already associated with a health check that has a
	// different configuration (AWS: HealthCheckAlreadyExists, 409).
	ErrHealthCheckAlreadyExists = errors.New("HealthCheckAlreadyExists")
	// ErrKeySigningKeyAlreadyExists is returned when CreateKeySigningKey is
	// called with a name that already exists in the hosted zone (AWS:
	// KeySigningKeyAlreadyExists, 409).
	ErrKeySigningKeyAlreadyExists = errors.New("KeySigningKeyAlreadyExists")
	// ErrVPCAssociationNotFound is returned by DisassociateVPCFromHostedZone
	// when the given VPC is not associated with the hosted zone (AWS:
	// VPCAssociationNotFound, 404).
	ErrVPCAssociationNotFound = errors.New("VPCAssociationNotFound")
	// ErrTrafficPolicyInstanceAlreadyExists is returned when
	// CreateTrafficPolicyInstance targets a (hostedZoneID, name) pair that
	// already has a traffic policy instance (AWS:
	// TrafficPolicyInstanceAlreadyExists, 409).
	ErrTrafficPolicyInstanceAlreadyExists = errors.New("TrafficPolicyInstanceAlreadyExists")
	// ErrCidrCollectionAlreadyExists is returned when CreateCidrCollection is
	// called with a name that is already in use (AWS:
	// CidrCollectionAlreadyExistsException, 400).
	ErrCidrCollectionAlreadyExists = errors.New("CidrCollectionAlreadyExistsException")
	// ErrHealthCheckVersionMismatch is returned when UpdateHealthCheck is
	// called with a HealthCheckVersion that does not match the health
	// check's current version (AWS: HealthCheckVersionMismatch, 409).
	ErrHealthCheckVersionMismatch = errors.New("HealthCheckVersionMismatch")
	// ErrCidrCollectionVersionMismatch is returned when ChangeCidrCollection
	// is called with a CollectionVersion that does not match the
	// collection's current version (AWS:
	// CidrCollectionVersionMismatchException, 409).
	ErrCidrCollectionVersionMismatch = errors.New("CidrCollectionVersionMismatchException")
	// ErrCidrCollectionInUse is returned when DeleteCidrCollection is called
	// on a non-empty collection — real AWS requires the collection to be
	// emptied of locations/blocks before it can be deleted (AWS:
	// CidrCollectionInUseException, 400).
	ErrCidrCollectionInUse = errors.New("CidrCollectionInUseException")
	// ErrDelegationSetInUse is returned when DeleteReusableDelegationSet is
	// called on a delegation set that is still associated with one or more
	// hosted zones (AWS: DelegationSetInUse, 400).
	ErrDelegationSetInUse = errors.New("DelegationSetInUse")
)

Errors returned by the backend.

View Source
var ErrNilAppContext = errors.New("route53: AppContext is nil")

ErrNilAppContext is returned by Init when a nil AppContext is passed.

Functions

This section is empty.

Types

type AlarmIdentifier

type AlarmIdentifier struct {
	Name   string `json:"name"`
	Region string `json:"region"`
}

AlarmIdentifier identifies a CloudWatch alarm for CLOUDWATCH_METRIC health checks.

type AliasTarget

type AliasTarget struct {
	HostedZoneID         string `json:"hostedZoneID"`
	DNSName              string `json:"dnsName"`
	EvaluateTargetHealth bool   `json:"evaluateTargetHealth"`
}

AliasTarget represents an alias resource record set target.

type Change

type Change struct {
	Action            ChangeAction
	ResourceRecordSet ResourceRecordSet
}

Change represents a single change in a ChangeResourceRecordSets request.

type ChangeAction

type ChangeAction string

ChangeAction is the action type for ChangeResourceRecordSets.

const (
	ChangeActionCreate ChangeAction = "CREATE"
	ChangeActionDelete ChangeAction = "DELETE"
	ChangeActionUpsert ChangeAction = "UPSERT"
)

type ChangeInfo

type ChangeInfo struct {
	SubmittedAt time.Time `json:"submittedAt"`
	ID          string    `json:"id"`
	Status      string    `json:"status"`
}

ChangeInfo records the state of a Route 53 change batch.

type CidrCollection

type CidrCollection struct {
	Locations map[string][]string `json:"locations"` // locationName → []CIDR
	ID        string              `json:"id"`
	Name      string              `json:"name"`
	ARN       string              `json:"arn"`
	Version   int64               `json:"version"`
}

CidrCollection represents a Route 53 CIDR collection.

type CidrCollectionChange

type CidrCollectionChange struct {
	LocationName string   `json:"locationName"`
	Action       string   `json:"action"`
	CidrList     []string `json:"cidrList"`
}

CidrCollectionChange represents a single change in a ChangeCidrCollection request.

type CidrRoutingConfig

type CidrRoutingConfig struct {
	CollectionID string `json:"collectionId"`
	LocationName string `json:"locationName"`
}

CidrRoutingConfig ties a record set to a CIDR collection location.

type DNSQueryContext

type DNSQueryContext struct {
	ClientRegion    string
	ContinentCode   string
	CountryCode     string
	SubdivisionCode string
	ResolverIP      string
	// contains filtered or unexported fields
}

DNSQueryContext carries the client-side signals Route 53 uses to resolve routing-policy records: the client's AWS region (latency routing), the client's geographic location (geolocation routing) and the resolver IP. randFloat is an injectable source of pseudo-random floats in [0,1) used for weighted selection; when nil a crypto/rand-backed source is used. Tests set it to obtain deterministic weighted draws.

type DNSRegistrar

type DNSRegistrar interface {
	RegisterRecord(hostname, recordType string, values []string)
	Deregister(hostname string)
}

DNSRegistrar can register and deregister hostnames with an embedded DNS server. RegisterRecord stores the actual record value (IP for A/AAAA, hostname for CNAME/ALIAS).

type FailoverPolicy

type FailoverPolicy string

FailoverPolicy is the failover role for a record set.

const (
	// FailoverPrimary is the primary record in failover routing.
	FailoverPrimary FailoverPolicy = "PRIMARY"
	// FailoverSecondary is the secondary record in failover routing.
	FailoverSecondary FailoverPolicy = "SECONDARY"
)

type GeoLocation

type GeoLocation struct {
	ContinentCode   string `json:"continentCode,omitempty"`
	CountryCode     string `json:"countryCode,omitempty"`
	SubdivisionCode string `json:"subdivisionCode,omitempty"`
}

GeoLocation represents a geolocation routing target.

type GeoProximityCoordinates

type GeoProximityCoordinates struct {
	Latitude  string `json:"latitude"`
	Longitude string `json:"longitude"`
}

GeoProximityCoordinates holds lat/lon for a GeoProximity endpoint.

type GeoProximityLocation

type GeoProximityLocation struct {
	Coordinates    *GeoProximityCoordinates `json:"coordinates,omitempty"`
	AWSRegion      string                   `json:"awsRegion,omitempty"`
	LocalZoneGroup string                   `json:"localZoneGroup,omitempty"`
	Bias           int                      `json:"bias,omitempty"`
}

GeoProximityLocation holds routing configuration for proximity-based routing.

type Handler

type Handler struct {
	Backend StorageBackend
}

Handler is the HTTP service handler for Route 53 operations.

func NewHandler

func NewHandler(backend StorageBackend) *Handler

NewHandler creates a new Route 53 Handler.

func (*Handler) ChaosOperations

func (h *Handler) ChaosOperations() []string

ChaosOperations returns all operations that can be fault-injected.

func (*Handler) ChaosRegions

func (h *Handler) ChaosRegions() []string

ChaosRegions returns all regions this Route53 instance handles.

func (*Handler) ChaosServiceName

func (h *Handler) ChaosServiceName() string

ChaosServiceName returns the lowercase AWS service name for fault rule matching.

func (*Handler) ExtractOperation

func (h *Handler) ExtractOperation(c *echo.Context) string

ExtractOperation extracts a human-readable operation name from the request.

func (*Handler) ExtractResource

func (h *Handler) ExtractResource(c *echo.Context) string

ExtractResource extracts the zone ID from the request path.

func (*Handler) GetSupportedOperations

func (h *Handler) GetSupportedOperations() []string

GetSupportedOperations returns all mocked Route 53 operations.

func (*Handler) Handler

func (h *Handler) Handler() echo.HandlerFunc

Handler returns the Echo handler function for Route 53 requests.

func (*Handler) IAMAction

func (h *Handler) IAMAction(r *http.Request) string

func (*Handler) MatchPriority

func (h *Handler) MatchPriority() int

MatchPriority returns the routing priority for Route 53.

func (*Handler) Name

func (h *Handler) Name() string

Name returns the service name.

func (*Handler) Reset

func (h *Handler) Reset()

Reset clears all in-memory state from the backend. It is used by the POST /_gopherstack/reset endpoint for CI pipelines and rapid local development.

func (*Handler) Restore

func (h *Handler) Restore(ctx context.Context, data []byte) error

Restore implements persistence.Persistable by delegating to the backend.

func (*Handler) RouteMatcher

func (h *Handler) RouteMatcher() service.Matcher

RouteMatcher returns a matcher that selects Route 53 requests by path prefix.

func (*Handler) Snapshot

func (h *Handler) Snapshot(ctx context.Context) []byte

Snapshot implements persistence.Persistable by delegating to the backend.

type HealthCheck

type HealthCheck struct {
	CreatedAt       time.Time                `json:"createdAt"`
	ID              string                   `json:"id"`
	CallerReference string                   `json:"callerReference"`
	Status          string                   `json:"status"`
	Observations    []HealthCheckObservation `json:"observations"`
	Config          HealthCheckConfig        `json:"config"`
	// Version is a sequential counter AWS sets to 1 at creation and
	// increments by 1 on every UpdateHealthCheck. Wire field
	// HealthCheckVersion; UpdateHealthCheck's optional request-side
	// HealthCheckVersion is checked against this for optimistic
	// concurrency (see ErrHealthCheckVersionMismatch).
	Version int64 `json:"version"`
}

HealthCheck represents a Route 53 health check.

type HealthCheckConfig

type HealthCheckConfig struct {
	AlarmIdentifier              *AlarmIdentifier `json:"alarmIdentifier,omitempty"`
	IPAddress                    string           `json:"ipAddress,omitempty"`
	FullyQualifiedDomainName     string           `json:"fullyQualifiedDomainName,omitempty"`
	ResourcePath                 string           `json:"resourcePath,omitempty"`
	SearchString                 string           `json:"searchString,omitempty"`
	InsufficientDataHealthStatus string           `json:"insufficientDataHealthStatus,omitempty"`
	RoutingControlArn            string           `json:"routingControlArn,omitempty"`
	Type                         HealthCheckType  `json:"type"`
	Regions                      []string         `json:"regions,omitempty"`
	ChildHealthChecks            []string         `json:"childHealthChecks,omitempty"`
	Port                         int              `json:"port,omitempty"`
	RequestInterval              int              `json:"requestInterval,omitempty"`
	FailureThreshold             int              `json:"failureThreshold,omitempty"`
	HealthThreshold              int              `json:"healthThreshold,omitempty"`
	EnableSNI                    bool             `json:"enableSNI,omitempty"`
	MeasureLatency               bool             `json:"measureLatency,omitempty"`
	Disabled                     bool             `json:"disabled,omitempty"`
	Inverted                     bool             `json:"inverted,omitempty"`
}

HealthCheckConfig holds the configuration for a health check.

type HealthCheckObservation

type HealthCheckObservation struct {
	CheckedTime time.Time `json:"checkedTime"`
	Region      string    `json:"region"`
	IPAddress   string    `json:"ipAddress"`
	Status      string    `json:"status"`
}

HealthCheckObservation represents a single observation of a health check.

type HealthCheckType

type HealthCheckType string

HealthCheckType is the type of health check.

const (
	HealthCheckTypeHTTP             HealthCheckType = "HTTP"
	HealthCheckTypeHTTPS            HealthCheckType = "HTTPS"
	HealthCheckTypeTCP              HealthCheckType = "TCP"
	HealthCheckTypeCalculated       HealthCheckType = "CALCULATED"
	HealthCheckTypeCloudWatchMetric HealthCheckType = "CLOUDWATCH_METRIC"
	HealthCheckTypeRecoveryControl  HealthCheckType = "RECOVERY_CONTROL"
)

type HostedZone

type HostedZone struct {
	CreatedAt       time.Time `json:"createdAt"`
	Name            string    `json:"name"`
	ID              string    `json:"id"`
	CallerReference string    `json:"callerReference"`
	Comment         string    `json:"comment"`
	// DelegationSetID is the ID of the reusable delegation set this zone
	// was created with, or "" if the zone uses a system-assigned (non
	// reusable) delegation set. Not part of the wire "HostedZone" element
	// itself — real AWS only surfaces it via the separate DelegationSet
	// element on CreateHostedZone/GetHostedZone responses.
	DelegationSetID string `json:"delegationSetId,omitempty"`
	// NameServers are the authoritative name servers for this zone, fixed
	// at creation time: either the reusable delegation set's servers (when
	// DelegationSetID is set) or the default pair otherwise.
	NameServers            []string `json:"nameServers,omitempty"`
	ResourceRecordSetCount int      `json:"resourceRecordSetCount"`
	PrivateZone            bool     `json:"privateZone"`
}

HostedZone represents a Route 53 hosted zone.

type InMemoryBackend

type InMemoryBackend struct {
	// contains filtered or unexported fields
}

InMemoryBackend stores Route 53 state in memory.

Most resource collections are *store.Table[T], registered once on registry at construction time (see store_setup.go); registry.ResetAll() then collapses their runtime reset to one call in Reset below. A handful of fields are deliberately left as plain maps -- see the doc comment atop store_setup.go for the full list and why.

func NewInMemoryBackend

func NewInMemoryBackend() *InMemoryBackend

NewInMemoryBackend creates a new InMemoryBackend.

func (*InMemoryBackend) AccountID

func (b *InMemoryBackend) AccountID() string

AccountID returns the AWS account ID for this backend.

func (*InMemoryBackend) ActivateKeySigningKey

func (b *InMemoryBackend) ActivateKeySigningKey(hostedZoneID, name string) (*KeySigningKey, error)

ActivateKeySigningKey activates an existing key signing key.

func (*InMemoryBackend) AddHealthCheckInternal

func (b *InMemoryBackend) AddHealthCheckInternal(hc HealthCheck)

AddHealthCheckInternal adds a health check directly into the backend for testing.

func (*InMemoryBackend) AddKeySigningKeyInternal

func (b *InMemoryBackend) AddKeySigningKeyInternal(ksk KeySigningKey)

AddKeySigningKeyInternal adds a KSK directly into the backend for testing.

func (*InMemoryBackend) AddTrafficPolicyInternal

func (b *InMemoryBackend) AddTrafficPolicyInternal(tp TrafficPolicy)

AddTrafficPolicyInternal adds a traffic policy directly into the backend for testing.

func (*InMemoryBackend) AddZoneInternal

func (b *InMemoryBackend) AddZoneInternal(hz HostedZone)

AddZoneInternal adds a hosted zone directly into the backend for testing.

func (*InMemoryBackend) AssociateVPCWithHostedZone

func (b *InMemoryBackend) AssociateVPCWithHostedZone(zoneID, vpcID, vpcRegion string) error

AssociateVPCWithHostedZone associates a VPC with a private hosted zone. Returns ErrPublicZoneVPCAssociation when called on a public zone.

func (*InMemoryBackend) ChangeCidrCollection

func (b *InMemoryBackend) ChangeCidrCollection(
	collectionID string,
	changes []CidrCollectionChange,
	expectedVersion *int64,
) (*CidrCollection, error)

ChangeCidrCollection applies PUT/DELETE_IF_EXISTS changes to a CIDR collection's locations. expectedVersion is the caller-supplied CollectionVersion, or nil when the request omitted it (the field is optional on the wire). When present, it must match the collection's current Version or the change is rejected with ErrCidrCollectionVersionMismatch — AWS's optimistic-concurrency guard against overwriting an intervening update.

func (*InMemoryBackend) ChangeResourceRecordSets

func (b *InMemoryBackend) ChangeResourceRecordSets(
	zoneID string,
	changes []Change,
) (string, error)

ChangeResourceRecordSets applies a batch of record set changes atomically. All changes are validated before any mutation is applied.

func (*InMemoryBackend) ChangeTagsForResource

func (b *InMemoryBackend) ChangeTagsForResource(
	resourceType, resourceID string,
	addTags map[string]string,
	removeKeys []string,
) error

func (*InMemoryBackend) CountAssociatedVPCs

func (b *InMemoryBackend) CountAssociatedVPCs(zoneID string) (int, error)

CountAssociatedVPCs returns the number of VPCs associated with the given hosted zone. It returns ErrHostedZoneNotFound if the zone does not exist.

func (*InMemoryBackend) CountResourceRecordSets

func (b *InMemoryBackend) CountResourceRecordSets(zoneID string) (int, error)

CountResourceRecordSets returns the number of resource record sets in the given hosted zone. It returns ErrHostedZoneNotFound if the zone does not exist.

func (*InMemoryBackend) CountZonesByReusableDelegationSet

func (b *InMemoryBackend) CountZonesByReusableDelegationSet(id string) (int, error)

CountZonesByReusableDelegationSet returns the number of hosted zones that use the given reusable delegation set. It returns ErrDelegationSetNotFound if the delegation set does not exist.

func (*InMemoryBackend) CreateCidrCollection

func (b *InMemoryBackend) CreateCidrCollection(
	name, _ string,
) (*CidrCollection, error)

CreateCidrCollection creates a new CIDR collection.

func (*InMemoryBackend) CreateHealthCheck

func (b *InMemoryBackend) CreateHealthCheck(
	callerRef string,
	cfg HealthCheckConfig,
) (*HealthCheck, error)

CreateHealthCheck creates a new health check.

func (*InMemoryBackend) CreateHostedZone

func (b *InMemoryBackend) CreateHostedZone(
	name, callerRef, comment string,
	private bool,
	delegationSetID string,
) (*HostedZone, error)

CreateHostedZone creates a new hosted zone. When delegationSetID is non-empty, the zone is linked to that reusable delegation set (which must already exist, see ErrDelegationSetNotFound) and inherits its name servers; otherwise the zone gets the default system-assigned name servers.

func (*InMemoryBackend) CreateKeySigningKey

func (b *InMemoryBackend) CreateKeySigningKey(
	hostedZoneID, _, name, kmsArn, status string,
) (*KeySigningKey, error)

CreateKeySigningKey creates a new key signing key for a hosted zone.

func (*InMemoryBackend) CreateQueryLoggingConfig

func (b *InMemoryBackend) CreateQueryLoggingConfig(
	hostedZoneID, logGroupArn string,
) (*QueryLoggingConfig, error)

CreateQueryLoggingConfig creates a new query logging configuration. AWS allows at most one config per hosted zone.

func (*InMemoryBackend) CreateReusableDelegationSet

func (b *InMemoryBackend) CreateReusableDelegationSet(
	callerRef, _ string,
) (*ReusableDelegationSet, error)

CreateReusableDelegationSet creates a new reusable delegation set.

func (*InMemoryBackend) CreateTrafficPolicy

func (b *InMemoryBackend) CreateTrafficPolicy(
	name, document, comment string,
) (*TrafficPolicy, error)

CreateTrafficPolicy creates a new traffic policy.

func (*InMemoryBackend) CreateTrafficPolicyInstance

func (b *InMemoryBackend) CreateTrafficPolicyInstance(
	hostedZoneID, name, tpID string,
	tpVersion int32,
	ttl int64,
) (*TrafficPolicyInstance, error)

CreateTrafficPolicyInstance creates a new traffic policy instance.

func (*InMemoryBackend) CreateTrafficPolicyVersion

func (b *InMemoryBackend) CreateTrafficPolicyVersion(
	id, document, comment string,
) (*TrafficPolicy, error)

CreateTrafficPolicyVersion creates a new version of an existing traffic policy.

func (*InMemoryBackend) CreateVPCAssociationAuthorization

func (b *InMemoryBackend) CreateVPCAssociationAuthorization(
	zoneID, vpcID, vpcRegion string,
) (*VPCAssociationAuthorization, error)

CreateVPCAssociationAuthorization authorizes a VPC to be associated with a hosted zone from another AWS account.

func (*InMemoryBackend) DeactivateKeySigningKey

func (b *InMemoryBackend) DeactivateKeySigningKey(
	hostedZoneID, name string,
) (*KeySigningKey, error)

DeactivateKeySigningKey deactivates an existing key signing key.

func (*InMemoryBackend) DeleteCidrCollection

func (b *InMemoryBackend) DeleteCidrCollection(id string) error

DeleteCidrCollection deletes a CIDR collection. DeleteCidrCollection deletes a CIDR collection. Real AWS requires the collection to be empty (no locations/CIDR blocks) before it can be deleted — see ErrCidrCollectionInUse.

func (*InMemoryBackend) DeleteHealthCheck

func (b *InMemoryBackend) DeleteHealthCheck(id string) error

DeleteHealthCheck removes a health check.

func (*InMemoryBackend) DeleteHostedZone

func (b *InMemoryBackend) DeleteHostedZone(zoneID string) error

DeleteHostedZone removes a hosted zone and all its record sets.

func (*InMemoryBackend) DeleteKeySigningKey

func (b *InMemoryBackend) DeleteKeySigningKey(hostedZoneID, name string) error

DeleteKeySigningKey deletes a key signing key. The KSK must be INACTIVE; deleting an ACTIVE KSK returns ErrInvalidKeySigningKeyStatus (AWS: InvalidKeySigningKeyStatus).

func (*InMemoryBackend) DeleteQueryLoggingConfig

func (b *InMemoryBackend) DeleteQueryLoggingConfig(id string) error

DeleteQueryLoggingConfig deletes a query logging config.

func (*InMemoryBackend) DeleteReusableDelegationSet

func (b *InMemoryBackend) DeleteReusableDelegationSet(id string) error

DeleteReusableDelegationSet deletes a reusable delegation set. It returns ErrDelegationSetInUse if any hosted zone is still linked to it — real AWS requires all zones created with the set to be deleted first.

func (*InMemoryBackend) DeleteTrafficPolicy

func (b *InMemoryBackend) DeleteTrafficPolicy(id string, version int32) error

DeleteTrafficPolicy deletes a specific version of a traffic policy. If it is the last version, the entire policy is removed.

func (*InMemoryBackend) DeleteTrafficPolicyInstance

func (b *InMemoryBackend) DeleteTrafficPolicyInstance(id string) error

DeleteTrafficPolicyInstance deletes a traffic policy instance.

func (*InMemoryBackend) DeleteVPCAssociationAuthorization

func (b *InMemoryBackend) DeleteVPCAssociationAuthorization(zoneID, vpcID string) error

DeleteVPCAssociationAuthorization removes a VPC association authorization.

func (*InMemoryBackend) DisableHostedZoneDNSSEC

func (b *InMemoryBackend) DisableHostedZoneDNSSEC(zoneID string) error

DisableHostedZoneDNSSEC disables DNSSEC for a hosted zone.

func (*InMemoryBackend) DisassociateVPCFromHostedZone

func (b *InMemoryBackend) DisassociateVPCFromHostedZone(zoneID, vpcID string) error

DisassociateVPCFromHostedZone removes a VPC association from a private hosted zone.

func (*InMemoryBackend) EnableHostedZoneDNSSEC

func (b *InMemoryBackend) EnableHostedZoneDNSSEC(zoneID string) error

EnableHostedZoneDNSSEC enables DNSSEC for a hosted zone. Requires at least one ACTIVE KSK; returns ErrKeySigningKeyWithActiveStatusNF otherwise.

func (*InMemoryBackend) GetChange

func (b *InMemoryBackend) GetChange(changeID string) (*ChangeInfo, error)

GetChange returns the ChangeInfo for a given change ID.

func (*InMemoryBackend) GetDNSSEC

func (b *InMemoryBackend) GetDNSSEC(zoneID string) (bool, []KeySigningKey, error)

GetDNSSEC returns the DNSSEC status and key signing keys for a hosted zone.

func (*InMemoryBackend) GetHealthCheck

func (b *InMemoryBackend) GetHealthCheck(id string) (*HealthCheck, error)

GetHealthCheck returns a single health check.

func (*InMemoryBackend) GetHealthCheckCount

func (b *InMemoryBackend) GetHealthCheckCount() int

GetHealthCheckCount returns the total number of health checks.

func (*InMemoryBackend) GetHealthCheckStatus

func (b *InMemoryBackend) GetHealthCheckStatus(id string) (string, error)

GetHealthCheckStatus returns the mocked health status for a health check.

func (*InMemoryBackend) GetHostedZone

func (b *InMemoryBackend) GetHostedZone(zoneID string) (*HostedZone, error)

GetHostedZone returns a single hosted zone.

func (*InMemoryBackend) GetHostedZoneCount

func (b *InMemoryBackend) GetHostedZoneCount() int

GetHostedZoneCount returns the total number of hosted zones.

func (*InMemoryBackend) GetQueryLoggingConfig

func (b *InMemoryBackend) GetQueryLoggingConfig(id string) (*QueryLoggingConfig, error)

GetQueryLoggingConfig returns a query logging config by ID.

func (*InMemoryBackend) GetReusableDelegationSet

func (b *InMemoryBackend) GetReusableDelegationSet(id string) (*ReusableDelegationSet, error)

GetReusableDelegationSet returns a reusable delegation set by ID.

func (*InMemoryBackend) GetTrafficPolicy

func (b *InMemoryBackend) GetTrafficPolicy(id string, version int32) (*TrafficPolicy, error)

GetTrafficPolicy returns a specific version of a traffic policy.

func (*InMemoryBackend) GetTrafficPolicyInstance

func (b *InMemoryBackend) GetTrafficPolicyInstance(id string) (*TrafficPolicyInstance, error)

GetTrafficPolicyInstance returns a traffic policy instance by ID.

func (*InMemoryBackend) ListCidrBlocks

func (b *InMemoryBackend) ListCidrBlocks(collectionID, locationName string) ([]string, error)

ListCidrBlocks returns all CIDR blocks for a given location in a collection.

func (*InMemoryBackend) ListCidrCollections

func (b *InMemoryBackend) ListCidrCollections() ([]*CidrCollection, error)

ListCidrCollections returns all CIDR collections.

func (*InMemoryBackend) ListCidrLocations

func (b *InMemoryBackend) ListCidrLocations(collectionID string) ([]string, error)

ListCidrLocations returns all location names in a CIDR collection.

func (*InMemoryBackend) ListHealthChecks

func (b *InMemoryBackend) ListHealthChecks(
	marker string,
	maxItems int,
) (page.Page[HealthCheck], error)

ListHealthChecks returns all health checks.

func (*InMemoryBackend) ListHostedZones

func (b *InMemoryBackend) ListHostedZones(
	marker string,
	maxItems int,
) (page.Page[HostedZone], error)

ListHostedZones returns hosted zones sorted by name, with optional pagination.

func (*InMemoryBackend) ListHostedZonesByName

func (b *InMemoryBackend) ListHostedZonesByName(
	dnsName, zoneID string,
	maxItems int,
) ([]HostedZone, string, string, error)

ListHostedZonesByName returns hosted zones sorted by name, paginating by DNSName and zoneID.

func (*InMemoryBackend) ListHostedZonesByVPC

func (b *InMemoryBackend) ListHostedZonesByVPC(vpcID, vpcRegion string) ([]HostedZone, error)

ListHostedZonesByVPC returns all private hosted zones that have a VPC association with the given VPC.

func (*InMemoryBackend) ListQueryLoggingConfigs

func (b *InMemoryBackend) ListQueryLoggingConfigs(
	hostedZoneID string,
) ([]*QueryLoggingConfig, error)

ListQueryLoggingConfigs returns all query logging configs, optionally filtered by zone.

func (*InMemoryBackend) ListResourceRecordSets

func (b *InMemoryBackend) ListResourceRecordSets(
	zoneID, startName, startType, startIdentifier string,
	maxItems int,
) (RRSetPage, error)

ListResourceRecordSets returns resource record sets sorted by (Name, Type, SetIdentifier), starting after the given (startName, startType, startIdentifier) tuple, up to maxItems. Pass empty strings and 0 to get the first page.

func (*InMemoryBackend) ListReusableDelegationSets

func (b *InMemoryBackend) ListReusableDelegationSets() ([]*ReusableDelegationSet, error)

ListReusableDelegationSets returns all reusable delegation sets.

func (*InMemoryBackend) ListTagsForResource

func (b *InMemoryBackend) ListTagsForResource(resourceType, resourceID string) (map[string]string, error)

ListTagsForResource returns the tags for a single hosted zone or health check.

func (*InMemoryBackend) ListTagsForResources

func (b *InMemoryBackend) ListTagsForResources(
	resourceType string,
	resourceIDs []string,
) (map[string]map[string]string, error)

ListTagsForResources returns the tags for a batch of same-type resources. If any resourceID does not exist, the whole call fails (matching AWS, which validates the entire ResourceIds list before returning tags).

func (*InMemoryBackend) ListTrafficPolicies

func (b *InMemoryBackend) ListTrafficPolicies() ([]*TrafficPolicySummary, error)

ListTrafficPolicies returns the latest version of each traffic policy with its version count.

func (*InMemoryBackend) ListTrafficPolicyInstances

func (b *InMemoryBackend) ListTrafficPolicyInstances() ([]*TrafficPolicyInstance, error)

ListTrafficPolicyInstances returns all traffic policy instances.

func (*InMemoryBackend) ListTrafficPolicyInstancesByHostedZone

func (b *InMemoryBackend) ListTrafficPolicyInstancesByHostedZone(
	hostedZoneID string,
) ([]*TrafficPolicyInstance, error)

ListTrafficPolicyInstancesByHostedZone filters instances by hosted zone ID.

func (*InMemoryBackend) ListTrafficPolicyInstancesByPolicy

func (b *InMemoryBackend) ListTrafficPolicyInstancesByPolicy(
	tpID string,
	tpVersion int32,
) ([]*TrafficPolicyInstance, error)

ListTrafficPolicyInstancesByPolicy filters instances by traffic policy ID and version.

func (*InMemoryBackend) ListTrafficPolicyVersions

func (b *InMemoryBackend) ListTrafficPolicyVersions(id string) ([]*TrafficPolicy, error)

ListTrafficPolicyVersions returns all versions of a traffic policy.

func (*InMemoryBackend) ListVPCAssociationAuthorizations

func (b *InMemoryBackend) ListVPCAssociationAuthorizations(
	zoneID string,
) ([]VPCAssociationAuthorization, error)

ListVPCAssociationAuthorizations returns all VPC association authorizations for a hosted zone.

func (*InMemoryBackend) ListVPCAssociations

func (b *InMemoryBackend) ListVPCAssociations(zoneID string) ([]vpcAssociation, error)

ListVPCAssociations returns all VPCs associated with a hosted zone.

func (*InMemoryBackend) Region

func (b *InMemoryBackend) Region() string

Region returns the AWS region for this backend.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all in-memory state from the backend. It is used by the POST /_gopherstack/reset endpoint for CI pipelines and rapid local development.

func (*InMemoryBackend) Restore

func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error

Restore loads backend state from a JSON snapshot. It implements persistence.Persistable. The DNS registrar is not restored — it must be re-wired by the caller after restore.

func (*InMemoryBackend) SetDNSRegistrar

func (b *InMemoryBackend) SetDNSRegistrar(dns DNSRegistrar)

SetDNSRegistrar wires a DNS server so A/CNAME records are auto-registered.

func (*InMemoryBackend) SetHealthCheckStatus

func (b *InMemoryBackend) SetHealthCheckStatus(id, status string) error

SetHealthCheckStatus overrides the mocked health status for a health check. This allows tests to simulate failover scenarios.

func (*InMemoryBackend) Snapshot

func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte

Snapshot serialises the backend state to JSON. It implements persistence.Persistable.

func (*InMemoryBackend) TestDNSAnswer

func (b *InMemoryBackend) TestDNSAnswer(
	zoneID, recordName, recordType string,
	qctx DNSQueryContext,
) ([]string, error)

TestDNSAnswer looks up a record in the hosted zone and returns the values the resolver would answer with, applying routing policy (weighted, latency, geolocation, failover, multivalue), health-check status and alias recursion. The DNSQueryContext supplies client-side signals (region, geo, weighted RNG).

func (*InMemoryBackend) UpdateHealthCheck

func (b *InMemoryBackend) UpdateHealthCheck(
	id string,
	cfg HealthCheckConfig,
	expectedVersion *int64,
) (*HealthCheck, error)

UpdateHealthCheck updates configuration fields of an existing health check. expectedVersion is the caller-supplied HealthCheckVersion, or nil when the request omitted it (the field is optional on the wire). When present, it must match the health check's current Version or the update is rejected with ErrHealthCheckVersionMismatch — this is AWS's optimistic-concurrency guard against overwriting an intervening update. Version is incremented by 1 on every successful update, matching real AWS's documented behavior.

func (*InMemoryBackend) UpdateHostedZoneComment

func (b *InMemoryBackend) UpdateHostedZoneComment(zoneID, comment string) (*HostedZone, error)

UpdateHostedZoneComment updates the comment on an existing hosted zone.

func (*InMemoryBackend) UpdateTrafficPolicyComment

func (b *InMemoryBackend) UpdateTrafficPolicyComment(
	id string, version int32, comment string,
) (*TrafficPolicy, error)

UpdateTrafficPolicyComment updates the comment on a specific version of a traffic policy.

func (*InMemoryBackend) UpdateTrafficPolicyInstance

func (b *InMemoryBackend) UpdateTrafficPolicyInstance(
	id, tpID string,
	tpVersion int32,
	ttl int64,
) (*TrafficPolicyInstance, error)

UpdateTrafficPolicyInstance updates the TTL of a traffic policy instance.

type KeySigningKey

type KeySigningKey struct {
	CreatedAt                time.Time `json:"createdAt"`
	HostedZoneID             string    `json:"hostedZoneId"`
	Name                     string    `json:"name"`
	KeyManagementServiceArn  string    `json:"keyManagementServiceArn"`
	Status                   string    `json:"status"`
	SigningAlgorithmMnemonic string    `json:"signingAlgorithmMnemonic"`
	DigestAlgorithmMnemonic  string    `json:"digestAlgorithmMnemonic"`
	PublicKey                string    `json:"publicKey"`
	DSRecord                 string    `json:"dsRecord"`
	DigestValue              string    `json:"digestValue"`
	Flag                     int       `json:"flag"`
	SigningAlgorithmType     int       `json:"signingAlgorithmType"`
	DigestAlgorithmType      int       `json:"digestAlgorithmType"`
	KeyTag                   int       `json:"keyTag"`
}

KeySigningKey represents a Route 53 key signing key for DNSSEC.

type Provider

type Provider struct{}

Provider implements service.Provider for the Route 53 service.

func (*Provider) Init

Init initializes the Route 53 service backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the logical name of the provider.

type QueryLoggingConfig

type QueryLoggingConfig struct {
	CreatedAt                 time.Time `json:"createdAt"`
	ID                        string    `json:"id"`
	HostedZoneID              string    `json:"hostedZoneId"`
	CloudWatchLogsLogGroupArn string    `json:"cloudWatchLogsLogGroupArn"`
}

QueryLoggingConfig represents a Route 53 query logging configuration.

type RRSetPage

type RRSetPage struct {
	NextName       string
	NextType       string
	NextIdentifier string
	Records        []ResourceRecordSet
	IsTruncated    bool
}

RRSetPage is a page of ResourceRecordSets with pagination cursors.

type ResourceRecord

type ResourceRecord struct {
	Value string `json:"value"`
}

ResourceRecord holds a single DNS resource record value.

type ResourceRecordSet

type ResourceRecordSet struct {
	AliasTarget          *AliasTarget          `json:"aliasTarget,omitempty"`
	GeoLocation          *GeoLocation          `json:"geoLocation,omitempty"`
	GeoProximityLocation *GeoProximityLocation `json:"geoProximityLocation,omitempty"`
	CidrRoutingConfig    *CidrRoutingConfig    `json:"cidrRoutingConfig,omitempty"`
	Weight               *int64                `json:"weight,omitempty"`
	SetIdentifier        string                `json:"setIdentifier,omitempty"`
	Type                 string                `json:"type"`
	Failover             FailoverPolicy        `json:"failover,omitempty"`
	Region               string                `json:"region,omitempty"`
	HealthCheckID        string                `json:"healthCheckId,omitempty"`
	Name                 string                `json:"name"`
	Records              []ResourceRecord      `json:"records"`
	TTL                  int64                 `json:"ttl"`
	MultiValueAnswer     bool                  `json:"multiValueAnswer,omitempty"`
}

ResourceRecordSet represents a DNS resource record set.

type ReusableDelegationSet

type ReusableDelegationSet struct {
	CreatedAt       time.Time `json:"createdAt"`
	ID              string    `json:"id"`
	CallerReference string    `json:"callerReference"`
	NameServers     []string  `json:"nameServers"`
}

ReusableDelegationSet represents a Route 53 reusable delegation set.

type StorageBackend

type StorageBackend interface {
	// Hosted zone operations
	CreateHostedZone(name, callerRef, comment string, private bool, delegationSetID string) (*HostedZone, error)
	DeleteHostedZone(zoneID string) error
	GetHostedZone(zoneID string) (*HostedZone, error)
	ListHostedZones(marker string, maxItems int) (page.Page[HostedZone], error)
	ListHostedZonesByName(dnsName, zoneID string, maxItems int) ([]HostedZone, string, string, error)
	GetHostedZoneCount() int
	UpdateHostedZoneComment(zoneID, comment string) (*HostedZone, error)

	// Record set operations
	ChangeResourceRecordSets(zoneID string, changes []Change) (string, error)
	ListResourceRecordSets(zoneID, startName, startType, startIdentifier string, maxItems int) (RRSetPage, error)
	CountResourceRecordSets(zoneID string) (int, error)
	GetChange(changeID string) (*ChangeInfo, error)

	// Health check operations
	CreateHealthCheck(callerRef string, cfg HealthCheckConfig) (*HealthCheck, error)
	GetHealthCheck(id string) (*HealthCheck, error)
	ListHealthChecks(marker string, maxItems int) (page.Page[HealthCheck], error)
	GetHealthCheckCount() int
	DeleteHealthCheck(id string) error
	UpdateHealthCheck(id string, cfg HealthCheckConfig, expectedVersion *int64) (*HealthCheck, error)
	GetHealthCheckStatus(id string) (string, error)
	SetHealthCheckStatus(id, status string) error

	// Key signing key operations
	CreateKeySigningKey(hostedZoneID, callerRef, name, kmsArn, status string) (*KeySigningKey, error)
	ActivateKeySigningKey(hostedZoneID, name string) (*KeySigningKey, error)
	DeactivateKeySigningKey(hostedZoneID, name string) (*KeySigningKey, error)
	DeleteKeySigningKey(hostedZoneID, name string) error

	// DNSSEC operations
	EnableHostedZoneDNSSEC(zoneID string) error
	DisableHostedZoneDNSSEC(zoneID string) error
	GetDNSSEC(zoneID string) (bool, []KeySigningKey, error)

	// VPC association operations
	AssociateVPCWithHostedZone(zoneID, vpcID, vpcRegion string) error
	DisassociateVPCFromHostedZone(zoneID, vpcID string) error
	ListVPCAssociations(zoneID string) ([]vpcAssociation, error)
	ListHostedZonesByVPC(vpcID, vpcRegion string) ([]HostedZone, error)
	CreateVPCAssociationAuthorization(zoneID, vpcID, vpcRegion string) (*VPCAssociationAuthorization, error)
	DeleteVPCAssociationAuthorization(zoneID, vpcID string) error
	ListVPCAssociationAuthorizations(zoneID string) ([]VPCAssociationAuthorization, error)
	CountAssociatedVPCs(zoneID string) (int, error)

	// CIDR collection operations
	CreateCidrCollection(name, callerRef string) (*CidrCollection, error)
	ChangeCidrCollection(
		collectionID string,
		changes []CidrCollectionChange,
		expectedVersion *int64,
	) (*CidrCollection, error)
	DeleteCidrCollection(id string) error
	ListCidrCollections() ([]*CidrCollection, error)
	ListCidrLocations(collectionID string) ([]string, error)
	ListCidrBlocks(collectionID, locationName string) ([]string, error)

	// Query logging operations
	CreateQueryLoggingConfig(hostedZoneID, logGroupArn string) (*QueryLoggingConfig, error)
	GetQueryLoggingConfig(id string) (*QueryLoggingConfig, error)
	DeleteQueryLoggingConfig(id string) error
	ListQueryLoggingConfigs(hostedZoneID string) ([]*QueryLoggingConfig, error)

	// Delegation set operations
	CreateReusableDelegationSet(callerRef, hostedZoneID string) (*ReusableDelegationSet, error)
	GetReusableDelegationSet(id string) (*ReusableDelegationSet, error)
	DeleteReusableDelegationSet(id string) error
	ListReusableDelegationSets() ([]*ReusableDelegationSet, error)
	CountZonesByReusableDelegationSet(id string) (int, error)

	// DNS query simulation
	TestDNSAnswer(zoneID, recordName, recordType string, qctx DNSQueryContext) ([]string, error)

	// Traffic policy operations
	CreateTrafficPolicy(name, document, comment string) (*TrafficPolicy, error)
	CreateTrafficPolicyVersion(id, document, comment string) (*TrafficPolicy, error)
	CreateTrafficPolicyInstance(
		hostedZoneID, name, tpID string,
		tpVersion int32,
		ttl int64,
	) (*TrafficPolicyInstance, error)
	UpdateTrafficPolicyInstance(id, tpID string, tpVersion int32, ttl int64) (*TrafficPolicyInstance, error)
	UpdateTrafficPolicyComment(id string, version int32, comment string) (*TrafficPolicy, error)
	DeleteTrafficPolicy(id string, version int32) error
	GetTrafficPolicy(id string, version int32) (*TrafficPolicy, error)
	DeleteTrafficPolicyInstance(id string) error
	GetTrafficPolicyInstance(id string) (*TrafficPolicyInstance, error)
	ListTrafficPolicies() ([]*TrafficPolicySummary, error)
	ListTrafficPolicyVersions(id string) ([]*TrafficPolicy, error)
	ListTrafficPolicyInstances() ([]*TrafficPolicyInstance, error)
	ListTrafficPolicyInstancesByHostedZone(hostedZoneID string) ([]*TrafficPolicyInstance, error)
	ListTrafficPolicyInstancesByPolicy(tpID string, tpVersion int32) ([]*TrafficPolicyInstance, error)

	// Tags operations. resourceType is the AWS TagResourceType wire value
	// ("hostedzone" or "healthcheck"); it is used to validate that the
	// resource actually exists (and to pick the right NoSuch* error) before
	// reading or mutating tags.
	ListTagsForResource(resourceType, resourceID string) (map[string]string, error)
	ListTagsForResources(resourceType string, resourceIDs []string) (map[string]map[string]string, error)
	ChangeTagsForResource(resourceType, resourceID string, addTags map[string]string, removeKeys []string) error

	// Lifecycle
	Reset()
	Region() string
	AccountID() string
	Snapshot(ctx context.Context) []byte
	Restore(ctx context.Context, data []byte) error
}

StorageBackend defines the interface for Route 53 backend implementations. All mutating methods must be safe for concurrent use.

type TrafficPolicy

type TrafficPolicy struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Document string `json:"document"`
	Comment  string `json:"comment,omitempty"`
	Type     string `json:"type"`
	Version  int32  `json:"version"`
}

TrafficPolicy represents a Route 53 traffic policy.

type TrafficPolicyInstance

type TrafficPolicyInstance struct {
	ID                   string `json:"id"`
	HostedZoneID         string `json:"hostedZoneId"`
	Name                 string `json:"name"`
	TrafficPolicyID      string `json:"trafficPolicyId"`
	TrafficPolicyType    string `json:"trafficPolicyType"`
	State                string `json:"state"`
	TTL                  int64  `json:"ttl"`
	TrafficPolicyVersion int32  `json:"trafficPolicyVersion"`
}

TrafficPolicyInstance represents a Route 53 traffic policy instance.

type TrafficPolicySummary

type TrafficPolicySummary struct {
	TrafficPolicy
	VersionCount int32
}

TrafficPolicySummary is returned by ListTrafficPolicies and includes the version count.

type VPCAssociationAuthorization

type VPCAssociationAuthorization struct {
	VPCID     string `json:"vpcId"`
	VPCRegion string `json:"vpcRegion"`
}

VPCAssociationAuthorization records an authorized cross-account VPC association.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL