aws

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Id   string
	Name string
}

func (Account) String

func (account Account) String() string

type Credentials

type Credentials struct {
	AccessKeyId     string
	Expiration      time.Time
	SecretAccessKey string
	SessionToken    string
}

type Role

type Role struct {
	Account       Account
	Arn           string
	Name          string
	PrincipalArn  string
	SamlAssertion string
}

func (Role) Login

func (role Role) Login() (Credentials, error)

func (Role) LoginWithDuration added in v1.0.4

func (role Role) LoginWithDuration(duration time.Duration) (Credentials, error)

func (Role) String

func (role Role) String() string

type Roles

type Roles []Role

func (Roles) Accounts

func (roles Roles) Accounts() []Account

func (Roles) RoleByRoleArn

func (roles Roles) RoleByRoleArn(roleArn string) (Role, error)

Returns role specified by ARN e.g. 'arn:aws:iam::123456789:role/Admin', or error if role does not exist

func (Roles) RolesByAccountId

func (roles Roles) RolesByAccountId(accountId string) Roles

Returns all roles that are under specified account id

Jump to

Keyboard shortcuts

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