Ejemplo n.º 1
0
// Cancels Spot instance requests for given slice of spotInstanceRequestIds
// Other input parameters can be configured by uncommenting the appropriate portion of the code
func (p *Parameters) CancelSpotInstanceRequests(svc *ec2.EC2, spotInstanceRequestIds []*string) (string, error) {
	paramsForReq := &ec2.CancelSpotInstanceRequestsInput{
		SpotInstanceRequestIds: spotInstanceRequestIds,
		//		DryRun: aws.Bool(true),
	}
	resp, err := svc.CancelSpotInstanceRequests(paramsForReq)

	if err != nil {
		return "", err
	}
	return fmt.Sprintln(resp), nil
}