aws

package
v0.0.0-...-2bc12df Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package aws presents a filesystem hierarchy for AWS resources.

It uses the AWS_SHARED_CREDENTIALS_FILE environment variable or $HOME/.aws/credentials to configure AWS access.

Index

Constants

View Source
const (
	EC2InstancePendingState      = 0
	EC2InstanceRunningState      = 16
	EC2InstanceShuttingDownState = 32
	EC2InstanceTerminated        = 48
	EC2InstanceStopping          = 64
	EC2InstanceStopped           = 80
)

These constants represent the possible states that the EC2 instance could be in. We export these constants so that other packages could use them since they are not provided by the AWS SDK.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileCacheProvider

type FileCacheProvider struct {
	// contains filtered or unexported fields
}

FileCacheProvider is a credentials.Provider implementation that wraps an underlying Provider (contained in credentials.Credentials) and provides caching support for credentials for the specified profile.

func (*FileCacheProvider) ExpiresAt

func (f *FileCacheProvider) ExpiresAt() time.Time

ExpiresAt implements the Expirer interface, and gives access to the expiration time of the credential

func (*FileCacheProvider) IsExpired

func (f *FileCacheProvider) IsExpired() bool

IsExpired implements the Provider interface, deferring to the cached credential first, but fall back to the underlying Provider if it is expired.

func (*FileCacheProvider) Retrieve

func (f *FileCacheProvider) Retrieve() (credentials.Value, error)

Retrieve implements the Provider interface, returning the cached credential if not expired, otherwise fetching the credential from the underlying Provider and caching the results on disk with an expiration time.

type Root

type Root struct {
	plugin.EntryBase
	// contains filtered or unexported fields
}

Root of the AWS plugin

func (*Root) ChildSchemas

func (r *Root) ChildSchemas() []*plugin.EntrySchema

ChildSchemas returns the root's child schema

func (*Root) Init

func (r *Root) Init(cfg map[string]interface{}) error

Init for root

func (*Root) List

func (r *Root) List(ctx context.Context) ([]plugin.Entry, error)

List the available AWS profiles

func (*Root) Schema

func (r *Root) Schema() *plugin.EntrySchema

Schema returns the root's schema

Jump to

Keyboard shortcuts

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