Documentation ¶
Index ¶
- func ErrCode(msg string, err error) error
- func PolicyDeepEqual(p1, p2 PolicyDocument) bool
- type Condition
- type ConditionStatement
- type IAM
- func (i *IAM) AddUserToGroup(ctx context.Context, userName, groupName string) error
- func (i *IAM) AttachGroupPolicy(ctx context.Context, groupName, policyArn string) error
- func (i *IAM) CreateAccessKey(ctx context.Context, name string) (*iam.AccessKey, error)
- func (i *IAM) CreateGroup(ctx context.Context, name, path string) (*iam.Group, error)
- func (i *IAM) CreatePolicy(ctx context.Context, name, path, policyDoc string) (*iam.Policy, error)
- func (i *IAM) CreateUser(ctx context.Context, name, path string, tags []*iam.Tag) (*iam.User, error)
- func (i *IAM) DeleteAccessKey(ctx context.Context, name, keyId string) error
- func (i *IAM) DeleteUser(ctx context.Context, name string) error
- func (i *IAM) GetDefaultPolicyVersion(ctx context.Context, arn, version string) (*iam.PolicyVersion, error)
- func (i *IAM) GetGroupWithPath(ctx context.Context, name, path string) (*iam.Group, error)
- func (i *IAM) GetPolicyByName(ctx context.Context, name, path string) (*iam.Policy, error)
- func (i *IAM) GetUserWithPath(ctx context.Context, path, name string) (*iam.User, error)
- func (i *IAM) ListAccessKeys(ctx context.Context, name string) ([]*iam.AccessKeyMetadata, error)
- func (i *IAM) ListAttachedGroupPolicies(ctx context.Context, groupName, path string) ([]string, error)
- func (i *IAM) ListGroupsForUser(ctx context.Context, name string) ([]string, error)
- func (i *IAM) ListUsers(ctx context.Context, path string) ([]string, error)
- func (i *IAM) RemoveUserFromGroup(ctx context.Context, userName, groupName string) error
- func (i *IAM) TagUser(ctx context.Context, name string, tags []*iam.Tag) error
- func (i *IAM) UpdatePolicy(ctx context.Context, arn, policyDoc string) error
- func (i *IAM) WaitForPolicy(ctx context.Context, policyArn string) error
- func (i *IAM) WaitForUser(ctx context.Context, name string) error
- type IAMOption
- type PolicyDocument
- type Principal
- type StatementEntry
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PolicyDeepEqual ¶ added in v0.4.1
func PolicyDeepEqual(p1, p2 PolicyDocument) bool
Types ¶
type Condition ¶
type Condition map[string]ConditionStatement
type ConditionStatement ¶
func (ConditionStatement) Equal ¶ added in v0.4.1
func (c ConditionStatement) Equal(c1 ConditionStatement) bool
type IAM ¶ added in v0.2.0
func (*IAM) AddUserToGroup ¶ added in v0.2.0
AddUserToGroup adds an existing user to an existing group
func (*IAM) AttachGroupPolicy ¶ added in v0.2.0
func (*IAM) CreateAccessKey ¶ added in v0.3.0
func (*IAM) CreateGroup ¶ added in v0.2.0
CreateGroup handles creating an IAM group
func (*IAM) CreatePolicy ¶ added in v0.2.0
func (*IAM) CreateUser ¶ added in v0.2.0
func (*IAM) DeleteAccessKey ¶ added in v0.3.0
func (*IAM) DeleteUser ¶ added in v0.2.0
func (*IAM) GetDefaultPolicyVersion ¶ added in v0.2.0
func (*IAM) GetGroupWithPath ¶ added in v0.2.0
GetGroup gets the details of an IAM group
func (*IAM) GetPolicyByName ¶ added in v0.2.0
func (*IAM) GetUserWithPath ¶ added in v0.2.0
GetUserWithPath gets details about a user and returns an error if the path doesn't match
func (*IAM) ListAccessKeys ¶ added in v0.2.0
func (*IAM) ListAttachedGroupPolicies ¶ added in v0.2.0
func (*IAM) ListGroupsForUser ¶ added in v0.2.0
func (*IAM) ListUsers ¶ added in v0.2.0
ListUsers lists all of the users in a path prefix, "/" by default
func (*IAM) RemoveUserFromGroup ¶ added in v0.2.0
RemoveUserFromGroup removes a user from a group
func (*IAM) UpdatePolicy ¶ added in v0.2.0
func (*IAM) WaitForPolicy ¶ added in v0.2.0
type IAMOption ¶ added in v0.2.0
type IAMOption func(*IAM)
func WithCredentials ¶ added in v0.2.0
func WithSession ¶ added in v0.2.0
type PolicyDocument ¶
type PolicyDocument struct { // 2012-10-17 or 2008-10-17 old policies, do NOT use this for new policies Version string `json:"Version"` Id string `json:"Id,omitempty"` Statement []StatementEntry `json:"Statement"` }
type StatementEntry ¶
type StatementEntry struct { Sid string `json:"Sid,omitempty"` // statement ID, service specific Effect string `json:"Effect"` // Allow or Deny Principal Principal `json:"Principal,omitempty"` // principal that is allowed or denied NotPrincipal Principal `json:"NotPrincipal,omitempty"` // exception to a list of principals Action Value `json:"Action"` // allowed or denied action NotAction Value `json:"NotAction,omitempty"` // matches everything except Resource Value `json:"Resource,omitempty"` // object or objects that the statement covers NotResource Value `json:"NotResource,omitempty"` // matches everything except Condition Condition `json:"Condition,omitempty"` // conditions for when a policy is in effect }
type Value ¶ added in v0.4.1
type Value []string
func (*Value) UnmarshalJSON ¶ added in v0.4.1
UnmarshalJSON unmarshalls IAM values, converting everything to []string to avoid casting
Click to show internal directories.
Click to hide internal directories.