provider/aws: add devicefarm sdk
This commit is contained in:
parent
13e1a62319
commit
742da65144
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,82 @@
|
||||||
|
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||||
|
|
||||||
|
// Package devicefarm provides the client and types for making API
|
||||||
|
// requests to AWS Device Farm.
|
||||||
|
//
|
||||||
|
// AWS Device Farm is a service that enables mobile app developers to test Android,
|
||||||
|
// iOS, and Fire OS apps on physical phones, tablets, and other devices in the
|
||||||
|
// cloud.
|
||||||
|
//
|
||||||
|
// See https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23 for more information on this service.
|
||||||
|
//
|
||||||
|
// See devicefarm package documentation for more information.
|
||||||
|
// https://docs.aws.amazon.com/sdk-for-go/api/service/devicefarm/
|
||||||
|
//
|
||||||
|
// Using the Client
|
||||||
|
//
|
||||||
|
// To use the client for AWS Device Farm you will first need
|
||||||
|
// to create a new instance of it.
|
||||||
|
//
|
||||||
|
// When creating a client for an AWS service you'll first need to have a Session
|
||||||
|
// already created. The Session provides configuration that can be shared
|
||||||
|
// between multiple service clients. Additional configuration can be applied to
|
||||||
|
// the Session and service's client when they are constructed. The aws package's
|
||||||
|
// Config type contains several fields such as Region for the AWS Region the
|
||||||
|
// client should make API requests too. The optional Config value can be provided
|
||||||
|
// as the variadic argument for Sessions and client creation.
|
||||||
|
//
|
||||||
|
// Once the service's client is created you can use it to make API requests the
|
||||||
|
// AWS service. These clients are safe to use concurrently.
|
||||||
|
//
|
||||||
|
// // Create a session to share configuration, and load external configuration.
|
||||||
|
// sess := session.Must(session.NewSession())
|
||||||
|
//
|
||||||
|
// // Create the service's client with the session.
|
||||||
|
// svc := devicefarm.New(sess)
|
||||||
|
//
|
||||||
|
// See the SDK's documentation for more information on how to use service clients.
|
||||||
|
// https://docs.aws.amazon.com/sdk-for-go/api/
|
||||||
|
//
|
||||||
|
// See aws package's Config type for more information on configuration options.
|
||||||
|
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
|
||||||
|
//
|
||||||
|
// See the AWS Device Farm client DeviceFarm for more
|
||||||
|
// information on creating the service's client.
|
||||||
|
// https://docs.aws.amazon.com/sdk-for-go/api/service/devicefarm/#New
|
||||||
|
//
|
||||||
|
// Once the client is created you can make an API request to the service.
|
||||||
|
// Each API method takes a input parameter, and returns the service response
|
||||||
|
// and an error.
|
||||||
|
//
|
||||||
|
// The API method will document which error codes the service can be returned
|
||||||
|
// by the operation if the service models the API operation's errors. These
|
||||||
|
// errors will also be available as const strings prefixed with "ErrCode".
|
||||||
|
//
|
||||||
|
// result, err := svc.CreateDevicePool(params)
|
||||||
|
// if err != nil {
|
||||||
|
// // Cast err to awserr.Error to handle specific error codes.
|
||||||
|
// aerr, ok := err.(awserr.Error)
|
||||||
|
// if ok && aerr.Code() == <error code to check for> {
|
||||||
|
// // Specific error code handling
|
||||||
|
// }
|
||||||
|
// return err
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// fmt.Println("CreateDevicePool result:")
|
||||||
|
// fmt.Println(result)
|
||||||
|
//
|
||||||
|
// Using the Client with Context
|
||||||
|
//
|
||||||
|
// The service's client also provides methods to make API requests with a Context
|
||||||
|
// value. This allows you to control the timeout, and cancellation of pending
|
||||||
|
// requests. These methods also take request Option as variadic parameter to apply
|
||||||
|
// additional configuration to the API request.
|
||||||
|
//
|
||||||
|
// ctx := context.Background()
|
||||||
|
//
|
||||||
|
// result, err := svc.CreateDevicePoolWithContext(ctx, params)
|
||||||
|
//
|
||||||
|
// See the request package documentation for more information on using Context pattern
|
||||||
|
// with the SDK.
|
||||||
|
// https://docs.aws.amazon.com/sdk-for-go/api/aws/request/
|
||||||
|
package devicefarm
|
|
@ -0,0 +1,43 @@
|
||||||
|
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||||
|
|
||||||
|
package devicefarm
|
||||||
|
|
||||||
|
const (
|
||||||
|
|
||||||
|
// ErrCodeArgumentException for service response error code
|
||||||
|
// "ArgumentException".
|
||||||
|
//
|
||||||
|
// An invalid argument was specified.
|
||||||
|
ErrCodeArgumentException = "ArgumentException"
|
||||||
|
|
||||||
|
// ErrCodeIdempotencyException for service response error code
|
||||||
|
// "IdempotencyException".
|
||||||
|
//
|
||||||
|
// An entity with the same name already exists.
|
||||||
|
ErrCodeIdempotencyException = "IdempotencyException"
|
||||||
|
|
||||||
|
// ErrCodeLimitExceededException for service response error code
|
||||||
|
// "LimitExceededException".
|
||||||
|
//
|
||||||
|
// A limit was exceeded.
|
||||||
|
ErrCodeLimitExceededException = "LimitExceededException"
|
||||||
|
|
||||||
|
// ErrCodeNotEligibleException for service response error code
|
||||||
|
// "NotEligibleException".
|
||||||
|
//
|
||||||
|
// Exception gets thrown when a user is not eligible to perform the specified
|
||||||
|
// transaction.
|
||||||
|
ErrCodeNotEligibleException = "NotEligibleException"
|
||||||
|
|
||||||
|
// ErrCodeNotFoundException for service response error code
|
||||||
|
// "NotFoundException".
|
||||||
|
//
|
||||||
|
// The specified entity was not found.
|
||||||
|
ErrCodeNotFoundException = "NotFoundException"
|
||||||
|
|
||||||
|
// ErrCodeServiceAccountException for service response error code
|
||||||
|
// "ServiceAccountException".
|
||||||
|
//
|
||||||
|
// There was a problem with the service account.
|
||||||
|
ErrCodeServiceAccountException = "ServiceAccountException"
|
||||||
|
)
|
|
@ -0,0 +1,95 @@
|
||||||
|
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||||
|
|
||||||
|
package devicefarm
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
|
"github.com/aws/aws-sdk-go/aws/client"
|
||||||
|
"github.com/aws/aws-sdk-go/aws/client/metadata"
|
||||||
|
"github.com/aws/aws-sdk-go/aws/request"
|
||||||
|
"github.com/aws/aws-sdk-go/aws/signer/v4"
|
||||||
|
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
|
||||||
|
)
|
||||||
|
|
||||||
|
// DeviceFarm provides the API operation methods for making requests to
|
||||||
|
// AWS Device Farm. See this package's package overview docs
|
||||||
|
// for details on the service.
|
||||||
|
//
|
||||||
|
// DeviceFarm methods are safe to use concurrently. It is not safe to
|
||||||
|
// modify mutate any of the struct's properties though.
|
||||||
|
type DeviceFarm struct {
|
||||||
|
*client.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// Used for custom client initialization logic
|
||||||
|
var initClient func(*client.Client)
|
||||||
|
|
||||||
|
// Used for custom request initialization logic
|
||||||
|
var initRequest func(*request.Request)
|
||||||
|
|
||||||
|
// Service information constants
|
||||||
|
const (
|
||||||
|
ServiceName = "devicefarm" // Service endpoint prefix API calls made to.
|
||||||
|
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
|
||||||
|
)
|
||||||
|
|
||||||
|
// New creates a new instance of the DeviceFarm client with a session.
|
||||||
|
// If additional configuration is needed for the client instance use the optional
|
||||||
|
// aws.Config parameter to add your extra config.
|
||||||
|
//
|
||||||
|
// Example:
|
||||||
|
// // Create a DeviceFarm client from just a session.
|
||||||
|
// svc := devicefarm.New(mySession)
|
||||||
|
//
|
||||||
|
// // Create a DeviceFarm client with additional configuration
|
||||||
|
// svc := devicefarm.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||||
|
func New(p client.ConfigProvider, cfgs ...*aws.Config) *DeviceFarm {
|
||||||
|
c := p.ClientConfig(EndpointsID, cfgs...)
|
||||||
|
return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
|
||||||
|
}
|
||||||
|
|
||||||
|
// newClient creates, initializes and returns a new service client instance.
|
||||||
|
func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *DeviceFarm {
|
||||||
|
svc := &DeviceFarm{
|
||||||
|
Client: client.New(
|
||||||
|
cfg,
|
||||||
|
metadata.ClientInfo{
|
||||||
|
ServiceName: ServiceName,
|
||||||
|
SigningName: signingName,
|
||||||
|
SigningRegion: signingRegion,
|
||||||
|
Endpoint: endpoint,
|
||||||
|
APIVersion: "2015-06-23",
|
||||||
|
JSONVersion: "1.1",
|
||||||
|
TargetPrefix: "DeviceFarm_20150623",
|
||||||
|
},
|
||||||
|
handlers,
|
||||||
|
),
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handlers
|
||||||
|
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
|
||||||
|
svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
|
||||||
|
svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
|
||||||
|
svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
|
||||||
|
svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
|
||||||
|
|
||||||
|
// Run custom client initialization if present
|
||||||
|
if initClient != nil {
|
||||||
|
initClient(svc.Client)
|
||||||
|
}
|
||||||
|
|
||||||
|
return svc
|
||||||
|
}
|
||||||
|
|
||||||
|
// newRequest creates a new request for a DeviceFarm operation and runs any
|
||||||
|
// custom request initialization.
|
||||||
|
func (c *DeviceFarm) newRequest(op *request.Operation, params, data interface{}) *request.Request {
|
||||||
|
req := c.NewRequest(op, params, data)
|
||||||
|
|
||||||
|
// Run custom request initialization if present
|
||||||
|
if initRequest != nil {
|
||||||
|
initRequest(req)
|
||||||
|
}
|
||||||
|
|
||||||
|
return req
|
||||||
|
}
|
|
@ -868,6 +868,12 @@
|
||||||
"version": "v1.8.16",
|
"version": "v1.8.16",
|
||||||
"versionExact": "v1.8.16"
|
"versionExact": "v1.8.16"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"checksumSHA1": "JsCuHtHM4ql9lVjpCJ869L7irZk=",
|
||||||
|
"path": "github.com/aws/aws-sdk-go/service/devicefarm",
|
||||||
|
"revision": "a5b389b7b05c59adf7ac44f50d0d8be6e0c85710",
|
||||||
|
"revisionTime": "2017-05-04T23:50:54Z"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "2Su2xzCbUPbCdVkyWuXcmxAI2Rs=",
|
"checksumSHA1": "2Su2xzCbUPbCdVkyWuXcmxAI2Rs=",
|
||||||
"path": "github.com/aws/aws-sdk-go/service/directoryservice",
|
"path": "github.com/aws/aws-sdk-go/service/directoryservice",
|
||||||
|
@ -4550,4 +4556,4 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"rootPath": "github.com/hashicorp/terraform"
|
"rootPath": "github.com/hashicorp/terraform"
|
||||||
}
|
}
|
Loading…
Reference in New Issue