Documentation ¶
Index ¶
- func Client(session client.ConfigProvider) *iam.IAM
- func FriendlyNamefromARN(arn awsarn.ARN) string
- type AccessKey
- type AttachmentType
- type GroupInstance
- func (g *GroupInstance) ARN() awsarn.ARN
- func (g *GroupInstance) AddUser(svc iamiface.IAMAPI, userArn awsarn.ARN) error
- func (g *GroupInstance) Create(svc iamiface.IAMAPI) error
- func (g *GroupInstance) Delete(svc iamiface.IAMAPI) error
- func (g *GroupInstance) IsCreated(svc iamiface.IAMAPI) bool
- func (g *GroupInstance) RemoveUser(svc iamiface.IAMAPI, userArn awsarn.ARN) error
- func (g *GroupInstance) Update(svc iamiface.IAMAPI) error
- type LoginProfileCredentials
- type PolicyAttachmentInstance
- func (pa *PolicyAttachmentInstance) ARN() awsarn.ARN
- func (pa *PolicyAttachmentInstance) Create(svc iamiface.IAMAPI) error
- func (pa *PolicyAttachmentInstance) Delete(svc iamiface.IAMAPI) error
- func (pa *PolicyAttachmentInstance) IsCreated(svc iamiface.IAMAPI) bool
- func (pa *PolicyAttachmentInstance) Update(svc iamiface.IAMAPI) error
- type PolicyDocument
- type PolicyInstance
- type PolicyVersion
- type RoleInstance
- type StatementEntry
- type UserInstance
- func (u *UserInstance) ARN() awsarn.ARN
- func (u *UserInstance) AccessKey() *AccessKey
- func (u *UserInstance) Create(svc iamiface.IAMAPI) error
- func (u *UserInstance) Delete(svc iamiface.IAMAPI) error
- func (u *UserInstance) IsCreated(svc iamiface.IAMAPI) bool
- func (u *UserInstance) LoginProfileCredentials() *LoginProfileCredentials
- func (u *UserInstance) Update(svc iamiface.IAMAPI) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FriendlyNamefromARN ¶
Types ¶
type AccessKey ¶
type AccessKey struct {
// contains filtered or unexported fields
}
func NewAccessKey ¶
type AttachmentType ¶
type AttachmentType string
const ( RoleAttachmentType AttachmentType = "role" UserAttachmentType AttachmentType = "user" GroupAttachmentType AttachmentType = "group" ErrAttachmentTypeUnknown aws.ErrorCode = "AttachmentType is unknown" )
type GroupInstance ¶
type GroupInstance struct { Name string // contains filtered or unexported fields }
func NewExistingGroupInstance ¶
func NewExistingGroupInstance(name string, arn awsarn.ARN) *GroupInstance
func NewGroupInstance ¶
func NewGroupInstance(name string) *GroupInstance
func (*GroupInstance) ARN ¶
func (g *GroupInstance) ARN() awsarn.ARN
func (*GroupInstance) Create ¶
func (g *GroupInstance) Create(svc iamiface.IAMAPI) error
Reconcile creates or updates an AWS Group
func (*GroupInstance) RemoveUser ¶
type LoginProfileCredentials ¶
type LoginProfileCredentials struct {
// contains filtered or unexported fields
}
func NewLoginProfileCredentials ¶
func NewLoginProfileCredentials(user string, pass string) *LoginProfileCredentials
func (*LoginProfileCredentials) Password ¶
func (lpc *LoginProfileCredentials) Password() string
func (*LoginProfileCredentials) Username ¶
func (lpc *LoginProfileCredentials) Username() string
type PolicyAttachmentInstance ¶
type PolicyAttachmentInstance struct { PolicyRef awsarn.ARN Type AttachmentType TargetRef awsarn.ARN }
func NewPolicyAttachmentInstance ¶
func NewPolicyAttachmentInstance(policyRef awsarn.ARN, attType AttachmentType, ref awsarn.ARN) *PolicyAttachmentInstance
func (*PolicyAttachmentInstance) ARN ¶
func (pa *PolicyAttachmentInstance) ARN() awsarn.ARN
Returns the target ARN when created
func (*PolicyAttachmentInstance) Create ¶
func (pa *PolicyAttachmentInstance) Create(svc iamiface.IAMAPI) error
Create attaches the referenced policy on referenced target type
func (*PolicyAttachmentInstance) Delete ¶
func (pa *PolicyAttachmentInstance) Delete(svc iamiface.IAMAPI) error
Delete removes the referenced Policy from referenced target type
type PolicyDocument ¶
type PolicyDocument struct { Version PolicyVersion `json:"Version,omitempty"` Statement []StatementEntry `json:"Statement,omitempty"` }
type PolicyInstance ¶
type PolicyInstance struct { Name string Description string PolicyDocument PolicyDocument // contains filtered or unexported fields }
func NewExistingPolicyInstance ¶
func NewExistingPolicyInstance(name, description string, policyDoc PolicyDocument, arn awsarn.ARN) *PolicyInstance
func NewPolicyInstance ¶
func NewPolicyInstance(name, description string, policyDoc PolicyDocument) *PolicyInstance
func (*PolicyInstance) ARN ¶
func (p *PolicyInstance) ARN() awsarn.ARN
func (*PolicyInstance) Create ¶
func (p *PolicyInstance) Create(svc iamiface.IAMAPI) error
Create attaches the referenced policy on referenced target type and returns the target ARN
type PolicyVersion ¶
type PolicyVersion string
const PolicyVersion20121017 PolicyVersion = "2012-10-17"
type RoleInstance ¶
type RoleInstance struct { Name string Description string PolicyDocument PolicyDocument MaxSessionDuration int64 // contains filtered or unexported fields }
func NewExistingRoleInstance ¶
func NewExistingRoleInstance(name string, description string, sessionDuration int64, poldoc PolicyDocument, arn awsarn.ARN) *RoleInstance
func NewRoleInstance ¶
func NewRoleInstance(name string, description string, sessionDuration int64, poldoc PolicyDocument) *RoleInstance
func (*RoleInstance) ARN ¶
func (r *RoleInstance) ARN() awsarn.ARN
type StatementEntry ¶
type StatementEntry struct { Sid string `json:"Sid,omitempty"` Effect string `json:"Effect,omitempty"` Principal map[string]string `json:"Principal,omitempty"` Action []string `json:"Action,omitempty"` Resource []string `json:"Resource,omitempty"` Condition map[string]map[string][]string `json:"Condition,omitempty"` }
type UserInstance ¶
type UserInstance struct { Name string LoginProfile bool ProgrammaticAccess bool // contains filtered or unexported fields }
func NewExistingUserInstance ¶
func NewExistingUserInstance(name string, loginProfile, existingLoginProfile, programmaticAccess, existingAccessKey bool, arn awsarn.ARN) *UserInstance
func NewUserInstance ¶
func NewUserInstance(name string, loginProfile, programmaticAccess bool) *UserInstance
func (*UserInstance) ARN ¶
func (u *UserInstance) ARN() awsarn.ARN
func (*UserInstance) AccessKey ¶
func (u *UserInstance) AccessKey() *AccessKey
func (*UserInstance) Create ¶
func (u *UserInstance) Create(svc iamiface.IAMAPI) error
Create creates an AWS User
func (*UserInstance) LoginProfileCredentials ¶
func (u *UserInstance) LoginProfileCredentials() *LoginProfileCredentials
Click to show internal directories.
Click to hide internal directories.