Exemple #1
0
// New creates a new ProductAdvertising client
func New(auth aws.Auth, associateTag string) (p *ProductAdvertising, err error) {
	serviceInfo := aws.ServiceInfo{Endpoint: "https://webservices.amazon.com", Signer: aws.V2Signature}
	if service, err := aws.NewService(auth, serviceInfo); err == nil {
		p = &ProductAdvertising{*service, associateTag}
	}
	return
}
Exemple #2
0
// Create a new CloudWatch object for a given namespace
func NewCloudWatch(auth aws.Auth, region aws.ServiceInfo) (*CloudWatch, error) {
	service, err := aws.NewService(auth, region)
	if err != nil {
		return nil, err
	}
	return &CloudWatch{
		Service: service,
	}, nil
}
Exemple #3
0
// New creates a new RDS Client.
func New(auth aws.Auth, region aws.Region) (*RDS, error) {
	service, err := aws.NewService(auth, region.RDSEndpoint)
	if err != nil {
		return nil, err
	}
	return &RDS{
		Service: service,
		Auth:    auth,
		Region:  region,
	}, nil
}
Exemple #4
0
func New(auth aws.Auth, region aws.Region) (*SNS, error) {
	serviceInfo := aws.ServiceInfo{region.SNSEndpoint, aws.V2Signature}
	service, err := aws.NewService(auth, serviceInfo)

	return &SNS{auth, region, *service}, err
}