Documentation ¶
Index ¶
- type IAMPolicyClient
- func (ip *IAMPolicyClient) CreateAssumeRole(policy string, rolename string) (*iam.Role, error)
- func (ip *IAMPolicyClient) CreatePolicyAttachRole(policyname string, policy string, role iam.Role) (policyarn string, err error)
- func (ip *IAMPolicyClient) CreatePolicyFromTemplate(policyName, iamPath, policyTemplate string, resources []string) (string, error)
- func (ip *IAMPolicyClient) CreateUserPolicy(policy string, policyname string, username string) (string, error)
- func (ip *IAMPolicyClient) DeletePolicy(policyARN string) error
- func (ip IAMPolicyClient) UpdateExistingPolicy(policyARN string, policyStatements []PolicyStatementEntry) (*iam.PolicyVersion, error)
- type IAMUserClient
- func (i *IAMUserClient) AttachUserPolicy(userName string, policyARN string) error
- func (i *IAMUserClient) Create(userName, iamPath string) (string, error)
- func (i *IAMUserClient) CreateAccessKey(userName string) (string, string, error)
- func (i *IAMUserClient) Delete(userName string) error
- func (i *IAMUserClient) DeleteAccessKey(userName, accessKeyID string) error
- func (i *IAMUserClient) Describe(userName string) (UserDetails, error)
- func (i *IAMUserClient) DetachUserPolicy(userName string, policyARN string) error
- func (i *IAMUserClient) ListAccessKeys(userName string) ([]string, error)
- func (i *IAMUserClient) ListAttachedUserPolicies(userName, iamPath string) ([]string, error)
- type PolicyDocument
- type PolicyStatementEntry
- type UserDetails
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IAMPolicyClient ¶
type IAMPolicyClient struct {
// contains filtered or unexported fields
}
func NewIAMPolicyClient ¶
func NewIAMPolicyClient(region string, logger lager.Logger) *IAMPolicyClient
func (*IAMPolicyClient) CreateAssumeRole ¶
create new assumable role with the trust policy
func (*IAMPolicyClient) CreatePolicyAttachRole ¶
func (ip *IAMPolicyClient) CreatePolicyAttachRole(policyname string, policy string, role iam.Role) (policyarn string, err error)
create a new policy and attach to a specific role this does not validate the policy
func (*IAMPolicyClient) CreatePolicyFromTemplate ¶
func (ip *IAMPolicyClient) CreatePolicyFromTemplate( policyName, iamPath, policyTemplate string, resources []string, ) (string, error)
func (*IAMPolicyClient) CreateUserPolicy ¶
func (ip *IAMPolicyClient) CreateUserPolicy(policy string, policyname string, username string) (string, error)
create a policy and attach to a user, return the policy ARN the does not validate the policy
func (*IAMPolicyClient) DeletePolicy ¶
func (ip *IAMPolicyClient) DeletePolicy(policyARN string) error
func (IAMPolicyClient) UpdateExistingPolicy ¶
func (ip IAMPolicyClient) UpdateExistingPolicy(policyARN string, policyStatements []PolicyStatementEntry) (*iam.PolicyVersion, error)
update a specific policy by adding new statements and updating the policyversion this does not validate the policy
type IAMUserClient ¶
type IAMUserClient struct {
// contains filtered or unexported fields
}
func NewIAMUserClient ¶
func NewIAMUserClient( iamsvc iamiface.IAMAPI, logger lager.Logger, ) *IAMUserClient
func (*IAMUserClient) AttachUserPolicy ¶
func (i *IAMUserClient) AttachUserPolicy(userName string, policyARN string) error
func (*IAMUserClient) Create ¶
func (i *IAMUserClient) Create(userName, iamPath string) (string, error)
func (*IAMUserClient) CreateAccessKey ¶
func (i *IAMUserClient) CreateAccessKey(userName string) (string, string, error)
func (*IAMUserClient) Delete ¶
func (i *IAMUserClient) Delete(userName string) error
func (*IAMUserClient) DeleteAccessKey ¶
func (i *IAMUserClient) DeleteAccessKey(userName, accessKeyID string) error
func (*IAMUserClient) Describe ¶
func (i *IAMUserClient) Describe(userName string) (UserDetails, error)
func (*IAMUserClient) DetachUserPolicy ¶
func (i *IAMUserClient) DetachUserPolicy(userName string, policyARN string) error
func (*IAMUserClient) ListAccessKeys ¶
func (i *IAMUserClient) ListAccessKeys(userName string) ([]string, error)
func (*IAMUserClient) ListAttachedUserPolicies ¶
func (i *IAMUserClient) ListAttachedUserPolicies(userName, iamPath string) ([]string, error)
type PolicyDocument ¶
type PolicyDocument struct { Version string Statement []PolicyStatementEntry }
func (*PolicyDocument) AddNewStatements ¶
func (pd *PolicyDocument) AddNewStatements(newStatements []PolicyStatementEntry) bool
adds any policy statement entries that dont already exist in the policy doc using string comparison
func (*PolicyDocument) FromString ¶
func (pd *PolicyDocument) FromString(docstring string) error
func (*PolicyDocument) ToString ¶
func (pd *PolicyDocument) ToString() (string, error)
type PolicyStatementEntry ¶
func (*PolicyStatementEntry) ToString ¶
func (ps *PolicyStatementEntry) ToString() (string, error)
type UserDetails ¶
Click to show internal directories.
Click to hide internal directories.