AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

DnsConfig

import "github.com/aws/aws-sdk-go/service/servicediscovery"

type DnsConfig struct { DnsRecords []*DnsRecord `type:"list" required:"true"` NamespaceId *string `deprecated:"true" type:"string"` RoutingPolicy *string `type:"string" enum:"RoutingPolicy"` }

A complex type that contains information about the Amazon Route 53 DNS records that you want AWS Cloud Map to create when you register an instance.

DnsRecords

A complex type that contains information about the Route 53 DNS records that you want AWS Cloud Map to create when you register an instance.

NamespaceId

Type: *string

The ID of the namespace to use for DNS configuration.

Deprecated: Top level attribute in request should be used to reference namespace-id

RoutingPolicy

Type: *string

The routing policy that you want to apply to all Route 53 DNS records that AWS Cloud Map creates when you register an instance and specify this service.

If you want to use this service to register instances that create alias records, specify WEIGHTED for the routing policy.

You can specify the following values:

MULTIVALUE

If you define a health check for the service and the health check is healthy, Route 53 returns the applicable value for up to eight instances.

For example, suppose the service includes configurations for one A record and a health check, and you use the service to register 10 instances. Route 53 responds to DNS queries with IP addresses for up to eight healthy instances. If fewer than eight instances are healthy, Route 53 responds to every DNS query with the IP addresses for all of the healthy instances.

If you don't define a health check for the service, Route 53 assumes that all instances are healthy and returns the values for up to eight instances.

For more information about the multivalue routing policy, see Multivalue Answer Routing (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html#routing-policy-multivalue) in the Route 53 Developer Guide.

WEIGHTED

Route 53 returns the applicable value from one randomly selected instance from among the instances that you registered using the same service. Currently, all records have the same weight, so you can't route more or less traffic to any instances.

For example, suppose the service includes configurations for one A record and a health check, and you use the service to register 10 instances. Route 53 responds to DNS queries with the IP address for one randomly selected instance from among the healthy instances. If no instances are healthy, Route 53 responds to DNS queries as if all of the instances were healthy.

If you don't define a health check for the service, Route 53 assumes that all instances are healthy and returns the applicable value for one randomly selected instance.

For more information about the weighted routing policy, see Weighted Routing (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html#routing-policy-weighted) in the Route 53 Developer Guide.

Method

GoString

func (s DnsConfig) GoString() string

GoString returns the string representation

SetDnsRecords

func (s *DnsConfig) SetDnsRecords(v []*DnsRecord) *DnsConfig

SetDnsRecords sets the DnsRecords field's value.

SetNamespaceId

func (s *DnsConfig) SetNamespaceId(v string) *DnsConfig

SetNamespaceId sets the NamespaceId field's value.

SetRoutingPolicy

func (s *DnsConfig) SetRoutingPolicy(v string) *DnsConfig

SetRoutingPolicy sets the RoutingPolicy field's value.

String

func (s DnsConfig) String() string

String returns the string representation

Validate

func (s *DnsConfig) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: