Esempio n. 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
}
Esempio n. 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
}
Esempio n. 3
0
File: rds.go Progetto: hayesgm/goamz
// 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,
	}, nil
}
Esempio n. 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
}