iam

package
v0.0.0-...-7c95964 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2013 License: LGPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

The iam package provides types and functions for interaction with the AWS Identity and Access Management (IAM) service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessKey

type AccessKey struct {
	UserName string
	Id       string `xml:"AccessKeyId"`
	Secret   string `xml:"SecretAccessKey"`
	Status   string
}

AccessKey encapsulates an access key generated for a user.

See http://goo.gl/LHgZR for more details.

type CreateAccessKeyResp

type CreateAccessKeyResp struct {
	RequestId string    `xml:"ResponseMetadata>RequestId"`
	AccessKey AccessKey `xml:"CreateAccessKeyResult>AccessKey"`
}

Response to a CreateAccessKey request.

See http://goo.gl/L46Py for more details.

type CreateUserResp

type CreateUserResp struct {
	RequestId string `xml:"ResponseMetadata>RequestId"`
	User      User   `xml:"CreateUserResult>User"`
}

Response to a CreateUser request.

See http://goo.gl/JS9Gz for more details.

type Error

type Error struct {
	// HTTP status code of the error.
	StatusCode int

	// AWS code of the error.
	Code string

	// Message explaining the error.
	Message string
}

Error encapsulates an IAM error.

func (*Error) Error

func (e *Error) Error() string

type GetUserResp

type GetUserResp struct {
	RequestId string `xml:"ResponseMetadata>RequestId"`
	User      User   `xml:"GetUserResult>User"`
}

Response for GetUser requests.

See http://goo.gl/ZnzRN for more details.

type IAM

type IAM struct {
	aws.Auth
	aws.Region
}

The IAM type encapsulates operations operations with the IAM endpoint.

func New

func New(auth aws.Auth, region aws.Region) *IAM

New creates a new IAM instance.

func (*IAM) CreateAccessKey

func (iam *IAM) CreateAccessKey(userName string) (*CreateAccessKeyResp, error)

CreateAccessKey creates a new access key in IAM.

See http://goo.gl/L46Py for more details.

func (*IAM) CreateUser

func (iam *IAM) CreateUser(name, path string) (*CreateUserResp, error)

CreateUser creates a new user in IAM.

See http://goo.gl/JS9Gz for more details.

func (*IAM) DeleteUser

func (iam *IAM) DeleteUser(name string) (*SimpleResp, error)

DeleteUser deletes a user from IAM.

See http://goo.gl/jBuCG for more details.

func (*IAM) GetUser

func (iam *IAM) GetUser(name string) (*GetUserResp, error)

GetUser gets a user from IAM.

See http://goo.gl/ZnzRN for more details.

type SimpleResp

type SimpleResp struct {
	RequestId string `xml:"ResponseMetadata>RequestId"`
}

type User

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

User encapsulates a user managed by IAM.

See http://goo.gl/BwIQ3 for more details.

Directories

Path Synopsis
Package iamtest implements a fake IAM provider with the capability of inducing errors on any given operation, and retrospectively determining what operations have been carried out.
Package iamtest implements a fake IAM provider with the capability of inducing errors on any given operation, and retrospectively determining what operations have been carried out.

Jump to

Keyboard shortcuts

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