aws

package
v0.0.0-...-cdd2727 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: MPL-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorCodeNotFound string = "NotFound"
)

Variables

This section is empty.

Functions

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.

Types

type AWSClient

type AWSClient struct {
	// 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
	AssumeRoleTransitiveTagKeys []string

	AllowedAccountIds   []string
	ForbiddenAccountIds []string

	Endpoints map[string]string
	Insecure  bool

	SkipCredsValidation     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 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

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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