Esempio n. 1
0
// NewEC2Client creates an instance of ec2Client object.
func NewEC2Client(params *config.CliParams) EC2Client {
	client := ec2.New(session.New(params.Config))
	client.Handlers.Build.PushBackNamed(clients.CustomUserAgentHandler())
	return &ec2Client{
		client: client,
	}
}
Esempio n. 2
0
// Initialize initializes all the fields of the cloudFormationClient object.
func (c *cloudformationClient) Initialize(params *config.CliParams) {
	cfnClient := cloudformation.New(params.Config)
	cfnClient.Handlers.Build.PushBackNamed(clients.CustomUserAgentHandler())
	c.client = cfnClient
	c.cliParams = params
	c.sleeper = &utils.TimeSleeper{}
}
Esempio n. 3
0
func (c *ecsClient) Initialize(params *config.CliParams) {
	client := ecs.New(params.Config)
	client.Handlers.Build.PushBackNamed(clients.CustomUserAgentHandler())
	c.client = client
	c.params = params
}