Documentation
¶
Index ¶
- Constants
- type EKS
- type EKSIface
- type IAM
- func (i *IAM) AddPermissionBoundary(ctx context.Context, req IAMRoleRequest) error
- func (i *IAM) AttachInlineRolePolicy(ctx context.Context, req IAMRoleRequest) (*IAMRoleResponse, error)
- func (i *IAM) AttachManagedRolePolicy(ctx context.Context, policyArn string, roleName string) error
- func (i *IAM) CreateOIDCProvider(ctx context.Context, url string, aud string, certThumpPrint string) error
- func (i *IAM) CreateRole(ctx context.Context, req IAMRoleRequest) (*IAMRoleResponse, error)
- func (i *IAM) DeleteInlinePolicy(ctx context.Context, policyName string, roleName string) error
- func (i *IAM) DeleteRole(ctx context.Context, roleName string) error
- func (i *IAM) DetachRolePolicy(ctx context.Context, policyArn string, roleName string) error
- func (i *IAM) GetRole(ctx context.Context, req IAMRoleRequest) (*iam.GetRoleOutput, error)
- func (i *IAM) GetRolePolicy(ctx context.Context, req IAMRoleRequest) (*string, error)
- func (i *IAM) TagRole(ctx context.Context, req IAMRoleRequest) (*IAMRoleResponse, error)
- func (i *IAM) UpdateRole(ctx context.Context, req IAMRoleRequest) (*IAMRoleResponse, error)
- func (i *IAM) VerifyTags(ctx context.Context, req IAMRoleRequest) (*IAMRoleResponse, error)
- type IAMIface
- type IAMRoleRequest
- type IAMRoleResponse
- type STS
- type STSIface
Constants ¶
View Source
const (
RoleAlreadyExistsError = "Please choose a different name"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EKS ¶
func (*EKS) DescribeCluster ¶
func (e *EKS) DescribeCluster(ctx context.Context, clusterName string) (*eks.DescribeClusterOutput, error)
DescribeCluster function provides cluster info
type IAM ¶
func (*IAM) AddPermissionBoundary ¶
func (i *IAM) AddPermissionBoundary(ctx context.Context, req IAMRoleRequest) error
AddPermissionBoundary adds permission boundary to the existing roles
func (*IAM) AttachInlineRolePolicy ¶
func (i *IAM) AttachInlineRolePolicy(ctx context.Context, req IAMRoleRequest) (*IAMRoleResponse, error)
AttachInlineRolePolicy function attaches inline policy to the role
func (*IAM) AttachManagedRolePolicy ¶
AttachManagedRolePolicy function attaches managed policy to the role
func (*IAM) CreateOIDCProvider ¶
func (i *IAM) CreateOIDCProvider(ctx context.Context, url string, aud string, certThumpPrint string) error
CreateOIDCProvider creates OIDC IDP provider with AWS IAM
func (*IAM) CreateRole ¶
func (i *IAM) CreateRole(ctx context.Context, req IAMRoleRequest) (*IAMRoleResponse, error)
CreateRole creates/updates the role
func (*IAM) DeleteInlinePolicy ¶
DeleteInlinePolicy function deletes inline policy
func (*IAM) DeleteRole ¶
DeleteRole function deletes the role in the account
func (*IAM) DetachRolePolicy ¶
DetachRolePolicy detaches a policy from role
func (*IAM) GetRole ¶
func (i *IAM) GetRole(ctx context.Context, req IAMRoleRequest) (*iam.GetRoleOutput, error)
GetRole gets the role from aws iam
func (*IAM) GetRolePolicy ¶
GetRolePolicy gets the role from aws iam
func (*IAM) TagRole ¶
func (i *IAM) TagRole(ctx context.Context, req IAMRoleRequest) (*IAMRoleResponse, error)
TagRole tags role with appropriate tags
func (*IAM) UpdateRole ¶
func (i *IAM) UpdateRole(ctx context.Context, req IAMRoleRequest) (*IAMRoleResponse, error)
UpdateRole updates role
func (*IAM) VerifyTags ¶
func (i *IAM) VerifyTags(ctx context.Context, req IAMRoleRequest) (*IAMRoleResponse, error)
VerifyTags function verifies the tags attached to the role
type IAMIface ¶
type IAMIface interface { CreateRole(ctx context.Context, req IAMRoleRequest) UpdateRole(ctx context.Context, req IAMRoleRequest) DeleteRole(ctx context.Context, roleName string) AttachInlineRolePolicy(ctx context.Context, req IAMRoleRequest) AddPermissionBoundary(ctx context.Context, req IAMRoleRequest) error GetRolePolicy(ctx context.Context, req IAMRoleRequest) bool }
IAMIface defines interface methods
type IAMRoleRequest ¶
type IAMRoleRequest struct { Name string PolicyName string Description string SessionDuration int64 TrustPolicy string PermissionPolicy string ManagedPermissionBoundaryPolicy string ManagedPolicies []string Tags map[string]string }
IAMRoleRequest struct