aws

package
v0.0.0-...-4f69453 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2020 License: MPL-2.0 Imports: 188 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EcsContainerDefinitionsAreEquivalent

func EcsContainerDefinitionsAreEquivalent(def1, def2 string, isAWSVPC bool) (bool, error)

EcsContainerDefinitionsAreEquivalent determines equality between two ECS container definition JSON strings Note: This function will be moved out of the aws package in the future.

func GetSupportedEC2Platforms

func GetSupportedEC2Platforms(conn *ec2.EC2) ([]string, error)

func HostedZoneIDForRegion

func HostedZoneIDForRegion(region string) (string, error)

Returns the hosted zone ID for an S3 website endpoint region. This can be used as input to the aws_route53_record resource's zone_id argument.

func Provider

func Provider() *schema.Provider

Provider returns a *schema.Provider.

func RetryOnAwsCodes

func RetryOnAwsCodes(codes []string, f func() (interface{}, error)) (interface{}, error)

RetryOnAwsCodes retries AWS error codes for one minute Note: This function will be moved out of the aws package in the future.

func StateTrimSpace

func StateTrimSpace(v interface{}) string

StateTrimSpace is a StateFunc that trims extraneous whitespace from strings.

This prevents differences caused by an API canonicalizing a string with a trailing newline character removed.

Types

type AWSClient

type AWSClient struct {
	IgnoreTagsConfig *keyvaluetags.IgnoreConfig
	// contains filtered or unexported fields
}

func (*AWSClient) PartitionHostname

func (client *AWSClient) PartitionHostname(prefix string) string

PartitionHostname returns a hostname with the provider domain suffix for the partition e.g. PREFIX.amazonaws.com The prefix should not contain a trailing period.

func (*AWSClient) RegionalHostname

func (client *AWSClient) RegionalHostname(prefix string) string

RegionalHostname returns a hostname with the provider domain suffix for the region and partition e.g. PREFIX.us-west-2.amazonaws.com The prefix should not contain a trailing period.

type Config

type Config struct {
	AccessKey     string
	SecretKey     string
	CredsFilename string
	Profile       string
	Token         string
	Region        string
	MaxRetries    int

	AssumeRoleARN               string
	AssumeRoleDurationSeconds   int
	AssumeRoleExternalID        string
	AssumeRolePolicy            string
	AssumeRolePolicyARNs        []string
	AssumeRoleSessionName       string
	AssumeRoleTags              map[string]string
	AssumeRoleTransitiveTagKeys []string

	AllowedAccountIds   []string
	ForbiddenAccountIds []string

	Endpoints        map[string]string
	IgnoreTagsConfig *keyvaluetags.IgnoreConfig
	Insecure         bool

	SkipCredsValidation     bool
	SkipGetEC2Platforms     bool
	SkipRegionValidation    bool
	SkipRequestingAccountId bool
	SkipMetadataApiCheck    bool
	S3ForcePathStyle        bool
	// contains filtered or unexported fields
}

func (*Config) Client

func (c *Config) Client() (interface{}, error)

Client configures and returns a fully initialized AWSClient

type GroupIdentifier

type GroupIdentifier struct {
	// The ID of the security group.
	GroupId *string

	// The name of the security group.
	GroupName *string

	Description *string
}

Like ec2.GroupIdentifier but with additional rule description.

type IAMPolicyDoc

type IAMPolicyDoc struct {
	Version    string                `json:",omitempty"`
	Id         string                `json:",omitempty"`
	Statements []*IAMPolicyStatement `json:"Statement"`
}

func (*IAMPolicyDoc) Merge

func (s *IAMPolicyDoc) Merge(newDoc *IAMPolicyDoc)

type IAMPolicyStatement

type IAMPolicyStatement struct {
	Sid           string
	Effect        string                         `json:",omitempty"`
	Actions       interface{}                    `json:"Action,omitempty"`
	NotActions    interface{}                    `json:"NotAction,omitempty"`
	Resources     interface{}                    `json:"Resource,omitempty"`
	NotResources  interface{}                    `json:"NotResource,omitempty"`
	Principals    IAMPolicyStatementPrincipalSet `json:"Principal,omitempty"`
	NotPrincipals IAMPolicyStatementPrincipalSet `json:"NotPrincipal,omitempty"`
	Conditions    IAMPolicyStatementConditionSet `json:"Condition,omitempty"`
}

type IAMPolicyStatementCondition

type IAMPolicyStatementCondition struct {
	Test     string
	Variable string
	Values   interface{}
}

type IAMPolicyStatementConditionSet

type IAMPolicyStatementConditionSet []IAMPolicyStatementCondition

func (IAMPolicyStatementConditionSet) MarshalJSON

func (cs IAMPolicyStatementConditionSet) MarshalJSON() ([]byte, error)

func (*IAMPolicyStatementConditionSet) UnmarshalJSON

func (cs *IAMPolicyStatementConditionSet) UnmarshalJSON(b []byte) error

type IAMPolicyStatementPrincipal

type IAMPolicyStatementPrincipal struct {
	Type        string
	Identifiers interface{}
}

type IAMPolicyStatementPrincipalSet

type IAMPolicyStatementPrincipalSet []IAMPolicyStatementPrincipal

func (IAMPolicyStatementPrincipalSet) MarshalJSON

func (ps IAMPolicyStatementPrincipalSet) MarshalJSON() ([]byte, error)

func (*IAMPolicyStatementPrincipalSet) UnmarshalJSON

func (ps *IAMPolicyStatementPrincipalSet) UnmarshalJSON(b []byte) error

type WafRegionalRetryer

type WafRegionalRetryer struct {
	Connection *wafregional.WAFRegional
	Region     string
}

func (*WafRegionalRetryer) RetryWithToken

func (t *WafRegionalRetryer) RetryWithToken(f withRegionalTokenFunc) (interface{}, error)

type WafRetryer

type WafRetryer struct {
	Connection *waf.WAF
}

func (*WafRetryer) RetryWithToken

func (t *WafRetryer) RetryWithToken(f withTokenFunc) (interface{}, error)

Jump to

Keyboard shortcuts

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