Exemplo n.º 1
0
// New returns a new Logs client.
func New(creds aws.CredentialsProvider, region string, client *http.Client) *Logs {
	if client == nil {
		client = http.DefaultClient
	}

	endpoint, service, region := endpoints.Lookup("logs", region)

	return &Logs{
		client: &aws.JSONClient{
			Context: aws.Context{
				Credentials: creds,
				Service:     service,
				Region:      region,
			}, Client: client,
			Endpoint:     endpoint,
			JSONVersion:  "1.1",
			TargetPrefix: "Logs_20140328",
		},
	}
}
Exemplo n.º 2
0
// New returns a new ECS client.
func New(creds aws.CredentialsProvider, region string, client *http.Client) *ECS {
	if client == nil {
		client = http.DefaultClient
	}

	endpoint, service, region := endpoints.Lookup("ecs", region)

	return &ECS{
		client: &aws.QueryClient{
			Context: aws.Context{
				Credentials: creds,
				Service:     service,
				Region:      region,
			},
			Client:     client,
			Endpoint:   endpoint,
			APIVersion: "2014-11-13",
		},
	}
}
Exemplo n.º 3
0
// New returns a new DynamoDB client.
func New(creds aws.CredentialsProvider, region string, client *http.Client) *DynamoDB {
	if client == nil {
		client = http.DefaultClient
	}

	endpoint, service, region := endpoints.Lookup("dynamodb", region)

	return &DynamoDB{
		client: &aws.JSONClient{
			Context: aws.Context{
				Credentials: creds,
				Service:     service,
				Region:      region,
			}, Client: client,
			Endpoint:     endpoint,
			JSONVersion:  "1.0",
			TargetPrefix: "DynamoDB_20120810",
		},
	}
}
Exemplo n.º 4
0
// New returns a new CloudHSM client.
func New(creds aws.CredentialsProvider, region string, client *http.Client) *CloudHSM {
	if client == nil {
		client = http.DefaultClient
	}

	endpoint, service, region := endpoints.Lookup("cloudhsm", region)

	return &CloudHSM{
		client: &aws.JSONClient{
			Context: aws.Context{
				Credentials: creds,
				Service:     service,
				Region:      region,
			}, Client: client,
			Endpoint:     endpoint,
			JSONVersion:  "1.1",
			TargetPrefix: "CloudHsmFrontendService",
		},
	}
}
Exemplo n.º 5
0
// New returns a new Support client.
func New(creds aws.CredentialsProvider, region string, client *http.Client) *Support {
	if client == nil {
		client = http.DefaultClient
	}

	endpoint, service, region := endpoints.Lookup("support", region)

	return &Support{
		client: &aws.JSONClient{
			Context: aws.Context{
				Credentials: creds,
				Service:     service,
				Region:      region,
			}, Client: client,
			Endpoint:     endpoint,
			JSONVersion:  "1.1",
			TargetPrefix: "AWSSupport_20130415",
		},
	}
}
Exemplo n.º 6
0
// New returns a new CloudTrail client.
func New(creds aws.CredentialsProvider, region string, client *http.Client) *CloudTrail {
	if client == nil {
		client = http.DefaultClient
	}

	endpoint, service, region := endpoints.Lookup("cloudtrail", region)

	return &CloudTrail{
		client: &aws.JSONClient{
			Context: aws.Context{
				Credentials: creds,
				Service:     service,
				Region:      region,
			}, Client: client,
			Endpoint:     endpoint,
			JSONVersion:  "1.1",
			TargetPrefix: "com.amazonaws.cloudtrail.v20131101.CloudTrail_20131101",
		},
	}
}
Exemplo n.º 7
0
// New returns a new ImportExport client.
func New(creds aws.CredentialsProvider, region string, client *http.Client) *ImportExport {
	if client == nil {
		client = http.DefaultClient
	}

	endpoint, service, region := endpoints.Lookup("importexport", region)

	return &ImportExport{
		client: &aws.QueryClient{
			Context: aws.Context{
				Credentials: creds,
				Service:     service,
				Region:      region,
			},
			Client:     client,
			Endpoint:   endpoint,
			APIVersion: "2010-06-01",
		},
	}
}
Exemplo n.º 8
0
// New returns a new EMR client.
func New(creds aws.CredentialsProvider, region string, client *http.Client) *EMR {
	if client == nil {
		client = http.DefaultClient
	}

	endpoint, service, region := endpoints.Lookup("elasticmapreduce", region)

	return &EMR{
		client: &aws.JSONClient{
			Context: aws.Context{
				Credentials: creds,
				Service:     service,
				Region:      region,
			}, Client: client,
			Endpoint:     endpoint,
			JSONVersion:  "1.1",
			TargetPrefix: "ElasticMapReduce",
		},
	}
}
Exemplo n.º 9
0
// New returns a new Config client.
func New(creds aws.CredentialsProvider, region string, client *http.Client) *Config {
	if client == nil {
		client = http.DefaultClient
	}

	endpoint, service, region := endpoints.Lookup("config", region)

	return &Config{
		client: &aws.JSONClient{
			Context: aws.Context{
				Credentials: creds,
				Service:     service,
				Region:      region,
			}, Client: client,
			Endpoint:     endpoint,
			JSONVersion:  "1.1",
			TargetPrefix: "StarlingDoveService",
		},
	}
}
Exemplo n.º 10
0
// New returns a new CloudSearchDomain client.
func New(creds aws.CredentialsProvider, region string, client *http.Client) *CloudSearchDomain {
	if client == nil {
		client = http.DefaultClient
	}

	endpoint, service, region := endpoints.Lookup("cloudsearchdomain", region)

	return &CloudSearchDomain{
		client: &aws.RestClient{
			Context: aws.Context{
				Credentials: creds,
				Service:     service,
				Region:      region,
			},
			Client:     client,
			Endpoint:   endpoint,
			APIVersion: "2013-01-01",
		},
	}
}
Exemplo n.º 11
0
// New returns a new Route53Domains client.
func New(creds aws.CredentialsProvider, region string, client *http.Client) *Route53Domains {
	if client == nil {
		client = http.DefaultClient
	}

	endpoint, service, region := endpoints.Lookup("route53domains", region)

	return &Route53Domains{
		client: &aws.JSONClient{
			Context: aws.Context{
				Credentials: creds,
				Service:     service,
				Region:      region,
			}, Client: client,
			Endpoint:     endpoint,
			JSONVersion:  "1.1",
			TargetPrefix: "Route53Domains_v20140515",
		},
	}
}
Exemplo n.º 12
0
// New returns a new CloudWatch client.
func New(creds aws.CredentialsProvider, region string, client *http.Client) *CloudWatch {
	if client == nil {
		client = http.DefaultClient
	}

	endpoint, service, region := endpoints.Lookup("monitoring", region)

	return &CloudWatch{
		client: &aws.QueryClient{
			Context: aws.Context{
				Credentials: creds,
				Service:     service,
				Region:      region,
			},
			Client:     client,
			Endpoint:   endpoint,
			APIVersion: "2010-08-01",
		},
	}
}
Exemplo n.º 13
0
// New returns a new DataPipeline client.
func New(creds aws.CredentialsProvider, region string, client *http.Client) *DataPipeline {
	if client == nil {
		client = http.DefaultClient
	}

	endpoint, service, region := endpoints.Lookup("datapipeline", region)

	return &DataPipeline{
		client: &aws.JSONClient{
			Context: aws.Context{
				Credentials: creds,
				Service:     service,
				Region:      region,
			}, Client: client,
			Endpoint:     endpoint,
			JSONVersion:  "1.1",
			TargetPrefix: "DataPipeline",
		},
	}
}
Exemplo n.º 14
0
// New returns a new DirectConnect client.
func New(creds aws.CredentialsProvider, region string, client *http.Client) *DirectConnect {
	if client == nil {
		client = http.DefaultClient
	}

	endpoint, service, region := endpoints.Lookup("directconnect", region)

	return &DirectConnect{
		client: &aws.JSONClient{
			Context: aws.Context{
				Credentials: creds,
				Service:     service,
				Region:      region,
			}, Client: client,
			Endpoint:     endpoint,
			JSONVersion:  "1.1",
			TargetPrefix: "OvertureService",
		},
	}
}
Exemplo n.º 15
0
// New returns a new ELB client.
func New(creds aws.CredentialsProvider, region string, client *http.Client) *ELB {
	if client == nil {
		client = http.DefaultClient
	}

	endpoint, service, region := endpoints.Lookup("elasticloadbalancing", region)

	return &ELB{
		client: &aws.QueryClient{
			Context: aws.Context{
				Credentials: creds,
				Service:     service,
				Region:      region,
			},
			Client:     client,
			Endpoint:   endpoint,
			APIVersion: "2012-06-01",
		},
	}
}
Exemplo n.º 16
0
// New returns a new ElasticTranscoder client.
func New(creds aws.CredentialsProvider, region string, client *http.Client) *ElasticTranscoder {
	if client == nil {
		client = http.DefaultClient
	}

	endpoint, service, region := endpoints.Lookup("elastictranscoder", region)

	return &ElasticTranscoder{
		client: &aws.RestClient{
			Context: aws.Context{
				Credentials: creds,
				Service:     service,
				Region:      region,
			},
			Client:     client,
			Endpoint:   endpoint,
			APIVersion: "2012-09-25",
		},
	}
}
Exemplo n.º 17
0
Arquivo: sync.go Projeto: 2722/lantern
// New returns a new CognitoSync client.
func New(creds aws.CredentialsProvider, region string, client *http.Client) *CognitoSync {
	if client == nil {
		client = http.DefaultClient
	}

	endpoint, service, region := endpoints.Lookup("cognito-sync", region)

	return &CognitoSync{
		client: &aws.RestClient{
			Context: aws.Context{
				Credentials: creds,
				Service:     service,
				Region:      region,
			},
			Client:     client,
			Endpoint:   endpoint,
			APIVersion: "2014-06-30",
		},
	}
}