Documentation ¶
Overview ¶
The iam package provides types and functions for interaction with the AWS Identity and Access Management (IAM) service.
Index ¶
- type AccessKey
- type AccessKeysResp
- type CreateAccessKeyResp
- type CreateGroupResp
- type CreateUserResp
- type Error
- type GetUserPolicyResp
- type GetUserResp
- type Group
- type GroupsResp
- type IAM
- func (iam *IAM) AccessKeys(userName string) (*AccessKeysResp, error)
- func (iam *IAM) CreateAccessKey(userName string) (*CreateAccessKeyResp, error)
- func (iam *IAM) CreateGroup(name string, path string) (*CreateGroupResp, error)
- func (iam *IAM) CreateUser(name, path string) (*CreateUserResp, error)
- func (iam *IAM) DeleteAccessKey(id, userName string) (*SimpleResp, error)
- func (iam *IAM) DeleteGroup(name string) (*SimpleResp, error)
- func (iam *IAM) DeleteUser(name string) (*SimpleResp, error)
- func (iam *IAM) DeleteUserPolicy(userName, policyName string) (*SimpleResp, error)
- func (iam *IAM) GetUser(name string) (*GetUserResp, error)
- func (iam *IAM) GetUserPolicy(userName, policyName string) (*GetUserPolicyResp, error)
- func (iam *IAM) Groups(pathPrefix string) (*GroupsResp, error)
- func (iam *IAM) PutUserPolicy(userName, policyName, policyDocument string) (*SimpleResp, error)
- type SimpleResp
- type User
- type UserPolicy
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,omitempty"` Status string }
AccessKey encapsulates an access key generated for a user.
See http://goo.gl/LHgZR for more details.
type AccessKeysResp ¶
type AccessKeysResp struct { RequestId string `xml:"ResponseMetadata>RequestId"` AccessKeys []AccessKey `xml:"ListAccessKeysResult>AccessKeyMetadata>member"` }
Response to AccessKeys request.
See http://goo.gl/Vjozx 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 CreateGroupResp ¶
type CreateGroupResp struct { Group Group `xml:"CreateGroupResult>Group"` RequestId string `xml:"ResponseMetadata>RequestId"` }
Response to a CreateGroup request.
See http://goo.gl/n7NNQ 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.
type GetUserPolicyResp ¶
type GetUserPolicyResp struct { Policy UserPolicy `xml:"GetUserPolicyResult"` RequestId string `xml:"ResponseMetadata>RequestId"` }
Response to a GetUserPolicy request.
See http://goo.gl/BH04O for more details.
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 Group ¶
type Group struct { Arn string Id string `xml:"GroupId"` Name string `xml:"GroupName"` Path string }
Group encapsulates a group managed by IAM.
See http://goo.gl/ae7Vs for more details.
type GroupsResp ¶
type GroupsResp struct { Groups []Group `xml:"ListGroupsResult>Groups>member"` RequestId string `xml:"ResponseMetadata>RequestId"` }
Response to a ListGroups request.
See http://goo.gl/W2TRj for more details.
type IAM ¶
The IAM type encapsulates operations operations with the IAM endpoint.
func (*IAM) AccessKeys ¶
func (iam *IAM) AccessKeys(userName string) (*AccessKeysResp, error)
AccessKeys lists all acccess keys associated with a user.
The userName parameter is optional. If set to "", the userName is determined implicitly based on the AWS Access Key ID used to sign the request.
See http://goo.gl/Vjozx for more details.
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) CreateGroup ¶
func (iam *IAM) CreateGroup(name string, path string) (*CreateGroupResp, error)
CreateGroup creates a new group in IAM.
The path parameter can be used to identify which division or part of the organization the user belongs to.
If path is unset ("") it defaults to "/".
See http://goo.gl/n7NNQ 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) DeleteAccessKey ¶
func (iam *IAM) DeleteAccessKey(id, userName string) (*SimpleResp, error)
DeleteAccessKey deletes an access key from IAM.
The userName parameter is optional. If set to "", the userName is determined implicitly based on the AWS Access Key ID used to sign the request.
See http://goo.gl/hPGhw for more details.
func (*IAM) DeleteGroup ¶
func (iam *IAM) DeleteGroup(name string) (*SimpleResp, error)
DeleteGroup deletes a group from IAM.
See http://goo.gl/d5i2i 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) DeleteUserPolicy ¶
func (iam *IAM) DeleteUserPolicy(userName, policyName string) (*SimpleResp, error)
DeleteUserPolicy deletes a user policy from IAM.
See http://goo.gl/7Jncn 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.
func (*IAM) GetUserPolicy ¶
func (iam *IAM) GetUserPolicy(userName, policyName string) (*GetUserPolicyResp, error)
GetUserPolicy gets a user policy in IAM.
See http://goo.gl/BH04O for more details.
func (*IAM) Groups ¶
func (iam *IAM) Groups(pathPrefix string) (*GroupsResp, error)
Groups list the groups that have the specified path prefix.
The parameter pathPrefix is optional. If pathPrefix is "", all groups are returned.
See http://goo.gl/W2TRj for more details.
func (*IAM) PutUserPolicy ¶
func (iam *IAM) PutUserPolicy(userName, policyName, policyDocument string) (*SimpleResp, error)
PutUserPolicy creates a user policy in IAM.
See http://goo.gl/ldCO8 for more details.
type SimpleResp ¶
type SimpleResp struct {
RequestId string `xml:"ResponseMetadata>RequestId"`
}
type UserPolicy ¶
type UserPolicy struct { Name string `xml:"PolicyName"` UserName string `xml:"UserName"` Document string `xml:"PolicyDocument"` }
UserPolicy encapsulates an IAM group policy.
See http://goo.gl/C7hgS 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. |