Documentation
¶
Index ¶
- Constants
- func AskMFAToken() (string, error)
- func GenerateCreds(assumeRole, name string) *credentials.Credentials
- func GetASGClientFn(sess client.ConfigProvider, region string, creds *credentials.Credentials) *autoscaling.AutoScaling
- func GetAwsSession() *session.Session
- func GetAwsSessionWithConfig(region string) (*session.Session, error)
- func GetDBAuthToken(target, region, user string, creds *credentials.Credentials) (string, error)
- func GetEC2ClientFn(sess client.ConfigProvider, region string, creds *credentials.Credentials) *ec2.EC2
- func GetELBClientFn(sess client.ConfigProvider, region string, creds *credentials.Credentials) *elbv2.ELBV2
- func GetEcrClientFn(sess client.ConfigProvider, region string, creds *credentials.Credentials) *ecr.ECR
- func GetIAMClientFn(sess client.ConfigProvider, creds *credentials.Credentials) *iam.IAM
- func GetRDSClientFn(sess client.ConfigProvider, region string, creds *credentials.Credentials) *rds.RDS
- func GetS3ClientFn(sess client.ConfigProvider, region string, creds *credentials.Credentials) *s3.S3
- func GetSSMClientFn(sess client.ConfigProvider, region string, creds *credentials.Credentials) *ssm.SSM
- func GetSTSClientFn(sess client.ConfigProvider, region string, creds *credentials.Credentials) *sts.STS
- func GetWafClientFn(sess client.ConfigProvider, region string, creds *credentials.Credentials) *waf.WAF
- func ParseWebACLID(str string) string
- func SelectTarget(opt []string) (string, error)
- type Client
- func (c Client) CheckAccessKeyExpired(name, accessKeyID string) error
- func (c Client) CheckMFAToken(name string) error
- func (c Client) CheckWhoIam(out io.Writer) error
- func (c Client) CreateMaintenanceRule(listenerArn *string, message string) error
- func (c Client) CreateNewCredentials(name string) (*iam.AccessKey, error)
- func (c *Client) CreateSession(input *ssm.StartSessionInput) (*ssm.StartSessionOutput, string, error)
- func (c Client) DeleteAccessKey(accessKey, userName string) error
- func (c Client) DeleteMaintenanceRule(ruleArn *string) error
- func (c *Client) DeleteSession(sessionID string) error
- func (c Client) DescribeListeners(loadbalancerArn string) ([]*elbv2.Listener, error)
- func (c Client) DescribeRule(ruleID string) (*waf.Rule, error)
- func (c Client) DescribeRules(listenerArn *string) ([]*elbv2.Rule, error)
- func (c Client) DescribeWebACL(target string) (*schema.WebACL, error)
- func (c Client) GetAccessKeyList(name string) ([]*iam.AccessKeyMetadata, error)
- func (c Client) GetAllWebACLs() ([]*waf.WebACLSummary, error)
- func (c Client) GetAuthorizeToken() (*ecr.AuthorizationData, error)
- func (c Client) GetExactASGNames(asgName string) ([]*string, error)
- func (c Client) GetIPSet(dataID string) (*waf.IPSet, error)
- func (c *Client) GetInstanceIds(instanceList []*ec2.Instance) ([]string, error)
- func (c *Client) GetInstanceList(ret []*ec2.Instance, nextToken *string) ([]*ec2.Instance, error)
- func (c *Client) GetInstanceListOnlyIds(ret []string, nextToken *string) ([]string, error)
- func (c Client) GetListGroupForUser(out io.Writer, userName string) error
- func (c Client) GetListPolicyAttachedGroup(out io.Writer, userName string) error
- func (c Client) GetListRoleArn(out io.Writer, userName string) error
- func (c Client) GetLoadtestASGStatus(asgName *string) (*int64, error)
- func (c Client) GetLoadtestRDSStatus(dbClusterID string) (*string, error)
- func (c Client) GetSessionToken(mfaSerialNumber, mfaToken string) error
- func (c Client) GetWebACLInfo(target string) (*waf.WebACL, error)
- func (c Client) HeadS3Bucket(bucket string) error
- func (c Client) SelectACL() (string, error)
- func (c *Client) SendCommand(input *ssm.SendCommandInput) (*ssm.SendCommandOutput, error)
- func (c Client) StartLoadtestASG(asgName *string) error
- func (c Client) StartLoadtestRDS(dbClusterID string) (*string, error)
- func (c Client) StopLoadtestASG(asgName *string) error
- func (c Client) StopLoadtestRDS(dbClusterID string) (*string, error)
- type PolicyDocument
- type StatementEntry
Constants ¶
const PORT = 3310
Variables ¶
This section is empty.
Functions ¶
func AskMFAToken ¶
AskMFAToken gets MFA token from command line interface
func GenerateCreds ¶
func GenerateCreds(assumeRole, name string) *credentials.Credentials
GenerateCreds creates new credentials with MFA
func GetASGClientFn ¶
func GetASGClientFn(sess client.ConfigProvider, region string, creds *credentials.Credentials) *autoscaling.AutoScaling
func GetAwsSession ¶
GetAwsSession creates new session for AWS
func GetAwsSessionWithConfig ¶
GetAwsSessionWithConfig creates new session for AWS
func GetDBAuthToken ¶
func GetDBAuthToken(target, region, user string, creds *credentials.Credentials) (string, error)
Get DB Auth token
func GetEC2ClientFn ¶
func GetEC2ClientFn(sess client.ConfigProvider, region string, creds *credentials.Credentials) *ec2.EC2
func GetELBClientFn ¶
func GetELBClientFn(sess client.ConfigProvider, region string, creds *credentials.Credentials) *elbv2.ELBV2
func GetEcrClientFn ¶
func GetEcrClientFn(sess client.ConfigProvider, region string, creds *credentials.Credentials) *ecr.ECR
func GetIAMClientFn ¶
func GetIAMClientFn(sess client.ConfigProvider, creds *credentials.Credentials) *iam.IAM
func GetRDSClientFn ¶
func GetRDSClientFn(sess client.ConfigProvider, region string, creds *credentials.Credentials) *rds.RDS
func GetS3ClientFn ¶
func GetS3ClientFn(sess client.ConfigProvider, region string, creds *credentials.Credentials) *s3.S3
func GetSSMClientFn ¶
func GetSSMClientFn(sess client.ConfigProvider, region string, creds *credentials.Credentials) *ssm.SSM
func GetSTSClientFn ¶
func GetSTSClientFn(sess client.ConfigProvider, region string, creds *credentials.Credentials) *sts.STS
func GetWafClientFn ¶
func GetWafClientFn(sess client.ConfigProvider, region string, creds *credentials.Credentials) *waf.WAF
func ParseWebACLID ¶
ParseWebACLID parses web ACL ID from option string
func SelectTarget ¶
SelectTarget select only one target from candidates
Types ¶
type Client ¶
type Client struct { RDSClient *rds.RDS STSClient *sts.STS S3Client *s3.S3 WafClient *waf.WAF ECRClient *ecr.ECR IAMClient *iam.IAM ELBClient *elbv2.ELBV2 EC2Client *ec2.EC2 SSMClient *ssm.SSM ASGClient *autoscaling.AutoScaling Region string }
func NewClient ¶
func NewClient(sess client.ConfigProvider, region string, creds *credentials.Credentials) Client
func (Client) CheckAccessKeyExpired ¶
CheckAccessKeyExpired check whether access key is expired or not
func (Client) CheckMFAToken ¶
CheckMFAToken checks MFA authentication for specific functions
func (Client) CheckWhoIam ¶
CheckWhoIam calls get-caller-identity and print the result
func (Client) CreateMaintenanceRule ¶
CreateMaintenanceRule creates maintenance rule
func (Client) CreateNewCredentials ¶
CreateNewCredentials creates new ACCESS_KEY, SECRET_ACCESS_KEY
func (*Client) CreateSession ¶
func (c *Client) CreateSession(input *ssm.StartSessionInput) (*ssm.StartSessionOutput, string, error)
Create start session
func (Client) DeleteAccessKey ¶
DeleteAccessKey deletes access key of user
func (Client) DeleteMaintenanceRule ¶
DeleteMaintenanceRule deletes maintenance rule
func (*Client) DeleteSession ¶
Delete Session
func (Client) DescribeListeners ¶
func (Client) DescribeRule ¶
DescribeRule describes web ACL rule
func (Client) DescribeRules ¶
DescribeRules describes list of rules in listener
func (Client) DescribeWebACL ¶
DescribeWebACL describes web acl
func (Client) GetAccessKeyList ¶
func (c Client) GetAccessKeyList(name string) ([]*iam.AccessKeyMetadata, error)
GetAccessKeyList lists all access key of user
func (Client) GetAllWebACLs ¶
func (c Client) GetAllWebACLs() ([]*waf.WebACLSummary, error)
GetAllWebACLs retrieves all ACLs in AWS WAF
func (Client) GetAuthorizeToken ¶
func (c Client) GetAuthorizeToken() (*ecr.AuthorizationData, error)
GetAuthorizeToken retrieves authorize token via API
func (Client) GetExactASGNames ¶
func (*Client) GetInstanceIds ¶
GetInstanceIds retrieves only ids from list
func (*Client) GetInstanceList ¶
GetInstanceList returns list of instances
func (*Client) GetInstanceListOnlyIds ¶
GetInstanceListOnlyIds retrieves only ids from list
func (Client) GetListGroupForUser ¶
GetListGroupForUser lists all group of user
func (Client) GetListPolicyAttachedGroup ¶
GetListPolicyAttachedGroup all group of user
func (Client) GetLoadtestASGStatus ¶
func (Client) GetLoadtestRDSStatus ¶
func (Client) GetSessionToken ¶
getSessionToken retrieves session token with MFA authentication
func (Client) GetWebACLInfo ¶
GetWebACLInfo retrieves web acl information
func (Client) HeadS3Bucket ¶
HeadS3Bucket checks if s3 bucket exists or not
func (*Client) SendCommand ¶
func (c *Client) SendCommand(input *ssm.SendCommandInput) (*ssm.SendCommandOutput, error)
func (Client) StartLoadtestASG ¶
func (Client) StartLoadtestRDS ¶
func (Client) StopLoadtestASG ¶
type PolicyDocument ¶
type PolicyDocument struct { Version string Statement []StatementEntry }