Documentation
¶
Index ¶
- type Client
- func (r *Client) AssociateRecord(ctx context.Context, res ResourceRecord) error
- func (r *Client) ByID(ctx context.Context, id string) (PrivateHostedZone, error)
- func (r *Client) ByVPC(ctx context.Context, vpc, region string) ([]PrivateHostedZone, error)
- func (r *Client) DisassociateRecord(ctx context.Context, res ResourceRecord) error
- type DNSClientAPI
- type PrivateHostedZone
- type ResourceRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client defines the client for interacting with Amazon Route 53
func NewFromAPI ¶
func NewFromAPI(api DNSClientAPI) *Client
NewFromAPI returns a new client from the provided DNS API implementation
func (*Client) AssociateRecord ¶
func (r *Client) AssociateRecord(ctx context.Context, res ResourceRecord) error
AssociateRecord creates a new A-Record entry within a given Route53 Private Hosted Zone for the specified Record Name and target EC2 IPv4 address
func (*Client) ByID ¶
ByID attempts to retrieve a Route53 Private Hosted Zone by its given ID
The equivalent operation can be achieved through the CLI using:
aws route53 get-hosted-zone --id <HOSTED_ZONE_ID>
func (*Client) ByVPC ¶
ByVPC finds all Route53 Private Hosted Zones associated with a given VPC ID
The equivalent operation can be achieved through the CLI using:
aws route53 list-hosted-zones-by-vpc --vpc-id <VPC_ID> --vpc-region <REGION>
func (*Client) DisassociateRecord ¶
func (r *Client) DisassociateRecord(ctx context.Context, res ResourceRecord) error
DisassociateRecord attempts to delete an existing A-Record entry within a given Route53 Private Hosted Zone, based on the specified Record Name and target EC2 IPv4 address
type DNSClientAPI ¶
type DNSClientAPI interface { // GetHostedZone retrieves information about a specified hosted zone including // the four name servers assigned to the hosted zone GetHostedZone(ctx context.Context, params *awsr53.GetHostedZoneInput, optFns ...func(*awsr53.Options)) (*awsr53.GetHostedZoneOutput, error) // ListHostedZonesByVPC lists all of the private hosted zones that a specified VPC // is associated with ListHostedZonesByVPC(ctx context.Context, params *awsr53.ListHostedZonesByVPCInput, optFns ...func(*awsr53.Options)) (*awsr53.ListHostedZonesByVPCOutput, error) // ChangeResourceRecordSets creates, changes, or deletes a resource record set, // which contains authoritative DNS information for a specified domain name or subdomain name ChangeResourceRecordSets(ctx context.Context, params *awsr53.ChangeResourceRecordSetsInput, optFns ...func(*awsr53.Options)) (*awsr53.ChangeResourceRecordSetsOutput, error) }
DNSClientAPI defines the API for interacting with Amazon Route 53
type PrivateHostedZone ¶
type PrivateHostedZone struct { // ID of the AWS Route53 Private Hosted Zone (PHZ) ID string // Name of the AWS Route53 Hosted Zone (PHZ). This will be the CNAME // of the parent domain Name string }
PrivateHostedZone identifies an AWS Route53 Private Hosted Zone (PHZ)
type ResourceRecord ¶
type ResourceRecord struct { // PhzID of the AWS Route53 Private Hosted Zone (PHZ) PhzID string // Name of the resource record that will be either be created, updated // or deleted within the AWS Route53 Private Hosted Zone (PHZ) Name string // Resource contains the value associated with the resource record Resource string }
ResourceRecord represents a DNS record type that is supported by an AWS Route53 Private Hosted Zone (PHZ)