本文整理汇总了Golang中github.com/bluet-deps/aws-sdk-go/service/devicefarm.New函数的典型用法代码示例。如果您正苦于以下问题:Golang New函数的具体用法?Golang New怎么用?Golang New使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了New函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: init
func init() {
Before("@devicefarm", func() {
// FIXME remove custom region
World["client"] = devicefarm.New(smoke.Session,
aws.NewConfig().WithRegion("us-west-2"))
})
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:7,代码来源:client.go
示例2: ExampleDeviceFarm_UpdateDevicePool
func ExampleDeviceFarm_UpdateDevicePool() {
svc := devicefarm.New(session.New())
params := &devicefarm.UpdateDevicePoolInput{
Arn: aws.String("AmazonResourceName"), // Required
Description: aws.String("Message"),
Name: aws.String("Name"),
Rules: []*devicefarm.Rule{
{ // Required
Attribute: aws.String("DeviceAttribute"),
Operator: aws.String("RuleOperator"),
Value: aws.String("String"),
},
// More values...
},
}
resp, err := svc.UpdateDevicePool(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:28,代码来源:examples_test.go
示例3: ExampleDeviceFarm_ScheduleRun
func ExampleDeviceFarm_ScheduleRun() {
svc := devicefarm.New(session.New())
params := &devicefarm.ScheduleRunInput{
DevicePoolArn: aws.String("AmazonResourceName"), // Required
ProjectArn: aws.String("AmazonResourceName"), // Required
Test: &devicefarm.ScheduleRunTest{ // Required
Type: aws.String("TestType"), // Required
Filter: aws.String("Filter"),
Parameters: map[string]*string{
"Key": aws.String("String"), // Required
// More values...
},
TestPackageArn: aws.String("AmazonResourceName"),
},
AppArn: aws.String("AmazonResourceName"),
Configuration: &devicefarm.ScheduleRunConfiguration{
AuxiliaryApps: []*string{
aws.String("AmazonResourceName"), // Required
// More values...
},
BillingMethod: aws.String("BillingMethod"),
ExtraDataPackageArn: aws.String("AmazonResourceName"),
Locale: aws.String("String"),
Location: &devicefarm.Location{
Latitude: aws.Float64(1.0), // Required
Longitude: aws.Float64(1.0), // Required
},
NetworkProfileArn: aws.String("AmazonResourceName"),
Radios: &devicefarm.Radios{
Bluetooth: aws.Bool(true),
Gps: aws.Bool(true),
Nfc: aws.Bool(true),
Wifi: aws.Bool(true),
},
},
Name: aws.String("Name"),
}
resp, err := svc.ScheduleRun(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:50,代码来源:examples_test.go
示例4: ExampleDeviceFarm_GetAccountSettings
func ExampleDeviceFarm_GetAccountSettings() {
svc := devicefarm.New(session.New())
var params *devicefarm.GetAccountSettingsInput
resp, err := svc.GetAccountSettings(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:16,代码来源:examples_test.go
示例5: ExampleDeviceFarm_DeleteDevicePool
func ExampleDeviceFarm_DeleteDevicePool() {
svc := devicefarm.New(session.New())
params := &devicefarm.DeleteDevicePoolInput{
Arn: aws.String("AmazonResourceName"), // Required
}
resp, err := svc.DeleteDevicePool(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:18,代码来源:examples_test.go
示例6: ExampleDeviceFarm_CreateProject
func ExampleDeviceFarm_CreateProject() {
svc := devicefarm.New(session.New())
params := &devicefarm.CreateProjectInput{
Name: aws.String("Name"), // Required
}
resp, err := svc.CreateProject(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:18,代码来源:examples_test.go
示例7: ExampleDeviceFarm_ListUploads
func ExampleDeviceFarm_ListUploads() {
svc := devicefarm.New(session.New())
params := &devicefarm.ListUploadsInput{
Arn: aws.String("AmazonResourceName"), // Required
NextToken: aws.String("PaginationToken"),
}
resp, err := svc.ListUploads(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:19,代码来源:examples_test.go
示例8: ExampleDeviceFarm_GetDevicePoolCompatibility
func ExampleDeviceFarm_GetDevicePoolCompatibility() {
svc := devicefarm.New(session.New())
params := &devicefarm.GetDevicePoolCompatibilityInput{
DevicePoolArn: aws.String("AmazonResourceName"), // Required
AppArn: aws.String("AmazonResourceName"),
TestType: aws.String("TestType"),
}
resp, err := svc.GetDevicePoolCompatibility(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:20,代码来源:examples_test.go
示例9: ExampleDeviceFarm_CreateUpload
func ExampleDeviceFarm_CreateUpload() {
svc := devicefarm.New(session.New())
params := &devicefarm.CreateUploadInput{
Name: aws.String("Name"), // Required
ProjectArn: aws.String("AmazonResourceName"), // Required
Type: aws.String("UploadType"), // Required
ContentType: aws.String("ContentType"),
}
resp, err := svc.CreateUpload(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:bluet-deps,项目名称:aws-sdk-go,代码行数:21,代码来源:examples_test.go
注:本文中的github.com/bluet-deps/aws-sdk-go/service/devicefarm.New函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论