Skip to content

Commit d64dd99

Browse files
committed
Fixed/added docstrings in aws provider package.
1 parent 3d36779 commit d64dd99

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

builtin/providers/aws/config.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ func (c *Config) Client() (interface{}, error) {
105105
return &client, nil
106106
}
107107

108-
// IsValidRegion returns true if the configured region is a valid AWS
109-
// region and false if it's not
108+
// ValidateRegion returns an error if the configured region is not a
109+
// valid aws region and nil otherwise.
110110
func (c *Config) ValidateRegion() error {
111111
var regions = [11]string{"us-east-1", "us-west-2", "us-west-1", "eu-west-1",
112112
"eu-central-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1",
@@ -120,6 +120,8 @@ func (c *Config) ValidateRegion() error {
120120
return fmt.Errorf("Not a valid region: %s", c.Region)
121121
}
122122

123+
// ValidateAccountId returns a context-specific error if the configured account
124+
// id is explicitly forbidden or not authorised; and nil if it is authorised.
123125
func (c *Config) ValidateAccountId(iamconn *iam.IAM) error {
124126
if c.AllowedAccountIds == nil && c.ForbiddenAccountIds == nil {
125127
return nil

0 commit comments

Comments
 (0)