iam

package
Version: v0.0.0-...-b425644 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ENDPOINT    = "https://iam.amazonaws.com"
	API_VERSION = "2010-05-08"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*aws.Client
}

func NewFromEnv

func NewFromEnv() *Client

func (*Client) GetAccountSummary

func (client *Client) GetAccountSummary() (m *SummaryMap, e error)

func (*Client) GetUser

func (client *Client) GetUser(userName string) (user *User, e error)

func (*Client) ListAccountAliases

func (client *Client) ListAccountAliases() (aliases *ListAccountAliasesResponse, e error)

func (*Client) ListMFADevices

func (client *Client) ListMFADevices(username string) (*ListMFADevicesResponse, error)

func (*Client) ListUsers

func (client *Client) ListUsers() (users *ListUsersResponse, e error)

type Entry

type Entry struct {
	Key   string `xml:"key"`
	Value string `xml:"value"`
}

type GetAccountSummaryResponse

type GetAccountSummaryResponse struct {
	SummaryMap *SummaryMap `xml:"GetAccountSummaryResult>SummaryMap"`
}

type GetUserResponse

type GetUserResponse struct {
	User *User `xml:"GetUserResult>User"`
}

type InstanceProfile

type InstanceProfile struct {
	Id                  string    `xml:"Id"`                  //AIPACZLSXM2EYYEXAMPLE</Id>
	Roles               []*Role   `xml:"Roles>member"`        //
	InstanceProfileName string    `xml:"InstanceProfileName"` //Webserver</InstanceProfileName>
	Path                string    `xml:"Path"`                ///application_abc/component_xyz/</Path>
	Arn                 string    `xml:"Arn"`
	CreateDate          time.Time `xml:"CreateDate"`
}

type ListAccountAliasesResponse

type ListAccountAliasesResponse struct {
	AccountAliases []string `xml:"ListAccountAliasesResult>AccountAliases>member"`
	IsTruncated    bool     `ListAccountAliasesResult>IsTruncated`
}

type ListInstanceProfilesResponse

type ListInstanceProfilesResponse struct {
	XMLName          xml.Name           `xml:"ListInstanceProfilesResponse"`
	InstanceProfiles []*InstanceProfile `xml:"ListInstanceProfilesResult>InstanceProfiles>member"`
}

type ListMFADevicesResponse

type ListMFADevicesResponse struct {
	MFADevices  []*MFADevice `xml:"ListMFADevicesResult>MFADevices>member"`
	IsTruncated bool         `ListAccountAliasesResult>IsTruncated`
}

type ListRolesResponse

type ListRolesResponse struct {
	XMLName xml.Name `xml:"ListRolesResponse"`
	Roles   []*Role  `xml:"ListRolesResult>Roles>member"`
}

type ListUsersResponse

type ListUsersResponse struct {
	Users []*User `xml:"ListUsersResult>Users>member"`
}

type MFADevice

type MFADevice struct {
	UserName     string `xml:"UserName"`
	SerialNumber string `xml:"SerialNumber"`
}

type Role

type Role struct {
	Path                     string `xml:"Path"`                     ///application_abc/component_xyz/</Path>
	Arn                      string `xml:"Arn"`                      //arn:aws:iam::123456789012:role/application_abc/component_xyz/S3Access</Arn>
	RoleName                 string `xml:"RoleName"`                 //S3Access</RoleName>
	AssumeRolePolicyDocument string `xml:"AssumeRolePolicyDocument"` //{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"Service":["ec2.amazonaws.com"]},"Action":["sts:AssumeRole"]}]}</AssumeRolePolicyDocument>
	CreateDate               string `xml:"CreateDate"`               //2012-05-09T15:45:35Z</CreateDate>
	RoleId                   string `xml:"RoleId"`                   //AROACVSVTSZYEXAMPLEYK</RoleId>
}

type SummaryMap

type SummaryMap struct {
	Entries []*Entry `xml:"entry"`
}

type User

type User struct {
	Path     string `xml:"Path"`
	UserName string `xml:"UserName"`
	UserId   string `xml:"UserId"`
	Arn      string `xml:"Arn"`
}

Source Files

Jump to

Keyboard shortcuts

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