Documentation
¶
Index ¶
- type CreateRoleWithPolicyInput
- type CreateRoleWithPolicyOutput
- type DestroyRoleWithPolicyInput
- type DestroyRoleWithPolicyOutput
- type IAMPolicyManager
- type IAMRoleManager
- func (rm *IAMRoleManager) CreateRoleWithPolicy(input *CreateRoleWithPolicyInput) (*CreateRoleWithPolicyOutput, error)
- func (rm *IAMRoleManager) DestroyRoleWithPolicy(input *DestroyRoleWithPolicyInput) (*DestroyRoleWithPolicyOutput, *errors2.MultiError)
- func (rm *IAMRoleManager) SetIAMClient(iamClient awsiface.IAM)
- type MergePolicyInput
- type Policy
- type PolicyManager
- type RoleManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateRoleWithPolicyInput ¶
type CreateRoleWithPolicyInput struct {
RoleName string
RoleDescription string
AssumeRolePolicyDocument string
MaxSessionDuration int64
PolicyName string
PolicyDocument string
PolicyDescription string
Tags []*iam.Tag
// If false, method will fail if the role/policy/attachment already exists.
// If true, these errors will be logged and ignored
IgnoreAlreadyExistsErrors bool
}
type CreateRoleWithPolicyOutput ¶
type CreateRoleWithPolicyOutput struct {
RoleName string
RoleArn string
PolicyName string
PolicyArn string
}
CreateRoleWithPolicyOutput - Output of the CreateRoleWithPolicy func
type IAMPolicyManager ¶
IAMPolicyManager has the interface to the AWS Session
func (*IAMPolicyManager) DeletePolicyVersion ¶
func (rm *IAMPolicyManager) DeletePolicyVersion(arn string, versionID string) error
DeletePolicyVersion delete a version of a template
func (*IAMPolicyManager) MergePolicy ¶
func (rm *IAMPolicyManager) MergePolicy(input *MergePolicyInput) error
MergePolicy creates or updates the policy
func (*IAMPolicyManager) PrunePolicyVersions ¶
func (rm *IAMPolicyManager) PrunePolicyVersions(arn string) error
PrunePolicyVersions to prune the oldest version if at 5 versions
func (*IAMPolicyManager) SetIAMClient ¶
func (rm *IAMPolicyManager) SetIAMClient(iamClient awsiface.IAM)
SetIAMClient allows consumer to set IAM session in IAMRoleManager stuct
type IAMRoleManager ¶
func (*IAMRoleManager) CreateRoleWithPolicy ¶
func (rm *IAMRoleManager) CreateRoleWithPolicy(input *CreateRoleWithPolicyInput) (*CreateRoleWithPolicyOutput, error)
CreateRoleWithPolicy - Create a Role, and attach a policy to it
func (*IAMRoleManager) DestroyRoleWithPolicy ¶
func (rm *IAMRoleManager) DestroyRoleWithPolicy(input *DestroyRoleWithPolicyInput) (*DestroyRoleWithPolicyOutput, *errors2.MultiError)
func (*IAMRoleManager) SetIAMClient ¶
func (rm *IAMRoleManager) SetIAMClient(iamClient awsiface.IAM)
SetSession allows consumer to set IAM session in IAMRoleManager stuct
type MergePolicyInput ¶
type MergePolicyInput struct {
PolicyArn arn.ARN
PolicyName string
PolicyDocument string
PolicyDescription string
}
MergePolicyInput defines what we need to create and upate a policy
type PolicyManager ¶
type PolicyManager interface {
MergePolicy(input *MergePolicyInput) error
SetIAMClient(iamClient awsiface.IAM)
PrunePolicyVersions(arn string) error
DeletePolicyVersion(arn string, versionID string) error
}
PolicyManager updates and manages policy versions
type RoleManager ¶
type RoleManager interface {
CreateRoleWithPolicy(input *CreateRoleWithPolicyInput) (*CreateRoleWithPolicyOutput, error)
SetIAMClient(iamClient awsiface.IAM)
DestroyRoleWithPolicy(input *DestroyRoleWithPolicyInput) (*DestroyRoleWithPolicyOutput, *errors2.MultiError)
}
Click to show internal directories.
Click to hide internal directories.