directory

package
v0.0.0-...-abb857b Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2017 License: MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetActiveSshPublicKeys

func GetActiveSshPublicKeys(username string) ([]*iam.SSHPublicKeyMetadata, error)

func GetGroupUsers

func GetGroupUsers(group *iam.Group) ([]*iam.User, error)

func GetGroups

func GetGroups(prefixes []string) ([]*iam.Group, error)

func GetRole

func GetRole() (string, error)

curl http://169.254.169.254/latest/meta-data/iam/info

{
 "Code" : "Success",
 "LastUpdated" : "2016-11-16T18:52:29Z",
 "InstanceProfileArn" : "arn:aws:iam::756413706286:instance-profile/bastion",
 "InstanceProfileId" : "AIPAIHHSYB75V3MLIVTG6"
}

func GetSshEncodedPublicKey

func GetSshEncodedPublicKey(username, keyID *string) (*string, error)

func GetUser

func GetUser(username string) (*iam.User, error)

func UserNames

func UserNames(users []*iam.User) []string

Types

type ARN

type ARN struct {
	Partition string
	Service   string
	Region    string
	Account   string
	Resource  string
}

type IamInfo

type IamInfo struct {
	Code               string `json:"Code"`
	LastUpdatee        string `json:"LastUpdated"`
	InstanceProfileArn string `json:"InstanceProfileArn"`
	InstanceProfileId  string `json:"InstanceProfileId"`
}

Jump to

Keyboard shortcuts

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