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 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 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) DeleteAccessKey(accessKey, userName string) error
- func (c Client) DeleteMaintenanceRule(ruleArn *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) 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) 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)
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 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 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 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) DeleteAccessKey ¶
DeleteAccessKey deletes access key of user
func (Client) DeleteMaintenanceRule ¶
DeleteMaintenanceRule deletes maintenance rule
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) 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