@@ -8,17 +8,56 @@ import (
88 "github.com/libdns/libdns"
99)
1010
11- // Provider implements the libdns interfaces for Route53
11+ // Provider implements the libdns interfaces for Route53.
12+ //
13+ // By default, the provider loads the AWS configuration from the environment.
14+ // To override these values, set the fields in the Provider struct.
1215type Provider struct {
13- MaxRetries int `json:"max_retries,omitempty"`
14- MaxWaitDur time.Duration `json:"max_wait_dur,omitempty"`
15- WaitForPropagation bool `json:"wait_for_propagation,omitempty"`
16- Region string `json:"region,omitempty"`
17- AWSProfile string `json:"aws_profile,omitempty"`
18- AccessKeyId string `json:"access_key_id,omitempty"`
19- SecretAccessKey string `json:"secret_access_key,omitempty"`
20- Token string `json:"token,omitempty"`
21- client * r53.Client
16+ client * r53.Client
17+
18+ // Region is the AWS Region to use. If not set, it will use AWS_REGION
19+ // environment variable.
20+ Region string `json:"region,omitempty"`
21+
22+ // AWSProfile is the AWS Profile to use. If not set, it will use
23+ // AWS_PROFILE environment variable.
24+ //
25+ // Deprecated: Use Profile instead
26+ AWSProfile string `json:"aws_profile,omitempty"`
27+
28+ // AWSProfile is the AWS Profile to use. If not set, it will use
29+ // AWS_PROFILE environment variable.
30+ Profile string `json:"profile,omitempty"`
31+
32+ // AccessKeyId is the AWS Access Key ID to use. If not set, it will use
33+ // AWS_ACCESS_KEY_ID
34+ AccessKeyId string `json:"access_key_id,omitempty"`
35+
36+ // SecretAccessKey is the AWS Secret Access Key to use. If not set, it will use
37+ // AWS_SECRET_ACCESS_KEY environment variable.
38+ SecretAccessKey string `json:"secret_access_key,omitempty"`
39+
40+ // Token is the AWS Session Token to use. If not set, it will use
41+ // AWS_SESSION_TOKEN environment variable.
42+ //
43+ // Deprecated: Use SessionToken instead.
44+ Token string `json:"token,omitempty"`
45+
46+ // SessionToken is the AWS Session Token to use. If not set, it will use
47+ // AWS_SESSION_TOKEN environment variable.
48+ SessionToken string `json:"session_token,omitempty"`
49+
50+ // MaxRetries is the maximum number of retries to make when a request
51+ // fails. If not set, it will use 5 retries.
52+ MaxRetries int `json:"max_retries,omitempty"`
53+
54+ // MaxWaitDur is the maximum amount of time to wait for a record to be
55+ // propagated. If not set, it will use 1 minutes.
56+ MaxWaitDur time.Duration `json:"max_wait_dur,omitempty"`
57+
58+ // WaitForPropagation if set to true, it will wait for the record to be
59+ // propagated before returning.
60+ WaitForPropagation bool `json:"wait_for_propagation,omitempty"`
2261}
2362
2463// GetRecords lists all the records in the zone.
0 commit comments