Documentation ¶
Index ¶
- func AssumeRoleWithSession(session *session.Session, rolearn string) *credentials.Credentials
- func Check(flag *CheckFlag)
- func ConnectEC2(session *session.Session, credential *credentials.Credentials, region string, ...) (result *ec2.EC2)
- func ConnectRDS(session *session.Session, credential *credentials.Credentials, region string, ...) (result *rds.RDS)
- func GetEC2InstanceEvents(notifier Notifier, ec2service *ec2.EC2) (results [][]string)
- func GetEC2InstanceStatus(service *ec2.EC2, instance string) (result *ec2.DescribeInstanceStatusOutput, err error)
- func GetEC2Instances(service *ec2.EC2, instance string) (result *ec2.DescribeInstancesOutput, err error)
- func GetRDSPendingMaintenanceActionDetails(notifier Notifier, rdsservice *rds.RDS) (results [][]string)
- func GetRDSPendingMaintenanceActions(service *rds.RDS, instance string) (result *rds.DescribePendingMaintenanceActionsOutput, err error)
- func NotifyEC2Chatwork(chatwork []ChatworkNotifer, ec2events [][]string)
- func NotifyRDSChatwork(chatwork []ChatworkNotifer, rdsactions [][]string)
- func PostChatwork(roomid string, apikey string, body string)
- func Unmarshal(file string) (err error)
- type ChatworkNotifer
- type CheckFlag
- type Config
- type EC2Infomation
- type Notifier
- type RDSInfomation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssumeRoleWithSession ¶
func AssumeRoleWithSession(session *session.Session, rolearn string) *credentials.Credentials
AssumeRoleWithSession gets temporary credentials needed to access other accounts
func ConnectEC2 ¶
func ConnectEC2(session *session.Session, credential *credentials.Credentials, region string, profile string) (result *ec2.EC2)
ConnectEC2 is Connect EC2 Service
func ConnectRDS ¶
func ConnectRDS(session *session.Session, credential *credentials.Credentials, region string, profile string) (result *rds.RDS)
ConnectRDS is Connect RDS Service
func GetEC2InstanceEvents ¶
GetEC2InstanceEvents is get event information from EC2 instance status
func GetEC2InstanceStatus ¶
func GetEC2InstanceStatus(service *ec2.EC2, instance string) (result *ec2.DescribeInstanceStatusOutput, err error)
GetEC2InstanceStatus is get list of instance status
func GetEC2Instances ¶
func GetEC2Instances(service *ec2.EC2, instance string) (result *ec2.DescribeInstancesOutput, err error)
GetEC2Instances is get list of instance infomation
func GetRDSPendingMaintenanceActionDetails ¶
func GetRDSPendingMaintenanceActionDetails(notifier Notifier, rdsservice *rds.RDS) (results [][]string)
GetRDSPendingMaintenanceActionDetails is get maintenance action infomation from RDS pending maintenance actions
func GetRDSPendingMaintenanceActions ¶
func GetRDSPendingMaintenanceActions(service *rds.RDS, instance string) (result *rds.DescribePendingMaintenanceActionsOutput, err error)
GetRDSPendingMaintenanceActions is get list of instance pending maintenance actions
func NotifyEC2Chatwork ¶
func NotifyEC2Chatwork(chatwork []ChatworkNotifer, ec2events [][]string)
NotifyEC2Chatwork is notify EC2 schedule events to chatwork
func NotifyRDSChatwork ¶
func NotifyRDSChatwork(chatwork []ChatworkNotifer, rdsactions [][]string)
NotifyRDSChatwork is notify RDS maintenance actions to chatwork
func PostChatwork ¶
PostChatwork is post chatwork api
Types ¶
type ChatworkNotifer ¶
type ChatworkNotifer struct { Roomid string `mapstructure:"roomid"` Apikey string `mapstructure:"apikey"` To []string `mapstructure:"to"` }
ChatworkNotifer is Notify to Chatwork
type Config ¶
type Config struct {
Notifier []Notifier `mapstructure:"notifier"`
}
Config Unmarshal yaml file
type EC2Infomation ¶
type EC2Infomation struct {
Instances []string `mapstructure:"instances"`
}
EC2Infomation is EC2 instance infomation
type Notifier ¶
type Notifier struct { Notification string `mapstructure:"notification"` Region string `mapstructure:"region"` Profile string `mapstructure:"profile"` Assumerole bool `mapstructure:"assumerole"` Rolearn string `mapstructure:"rolearn"` Chatwork []ChatworkNotifer `mapstructure:"chatwork"` EC2 []EC2Infomation `mapstructure:"ec2"` RDS []RDSInfomation `mapstructure:"rds"` }
Notifier is a notification notifier
type RDSInfomation ¶
type RDSInfomation struct {
Instances []string `mapstructure:"instances"`
}
RDSInfomation is RDS instance infomation