diff --git a/CHANGELOG.md b/CHANGELOG.md index 07bba075b85..fe65439bf46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,83 @@ +Release v1.27.0 (2020-01-02) +=== + +### Service Client Updates +* `service/ce`: Updates service documentation +* `service/ecr`: Updates service waiters + * Adds waiters for ImageScanComplete and LifecyclePolicyPreviewComplete +* `service/lex-models`: Updates service documentation +* `service/lightsail`: Updates service API and documentation + * This release adds support for Certificate Authority (CA) certificate identifier to managed databases in Amazon Lightsail. + +### SDK Features +* `services/transcribestreamingservice`: Support for Amazon Transcribe Streaming ([#3048](https://github.com/aws/aws-sdk-go/pull/3048)) + * The SDK now supports the Amazon Transcribe Streaming APIs by utilizing event stream encoding over HTTP/2 + * See [Amazon Transcribe Developer Guide](https://docs.aws.amazon.com/transcribe/latest/dg) + * Fixes [#2487](https://github.com/aws/aws-sdk-go/issues/2487) + +Release v1.26.8 (2019-12-23) +=== + +### Service Client Updates +* `service/detective`: Updates service documentation +* `service/fsx`: Updates service API, documentation, and paginators +* `service/health`: Updates service API, documentation, and paginators + * With this release, you can now centrally aggregate AWS Health events from all accounts in your AWS organization. Visit AWS Health documentation to learn more about enabling and using this feature: https://docs.aws.amazon.com/health/latest/ug/organizational-view-health.html. + +Release v1.26.7 (2019-12-20) +=== + +### Service Client Updates +* `service/devicefarm`: Updates service API, documentation, and paginators + * Introduced browser testing support through AWS Device Farm +* `service/ec2`: Updates service API and documentation + * This release introduces the ability to tag key pairs, placement groups, export tasks, import image tasks, import snapshot tasks and export image tasks. You can use tags to organize and identify your resources for cost allocation. +* `service/eks`: Updates service API and documentation +* `service/pinpoint`: Updates service API and documentation + * This release of the Amazon Pinpoint API introduces versioning support for message templates. +* `service/rds`: Updates service API and documentation + * This release adds an operation that enables users to specify whether a database is restarted when its SSL/TLS certificate is rotated. Only customers who do not use SSL/TLS should use this operation. +* `service/redshift`: Updates service documentation + * Documentation updates for Amazon Redshift RA3 node types. +* `service/securityhub`: Updates service API and documentation +* `service/ssm`: Updates service API and documentation + * This release updates the attachments support to include AttachmentReference source for Automation documents. +* `service/transcribe`: Updates service API, documentation, and paginators + +Release v1.26.6 (2019-12-19) +=== + +### Service Client Updates +* `service/codestar-connections`: Adds new service +* `service/dlm`: Updates service API and documentation +* `service/ec2`: Updates service API and documentation + * We are updating the supportedRootDevices field to supportedRootDeviceTypes for DescribeInstanceTypes API to ensure that the actual value is returned, correcting a previous error in the model. +* `service/gamelift`: Updates service API and documentation + * Amazon GameLift now supports ARNs for all key GameLift resources, tagging for GameLift resource authorization management, and updated documentation that articulates GameLift's resource authorization strategy. +* `service/lex-models`: Updates service API and documentation +* `service/personalize-runtime`: Updates service API and documentation +* `service/ssm`: Updates service API and documentation + * This release allows customers to add tags to Automation execution, enabling them to sort and filter executions in different ways, such as by resource, purpose, owner, or environment. +* `service/transcribe`: Updates service API and documentation + +Release v1.26.5 (2019-12-18) +=== + +### Service Client Updates +* `service/cloudfront`: Updates service documentation + * Documentation updates for CloudFront +* `service/ec2`: Updates service API and documentation + * This release introduces the ability to tag Elastic Graphics accelerators. You can use tags to organize and identify your accelerators for cost allocation. +* `service/opsworkscm`: Updates service API and documentation + * AWS OpsWorks CM now supports tagging, and tag-based access control, of servers and backups. +* `service/resourcegroupstaggingapi`: Updates service documentation + * Documentation updates for resourcegroupstaggingapi +* `service/s3`: Updates service documentation + * Updates Amazon S3 endpoints allowing you to configure your client to opt-in to using S3 with the us-east-1 regional endpoint, instead of global. + +### SDK Bugs +* `aws/request`: Fix shouldRetry behavior for nested errors ([#3017](https://github.com/aws/aws-sdk-go/pull/3017)) + Release v1.26.4 (2019-12-17) === diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 8a1927a39ca..f142cedcccd 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -3,3 +3,8 @@ ### SDK Enhancements ### SDK Bugs +* `aws/session`: Fix client init not exposing endpoint resolve error ([#3059](https://github.com/aws/aws-sdk-go/pull/3059)) + * Fixes the SDK API clients not surfacing endpoint resolution errors, when the EndpointResolver is unable to resolve an endpoint for the client and region. +* `aws/ec2metadata` : Reduces request timeout for EC2Metadata client along with maximum number of retries ([#3028](https://github.com/aws/aws-sdk-go/pull/3028)) + * Reduces latency while fetching response from EC2Metadata client running in a container to around 3 seconds + * Fixes [#2972](https://github.com/aws/aws-sdk-go/issues/2972) diff --git a/aws/corehandlers/handlers.go b/aws/corehandlers/handlers.go index 0c60e612ea5..aa902d70837 100644 --- a/aws/corehandlers/handlers.go +++ b/aws/corehandlers/handlers.go @@ -161,7 +161,7 @@ func handleSendError(r *request.Request, err error) { } // Catch all request errors, and let the default retrier determine // if the error is retryable. - r.Error = awserr.New("RequestError", "send request failed", err) + r.Error = awserr.New(request.ErrCodeRequestError, "send request failed", err) // Override the error with a context canceled error, if that was canceled. ctx := r.Context() diff --git a/aws/csm/reporter.go b/aws/csm/reporter.go index 9186587fc04..835bcd49cba 100644 --- a/aws/csm/reporter.go +++ b/aws/csm/reporter.go @@ -89,7 +89,7 @@ func getMetricException(err awserr.Error) metricException { code := err.Code() switch code { - case "RequestError", + case request.ErrCodeRequestError, request.ErrCodeSerialization, request.CanceledErrorCode: return sdkException{ diff --git a/aws/csm/reporter_test.go b/aws/csm/reporter_test.go index 00f9380ff7a..9a835a80e48 100644 --- a/aws/csm/reporter_test.go +++ b/aws/csm/reporter_test.go @@ -147,7 +147,7 @@ func TestReportingMetrics(t *testing.T) { req := request.New(*sess.Config, md, sess.Handlers, client.DefaultRetryer{NumMaxRetries: 3}, op, nil, nil) errs := []error{ awserr.New("AWSError", "aws error", nil), - awserr.New("RequestError", "sdk error", nil), + awserr.New(request.ErrCodeRequestError, "sdk error", nil), nil, } resps := []*http.Response{ @@ -182,8 +182,8 @@ func TestReportingMetrics(t *testing.T) { }, { "Type": "ApiCallAttempt", - "SdkException": "RequestError", - "SdkExceptionMessage": "RequestError: sdk error", + "SdkException": request.ErrCodeRequestError, + "SdkExceptionMessage": request.ErrCodeRequestError+": sdk error", "HttpStatusCode": float64(500), }, { diff --git a/aws/ec2metadata/api_test.go b/aws/ec2metadata/api_test.go index eaa5dc183b6..9139cc424f6 100644 --- a/aws/ec2metadata/api_test.go +++ b/aws/ec2metadata/api_test.go @@ -602,7 +602,7 @@ func TestMetadataNotAvailable(t *testing.T) { Status: http.StatusText(int(0)), Body: ioutil.NopCloser(bytes.NewReader([]byte{})), } - r.Error = awserr.New("RequestError", "send request failed", nil) + r.Error = awserr.New(request.ErrCodeRequestError, "send request failed", nil) r.Retryable = aws.Bool(true) // network errors are retryable }) @@ -997,9 +997,12 @@ func TestRequestTimeOut(t *testing.T) { c.Handlers.Complete.PushBack(op.addToOperationPerformedList) + start := time.Now() resp, err := c.GetMetadata("/some/path") - expectedOperationsPerformed := []string{"GetToken", "GetMetadata"} + if e, a := 1*time.Second, time.Since(start); e < a { + t.Fatalf("expected duration of test to be less than %v, got %v", e, a) + } if e, a := "IMDSProfileForSDKGo", resp; e != a { t.Fatalf("Expected %v, got %v", e, a) @@ -1009,13 +1012,16 @@ func TestRequestTimeOut(t *testing.T) { t.Fatalf("Expected no error, got %v", err) } + expectedOperationsPerformed := []string{"GetToken", "GetMetadata"} if e, a := expectedOperationsPerformed, op.operationsPerformed; !reflect.DeepEqual(e, a) { t.Fatalf("expect %v operations, got %v", e, a) } + start = time.Now() resp, err = c.GetMetadata("/some/path") - - expectedOperationsPerformed = []string{"GetToken", "GetMetadata", "GetMetadata"} + if e, a := 1*time.Second, time.Since(start); e < a { + t.Fatalf("expected duration of test to be less than %v, got %v", e, a) + } if e, a := "IMDSProfileForSDKGo", resp; e != a { t.Fatalf("Expected %v, got %v", e, a) @@ -1025,6 +1031,7 @@ func TestRequestTimeOut(t *testing.T) { t.Fatalf("Expected no error, got %v", err) } + expectedOperationsPerformed = []string{"GetToken", "GetMetadata", "GetMetadata"} if e, a := expectedOperationsPerformed, op.operationsPerformed; !reflect.DeepEqual(e, a) { t.Fatalf("expect %v operations, got %v", e, a) } diff --git a/aws/ec2metadata/service.go b/aws/ec2metadata/service.go index 8eccac05aa2..b8b2940d744 100644 --- a/aws/ec2metadata/service.go +++ b/aws/ec2metadata/service.go @@ -80,8 +80,10 @@ func NewClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio // use a shorter timeout than default because the metadata // service is local if it is running, and to fail faster // if not running on an ec2 instance. - Timeout: 5 * time.Second, + Timeout: 1 * time.Second, } + // max number of retries on the client operation + cfg.MaxRetries = aws.Int(2) } svc := &EC2Metadata{ diff --git a/aws/ec2metadata/service_test.go b/aws/ec2metadata/service_test.go index 8e625336473..bd94856fd5a 100644 --- a/aws/ec2metadata/service_test.go +++ b/aws/ec2metadata/service_test.go @@ -24,7 +24,7 @@ func TestClientOverrideDefaultHTTPClientTimeout(t *testing.T) { t.Errorf("expect %v, not to equal %v", e, a) } - if e, a := 5*time.Second, svc.Config.HTTPClient.Timeout; e != a { + if e, a := 1*time.Second, svc.Config.HTTPClient.Timeout; e != a { t.Errorf("expect %v to be %v", e, a) } } diff --git a/aws/ec2metadata/token_provider.go b/aws/ec2metadata/token_provider.go index 06f76055f36..663372a9154 100644 --- a/aws/ec2metadata/token_provider.go +++ b/aws/ec2metadata/token_provider.go @@ -62,7 +62,7 @@ func (t *tokenProvider) fetchTokenHandler(r *request.Request) { // Check if request timed out while waiting for response if e, ok := requestFailureError.OrigErr().(awserr.Error); ok { - if e.Code() == "RequestError" { + if e.Code() == request.ErrCodeRequestError { atomic.StoreUint32(&t.disabled, 1) } } diff --git a/aws/endpoints/defaults.go b/aws/endpoints/defaults.go index 887de682996..52e593d212f 100644 --- a/aws/endpoints/defaults.go +++ b/aws/endpoints/defaults.go @@ -179,17 +179,47 @@ var awsPartition = partition{ "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, - "eu-central-1": endpoint{}, - "eu-north-1": endpoint{}, - "eu-west-1": endpoint{}, - "eu-west-2": endpoint{}, - "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "ca-central-1-fips": endpoint{ + Hostname: "acm-fips.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + }, + "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-1-fips": endpoint{ + Hostname: "acm-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "us-east-2": endpoint{}, + "us-east-2-fips": endpoint{ + Hostname: "acm-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "us-west-1": endpoint{}, + "us-west-1-fips": endpoint{ + Hostname: "acm-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "us-west-2": endpoint{}, + "us-west-2-fips": endpoint{ + Hostname: "acm-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, }, }, "acm-pca": service{ @@ -698,9 +728,15 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-2": endpoint{}, @@ -1103,8 +1139,10 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, + "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-west-2": endpoint{}, }, @@ -1375,6 +1413,7 @@ var awsPartition = partition{ "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -1892,8 +1931,10 @@ var awsPartition = partition{ "groundstation": service{ Endpoints: endpoints{ - "us-east-2": endpoint{}, - "us-west-2": endpoint{}, + "eu-north-1": endpoint{}, + "me-south-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, }, }, "guardduty": service{ @@ -2204,11 +2245,13 @@ var awsPartition = partition{ "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-2": endpoint{}, @@ -2217,11 +2260,20 @@ var awsPartition = partition{ "kinesisvideo": service{ Endpoints: endpoints{ + "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, + "us-east-2": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -2544,6 +2596,7 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -2571,6 +2624,7 @@ var awsPartition = partition{ Region: "us-west-2", }, }, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -2782,6 +2836,20 @@ var awsPartition = partition{ }, }, }, + "outposts": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "pinpoint": service{ Defaults: endpoint{ CredentialScope: credentialScope{ @@ -3101,6 +3169,7 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -3197,7 +3266,8 @@ var awsPartition = partition{ SignatureVersions: []string{"s3", "s3v4"}, }, "aws-global": endpoint{ - Hostname: "s3.amazonaws.com", + Hostname: "s3.amazonaws.com", + SignatureVersions: []string{"s3", "s3v4"}, CredentialScope: credentialScope{ Region: "us-east-1", }, @@ -3223,7 +3293,10 @@ var awsPartition = partition{ Hostname: "s3.sa-east-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, - "us-east-1": endpoint{}, + "us-east-1": endpoint{ + Hostname: "s3.us-east-1.amazonaws.com", + SignatureVersions: []string{"s3", "s3v4"}, + }, "us-east-2": endpoint{}, "us-west-1": endpoint{ Hostname: "s3.us-west-1.amazonaws.com", @@ -4488,6 +4561,13 @@ var awscnPartition = partition{ "cn-north-1": endpoint{}, }, }, + "health": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, "iam": service{ PartitionEndpoint: "aws-cn-global", IsRegionalized: boxedFalse, @@ -4748,6 +4828,13 @@ var awscnPartition = partition{ "cn-northwest-1": endpoint{}, }, }, + "xray": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, }, } @@ -5635,7 +5722,6 @@ var awsisoPartition = partition{ }, "application-autoscaling": service{ Defaults: endpoint{ - Hostname: "autoscaling.us-iso-east-1.c2s.ic.gov", Protocols: []string{"http", "https"}, }, Endpoints: endpoints{ @@ -5964,7 +6050,6 @@ var awsisobPartition = partition{ Services: services{ "application-autoscaling": service{ Defaults: endpoint{ - Hostname: "autoscaling.us-isob-east-1.sc2s.sgov.gov", Protocols: []string{"http", "https"}, }, Endpoints: endpoints{ diff --git a/aws/request/handlers.go b/aws/request/handlers.go index 185b073181e..e819ab6c0e8 100644 --- a/aws/request/handlers.go +++ b/aws/request/handlers.go @@ -10,6 +10,7 @@ import ( type Handlers struct { Validate HandlerList Build HandlerList + BuildStream HandlerList Sign HandlerList Send HandlerList ValidateResponse HandlerList @@ -28,6 +29,7 @@ func (h *Handlers) Copy() Handlers { return Handlers{ Validate: h.Validate.copy(), Build: h.Build.copy(), + BuildStream: h.BuildStream.copy(), Sign: h.Sign.copy(), Send: h.Send.copy(), ValidateResponse: h.ValidateResponse.copy(), @@ -46,6 +48,7 @@ func (h *Handlers) Copy() Handlers { func (h *Handlers) Clear() { h.Validate.Clear() h.Build.Clear() + h.BuildStream.Clear() h.Send.Clear() h.Sign.Clear() h.Unmarshal.Clear() @@ -67,6 +70,9 @@ func (h *Handlers) IsEmpty() bool { if h.Build.Len() != 0 { return false } + if h.BuildStream.Len() != 0 { + return false + } if h.Send.Len() != 0 { return false } @@ -320,3 +326,18 @@ func MakeAddToUserAgentFreeFormHandler(s string) func(*Request) { AddToUserAgent(r, s) } } + +// WithSetRequestHeaders updates the operation request's HTTP header to contain +// the header key value pairs provided. If the header key already exists in the +// request's HTTP header set, the existing value(s) will be replaced. +func WithSetRequestHeaders(h map[string]string) Option { + return withRequestHeader(h).SetRequestHeaders +} + +type withRequestHeader map[string]string + +func (h withRequestHeader) SetRequestHeaders(r *Request) { + for k, v := range h { + r.HTTPRequest.Header[k] = []string{v} + } +} diff --git a/aws/request/request.go b/aws/request/request.go index 52178141da6..59da73ed408 100644 --- a/aws/request/request.go +++ b/aws/request/request.go @@ -36,6 +36,10 @@ const ( // API request that was canceled. Requests given a aws.Context may // return this error when canceled. CanceledErrorCode = "RequestCanceled" + + // ErrCodeRequestError is an error preventing the SDK from continuing to + // process the request. + ErrCodeRequestError = "RequestError" ) // A Request is the service request to be made. @@ -51,6 +55,7 @@ type Request struct { HTTPRequest *http.Request HTTPResponse *http.Response Body io.ReadSeeker + streamingBody io.ReadCloser BodyStart int64 // offset from beginning of Body that the request body starts Params interface{} Error error @@ -295,6 +300,13 @@ func (r *Request) SetReaderBody(reader io.ReadSeeker) { r.ResetBody() } +// SetStreamingBody set the reader to be used for the request that will stream +// bytes to the server. Request's Body must not be set to any reader. +func (r *Request) SetStreamingBody(reader io.ReadCloser) { + r.streamingBody = reader + r.SetReaderBody(aws.ReadSeekCloser(reader)) +} + // Presign returns the request's signed URL. Error will be returned // if the signing fails. The expire parameter is only used for presigned Amazon // S3 API requests. All other AWS services will use a fixed expiration @@ -419,6 +431,10 @@ func (r *Request) Sign() error { } func (r *Request) getNextRequestBody() (body io.ReadCloser, err error) { + if r.streamingBody != nil { + return r.streamingBody, nil + } + if r.safeBody != nil { r.safeBody.Close() } diff --git a/aws/request/retryer.go b/aws/request/retryer.go index 356e5d9d887..1b61dec9c21 100644 --- a/aws/request/retryer.go +++ b/aws/request/retryer.go @@ -75,7 +75,7 @@ func (d noOpRetryer) RetryRules(_ *Request) time.Duration { // retryableCodes is a collection of service response codes which are retry-able // without any further action. var retryableCodes = map[string]struct{}{ - "RequestError": {}, + ErrCodeRequestError: {}, "RequestTimeout": {}, ErrCodeResponseTimeout: {}, "RequestTimeoutException": {}, // Glacier's flavor of RequestTimeout @@ -177,8 +177,8 @@ func shouldRetryError(origErr error) bool { origErr := err.OrigErr() var shouldRetry bool if origErr != nil { - shouldRetry := shouldRetryError(origErr) - if err.Code() == "RequestError" && !shouldRetry { + shouldRetry = shouldRetryError(origErr) + if err.Code() == ErrCodeRequestError && !shouldRetry { return false } } diff --git a/aws/request/retryer_test.go b/aws/request/retryer_test.go index 659e0fa3e39..e3c90a0f1f3 100644 --- a/aws/request/retryer_test.go +++ b/aws/request/retryer_test.go @@ -76,14 +76,14 @@ func TestIsErrorRetryable(t *testing.T) { }, { Err: awserr.New(ErrCodeSerialization, "some error", errors.New("blah")), - Retryable: false, + Retryable: true, }, { Err: awserr.New("SomeError", "some error", nil), Retryable: false, }, { - Err: awserr.New("RequestError", "some error", nil), + Err: awserr.New(ErrCodeRequestError, "some error", nil), Retryable: true, }, { diff --git a/aws/session/session.go b/aws/session/session.go index 915e62cde12..0ff49960510 100644 --- a/aws/session/session.go +++ b/aws/session/session.go @@ -642,10 +642,16 @@ func (s *Session) ClientConfig(service string, cfgs ...*aws.Config) client.Confi region := aws.StringValue(s.Config.Region) resolved, err := s.resolveEndpoint(service, region, s.Config) - if err != nil && s.Config.Logger != nil { - s.Config.Logger.Log(fmt.Sprintf( - "ERROR: unable to resolve endpoint for service %q, region %q, err: %v", - service, region, err)) + if err != nil { + s.Handlers.Validate.PushBack(func(r *request.Request) { + if len(r.ClientInfo.Endpoint) != 0 { + // Error occurred while resolving endpoint, but the request + // being invoked has had an endpoint specified after the client + // was created. + return + } + r.Error = err + }) } return client.Config{ diff --git a/aws/session/session_test.go b/aws/session/session_test.go index 30017396c8d..e03e985b0b3 100644 --- a/aws/session/session_test.go +++ b/aws/session/session_test.go @@ -68,7 +68,10 @@ func TestNew_WithSessionLoadError(t *testing.T) { os.Setenv("AWS_PROFILE", "assume_role_invalid_source_profile") logger := bytes.Buffer{} - s := New(&aws.Config{Logger: &mockLogger{&logger}}) + s := New(&aws.Config{ + Region: aws.String("us-west-2"), + Logger: &mockLogger{&logger}, + }) if s == nil { t.Errorf("expect not nil") @@ -178,8 +181,8 @@ func TestNewSession_ResolveEndpointError(t *testing.T) { t.Errorf("expect %v validation error, got %v", e, a) } - if e, a := "unable to resolve", logger.Buffer.String(); !strings.Contains(a, e) { - t.Errorf("expect %v logged, got %v", e, a) + if v := logger.Buffer.String(); len(v) != 0 { + t.Errorf("expect nothing logged, got %s", v) } } diff --git a/aws/signer/v4/stream.go b/aws/signer/v4/stream.go new file mode 100644 index 00000000000..02cbd97e234 --- /dev/null +++ b/aws/signer/v4/stream.go @@ -0,0 +1,63 @@ +package v4 + +import ( + "encoding/hex" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws/credentials" +) + +type credentialValueProvider interface { + Get() (credentials.Value, error) +} + +// StreamSigner implements signing of event stream encoded payloads +type StreamSigner struct { + region string + service string + + credentials credentialValueProvider + + prevSig []byte +} + +// NewStreamSigner creates a SigV4 signer used to sign Event Stream encoded messages +func NewStreamSigner(region, service string, seedSignature []byte, credentials *credentials.Credentials) *StreamSigner { + return &StreamSigner{ + region: region, + service: service, + credentials: credentials, + prevSig: seedSignature, + } +} + +// GetSignature takes an event stream encoded headers and payload and returns a signature +func (s *StreamSigner) GetSignature(headers, payload []byte, date time.Time) ([]byte, error) { + credValue, err := s.credentials.Get() + if err != nil { + return nil, err + } + + sigKey := deriveSigningKey(s.region, s.service, credValue.SecretAccessKey, date) + + keyPath := buildSigningScope(s.region, s.service, date) + + stringToSign := buildEventStreamStringToSign(headers, payload, s.prevSig, keyPath, date) + + signature := hmacSHA256(sigKey, []byte(stringToSign)) + s.prevSig = signature + + return signature, nil +} + +func buildEventStreamStringToSign(headers, payload, prevSig []byte, scope string, date time.Time) string { + return strings.Join([]string{ + "AWS4-HMAC-SHA256-PAYLOAD", + formatTime(date), + scope, + hex.EncodeToString(prevSig), + hex.EncodeToString(hashSHA256(headers)), + hex.EncodeToString(hashSHA256(payload)), + }, "\n") +} diff --git a/aws/signer/v4/stream_test.go b/aws/signer/v4/stream_test.go new file mode 100644 index 00000000000..1e974db52fb --- /dev/null +++ b/aws/signer/v4/stream_test.go @@ -0,0 +1,133 @@ +// +build go1.7 + +package v4 + +import ( + "encoding/hex" + "fmt" + "strings" + "testing" + "time" + + "github.com/aws/aws-sdk-go/aws/credentials" +) + +type periodicBadCredentials struct { + call int + credentials *credentials.Credentials +} + +func (p *periodicBadCredentials) Get() (credentials.Value, error) { + defer func() { + p.call++ + }() + + if p.call%2 == 0 { + return credentials.Value{}, fmt.Errorf("credentials error") + } + + return p.credentials.Get() +} + +type chunk struct { + headers, payload []byte +} + +func mustDecodeHex(b []byte, err error) []byte { + if err != nil { + panic(err) + } + + return b +} + +func TestStreamingChunkSigner(t *testing.T) { + const ( + region = "us-east-1" + service = "transcribe" + seedSignature = "9d9ab996c81f32c9d4e6fc166c92584f3741d1cb5ce325cd11a77d1f962c8de2" + ) + + staticCredentials := credentials.NewStaticCredentials("AKIDEXAMPLE", "wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY", "") + currentTime := time.Date(2019, 1, 27, 22, 37, 54, 0, time.UTC) + + cases := map[string]struct { + credentials credentialValueProvider + chunks []chunk + expectedSignatures map[int]string + expectedErrors map[int]string + }{ + "signature calculation": { + credentials: staticCredentials, + chunks: []chunk{ + {headers: []byte("headers"), payload: []byte("payload")}, + {headers: []byte("more headers"), payload: []byte("more payload")}, + }, + expectedSignatures: map[int]string{ + 0: "681a7eaa82891536f24af7ec7e9219ee251ccd9bac2f1b981eab7c5ec8579115", + 1: "07633d9d4ab4d81634a2164934d1f648c7cbc6839a8cf0773d818127a267e4d6", + }, + }, + "signature calculation errors": { + credentials: &periodicBadCredentials{credentials: staticCredentials}, + chunks: []chunk{ + {headers: []byte("headers"), payload: []byte("payload")}, + {headers: []byte("headers"), payload: []byte("payload")}, + {headers: []byte("more headers"), payload: []byte("more payload")}, + {headers: []byte("more headers"), payload: []byte("more payload")}, + }, + expectedSignatures: map[int]string{ + 1: "681a7eaa82891536f24af7ec7e9219ee251ccd9bac2f1b981eab7c5ec8579115", + 3: "07633d9d4ab4d81634a2164934d1f648c7cbc6839a8cf0773d818127a267e4d6", + }, + expectedErrors: map[int]string{ + 0: "credentials error", + 2: "credentials error", + }, + }, + } + + for name, tt := range cases { + t.Run(name, func(t *testing.T) { + chunkSigner := &StreamSigner{ + region: region, + service: service, + credentials: tt.credentials, + prevSig: mustDecodeHex(hex.DecodeString(seedSignature)), + } + + for i, chunk := range tt.chunks { + var expectedError string + if len(tt.expectedErrors) != 0 { + _, ok := tt.expectedErrors[i] + if ok { + expectedError = tt.expectedErrors[i] + } + } + + signature, err := chunkSigner.GetSignature(chunk.headers, chunk.payload, currentTime) + if err == nil && len(expectedError) > 0 { + t.Errorf("expected error, but got nil") + continue + } else if err != nil && len(expectedError) == 0 { + t.Errorf("expected no error, but got %v", err) + continue + } else if err != nil && len(expectedError) > 0 && !strings.Contains(err.Error(), expectedError) { + t.Errorf("expected %v, but got %v", expectedError, err) + continue + } else if len(expectedError) > 0 { + continue + } + + expectedSignature, ok := tt.expectedSignatures[i] + if !ok { + t.Fatalf("expected signature not provided for test case") + } + + if e, a := expectedSignature, hex.EncodeToString(signature); e != a { + t.Errorf("expected %v, got %v", e, a) + } + } + }) + } +} diff --git a/aws/signer/v4/v4.go b/aws/signer/v4/v4.go index 8104793aa5b..03b5afb937e 100644 --- a/aws/signer/v4/v4.go +++ b/aws/signer/v4/v4.go @@ -76,9 +76,14 @@ import ( ) const ( + authorizationHeader = "Authorization" + authHeaderSignatureElem = "Signature=" + signatureQueryKey = "X-Amz-Signature" + authHeaderPrefix = "AWS4-HMAC-SHA256" timeFormat = "20060102T150405Z" shortTimeFormat = "20060102" + awsV4Request = "aws4_request" // emptyStringSHA256 is a SHA256 of an empty string emptyStringSHA256 = `e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855` @@ -87,9 +92,9 @@ const ( var ignoredHeaders = rules{ blacklist{ mapRule{ - "Authorization": struct{}{}, - "User-Agent": struct{}{}, - "X-Amzn-Trace-Id": struct{}{}, + authorizationHeader: struct{}{}, + "User-Agent": struct{}{}, + "X-Amzn-Trace-Id": struct{}{}, }, }, } @@ -229,11 +234,9 @@ type signingCtx struct { DisableURIPathEscaping bool - credValues credentials.Value - isPresign bool - formattedTime string - formattedShortTime string - unsignedPayload bool + credValues credentials.Value + isPresign bool + unsignedPayload bool bodyDigest string signedHeaders string @@ -532,39 +535,56 @@ func (ctx *signingCtx) build(disableHeaderHoisting bool) error { ctx.buildSignature() // depends on string to sign if ctx.isPresign { - ctx.Request.URL.RawQuery += "&X-Amz-Signature=" + ctx.signature + ctx.Request.URL.RawQuery += "&" + signatureQueryKey + "=" + ctx.signature } else { parts := []string{ authHeaderPrefix + " Credential=" + ctx.credValues.AccessKeyID + "/" + ctx.credentialString, "SignedHeaders=" + ctx.signedHeaders, - "Signature=" + ctx.signature, + authHeaderSignatureElem + ctx.signature, } - ctx.Request.Header.Set("Authorization", strings.Join(parts, ", ")) + ctx.Request.Header.Set(authorizationHeader, strings.Join(parts, ", ")) } return nil } -func (ctx *signingCtx) buildTime() { - ctx.formattedTime = ctx.Time.UTC().Format(timeFormat) - ctx.formattedShortTime = ctx.Time.UTC().Format(shortTimeFormat) +// GetSignedRequestSignature attempts to extract the signature of the request. +// Returning an error if the request is unsigned, or unable to extract the +// signature. +func GetSignedRequestSignature(r *http.Request) ([]byte, error) { + + if auth := r.Header.Get(authorizationHeader); len(auth) != 0 { + ps := strings.Split(auth, ", ") + for _, p := range ps { + if idx := strings.Index(p, authHeaderSignatureElem); idx >= 0 { + sig := p[len(authHeaderSignatureElem):] + if len(sig) == 0 { + return nil, fmt.Errorf("invalid request signature authorization header") + } + return hex.DecodeString(sig) + } + } + } + + if sig := r.URL.Query().Get("X-Amz-Signature"); len(sig) != 0 { + return hex.DecodeString(sig) + } + + return nil, fmt.Errorf("request not signed") +} +func (ctx *signingCtx) buildTime() { if ctx.isPresign { duration := int64(ctx.ExpireTime / time.Second) - ctx.Query.Set("X-Amz-Date", ctx.formattedTime) + ctx.Query.Set("X-Amz-Date", formatTime(ctx.Time)) ctx.Query.Set("X-Amz-Expires", strconv.FormatInt(duration, 10)) } else { - ctx.Request.Header.Set("X-Amz-Date", ctx.formattedTime) + ctx.Request.Header.Set("X-Amz-Date", formatTime(ctx.Time)) } } func (ctx *signingCtx) buildCredentialString() { - ctx.credentialString = strings.Join([]string{ - ctx.formattedShortTime, - ctx.Region, - ctx.ServiceName, - "aws4_request", - }, "/") + ctx.credentialString = buildSigningScope(ctx.Region, ctx.ServiceName, ctx.Time) if ctx.isPresign { ctx.Query.Set("X-Amz-Credential", ctx.credValues.AccessKeyID+"/"+ctx.credentialString) @@ -653,19 +673,15 @@ func (ctx *signingCtx) buildCanonicalString() { func (ctx *signingCtx) buildStringToSign() { ctx.stringToSign = strings.Join([]string{ authHeaderPrefix, - ctx.formattedTime, + formatTime(ctx.Time), ctx.credentialString, - hex.EncodeToString(makeSha256([]byte(ctx.canonicalString))), + hex.EncodeToString(hashSHA256([]byte(ctx.canonicalString))), }, "\n") } func (ctx *signingCtx) buildSignature() { - secret := ctx.credValues.SecretAccessKey - date := makeHmac([]byte("AWS4"+secret), []byte(ctx.formattedShortTime)) - region := makeHmac(date, []byte(ctx.Region)) - service := makeHmac(region, []byte(ctx.ServiceName)) - credentials := makeHmac(service, []byte("aws4_request")) - signature := makeHmac(credentials, []byte(ctx.stringToSign)) + creds := deriveSigningKey(ctx.Region, ctx.ServiceName, ctx.credValues.SecretAccessKey, ctx.Time) + signature := hmacSHA256(creds, []byte(ctx.stringToSign)) ctx.signature = hex.EncodeToString(signature) } @@ -726,13 +742,13 @@ func (ctx *signingCtx) removePresign() { ctx.Query.Del("X-Amz-SignedHeaders") } -func makeHmac(key []byte, data []byte) []byte { +func hmacSHA256(key []byte, data []byte) []byte { hash := hmac.New(sha256.New, key) hash.Write(data) return hash.Sum(nil) } -func makeSha256(data []byte) []byte { +func hashSHA256(data []byte) []byte { hash := sha256.New() hash.Write(data) return hash.Sum(nil) @@ -804,3 +820,28 @@ func stripExcessSpaces(vals []string) { vals[i] = string(buf[:m]) } } + +func buildSigningScope(region, service string, dt time.Time) string { + return strings.Join([]string{ + formatShortTime(dt), + region, + service, + awsV4Request, + }, "/") +} + +func deriveSigningKey(region, service, secretKey string, dt time.Time) []byte { + kDate := hmacSHA256([]byte("AWS4"+secretKey), []byte(formatShortTime(dt))) + kRegion := hmacSHA256(kDate, []byte(region)) + kService := hmacSHA256(kRegion, []byte(service)) + signingKey := hmacSHA256(kService, []byte(awsV4Request)) + return signingKey +} + +func formatShortTime(dt time.Time) string { + return dt.UTC().Format(shortTimeFormat) +} + +func formatTime(dt time.Time) string { + return dt.UTC().Format(timeFormat) +} diff --git a/aws/types.go b/aws/types.go index 455091540fd..d542ef01bc8 100644 --- a/aws/types.go +++ b/aws/types.go @@ -2,6 +2,7 @@ package aws import ( "io" + "strings" "sync" "github.com/aws/aws-sdk-go/internal/sdkio" @@ -205,3 +206,36 @@ func (b *WriteAtBuffer) Bytes() []byte { defer b.m.Unlock() return b.buf } + +// MultiCloser is a utility to close multiple io.Closers within a single +// statement. +type MultiCloser []io.Closer + +// Close closes all of the io.Closers making up the MultiClosers. Any +// errors that occur while closing will be returned in the order they +// occur. +func (m MultiCloser) Close() error { + var errs errors + for _, c := range m { + err := c.Close() + if err != nil { + errs = append(errs, err) + } + } + if len(errs) != 0 { + return errs + } + + return nil +} + +type errors []error + +func (es errors) Error() string { + var parts []string + for _, e := range es { + parts = append(parts, e.Error()) + } + + return strings.Join(parts, "\n") +} diff --git a/aws/version.go b/aws/version.go index 22beefe9759..acb13343bf1 100644 --- a/aws/version.go +++ b/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.26.4" +const SDKVersion = "1.27.0" diff --git a/models/apis/ce/2017-10-25/docs-2.json b/models/apis/ce/2017-10-25/docs-2.json index 2385f0d0e26..b7db1692bfc 100644 --- a/models/apis/ce/2017-10-25/docs-2.json +++ b/models/apis/ce/2017-10-25/docs-2.json @@ -359,7 +359,7 @@ "GetCostAndUsageWithResourcesRequest$Filter": "

Filters Amazon Web Services costs by different dimensions. For example, you can specify SERVICE and LINKED_ACCOUNT and get the costs that are associated with that account's usage of that service. You can nest Expression objects to define any combination of dimension filters. For more information, see Expression.

The GetCostAndUsageWithResources operation requires that you either group by or filter by a ResourceId.

", "GetCostForecastRequest$Filter": "

The filters that you want to use to filter your forecast. Cost Explorer API supports all of the Cost Explorer filters.

", "GetReservationCoverageRequest$Filter": "

Filters utilization data by dimensions. You can filter by the following dimensions:

GetReservationCoverage uses the same Expression object as the other operations, but only AND is supported among each dimension. You can nest only one level deep. If there are multiple values for a dimension, they are OR'd together.

If you don't provide a SERVICE filter, Cost Explorer defaults to EC2.

", - "GetReservationUtilizationRequest$Filter": "

Filters utilization data by dimensions. You can filter by the following dimensions:

GetReservationUtilization uses the same Expression object as the other operations, but only AND is supported among each dimension, and nesting is supported up to only one level deep. If there are multiple values for a dimension, they are OR'd together.

", + "GetReservationUtilizationRequest$Filter": "

Filters utilization data by dimensions. You can filter by the following dimensions:

GetReservationUtilization uses the same Expression object as the other operations, but only AND is supported among each dimension, and nesting is supported up to only one level deep. If there are multiple values for a dimension, they are OR'd together.

", "GetRightsizingRecommendationRequest$Filter": null, "GetSavingsPlansCoverageRequest$Filter": "

Filters Savings Plans coverage data by dimensions. You can filter data for Savings Plans usage with the following dimensions:

GetSavingsPlansCoverage uses the same Expression object as the other operations, but only AND is supported among each dimension. If there are multiple values for a dimension, they are OR'd together.

", "GetSavingsPlansUtilizationDetailsRequest$Filter": "

Filters Savings Plans utilization coverage data for active Savings Plans dimensions. You can filter data with the following dimensions:

GetSavingsPlansUtilizationDetails uses the same Expression object as the other operations, but only AND is supported among each dimension.

", diff --git a/models/apis/cloudfront/2019-03-26/docs-2.json b/models/apis/cloudfront/2019-03-26/docs-2.json index d50a3558a74..fa1a9bd2de1 100644 --- a/models/apis/cloudfront/2019-03-26/docs-2.json +++ b/models/apis/cloudfront/2019-03-26/docs-2.json @@ -593,10 +593,10 @@ } }, "ForwardedValues": { - "base": "

A complex type that specifies how CloudFront handles query strings and cookies.

", + "base": "

A complex type that specifies how CloudFront handles query strings, cookies, and HTTP headers.

", "refs": { - "CacheBehavior$ForwardedValues": "

A complex type that specifies how CloudFront handles query strings and cookies.

", - "DefaultCacheBehavior$ForwardedValues": "

A complex type that specifies how CloudFront handles query strings and cookies.

" + "CacheBehavior$ForwardedValues": "

A complex type that specifies how CloudFront handles query strings, cookies, and HTTP headers.

", + "DefaultCacheBehavior$ForwardedValues": "

A complex type that specifies how CloudFront handles query strings, cookies, and HTTP headers.

" } }, "GeoRestriction": { @@ -763,7 +763,7 @@ "ICPRecordalStatus": { "base": null, "refs": { - "AliasICPRecordal$ICPRecordalStatus": "

The Internet Content Provider (ICP) recordal status for a CNAME. The ICPRecordalStatus is set to APPROVED for all CNAMEs (aliases) in regions outside of China.

The status values returned are the following:

" + "AliasICPRecordal$ICPRecordalStatus": "

The Internet Content Provider (ICP) recordal status for a CNAME. The ICPRecordalStatus is set to APPROVED for all CNAMEs (aliases) in regions outside of China.

The status values returned are the following:

" } }, "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior": { @@ -892,7 +892,7 @@ } }, "InvalidWebACLId": { - "base": "

A web ACL id specified in the response body is not valid.

", + "base": "

A web ACL ID specified in the response body is not valid. To specify a web ACL created using the latest version of AWS WAF, use the ACL ARN, for example arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a. To specify a web ACL created using AWS WAF Classic, use the ACL ID, for example 473e64fd-f30b-4765-81a0-62ad96dd167a.

", "refs": { } }, @@ -1089,7 +1089,7 @@ "MinimumProtocolVersion": { "base": null, "refs": { - "ViewerCertificate$MinimumProtocolVersion": "

Specify the security policy that you want CloudFront to use for HTTPS connections. A security policy determines two settings:

On the CloudFront console, this setting is called Security policy.

We recommend that you specify TLSv1.1_2016 unless your users are using browsers or devices that do not support TLSv1.1 or later.

When both of the following are true, you must specify TLSv1 or later for the security policy:

If you specify true for CloudFrontDefaultCertificate, CloudFront automatically sets the security policy to TLSv1 regardless of the value that you specify for MinimumProtocolVersion.

For information about the relationship between the security policy that you choose and the protocols and ciphers that CloudFront uses to communicate with viewers, see Supported SSL/TLS Protocols and Ciphers for Communication Between Viewers and CloudFront in the Amazon CloudFront Developer Guide.

" + "ViewerCertificate$MinimumProtocolVersion": "

Specify the security policy that you want CloudFront to use for HTTPS connections. A security policy determines two settings:

On the CloudFront console, this setting is called Security Policy.

We recommend that you specify TLSv1.1_2016 unless your viewers are using browsers or devices that do not support TLSv1.1 or later.

When both of the following are true, you must specify TLSv1 or later for the security policy:

If you specify true for CloudFrontDefaultCertificate, CloudFront automatically sets the security policy to TLSv1 regardless of the value that you specify here.

For information about the relationship between the security policy that you choose and the protocols and ciphers that CloudFront uses to communicate with viewers, see Supported SSL/TLS Protocols and Ciphers for Communication Between Viewers and CloudFront in the Amazon CloudFront Developer Guide.

" } }, "MissingBody": { @@ -1372,7 +1372,7 @@ "SSLSupportMethod": { "base": null, "refs": { - "ViewerCertificate$SSLSupportMethod": "

If you specify a value for ACMCertificateArn or for IAMCertificateId, you must also specify how you want CloudFront to serve HTTPS requests: using a method that works for browsers and clients released after 2010 or one that works for all clients.

Don't specify a value for SSLSupportMethod if you specified <CloudFrontDefaultCertificate>true<CloudFrontDefaultCertificate>.

For more information, see Choosing How CloudFront Serves HTTPS Requests in the Amazon CloudFront Developer Guide.

" + "ViewerCertificate$SSLSupportMethod": "

If you specify a value for ACMCertificateArn or for IAMCertificateId, you must also specify how you want CloudFront to serve HTTPS requests: using a method that works for browsers and clients released after 2010, or one that works for all clients.

Don't specify a value here if you specified CloudFrontDefaultCertificate as true.

For more information, see Choosing How CloudFront Serves HTTPS Requests in the Amazon CloudFront Developer Guide.

" } }, "Signer": { @@ -1726,7 +1726,7 @@ } }, "ViewerCertificate": { - "base": "

A complex type that specifies the following:

Specify only one of the following values:

For more information, see Using Alternate Domain Names and HTTPS in the Amazon CloudFront Developer Guide.

", + "base": "

A complex type that specifies the following:

Specify only one of the following values:

For more information, see Using Alternate Domain Names and HTTPS in the Amazon CloudFront Developer Guide.

", "refs": { "DistributionConfig$ViewerCertificate": "

A complex type that specifies whether you want viewers to use HTTP or HTTPS to request your objects, whether you're using an alternate domain name with HTTPS, and if so, if you're using AWS Certificate Manager (ACM) or a third-party certificate authority.

", "DistributionSummary$ViewerCertificate": "

A complex type that specifies whether you want viewers to use HTTP or HTTPS to request your objects, whether you're using an alternate domain name with HTTPS, and if so, if you're using AWS Certificate Manager (ACM) or a third-party certificate authority.

" @@ -1765,7 +1765,7 @@ "StreamingDistributionSummary$Enabled": "

Whether the distribution is enabled to accept end user requests for content.

", "StreamingLoggingConfig$Enabled": "

Specifies whether you want CloudFront to save access logs to an Amazon S3 bucket. If you don't want to enable logging when you create a streaming distribution or if you want to disable logging for an existing streaming distribution, specify false for Enabled, and specify empty Bucket and Prefix elements. If you specify false for Enabled but you specify values for Bucket and Prefix, the values are automatically deleted.

", "TrustedSigners$Enabled": "

Specifies whether you want to require viewers to use signed URLs to access the files specified by PathPattern and TargetOriginId.

", - "ViewerCertificate$CloudFrontDefaultCertificate": "

If you're using the CloudFront domain name for your distribution, such as d111111abcdef8.cloudfront.net, specify the following value:

" + "ViewerCertificate$CloudFrontDefaultCertificate": "

If you're using the CloudFront domain name for your distribution, such as d111111abcdef8.cloudfront.net, specify this value as true.

" } }, "integer": { @@ -1824,7 +1824,7 @@ "CacheBehavior$MinTTL": "

The minimum amount of time that you want objects to stay in CloudFront caches before CloudFront forwards another request to your origin to determine whether the object has been updated. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.

You must specify 0 for MinTTL if you configure CloudFront to forward all headers to your origin (under Headers, if you specify 1 for Quantity and * for Name).

", "CacheBehavior$DefaultTTL": "

The default amount of time that you want objects to stay in CloudFront caches before CloudFront forwards another request to your origin to determine whether the object has been updated. The value that you specify applies only when your origin does not add HTTP headers such as Cache-Control max-age, Cache-Control s-maxage, and Expires to objects. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.

", "CacheBehavior$MaxTTL": "

The maximum amount of time that you want objects to stay in CloudFront caches before CloudFront forwards another request to your origin to determine whether the object has been updated. The value that you specify applies only when your origin adds HTTP headers such as Cache-Control max-age, Cache-Control s-maxage, and Expires to objects. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.

", - "CustomErrorResponse$ErrorCachingMinTTL": "

The minimum amount of time, in seconds, that you want CloudFront to cache the HTTP status code specified in ErrorCode. When this time period has elapsed, CloudFront queries your origin to see whether the problem that caused the error has been resolved and the requested object is now available.

If you don't want to specify a value, include an empty element, <ErrorCachingMinTTL>, in the XML document.

For more information, see Customizing Error Responses in the Amazon CloudFront Developer Guide.

", + "CustomErrorResponse$ErrorCachingMinTTL": "

The minimum amount of time, in seconds, that you want CloudFront to cache the HTTP status code specified in ErrorCode. When this time period has elapsed, CloudFront queries your origin to see whether the problem that caused the error has been resolved and the requested object is now available.

For more information, see Customizing Error Responses in the Amazon CloudFront Developer Guide.

", "DefaultCacheBehavior$MinTTL": "

The minimum amount of time that you want objects to stay in CloudFront caches before CloudFront forwards another request to your origin to determine whether the object has been updated. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.

You must specify 0 for MinTTL if you configure CloudFront to forward all headers to your origin (under Headers, if you specify 1 for Quantity and * for Name).

", "DefaultCacheBehavior$DefaultTTL": "

The default amount of time that you want objects to stay in CloudFront caches before CloudFront forwards another request to your origin to determine whether the object has been updated. The value that you specify applies only when your origin does not add HTTP headers such as Cache-Control max-age, Cache-Control s-maxage, and Expires to objects. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.

", "DefaultCacheBehavior$MaxTTL": "

The maximum amount of time that you want objects to stay in CloudFront caches before CloudFront forwards another request to your origin to determine whether the object has been updated. The value that you specify applies only when your origin adds HTTP headers such as Cache-Control max-age, Cache-Control s-maxage, and Expires to objects. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide.

" @@ -1875,8 +1875,8 @@ "CreateStreamingDistributionResult$ETag": "

The current version of the streaming distribution created.

", "CreateStreamingDistributionWithTagsResult$Location": "

The fully qualified URI of the new streaming distribution resource just created. For example: https://cloudfront.amazonaws.com/2010-11-01/streaming-distribution/EGTXBD79H29TRA8.

", "CreateStreamingDistributionWithTagsResult$ETag": "

The current version of the distribution created.

", - "CustomErrorResponse$ResponsePagePath": "

The path to the custom error page that you want CloudFront to return to a viewer when your origin returns the HTTP status code specified by ErrorCode, for example, /4xx-errors/403-forbidden.html. If you want to store your objects and your custom error pages in different locations, your distribution must include a cache behavior for which the following is true:

If you specify a value for ResponsePagePath, you must also specify a value for ResponseCode. If you don't want to specify a value, include an empty element, <ResponsePagePath>, in the XML document.

We recommend that you store custom error pages in an Amazon S3 bucket. If you store custom error pages on an HTTP server and the server starts to return 5xx errors, CloudFront can't get the files that you want to return to viewers because the origin server is unavailable.

", - "CustomErrorResponse$ResponseCode": "

The HTTP status code that you want CloudFront to return to the viewer along with the custom error page. There are a variety of reasons that you might want CloudFront to return a status code different from the status code that your origin returned to CloudFront, for example:

If you specify a value for ResponseCode, you must also specify a value for ResponsePagePath. If you don't want to specify a value, include an empty element, <ResponseCode>, in the XML document.

", + "CustomErrorResponse$ResponsePagePath": "

The path to the custom error page that you want CloudFront to return to a viewer when your origin returns the HTTP status code specified by ErrorCode, for example, /4xx-errors/403-forbidden.html. If you want to store your objects and your custom error pages in different locations, your distribution must include a cache behavior for which the following is true:

If you specify a value for ResponsePagePath, you must also specify a value for ResponseCode.

We recommend that you store custom error pages in an Amazon S3 bucket. If you store custom error pages on an HTTP server and the server starts to return 5xx errors, CloudFront can't get the files that you want to return to viewers because the origin server is unavailable.

", + "CustomErrorResponse$ResponseCode": "

The HTTP status code that you want CloudFront to return to the viewer along with the custom error page. There are a variety of reasons that you might want CloudFront to return a status code different from the status code that your origin returned to CloudFront, for example:

If you specify a value for ResponseCode, you must also specify a value for ResponsePagePath.

", "DefaultCacheBehavior$TargetOriginId": "

The value of ID for the origin that you want CloudFront to route requests to when a request matches the path pattern either for a cache behavior or for the default cache behavior in your distribution.

", "DefaultCacheBehavior$FieldLevelEncryptionId": "

The value of ID for the field-level encryption configuration that you want CloudFront to use for encrypting specific fields of data for a cache behavior or for the default cache behavior in your distribution.

", "DeleteCloudFrontOriginAccessIdentityRequest$Id": "

The origin access identity's ID.

", @@ -1898,7 +1898,7 @@ "DistributionAlreadyExists$Message": null, "DistributionConfig$CallerReference": "

A unique value (for example, a date-time stamp) that ensures that the request can't be replayed.

If the value of CallerReference is new (regardless of the content of the DistributionConfig object), CloudFront creates a new distribution.

If CallerReference is a value that you already sent in a previous request to create a distribution, CloudFront returns a DistributionAlreadyExists error.

", "DistributionConfig$DefaultRootObject": "

The object that you want CloudFront to request from your origin (for example, index.html) when a viewer requests the root URL for your distribution (http://www.example.com) instead of an object in your distribution (http://www.example.com/product-description.html). Specifying a default root object avoids exposing the contents of your distribution.

Specify only the object name, for example, index.html. Don't add a / before the object name.

If you don't want to specify a default root object when you create a distribution, include an empty DefaultRootObject element.

To delete the default root object from an existing distribution, update the distribution configuration and include an empty DefaultRootObject element.

To replace the default root object, update the distribution configuration and specify the new object.

For more information about the default root object, see Creating a Default Root Object in the Amazon CloudFront Developer Guide.

", - "DistributionConfig$WebACLId": "

A unique identifier that specifies the AWS WAF web ACL, if any, to associate with this distribution.

AWS WAF is a web application firewall that lets you monitor the HTTP and HTTPS requests that are forwarded to CloudFront, and lets you control access to your content. Based on conditions that you specify, such as the IP addresses that requests originate from or the values of query strings, CloudFront responds to requests either with the requested content or with an HTTP 403 status code (Forbidden). You can also configure CloudFront to return a custom error page when a request is blocked. For more information about AWS WAF, see the AWS WAF Developer Guide.

", + "DistributionConfig$WebACLId": "

A unique identifier that specifies the AWS WAF web ACL, if any, to associate with this distribution. To specify a web ACL created using the latest version of AWS WAF, use the ACL ARN, for example arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a. To specify a web ACL created using AWS WAF Classic, use the ACL ID, for example 473e64fd-f30b-4765-81a0-62ad96dd167a.

AWS WAF is a web application firewall that lets you monitor the HTTP and HTTPS requests that are forwarded to CloudFront, and lets you control access to your content. Based on conditions that you specify, such as the IP addresses that requests originate from or the values of query strings, CloudFront responds to requests either with the requested content or with an HTTP 403 status code (Forbidden). You can also configure CloudFront to return a custom error page when a request is blocked. For more information about AWS WAF, see the AWS WAF Developer Guide.

", "DistributionList$Marker": "

The value you provided for the Marker request parameter.

", "DistributionList$NextMarker": "

If IsTruncated is true, this element is present and contains the value you can use for the Marker request parameter to continue listing your distributions where they left off.

", "DistributionNotDisabled$Message": null, @@ -2112,8 +2112,8 @@ "UpdateStreamingDistributionRequest$Id": "

The streaming distribution's id.

", "UpdateStreamingDistributionRequest$IfMatch": "

The value of the ETag header that you received when retrieving the streaming distribution's configuration. For example: E2QWRUHAPOMQZL.

", "UpdateStreamingDistributionResult$ETag": "

The current version of the configuration. For example: E2QWRUHAPOMQZL.

", - "ViewerCertificate$IAMCertificateId": "

If you want viewers to use HTTPS to request your objects and you're using an alternate domain name, you must choose the type of certificate that you want to use. Specify the following value if you purchased your certificate from a third-party certificate authority:

If you specify IAMCertificateId, you must also specify a value for SSLSupportMethod.

", - "ViewerCertificate$ACMCertificateArn": "

If you want viewers to use HTTPS to request your objects and you're using an alternate domain name, you must choose the type of certificate that you want to use. Specify the following value if ACM provided your certificate:

If you specify ACMCertificateArn, you must also specify a value for SSLSupportMethod.

", + "ViewerCertificate$IAMCertificateId": "

If you want viewers to use HTTPS to request your objects and you're using an alternate domain name, you must choose the type of certificate that you want to use. If you purchased your certificate from a third-party certificate authority and uploaded it to the IAM certificate store, specify the certificate ID that you want to use for this distribution.

If you specify a certificate ID, you must also specify an SSL support method (sni-only or vip).

", + "ViewerCertificate$ACMCertificateArn": "

If you want viewers to use HTTPS to request your objects and you're using an alternate domain name, you must choose the type of certificate that you want to use. If ACM provided your certificate, specify the Amazon Resource Name (ARN) for the ACM certificate that you want to use for this distribution. CloudFront only supports ACM certificates in the US East (N. Virginia) Region (us-east-1).

If you specify an ACM certificate ARN, you must also specify an SSL support method (sni-only or vip).

", "ViewerCertificate$Certificate": "

This field is no longer used. Use one of the following fields instead:

" } }, diff --git a/models/apis/codestar-connections/2019-12-01/api-2.json b/models/apis/codestar-connections/2019-12-01/api-2.json new file mode 100644 index 00000000000..1b85e371cd2 --- /dev/null +++ b/models/apis/codestar-connections/2019-12-01/api-2.json @@ -0,0 +1,194 @@ +{ + "version":"2.0", + "metadata":{ + "apiVersion":"2019-12-01", + "endpointPrefix":"codestar-connections", + "jsonVersion":"1.0", + "protocol":"json", + "serviceFullName":"AWS CodeStar connections", + "serviceId":"CodeStar connections", + "signatureVersion":"v4", + "signingName":"codestar-connections", + "targetPrefix":"com.amazonaws.codestar.connections.CodeStar_connections_20191201", + "uid":"codestar-connections-2019-12-01" + }, + "operations":{ + "CreateConnection":{ + "name":"CreateConnection", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"CreateConnectionInput"}, + "output":{"shape":"CreateConnectionOutput"}, + "errors":[ + {"shape":"LimitExceededException"} + ] + }, + "DeleteConnection":{ + "name":"DeleteConnection", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeleteConnectionInput"}, + "output":{"shape":"DeleteConnectionOutput"}, + "errors":[ + {"shape":"ResourceNotFoundException"} + ] + }, + "GetConnection":{ + "name":"GetConnection", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"GetConnectionInput"}, + "output":{"shape":"GetConnectionOutput"}, + "errors":[ + {"shape":"ResourceNotFoundException"} + ] + }, + "ListConnections":{ + "name":"ListConnections", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListConnectionsInput"}, + "output":{"shape":"ListConnectionsOutput"} + } + }, + "shapes":{ + "AccountId":{ + "type":"string", + "max":12, + "min":12, + "pattern":"[0-9]{12}" + }, + "Connection":{ + "type":"structure", + "members":{ + "ConnectionName":{"shape":"ConnectionName"}, + "ConnectionArn":{"shape":"ConnectionArn"}, + "ProviderType":{"shape":"ProviderType"}, + "OwnerAccountId":{"shape":"AccountId"}, + "ConnectionStatus":{"shape":"ConnectionStatus"} + } + }, + "ConnectionArn":{ + "type":"string", + "max":256, + "min":0, + "pattern":"arn:aws(-[\\w]+)*:.+:.+:[0-9]{12}:.+" + }, + "ConnectionList":{ + "type":"list", + "member":{"shape":"Connection"} + }, + "ConnectionName":{ + "type":"string", + "max":32, + "min":1 + }, + "ConnectionStatus":{ + "type":"string", + "enum":[ + "PENDING", + "AVAILABLE", + "ERROR" + ] + }, + "CreateConnectionInput":{ + "type":"structure", + "required":[ + "ProviderType", + "ConnectionName" + ], + "members":{ + "ProviderType":{"shape":"ProviderType"}, + "ConnectionName":{"shape":"ConnectionName"} + } + }, + "CreateConnectionOutput":{ + "type":"structure", + "required":["ConnectionArn"], + "members":{ + "ConnectionArn":{"shape":"ConnectionArn"} + } + }, + "DeleteConnectionInput":{ + "type":"structure", + "required":["ConnectionArn"], + "members":{ + "ConnectionArn":{"shape":"ConnectionArn"} + } + }, + "DeleteConnectionOutput":{ + "type":"structure", + "members":{ + } + }, + "ErrorMessage":{ + "type":"string", + "max":600 + }, + "GetConnectionInput":{ + "type":"structure", + "required":["ConnectionArn"], + "members":{ + "ConnectionArn":{"shape":"ConnectionArn"} + } + }, + "GetConnectionOutput":{ + "type":"structure", + "members":{ + "Connection":{"shape":"Connection"} + } + }, + "LimitExceededException":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"} + }, + "exception":true + }, + "ListConnectionsInput":{ + "type":"structure", + "members":{ + "ProviderTypeFilter":{"shape":"ProviderType"}, + "MaxResults":{"shape":"MaxResults"}, + "NextToken":{"shape":"NextToken"} + } + }, + "ListConnectionsOutput":{ + "type":"structure", + "members":{ + "Connections":{"shape":"ConnectionList"}, + "NextToken":{"shape":"NextToken"} + } + }, + "MaxResults":{ + "type":"integer", + "max":50, + "min":1 + }, + "NextToken":{ + "type":"string", + "max":1024, + "min":1, + "pattern":"[a-zA-Z0-9=\\-\\\\/]+" + }, + "ProviderType":{ + "type":"string", + "enum":["Bitbucket"] + }, + "ResourceNotFoundException":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"} + }, + "exception":true + } + } +} diff --git a/models/apis/codestar-connections/2019-12-01/docs-2.json b/models/apis/codestar-connections/2019-12-01/docs-2.json new file mode 100644 index 00000000000..a11c33508e2 --- /dev/null +++ b/models/apis/codestar-connections/2019-12-01/docs-2.json @@ -0,0 +1,131 @@ +{ + "version": "2.0", + "service": "

This AWS CodeStar Connections API Reference provides descriptions and usage examples of the operations and data types for the AWS CodeStar Connections API. You can use the Connections API to work with connections and installations.

Connections are configurations that you use to connect AWS resources to external code repositories. Each connection is a resource that can be given to services such as CodePipeline to connect to a third-party repository such as Bitbucket. For example, you can add the connection in CodePipeline so that it triggers your pipeline when a code change is made to your third-party code repository. Each connection is named and associated with a unique ARN that is used to reference the connection.

When you create a connection, the console initiates a third-party connection handshake. Installations are the apps that are used to conduct this handshake. For example, the installation for the Bitbucket provider type is the Bitbucket Cloud app. When you create a connection, you can choose an existing installation or create one.

You can work with connections by calling:

For information about how to use AWS CodeStar Connections, see the AWS CodePipeline User Guide.

", + "operations": { + "CreateConnection": "

Creates a connection that can then be given to other AWS services like CodePipeline so that it can access third-party code repositories. The connection is in pending status until the third-party connection handshake is completed from the console.

", + "DeleteConnection": "

The connection to be deleted.

", + "GetConnection": "

Returns the connection ARN and details such as status, owner, and provider type.

", + "ListConnections": "

Lists the connections associated with your account.

" + }, + "shapes": { + "AccountId": { + "base": null, + "refs": { + "Connection$OwnerAccountId": "

The name of the external provider where your third-party code repository is configured. For Bitbucket, this is the account ID of the owner of the Bitbucket repository.

" + } + }, + "Connection": { + "base": "

The configuration that allows a service such as CodePipeline to connect to a third-party code repository.

", + "refs": { + "ConnectionList$member": null, + "GetConnectionOutput$Connection": "

The connection details, such as status, owner, and provider type.

" + } + }, + "ConnectionArn": { + "base": null, + "refs": { + "Connection$ConnectionArn": "

The Amazon Resource Name (ARN) of the connection. The ARN is used as the connection reference when the connection is shared between AWS services.

The ARN is never reused if the connection is deleted.

", + "CreateConnectionOutput$ConnectionArn": "

The Amazon Resource Name (ARN) of the connection to be created. The ARN is used as the connection reference when the connection is shared between AWS services.

The ARN is never reused if the connection is deleted.

", + "DeleteConnectionInput$ConnectionArn": "

The Amazon Resource Name (ARN) of the connection to be deleted.

The ARN is never reused if the connection is deleted.

", + "GetConnectionInput$ConnectionArn": "

The Amazon Resource Name (ARN) of a connection.

" + } + }, + "ConnectionList": { + "base": null, + "refs": { + "ListConnectionsOutput$Connections": "

A list of connections and the details for each connection, such as status, owner, and provider type.

" + } + }, + "ConnectionName": { + "base": null, + "refs": { + "Connection$ConnectionName": "

The name of the connection. Connection names must be unique in an AWS user account.

", + "CreateConnectionInput$ConnectionName": "

The name of the connection to be created. The name must be unique in the calling AWS account.

" + } + }, + "ConnectionStatus": { + "base": null, + "refs": { + "Connection$ConnectionStatus": "

The current status of the connection.

" + } + }, + "CreateConnectionInput": { + "base": null, + "refs": { + } + }, + "CreateConnectionOutput": { + "base": null, + "refs": { + } + }, + "DeleteConnectionInput": { + "base": null, + "refs": { + } + }, + "DeleteConnectionOutput": { + "base": null, + "refs": { + } + }, + "ErrorMessage": { + "base": null, + "refs": { + "LimitExceededException$Message": null, + "ResourceNotFoundException$Message": null + } + }, + "GetConnectionInput": { + "base": null, + "refs": { + } + }, + "GetConnectionOutput": { + "base": null, + "refs": { + } + }, + "LimitExceededException": { + "base": "

Exceeded the maximum limit for connections.

", + "refs": { + } + }, + "ListConnectionsInput": { + "base": null, + "refs": { + } + }, + "ListConnectionsOutput": { + "base": null, + "refs": { + } + }, + "MaxResults": { + "base": null, + "refs": { + "ListConnectionsInput$MaxResults": "

The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value.

" + } + }, + "NextToken": { + "base": null, + "refs": { + "ListConnectionsInput$NextToken": "

The token that was returned from the previous ListConnections call, which can be used to return the next set of connections in the list.

", + "ListConnectionsOutput$NextToken": "

A token that can be used in the next ListConnections call. To view all items in the list, continue to call this operation with each subsequent token until no more nextToken values are returned.

" + } + }, + "ProviderType": { + "base": null, + "refs": { + "Connection$ProviderType": "

The name of the external provider where your third-party code repository is configured. Currently, the valid provider type is Bitbucket.

", + "CreateConnectionInput$ProviderType": "

The name of the external provider where your third-party code repository is configured. Currently, the valid provider type is Bitbucket.

", + "ListConnectionsInput$ProviderTypeFilter": "

Filters the list of connections to those associated with a specified provider, such as Bitbucket.

" + } + }, + "ResourceNotFoundException": { + "base": "

Resource not found. Verify the connection resource ARN and try again.

", + "refs": { + } + } + } +} diff --git a/models/apis/codestar-connections/2019-12-01/examples-1.json b/models/apis/codestar-connections/2019-12-01/examples-1.json new file mode 100644 index 00000000000..0ea7e3b0bbe --- /dev/null +++ b/models/apis/codestar-connections/2019-12-01/examples-1.json @@ -0,0 +1,5 @@ +{ + "version": "1.0", + "examples": { + } +} diff --git a/models/apis/codestar-connections/2019-12-01/paginators-1.json b/models/apis/codestar-connections/2019-12-01/paginators-1.json new file mode 100644 index 00000000000..deffa71f04d --- /dev/null +++ b/models/apis/codestar-connections/2019-12-01/paginators-1.json @@ -0,0 +1,9 @@ +{ + "pagination": { + "ListConnections": { + "input_token": "NextToken", + "output_token": "NextToken", + "limit_key": "MaxResults" + } + } +} diff --git a/models/apis/detective/2018-10-26/docs-2.json b/models/apis/detective/2018-10-26/docs-2.json index 81dded3c058..01d629ffbbf 100644 --- a/models/apis/detective/2018-10-26/docs-2.json +++ b/models/apis/detective/2018-10-26/docs-2.json @@ -6,7 +6,7 @@ "CreateGraph": "

Amazon Detective is currently in preview.

Creates a new behavior graph for the calling account, and sets that account as the master account. This operation is called by the account that is enabling Detective.

The operation also enables Detective for the calling account in the currently selected Region. It returns the ARN of the new behavior graph.

CreateGraph triggers a process to create the corresponding data tables for the new behavior graph.

An account can only be the master account for one behavior graph within a Region. If the same account calls CreateGraph with the same master account, it always returns the same behavior graph ARN. It does not create a new behavior graph.

", "CreateMembers": "

Amazon Detective is currently in preview.

Sends a request to invite the specified AWS accounts to be member accounts in the behavior graph. This operation can only be called by the master account for a behavior graph.

CreateMembers verifies the accounts and then sends invitations to the verified accounts.

The request provides the behavior graph ARN and the list of accounts to invite.

The response separates the requested accounts into two lists:

", "DeleteGraph": "

Amazon Detective is currently in preview.

Disables the specified behavior graph and queues it to be deleted. This operation removes the graph from each member account's list of behavior graphs.

DeleteGraph can only be called by the master account for a behavior graph.

", - "DeleteMembers": "

Amazon Detective is currently in preview.

Deletes one or more member accounts from the master account behavior graph. This operation can only be called by a Detective master account. That account cannot use DeleteMembers to delete their own account from the Morocco graph. To disable a behavior graph, the master account uses the DeleteGraph API method.

", + "DeleteMembers": "

Amazon Detective is currently in preview.

Deletes one or more member accounts from the master account behavior graph. This operation can only be called by a Detective master account. That account cannot use DeleteMembers to delete their own account from the behavior graph. To disable a behavior graph, the master account uses the DeleteGraph API method.

", "DisassociateMembership": "

Amazon Detective is currently in preview.

Removes the member account from the specified behavior graph. This operation can only be called by a member account that has the ENABLED status.

", "GetMembers": "

Amazon Detective is currently in preview.

Returns the membership details for specified member accounts for a behavior graph.

", "ListGraphs": "

Amazon Detective is currently in preview.

Returns the list of behavior graphs that the calling account is a master of. This operation can only be called by a master account.

Because an account can currently only be the master of one behavior graph within a Region, the results always contain a single graph.

", diff --git a/models/apis/devicefarm/2015-06-23/api-2.json b/models/apis/devicefarm/2015-06-23/api-2.json index 3a71a4027f8..f25e1ab28dd 100644 --- a/models/apis/devicefarm/2015-06-23/api-2.json +++ b/models/apis/devicefarm/2015-06-23/api-2.json @@ -88,6 +88,32 @@ {"shape":"ServiceAccountException"} ] }, + "CreateTestGridProject":{ + "name":"CreateTestGridProject", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"CreateTestGridProjectRequest"}, + "output":{"shape":"CreateTestGridProjectResult"}, + "errors":[ + {"shape":"InternalServiceException"} + ] + }, + "CreateTestGridUrl":{ + "name":"CreateTestGridUrl", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"CreateTestGridUrlRequest"}, + "output":{"shape":"CreateTestGridUrlResult"}, + "errors":[ + {"shape":"NotFoundException"}, + {"shape":"ArgumentException"}, + {"shape":"InternalServiceException"} + ] + }, "CreateUpload":{ "name":"CreateUpload", "http":{ @@ -207,6 +233,21 @@ {"shape":"ServiceAccountException"} ] }, + "DeleteTestGridProject":{ + "name":"DeleteTestGridProject", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeleteTestGridProjectRequest"}, + "output":{"shape":"DeleteTestGridProjectResult"}, + "errors":[ + {"shape":"NotFoundException"}, + {"shape":"ArgumentException"}, + {"shape":"CannotDeleteException"}, + {"shape":"InternalServiceException"} + ] + }, "DeleteUpload":{ "name":"DeleteUpload", "http":{ @@ -448,6 +489,34 @@ {"shape":"ServiceAccountException"} ] }, + "GetTestGridProject":{ + "name":"GetTestGridProject", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"GetTestGridProjectRequest"}, + "output":{"shape":"GetTestGridProjectResult"}, + "errors":[ + {"shape":"NotFoundException"}, + {"shape":"ArgumentException"}, + {"shape":"InternalServiceException"} + ] + }, + "GetTestGridSession":{ + "name":"GetTestGridSession", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"GetTestGridSessionRequest"}, + "output":{"shape":"GetTestGridSessionResult"}, + "errors":[ + {"shape":"NotFoundException"}, + {"shape":"ArgumentException"}, + {"shape":"InternalServiceException"} + ] + }, "GetUpload":{ "name":"GetUpload", "http":{ @@ -729,10 +798,66 @@ "input":{"shape":"ListTagsForResourceRequest"}, "output":{"shape":"ListTagsForResourceResponse"}, "errors":[ + {"shape":"ArgumentException"}, {"shape":"NotFoundException"}, {"shape":"TagOperationException"} ] }, + "ListTestGridProjects":{ + "name":"ListTestGridProjects", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListTestGridProjectsRequest"}, + "output":{"shape":"ListTestGridProjectsResult"}, + "errors":[ + {"shape":"ArgumentException"}, + {"shape":"InternalServiceException"} + ] + }, + "ListTestGridSessionActions":{ + "name":"ListTestGridSessionActions", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListTestGridSessionActionsRequest"}, + "output":{"shape":"ListTestGridSessionActionsResult"}, + "errors":[ + {"shape":"NotFoundException"}, + {"shape":"ArgumentException"}, + {"shape":"InternalServiceException"} + ] + }, + "ListTestGridSessionArtifacts":{ + "name":"ListTestGridSessionArtifacts", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListTestGridSessionArtifactsRequest"}, + "output":{"shape":"ListTestGridSessionArtifactsResult"}, + "errors":[ + {"shape":"NotFoundException"}, + {"shape":"ArgumentException"}, + {"shape":"InternalServiceException"} + ] + }, + "ListTestGridSessions":{ + "name":"ListTestGridSessions", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListTestGridSessionsRequest"}, + "output":{"shape":"ListTestGridSessionsResult"}, + "errors":[ + {"shape":"NotFoundException"}, + {"shape":"ArgumentException"}, + {"shape":"InternalServiceException"} + ] + }, "ListTests":{ "name":"ListTests", "http":{ @@ -893,6 +1018,7 @@ "input":{"shape":"TagResourceRequest"}, "output":{"shape":"TagResourceResponse"}, "errors":[ + {"shape":"ArgumentException"}, {"shape":"NotFoundException"}, {"shape":"TagOperationException"}, {"shape":"TooManyTagsException"}, @@ -908,6 +1034,7 @@ "input":{"shape":"UntagResourceRequest"}, "output":{"shape":"UntagResourceResponse"}, "errors":[ + {"shape":"ArgumentException"}, {"shape":"NotFoundException"}, {"shape":"TagOperationException"} ] @@ -987,6 +1114,20 @@ {"shape":"ServiceAccountException"} ] }, + "UpdateTestGridProject":{ + "name":"UpdateTestGridProject", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"UpdateTestGridProjectRequest"}, + "output":{"shape":"UpdateTestGridProjectResult"}, + "errors":[ + {"shape":"NotFoundException"}, + {"shape":"ArgumentException"}, + {"shape":"InternalServiceException"} + ] + }, "UpdateUpload":{ "name":"UpdateUpload", "http":{ @@ -1041,7 +1182,8 @@ "AmazonResourceName":{ "type":"string", "max":1011, - "min":32 + "min":32, + "pattern":"^arn:.+" }, "AmazonResourceNames":{ "type":"list", @@ -1130,6 +1272,13 @@ "clock":{"shape":"Double"} } }, + "CannotDeleteException":{ + "type":"structure", + "members":{ + "message":{"shape":"Message"} + }, + "exception":true + }, "ClientId":{ "type":"string", "max":64, @@ -1265,6 +1414,38 @@ "remoteAccessSession":{"shape":"RemoteAccessSession"} } }, + "CreateTestGridProjectRequest":{ + "type":"structure", + "required":["name"], + "members":{ + "name":{"shape":"ResourceName"}, + "description":{"shape":"ResourceDescription"} + } + }, + "CreateTestGridProjectResult":{ + "type":"structure", + "members":{ + "testGridProject":{"shape":"TestGridProject"} + } + }, + "CreateTestGridUrlRequest":{ + "type":"structure", + "required":[ + "projectArn", + "expiresInSeconds" + ], + "members":{ + "projectArn":{"shape":"DeviceFarmArn"}, + "expiresInSeconds":{"shape":"TestGridUrlExpiresInSecondsInput"} + } + }, + "CreateTestGridUrlResult":{ + "type":"structure", + "members":{ + "url":{"shape":"String"}, + "expires":{"shape":"DateTime"} + } + }, "CreateUploadRequest":{ "type":"structure", "required":[ @@ -1390,6 +1571,18 @@ "members":{ } }, + "DeleteTestGridProjectRequest":{ + "type":"structure", + "required":["projectArn"], + "members":{ + "projectArn":{"shape":"DeviceFarmArn"} + } + }, + "DeleteTestGridProjectResult":{ + "type":"structure", + "members":{ + } + }, "DeleteUploadRequest":{ "type":"structure", "required":["arn"], @@ -1467,6 +1660,12 @@ "HIGHLY_AVAILABLE" ] }, + "DeviceFarmArn":{ + "type":"string", + "max":1011, + "min":32, + "pattern":"^arn:aws:devicefarm:.+" + }, "DeviceFilter":{ "type":"structure", "members":{ @@ -1821,6 +2020,33 @@ "suite":{"shape":"Suite"} } }, + "GetTestGridProjectRequest":{ + "type":"structure", + "required":["projectArn"], + "members":{ + "projectArn":{"shape":"DeviceFarmArn"} + } + }, + "GetTestGridProjectResult":{ + "type":"structure", + "members":{ + "testGridProject":{"shape":"TestGridProject"} + } + }, + "GetTestGridSessionRequest":{ + "type":"structure", + "members":{ + "projectArn":{"shape":"DeviceFarmArn"}, + "sessionId":{"shape":"ResourceId"}, + "sessionArn":{"shape":"DeviceFarmArn"} + } + }, + "GetTestGridSessionResult":{ + "type":"structure", + "members":{ + "testGridSession":{"shape":"TestGridSession"} + } + }, "GetTestRequest":{ "type":"structure", "required":["arn"], @@ -1938,6 +2164,14 @@ "max":64, "min":0 }, + "InternalServiceException":{ + "type":"structure", + "members":{ + "message":{"shape":"Message"} + }, + "exception":true, + "fault":true + }, "InvalidOperationException":{ "type":"structure", "members":{ @@ -2207,7 +2441,7 @@ "type":"structure", "required":["ResourceARN"], "members":{ - "ResourceARN":{"shape":"AmazonResourceName"} + "ResourceARN":{"shape":"DeviceFarmArn"} } }, "ListTagsForResourceResponse":{ @@ -2216,6 +2450,74 @@ "Tags":{"shape":"TagList"} } }, + "ListTestGridProjectsRequest":{ + "type":"structure", + "members":{ + "maxResult":{"shape":"MaxPageSize"}, + "nextToken":{"shape":"PaginationToken"} + } + }, + "ListTestGridProjectsResult":{ + "type":"structure", + "members":{ + "testGridProjects":{"shape":"TestGridProjects"}, + "nextToken":{"shape":"PaginationToken"} + } + }, + "ListTestGridSessionActionsRequest":{ + "type":"structure", + "required":["sessionArn"], + "members":{ + "sessionArn":{"shape":"DeviceFarmArn"}, + "maxResult":{"shape":"MaxPageSize"}, + "nextToken":{"shape":"PaginationToken"} + } + }, + "ListTestGridSessionActionsResult":{ + "type":"structure", + "members":{ + "actions":{"shape":"TestGridSessionActions"}, + "nextToken":{"shape":"PaginationToken"} + } + }, + "ListTestGridSessionArtifactsRequest":{ + "type":"structure", + "required":["sessionArn"], + "members":{ + "sessionArn":{"shape":"DeviceFarmArn"}, + "type":{"shape":"TestGridSessionArtifactCategory"}, + "maxResult":{"shape":"MaxPageSize"}, + "nextToken":{"shape":"PaginationToken"} + } + }, + "ListTestGridSessionArtifactsResult":{ + "type":"structure", + "members":{ + "artifacts":{"shape":"TestGridSessionArtifacts"}, + "nextToken":{"shape":"PaginationToken"} + } + }, + "ListTestGridSessionsRequest":{ + "type":"structure", + "required":["projectArn"], + "members":{ + "projectArn":{"shape":"DeviceFarmArn"}, + "status":{"shape":"TestGridSessionStatus"}, + "creationTimeAfter":{"shape":"DateTime"}, + "creationTimeBefore":{"shape":"DateTime"}, + "endTimeAfter":{"shape":"DateTime"}, + "endTimeBefore":{"shape":"DateTime"}, + "maxResult":{"shape":"MaxPageSize"}, + "nextToken":{"shape":"PaginationToken"} + } + }, + "ListTestGridSessionsResult":{ + "type":"structure", + "members":{ + "testGridSessions":{"shape":"TestGridSessions"}, + "nextToken":{"shape":"PaginationToken"} + } + }, "ListTestsRequest":{ "type":"structure", "required":["arn"], @@ -2288,6 +2590,11 @@ } }, "Long":{"type":"long"}, + "MaxPageSize":{ + "type":"integer", + "max":1000, + "min":1 + }, "MaxSlotMap":{ "type":"map", "key":{"shape":"String"}, @@ -2573,6 +2880,24 @@ "height":{"shape":"Integer"} } }, + "ResourceDescription":{ + "type":"string", + "max":2048, + "min":1, + "pattern":".*\\S.*" + }, + "ResourceId":{ + "type":"string", + "max":128, + "min":1, + "pattern":".*\\S.*" + }, + "ResourceName":{ + "type":"string", + "max":64, + "min":1, + "pattern":".*\\S.*" + }, "Rule":{ "type":"structure", "members":{ @@ -2847,7 +3172,7 @@ "Tags" ], "members":{ - "ResourceARN":{"shape":"AmazonResourceName"}, + "ResourceARN":{"shape":"DeviceFarmArn"}, "Tags":{"shape":"TagList"} } }, @@ -2877,6 +3202,88 @@ "deviceMinutes":{"shape":"DeviceMinutes"} } }, + "TestGridProject":{ + "type":"structure", + "members":{ + "arn":{"shape":"DeviceFarmArn"}, + "name":{"shape":"String"}, + "description":{"shape":"String"}, + "created":{"shape":"DateTime"} + } + }, + "TestGridProjects":{ + "type":"list", + "member":{"shape":"TestGridProject"} + }, + "TestGridSession":{ + "type":"structure", + "members":{ + "arn":{"shape":"DeviceFarmArn"}, + "status":{"shape":"TestGridSessionStatus"}, + "created":{"shape":"DateTime"}, + "ended":{"shape":"DateTime"}, + "billingMinutes":{"shape":"Double"}, + "seleniumProperties":{"shape":"String"} + } + }, + "TestGridSessionAction":{ + "type":"structure", + "members":{ + "action":{"shape":"String"}, + "started":{"shape":"DateTime"}, + "duration":{"shape":"Long"}, + "statusCode":{"shape":"String"}, + "requestMethod":{"shape":"String"} + } + }, + "TestGridSessionActions":{ + "type":"list", + "member":{"shape":"TestGridSessionAction"} + }, + "TestGridSessionArtifact":{ + "type":"structure", + "members":{ + "filename":{"shape":"String"}, + "type":{"shape":"TestGridSessionArtifactType"}, + "url":{"shape":"String"} + } + }, + "TestGridSessionArtifactCategory":{ + "type":"string", + "enum":[ + "VIDEO", + "LOG" + ] + }, + "TestGridSessionArtifactType":{ + "type":"string", + "enum":[ + "UNKNOWN", + "VIDEO", + "SELENIUM_LOG" + ] + }, + "TestGridSessionArtifacts":{ + "type":"list", + "member":{"shape":"TestGridSessionArtifact"} + }, + "TestGridSessionStatus":{ + "type":"string", + "enum":[ + "ACTIVE", + "CLOSED", + "ERRORED" + ] + }, + "TestGridSessions":{ + "type":"list", + "member":{"shape":"TestGridSession"} + }, + "TestGridUrlExpiresInSecondsInput":{ + "type":"integer", + "max":86400, + "min":60 + }, "TestParameters":{ "type":"map", "key":{"shape":"String"}, @@ -2959,7 +3366,7 @@ "TagKeys" ], "members":{ - "ResourceARN":{"shape":"AmazonResourceName"}, + "ResourceARN":{"shape":"DeviceFarmArn"}, "TagKeys":{"shape":"TagKeyList"} } }, @@ -3058,6 +3465,21 @@ "project":{"shape":"Project"} } }, + "UpdateTestGridProjectRequest":{ + "type":"structure", + "required":["projectArn"], + "members":{ + "projectArn":{"shape":"DeviceFarmArn"}, + "name":{"shape":"ResourceName"}, + "description":{"shape":"ResourceDescription"} + } + }, + "UpdateTestGridProjectResult":{ + "type":"structure", + "members":{ + "testGridProject":{"shape":"TestGridProject"} + } + }, "UpdateUploadRequest":{ "type":"structure", "required":["arn"], diff --git a/models/apis/devicefarm/2015-06-23/docs-2.json b/models/apis/devicefarm/2015-06-23/docs-2.json index 15c03d12f72..beccbd6b5c2 100644 --- a/models/apis/devicefarm/2015-06-23/docs-2.json +++ b/models/apis/devicefarm/2015-06-23/docs-2.json @@ -1,36 +1,41 @@ { "version": "2.0", - "service": "

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.

", + "service": "

Welcome to the AWS Device Farm API documentation, which contains APIs for:

", "operations": { "CreateDevicePool": "

Creates a device pool.

", "CreateInstanceProfile": "

Creates a profile that can be applied to one or more private fleet device instances.

", "CreateNetworkProfile": "

Creates a network profile.

", - "CreateProject": "

Creates a new project.

", + "CreateProject": "

Creates a project.

", "CreateRemoteAccessSession": "

Specifies and starts a remote access session.

", + "CreateTestGridProject": "

Creates a Selenium testing project. Projects are used to track TestGridSession instances.

", + "CreateTestGridUrl": "

Creates a signed, short-term URL that can be passed to a Selenium RemoteWebDriver constructor.

", "CreateUpload": "

Uploads an app or test scripts.

", "CreateVPCEConfiguration": "

Creates a configuration record in Device Farm for your Amazon Virtual Private Cloud (VPC) endpoint.

", "DeleteDevicePool": "

Deletes a device pool given the pool ARN. Does not allow deletion of curated pools owned by the system.

", "DeleteInstanceProfile": "

Deletes a profile that can be applied to one or more private device instances.

", "DeleteNetworkProfile": "

Deletes a network profile.

", - "DeleteProject": "

Deletes an AWS Device Farm project, given the project ARN.

Note Deleting this resource does not stop an in-progress run.

", + "DeleteProject": "

Deletes an AWS Device Farm project, given the project ARN.

Deleting this resource does not stop an in-progress run.

", "DeleteRemoteAccessSession": "

Deletes a completed remote access session and its results.

", - "DeleteRun": "

Deletes the run, given the run ARN.

Note Deleting this resource does not stop an in-progress run.

", + "DeleteRun": "

Deletes the run, given the run ARN.

Deleting this resource does not stop an in-progress run.

", + "DeleteTestGridProject": "

Deletes a Selenium testing project and all content generated under it.

You cannot undo this operation.

You cannot delete a project if it has active sessions.

", "DeleteUpload": "

Deletes an upload given the upload ARN.

", "DeleteVPCEConfiguration": "

Deletes a configuration for your Amazon Virtual Private Cloud (VPC) endpoint.

", - "GetAccountSettings": "

Returns the number of unmetered iOS and/or unmetered Android devices that have been purchased by the account.

", + "GetAccountSettings": "

Returns the number of unmetered iOS or unmetered Android devices that have been purchased by the account.

", "GetDevice": "

Gets information about a unique device type.

", - "GetDeviceInstance": "

Returns information about a device instance belonging to a private device fleet.

", + "GetDeviceInstance": "

Returns information about a device instance that belongs to a private device fleet.

", "GetDevicePool": "

Gets information about a device pool.

", "GetDevicePoolCompatibility": "

Gets information about compatibility with a device pool.

", "GetInstanceProfile": "

Returns information about the specified instance profile.

", "GetJob": "

Gets information about a job.

", "GetNetworkProfile": "

Returns information about a network profile.

", - "GetOfferingStatus": "

Gets the current status and future status of all offerings purchased by an AWS account. The response indicates how many offerings are currently available and the offerings that will be available in the next period. The API returns a NotEligible error if the user is not permitted to invoke the operation. Please contact aws-devicefarm-support@amazon.com if you believe that you should be able to invoke this operation.

", + "GetOfferingStatus": "

Gets the current status and future status of all offerings purchased by an AWS account. The response indicates how many offerings are currently available and the offerings that will be available in the next period. The API returns a NotEligible error if the user is not permitted to invoke the operation. If you must be able to invoke this operation, contact aws-devicefarm-support@amazon.com.

", "GetProject": "

Gets information about a project.

", "GetRemoteAccessSession": "

Returns a link to a currently running remote access session.

", "GetRun": "

Gets information about a run.

", "GetSuite": "

Gets information about a suite.

", "GetTest": "

Gets information about a test.

", + "GetTestGridProject": "

Retrieves information about a Selenium testing project.

", + "GetTestGridSession": "

A session is an instance of a browser created through a RemoteWebDriver with the URL from CreateTestGridUrlResult$url. You can use the following to look up sessions:

", "GetUpload": "

Gets information about an upload.

", "GetVPCEConfiguration": "

Returns information about the configuration settings for your Amazon Virtual Private Cloud (VPC) endpoint.

", "InstallToRemoteAccessSession": "

Installs an application to the device in a remote access session. For Android applications, the file must be in .apk format. For iOS applications, the file must be in .ipa format.

", @@ -41,34 +46,39 @@ "ListInstanceProfiles": "

Returns information about all the instance profiles in an AWS account.

", "ListJobs": "

Gets information about jobs for a given test run.

", "ListNetworkProfiles": "

Returns the list of available network profiles.

", - "ListOfferingPromotions": "

Returns a list of offering promotions. Each offering promotion record contains the ID and description of the promotion. The API returns a NotEligible error if the caller is not permitted to invoke the operation. Contact aws-devicefarm-support@amazon.com if you believe that you should be able to invoke this operation.

", - "ListOfferingTransactions": "

Returns a list of all historical purchases, renewals, and system renewal transactions for an AWS account. The list is paginated and ordered by a descending timestamp (most recent transactions are first). The API returns a NotEligible error if the user is not permitted to invoke the operation. Please contact aws-devicefarm-support@amazon.com if you believe that you should be able to invoke this operation.

", - "ListOfferings": "

Returns a list of products or offerings that the user can manage through the API. Each offering record indicates the recurring price per unit and the frequency for that offering. The API returns a NotEligible error if the user is not permitted to invoke the operation. Please contact aws-devicefarm-support@amazon.com if you believe that you should be able to invoke this operation.

", + "ListOfferingPromotions": "

Returns a list of offering promotions. Each offering promotion record contains the ID and description of the promotion. The API returns a NotEligible error if the caller is not permitted to invoke the operation. Contact aws-devicefarm-support@amazon.com if you must be able to invoke this operation.

", + "ListOfferingTransactions": "

Returns a list of all historical purchases, renewals, and system renewal transactions for an AWS account. The list is paginated and ordered by a descending timestamp (most recent transactions are first). The API returns a NotEligible error if the user is not permitted to invoke the operation. If you must be able to invoke this operation, contact aws-devicefarm-support@amazon.com.

", + "ListOfferings": "

Returns a list of products or offerings that the user can manage through the API. Each offering record indicates the recurring price per unit and the frequency for that offering. The API returns a NotEligible error if the user is not permitted to invoke the operation. If you must be able to invoke this operation, contact aws-devicefarm-support@amazon.com.

", "ListProjects": "

Gets information about projects.

", "ListRemoteAccessSessions": "

Returns a list of all currently running remote access sessions.

", "ListRuns": "

Gets information about runs, given an AWS Device Farm project ARN.

", "ListSamples": "

Gets information about samples, given an AWS Device Farm job ARN.

", "ListSuites": "

Gets information about test suites for a given job.

", "ListTagsForResource": "

List the tags for an AWS Device Farm resource.

", + "ListTestGridProjects": "

Gets a list of all Selenium testing projects in your account.

", + "ListTestGridSessionActions": "

Returns a list of the actions taken in a TestGridSession.

", + "ListTestGridSessionArtifacts": "

Retrieves a list of artifacts created during the session.

", + "ListTestGridSessions": "

Retrieves a list of sessions for a TestGridProject.

", "ListTests": "

Gets information about tests in a given test suite.

", - "ListUniqueProblems": "

Gets information about unique problems.

", + "ListUniqueProblems": "

Gets information about unique problems, such as exceptions or crashes.

Unique problems are defined as a single instance of an error across a run, job, or suite. For example, if a call in your application consistently raises an exception (OutOfBoundsException in MyActivity.java:386), ListUniqueProblems returns a single entry instead of many individual entries for that exception.

", "ListUploads": "

Gets information about uploads, given an AWS Device Farm project ARN.

", "ListVPCEConfigurations": "

Returns information about all Amazon Virtual Private Cloud (VPC) endpoint configurations in the AWS account.

", - "PurchaseOffering": "

Immediately purchases offerings for an AWS account. Offerings renew with the latest total purchased quantity for an offering, unless the renewal was overridden. The API returns a NotEligible error if the user is not permitted to invoke the operation. Please contact aws-devicefarm-support@amazon.com if you believe that you should be able to invoke this operation.

", - "RenewOffering": "

Explicitly sets the quantity of devices to renew for an offering, starting from the effectiveDate of the next period. The API returns a NotEligible error if the user is not permitted to invoke the operation. Please contact aws-devicefarm-support@amazon.com if you believe that you should be able to invoke this operation.

", + "PurchaseOffering": "

Immediately purchases offerings for an AWS account. Offerings renew with the latest total purchased quantity for an offering, unless the renewal was overridden. The API returns a NotEligible error if the user is not permitted to invoke the operation. If you must be able to invoke this operation, contact aws-devicefarm-support@amazon.com.

", + "RenewOffering": "

Explicitly sets the quantity of devices to renew for an offering, starting from the effectiveDate of the next period. The API returns a NotEligible error if the user is not permitted to invoke the operation. If you must be able to invoke this operation, contact aws-devicefarm-support@amazon.com.

", "ScheduleRun": "

Schedules a run.

", - "StopJob": "

Initiates a stop request for the current job. AWS Device Farm will immediately stop the job on the device where tests have not started executing, and you will not be billed for this device. On the device where tests have started executing, Setup Suite and Teardown Suite tests will run to completion before stopping execution on the device. You will be billed for Setup, Teardown, and any tests that were in progress or already completed.

", + "StopJob": "

Initiates a stop request for the current job. AWS Device Farm immediately stops the job on the device where tests have not started. You are not billed for this device. On the device where tests have started, setup suite and teardown suite tests run to completion on the device. You are billed for setup, teardown, and any tests that were in progress or already completed.

", "StopRemoteAccessSession": "

Ends a specified remote access session.

", - "StopRun": "

Initiates a stop request for the current test run. AWS Device Farm will immediately stop the run on devices where tests have not started executing, and you will not be billed for these devices. On devices where tests have started executing, Setup Suite and Teardown Suite tests will run to completion before stopping execution on those devices. You will be billed for Setup, Teardown, and any tests that were in progress or already completed.

", - "TagResource": "

Associates the specified tags to a resource with the specified resourceArn. If existing tags on a resource are not specified in the request parameters, they are not changed. When a resource is deleted, the tags associated with that resource are deleted as well.

", + "StopRun": "

Initiates a stop request for the current test run. AWS Device Farm immediately stops the run on devices where tests have not started. You are not billed for these devices. On devices where tests have started executing, setup suite and teardown suite tests run to completion on those devices. You are billed for setup, teardown, and any tests that were in progress or already completed.

", + "TagResource": "

Associates the specified tags to a resource with the specified resourceArn. If existing tags on a resource are not specified in the request parameters, they are not changed. When a resource is deleted, the tags associated with that resource are also deleted.

", "UntagResource": "

Deletes the specified tags from a resource.

", - "UpdateDeviceInstance": "

Updates information about an existing private device instance.

", + "UpdateDeviceInstance": "

Updates information about a private device instance.

", "UpdateDevicePool": "

Modifies the name, description, and rules in a device pool given the attributes and the pool ARN. Rule updates are all-or-nothing, meaning they can only be updated as a whole (or not at all).

", "UpdateInstanceProfile": "

Updates information about an existing private device instance profile.

", - "UpdateNetworkProfile": "

Updates the network profile with specific settings.

", + "UpdateNetworkProfile": "

Updates the network profile.

", "UpdateProject": "

Modifies the specified project name, given the project ARN and a new name.

", - "UpdateUpload": "

Update an uploaded test specification (test spec).

", - "UpdateVPCEConfiguration": "

Updates information about an existing Amazon Virtual Private Cloud (VPC) endpoint configuration.

" + "UpdateTestGridProject": "

Change details of a project.

", + "UpdateUpload": "

Updates an uploaded test spec.

", + "UpdateVPCEConfiguration": "

Updates information about an Amazon Virtual Private Cloud (VPC) endpoint configuration.

" }, "shapes": { "AWSAccountNumber": { @@ -78,7 +88,7 @@ } }, "AccountSettings": { - "base": "

A container for account-level settings within AWS Device Farm.

", + "base": "

A container for account-level settings in AWS Device Farm.

", "refs": { "GetAccountSettingsResult$accountSettings": "

The account settings.

" } @@ -86,7 +96,7 @@ "AccountsCleanup": { "base": null, "refs": { - "ExecutionConfiguration$accountsCleanup": "

True if account cleanup is enabled at the beginning of the test; otherwise, false.

" + "ExecutionConfiguration$accountsCleanup": "

True if account cleanup is enabled at the beginning of the test. Otherwise, false.

" } }, "AmazonResourceName": { @@ -97,30 +107,30 @@ "CreateDevicePoolRequest$projectArn": "

The ARN of the project for the device pool.

", "CreateNetworkProfileRequest$projectArn": "

The Amazon Resource Name (ARN) of the project for which you want to create a network profile.

", "CreateRemoteAccessSessionRequest$projectArn": "

The Amazon Resource Name (ARN) of the project for which you want to create a remote access session.

", - "CreateRemoteAccessSessionRequest$deviceArn": "

The Amazon Resource Name (ARN) of the device for which you want to create a remote access session.

", + "CreateRemoteAccessSessionRequest$deviceArn": "

The ARN of the device for which you want to create a remote access session.

", "CreateRemoteAccessSessionRequest$instanceArn": "

The Amazon Resource Name (ARN) of the device instance for which you want to create a remote access session.

", "CreateRemoteAccessSessionRequest$remoteRecordAppArn": "

The Amazon Resource Name (ARN) for the app to be recorded in the remote access session.

", "CreateUploadRequest$projectArn": "

The ARN of the project for the upload.

", - "DeleteDevicePoolRequest$arn": "

Represents the Amazon Resource Name (ARN) of the Device Farm device pool you wish to delete.

", + "DeleteDevicePoolRequest$arn": "

Represents the Amazon Resource Name (ARN) of the Device Farm device pool to delete.

", "DeleteInstanceProfileRequest$arn": "

The Amazon Resource Name (ARN) of the instance profile you are requesting to delete.

", - "DeleteNetworkProfileRequest$arn": "

The Amazon Resource Name (ARN) of the network profile you want to delete.

", - "DeleteProjectRequest$arn": "

Represents the Amazon Resource Name (ARN) of the Device Farm project you wish to delete.

", + "DeleteNetworkProfileRequest$arn": "

The ARN of the network profile to delete.

", + "DeleteProjectRequest$arn": "

Represents the Amazon Resource Name (ARN) of the Device Farm project to delete.

", "DeleteRemoteAccessSessionRequest$arn": "

The Amazon Resource Name (ARN) of the session for which you want to delete remote access.

", - "DeleteRunRequest$arn": "

The Amazon Resource Name (ARN) for the run you wish to delete.

", - "DeleteUploadRequest$arn": "

Represents the Amazon Resource Name (ARN) of the Device Farm upload you wish to delete.

", + "DeleteRunRequest$arn": "

The Amazon Resource Name (ARN) for the run to delete.

", + "DeleteUploadRequest$arn": "

Represents the Amazon Resource Name (ARN) of the Device Farm upload to delete.

", "DeleteVPCEConfigurationRequest$arn": "

The Amazon Resource Name (ARN) of the VPC endpoint configuration you want to delete.

", "Device$arn": "

The device's ARN.

", "DeviceInstance$arn": "

The Amazon Resource Name (ARN) of the device instance.

", - "DeviceInstance$deviceArn": "

The Amazon Resource Name (ARN) of the device.

", + "DeviceInstance$deviceArn": "

The ARN of the device.

", "DevicePool$arn": "

The device pool's ARN.

", "GetDeviceInstanceRequest$arn": "

The Amazon Resource Name (ARN) of the instance you're requesting information about.

", "GetDevicePoolCompatibilityRequest$devicePoolArn": "

The device pool's ARN.

", "GetDevicePoolCompatibilityRequest$appArn": "

The ARN of the app that is associated with the specified device pool.

", "GetDevicePoolRequest$arn": "

The device pool's ARN.

", "GetDeviceRequest$arn": "

The device type's ARN.

", - "GetInstanceProfileRequest$arn": "

The Amazon Resource Name (ARN) of your instance profile.

", + "GetInstanceProfileRequest$arn": "

The Amazon Resource Name (ARN) of an instance profile.

", "GetJobRequest$arn": "

The job's ARN.

", - "GetNetworkProfileRequest$arn": "

The Amazon Resource Name (ARN) of the network profile you want to return information about.

", + "GetNetworkProfileRequest$arn": "

The ARN of the network profile to return information about.

", "GetProjectRequest$arn": "

The project's ARN.

", "GetRemoteAccessSessionRequest$arn": "

The Amazon Resource Name (ARN) of the remote access session about which you want to get session information.

", "GetRunRequest$arn": "

The run's ARN.

", @@ -129,11 +139,11 @@ "GetUploadRequest$arn": "

The upload's ARN.

", "GetVPCEConfigurationRequest$arn": "

The Amazon Resource Name (ARN) of the VPC endpoint configuration you want to describe.

", "InstallToRemoteAccessSessionRequest$remoteAccessSessionArn": "

The Amazon Resource Name (ARN) of the remote access session about which you are requesting information.

", - "InstallToRemoteAccessSessionRequest$appArn": "

The Amazon Resource Name (ARN) of the app about which you are requesting information.

", + "InstallToRemoteAccessSessionRequest$appArn": "

The ARN of the app about which you are requesting information.

", "InstanceProfile$arn": "

The Amazon Resource Name (ARN) of the instance profile.

", "Job$arn": "

The job's ARN.

", - "Job$instanceArn": "

The Amazon Resource Name (ARN) of the instance.

", - "ListArtifactsRequest$arn": "

The Run, Job, Suite, or Test ARN.

", + "Job$instanceArn": "

The ARN of the instance.

", + "ListArtifactsRequest$arn": "

The run, job, suite, or test ARN.

", "ListDevicePoolsRequest$arn": "

The project ARN.

", "ListDevicesRequest$arn": "

The Amazon Resource Name (ARN) of the project.

", "ListJobsRequest$arn": "

The run's Amazon Resource Name (ARN).

", @@ -143,7 +153,6 @@ "ListRunsRequest$arn": "

The Amazon Resource Name (ARN) of the project for which you want to list runs.

", "ListSamplesRequest$arn": "

The Amazon Resource Name (ARN) of the job used to list samples.

", "ListSuitesRequest$arn": "

The job's Amazon Resource Name (ARN).

", - "ListTagsForResourceRequest$ResourceARN": "

The Amazon Resource Name (ARN) of the resource(s) for which to list tags. You can associate tags with the following Device Farm resources: PROJECT, RUN, NETWORK_PROFILE, INSTANCE_PROFILE, DEVICE_INSTANCE, SESSION, DEVICE_POOL, DEVICE, and VPCE_CONFIGURATION.

", "ListTestsRequest$arn": "

The test suite's Amazon Resource Name (ARN).

", "ListUniqueProblemsRequest$arn": "

The unique problems' ARNs.

", "ListUploadsRequest$arn": "

The Amazon Resource Name (ARN) of the project for which you want to list uploads.

", @@ -151,36 +160,34 @@ "ProblemDetail$arn": "

The problem detail's ARN.

", "Project$arn": "

The project's ARN.

", "RemoteAccessSession$arn": "

The Amazon Resource Name (ARN) of the remote access session.

", - "RemoteAccessSession$instanceArn": "

The Amazon Resource Name (ARN) of the instance.

", - "RemoteAccessSession$remoteRecordAppArn": "

The Amazon Resource Name (ARN) for the app to be recorded in the remote access session.

", + "RemoteAccessSession$instanceArn": "

The ARN of the instance.

", + "RemoteAccessSession$remoteRecordAppArn": "

The ARN for the app to be recorded in the remote access session.

", "Run$arn": "

The run's ARN.

", "Run$appUpload": "

An app to upload or that has been uploaded.

", "Run$devicePoolArn": "

The ARN of the device pool for the run.

", "Run$testSpecArn": "

The ARN of the YAML-formatted test specification for the run.

", "Sample$arn": "

The sample's ARN.

", - "ScheduleRunConfiguration$extraDataPackageArn": "

The ARN of the extra data for the run. The extra data is a .zip file that AWS Device Farm will extract to external data for Android or the app's sandbox for iOS.

", + "ScheduleRunConfiguration$extraDataPackageArn": "

The ARN of the extra data for the run. The extra data is a .zip file that AWS Device Farm extracts to external data for Android or the app's sandbox for iOS.

", "ScheduleRunConfiguration$networkProfileArn": "

Reserved for internal use.

", "ScheduleRunRequest$projectArn": "

The ARN of the project for the run to be scheduled.

", - "ScheduleRunRequest$appArn": "

The ARN of the app to schedule a run.

", + "ScheduleRunRequest$appArn": "

The ARN of an application package to run tests against, created with CreateUpload. See ListUploads.

", "ScheduleRunRequest$devicePoolArn": "

The ARN of the device pool for the run to be scheduled.

", - "ScheduleRunTest$testPackageArn": "

The ARN of the uploaded test that will be run.

", + "ScheduleRunTest$testPackageArn": "

The ARN of the uploaded test to be run.

", "ScheduleRunTest$testSpecArn": "

The ARN of the YAML-formatted test specification.

", - "StopJobRequest$arn": "

Represents the Amazon Resource Name (ARN) of the Device Farm job you wish to stop.

", - "StopRemoteAccessSessionRequest$arn": "

The Amazon Resource Name (ARN) of the remote access session you wish to stop.

", - "StopRunRequest$arn": "

Represents the Amazon Resource Name (ARN) of the Device Farm run you wish to stop.

", + "StopJobRequest$arn": "

Represents the Amazon Resource Name (ARN) of the Device Farm job to stop.

", + "StopRemoteAccessSessionRequest$arn": "

The Amazon Resource Name (ARN) of the remote access session to stop.

", + "StopRunRequest$arn": "

Represents the Amazon Resource Name (ARN) of the Device Farm run to stop.

", "Suite$arn": "

The suite's ARN.

", "TagOperationException$resourceName": null, "TagPolicyException$resourceName": null, - "TagResourceRequest$ResourceARN": "

The Amazon Resource Name (ARN) of the resource(s) to which to add tags. You can associate tags with the following Device Farm resources: PROJECT, RUN, NETWORK_PROFILE, INSTANCE_PROFILE, DEVICE_INSTANCE, SESSION, DEVICE_POOL, DEVICE, and VPCE_CONFIGURATION.

", "Test$arn": "

The test's ARN.

", "TooManyTagsException$resourceName": null, - "UntagResourceRequest$ResourceARN": "

The Amazon Resource Name (ARN) of the resource(s) from which to delete tags. You can associate tags with the following Device Farm resources: PROJECT, RUN, NETWORK_PROFILE, INSTANCE_PROFILE, DEVICE_INSTANCE, SESSION, DEVICE_POOL, DEVICE, and VPCE_CONFIGURATION.

", "UpdateDeviceInstanceRequest$arn": "

The Amazon Resource Name (ARN) of the device instance.

", - "UpdateDeviceInstanceRequest$profileArn": "

The Amazon Resource Name (ARN) of the profile that you want to associate with the device instance.

", - "UpdateDevicePoolRequest$arn": "

The Amazon Resource Name (ARN) of the Device Farm device pool you wish to update.

", + "UpdateDeviceInstanceRequest$profileArn": "

The ARN of the profile that you want to associate with the device instance.

", + "UpdateDevicePoolRequest$arn": "

The Amazon Resource Name (ARN) of the Device Farm device pool to update.

", "UpdateInstanceProfileRequest$arn": "

The Amazon Resource Name (ARN) of the instance profile.

", "UpdateNetworkProfileRequest$arn": "

The Amazon Resource Name (ARN) of the project for which you want to update network profile settings.

", - "UpdateProjectRequest$arn": "

The Amazon Resource Name (ARN) of the project whose name you wish to update.

", + "UpdateProjectRequest$arn": "

The Amazon Resource Name (ARN) of the project whose name to update.

", "UpdateUploadRequest$arn": "

The Amazon Resource Name (ARN) of the uploaded test spec.

", "UpdateVPCEConfigurationRequest$arn": "

The Amazon Resource Name (ARN) of the VPC endpoint configuration you want to update.

", "Upload$arn": "

The upload's ARN.

", @@ -190,21 +197,21 @@ "AmazonResourceNames": { "base": null, "refs": { - "CreateRemoteAccessSessionConfiguration$vpceConfigurationArns": "

An array of Amazon Resource Names (ARNs) included in the VPC endpoint configuration.

", - "ScheduleRunConfiguration$vpceConfigurationArns": "

An array of Amazon Resource Names (ARNs) for your VPC endpoint configurations.

", - "ScheduleRunConfiguration$auxiliaryApps": "

A list of Upload ARNs for app packages that will be installed alongside your app.

" + "CreateRemoteAccessSessionConfiguration$vpceConfigurationArns": "

An array of ARNs included in the VPC endpoint configuration.

", + "ScheduleRunConfiguration$vpceConfigurationArns": "

An array of ARNs for your VPC endpoint configurations.

", + "ScheduleRunConfiguration$auxiliaryApps": "

A list of upload ARNs for app packages to be installed with your app.

" } }, "AndroidPaths": { "base": null, "refs": { - "CustomerArtifactPaths$androidPaths": "

Comma-separated list of paths on the Android device where the artifacts generated by the customer's tests will be pulled from.

" + "CustomerArtifactPaths$androidPaths": "

Comma-separated list of paths on the Android device where the artifacts generated by the customer's tests are pulled from.

" } }, "AppPackagesCleanup": { "base": null, "refs": { - "ExecutionConfiguration$appPackagesCleanup": "

True if app package cleanup is enabled at the beginning of the test; otherwise, false.

" + "ExecutionConfiguration$appPackagesCleanup": "

True if app package cleanup is enabled at the beginning of the test. Otherwise, false.

" } }, "ArgumentException": { @@ -221,13 +228,13 @@ "ArtifactCategory": { "base": null, "refs": { - "ListArtifactsRequest$type": "

The artifacts' type.

Allowed values include:

" + "ListArtifactsRequest$type": "

The artifacts' type.

Allowed values include:

" } }, "ArtifactType": { "base": null, "refs": { - "Artifact$type": "

The artifact's type.

Allowed values include the following:

" + "Artifact$type": "

The artifact's type.

Allowed values include the following:

" } }, "Artifacts": { @@ -240,55 +247,60 @@ "base": null, "refs": { "CreateRemoteAccessSessionConfiguration$billingMethod": "

The billing method for the remote access session.

", - "RemoteAccessSession$billingMethod": "

The billing method of the remote access session. Possible values include METERED or UNMETERED. For more information about metered devices, see AWS Device Farm terminology.\"

", - "Run$billingMethod": "

Specifies the billing method for a test run: metered or unmetered. If the parameter is not specified, the default value is metered.

", - "ScheduleRunConfiguration$billingMethod": "

Specifies the billing method for a test run: metered or unmetered. If the parameter is not specified, the default value is metered.

" + "RemoteAccessSession$billingMethod": "

The billing method of the remote access session. Possible values include METERED or UNMETERED. For more information about metered devices, see AWS Device Farm terminology.

", + "Run$billingMethod": "

Specifies the billing method for a test run: metered or unmetered. If the parameter is not specified, the default value is metered.

If you have unmetered device slots, you must set this to unmetered to use them. Otherwise, the run is counted toward metered device minutes.

", + "ScheduleRunConfiguration$billingMethod": "

Specifies the billing method for a test run: metered or unmetered. If the parameter is not specified, the default value is metered.

If you have purchased unmetered device slots, you must set this parameter to unmetered to make use of them. Otherwise, your run counts against your metered time.

" } }, "Boolean": { "base": null, "refs": { - "CreateInstanceProfileRequest$packageCleanup": "

When set to true, Device Farm will remove app packages after a test run. The default value is false for private devices.

", - "CreateInstanceProfileRequest$rebootAfterUse": "

When set to true, Device Farm will reboot the instance after a test run. The default value is true.

", - "CreateRemoteAccessSessionRequest$remoteDebugEnabled": "

Set to true if you want to access devices remotely for debugging in your remote access session.

Remote debugging is no longer supported.

", + "CreateInstanceProfileRequest$packageCleanup": "

When set to true, Device Farm removes app packages after a test run. The default value is false for private devices.

", + "CreateInstanceProfileRequest$rebootAfterUse": "

When set to true, Device Farm reboots the instance after a test run. The default value is true.

", + "CreateRemoteAccessSessionRequest$remoteDebugEnabled": "

Set to true if you want to access devices remotely for debugging in your remote access session.

Remote debugging is no longer supported.

", "CreateRemoteAccessSessionRequest$remoteRecordEnabled": "

Set to true to enable remote recording for the remote access session.

", - "CreateRemoteAccessSessionRequest$skipAppResign": "

When set to true, for private devices, Device Farm will not sign your app again. For public devices, Device Farm always signs your apps again and this parameter has no effect.

For more information about how Device Farm re-signs your app(s), see Do you modify my app? in the AWS Device Farm FAQs.

", + "CreateRemoteAccessSessionRequest$skipAppResign": "

When set to true, for private devices, Device Farm does not sign your app again. For public devices, Device Farm always signs your apps again.

For more information on how Device Farm modifies your uploads during tests, see Do you modify my app?

", "Device$remoteAccessEnabled": "

Specifies whether remote access has been enabled for the specified device.

", - "Device$remoteDebugEnabled": "

This flag is set to true if remote debugging is enabled for the device.

Remote debugging is no longer supported.

", + "Device$remoteDebugEnabled": "

This flag is set to true if remote debugging is enabled for the device.

Remote debugging is no longer supported.

", "DevicePoolCompatibilityResult$compatible": "

Whether the result was compatible with the device pool.

", - "InstanceProfile$packageCleanup": "

When set to true, Device Farm will remove app packages after a test run. The default value is false for private devices.

", - "InstanceProfile$rebootAfterUse": "

When set to true, Device Farm will reboot the instance after a test run. The default value is true.

", - "Radios$wifi": "

True if Wi-Fi is enabled at the beginning of the test; otherwise, false.

", - "Radios$bluetooth": "

True if Bluetooth is enabled at the beginning of the test; otherwise, false.

", - "Radios$nfc": "

True if NFC is enabled at the beginning of the test; otherwise, false.

", - "Radios$gps": "

True if GPS is enabled at the beginning of the test; otherwise, false.

", - "RemoteAccessSession$remoteDebugEnabled": "

This flag is set to true if remote debugging is enabled for the remote access session.

Remote debugging is no longer supported.

", + "InstanceProfile$packageCleanup": "

When set to true, Device Farm removes app packages after a test run. The default value is false for private devices.

", + "InstanceProfile$rebootAfterUse": "

When set to true, Device Farm reboots the instance after a test run. The default value is true.

", + "Radios$wifi": "

True if Wi-Fi is enabled at the beginning of the test. Otherwise, false.

", + "Radios$bluetooth": "

True if Bluetooth is enabled at the beginning of the test. Otherwise, false.

", + "Radios$nfc": "

True if NFC is enabled at the beginning of the test. Otherwise, false.

", + "Radios$gps": "

True if GPS is enabled at the beginning of the test. Otherwise, false.

", + "RemoteAccessSession$remoteDebugEnabled": "

This flag is set to true if remote debugging is enabled for the remote access session.

Remote debugging is no longer supported.

", "RemoteAccessSession$remoteRecordEnabled": "

This flag is set to true if remote recording is enabled for the remote access session.

", - "UpdateDevicePoolRequest$clearMaxDevices": "

Sets whether the maxDevices parameter applies to your device pool. If you set this parameter to true, the maxDevices parameter does not apply, and Device Farm does not limit the number of devices that it adds to your device pool. In this case, Device Farm adds all available devices that meet the criteria that are specified for the rules parameter.

If you use this parameter in your request, you cannot use the maxDevices parameter in the same request.

", + "UpdateDevicePoolRequest$clearMaxDevices": "

Sets whether the maxDevices parameter applies to your device pool. If you set this parameter to true, the maxDevices parameter does not apply, and Device Farm does not limit the number of devices that it adds to your device pool. In this case, Device Farm adds all available devices that meet the criteria specified in the rules parameter.

If you use this parameter in your request, you cannot use the maxDevices parameter in the same request.

", "UpdateInstanceProfileRequest$packageCleanup": "

The updated choice for whether you want to specify package cleanup. The default value is false for private devices.

", "UpdateInstanceProfileRequest$rebootAfterUse": "

The updated choice for whether you want to reboot the device after use. The default value is true.

", - "UpdateUploadRequest$editContent": "

Set to true if the YAML file has changed and needs to be updated; otherwise, set to false.

" + "UpdateUploadRequest$editContent": "

Set to true if the YAML file has changed and must be updated. Otherwise, set to false.

" } }, "CPU": { - "base": "

Represents the amount of CPU that an app is using on a physical device.

Note that this does not represent system-wide CPU usage.

", + "base": "

Represents the amount of CPU that an app is using on a physical device. Does not represent system-wide CPU usage.

", "refs": { "Device$cpu": "

Information about the device's CPU.

" } }, + "CannotDeleteException": { + "base": "

The requested object could not be deleted.

", + "refs": { + } + }, "ClientId": { "base": null, "refs": { - "CreateRemoteAccessSessionRequest$clientId": "

Unique identifier for the client. If you want access to multiple devices on the same client, you should pass the same clientId value in each call to CreateRemoteAccessSession. This is required only if remoteDebugEnabled is set to true.

Remote debugging is no longer supported.

", - "RemoteAccessSession$clientId": "

Unique identifier of your client for the remote access session. Only returned if remote debugging is enabled for the remote access session.

Remote debugging is no longer supported.

" + "CreateRemoteAccessSessionRequest$clientId": "

Unique identifier for the client. If you want access to multiple devices on the same client, you should pass the same clientId value in each call to CreateRemoteAccessSession. This identifier is required only if remoteDebugEnabled is set to true.

Remote debugging is no longer supported.

", + "RemoteAccessSession$clientId": "

Unique identifier of your client for the remote access session. Only returned if remote debugging is enabled for the remote access session.

Remote debugging is no longer supported.

" } }, "ContentType": { "base": null, "refs": { - "CreateUploadRequest$contentType": "

The upload's content type (for example, \"application/octet-stream\").

", - "UpdateUploadRequest$contentType": "

The upload's content type (for example, \"application/x-yaml\").

", - "Upload$contentType": "

The upload's content type (for example, \"application/octet-stream\").

" + "CreateUploadRequest$contentType": "

The upload's content type (for example, application/octet-stream).

", + "UpdateUploadRequest$contentType": "

The upload's content type (for example, application/x-yaml).

", + "Upload$contentType": "

The upload's content type (for example, application/octet-stream).

" } }, "Counters": { @@ -356,6 +368,26 @@ "refs": { } }, + "CreateTestGridProjectRequest": { + "base": null, + "refs": { + } + }, + "CreateTestGridProjectResult": { + "base": null, + "refs": { + } + }, + "CreateTestGridUrlRequest": { + "base": null, + "refs": { + } + }, + "CreateTestGridUrlResult": { + "base": null, + "refs": { + } + }, "CreateUploadRequest": { "base": "

Represents a request to the create upload operation.

", "refs": { @@ -379,11 +411,11 @@ "CurrencyCode": { "base": null, "refs": { - "MonetaryAmount$currencyCode": "

The currency code of a monetary amount. For example, USD means \"U.S. dollars.\"

" + "MonetaryAmount$currencyCode": "

The currency code of a monetary amount. For example, USD means U.S. dollars.

" } }, "CustomerArtifactPaths": { - "base": "

A JSON object specifying the paths where the artifacts generated by the customer's tests, on the device or in the test environment, will be pulled from.

Specify deviceHostPaths and optionally specify either iosPaths or androidPaths.

For web app tests, you can specify both iosPaths and androidPaths.

", + "base": "

A JSON object that specifies the paths where the artifacts generated by the customer's tests, on the device or in the test environment, are pulled from.

Specify deviceHostPaths and optionally specify either iosPaths or androidPaths.

For web app tests, you can specify both iosPaths and androidPaths.

", "refs": { "Run$customerArtifactPaths": "

Output CustomerArtifactPaths object for the test run.

", "ScheduleRunConfiguration$customerArtifactPaths": "

Input CustomerArtifactPaths object for the scheduled run configuration.

" @@ -392,9 +424,14 @@ "DateTime": { "base": null, "refs": { + "CreateTestGridUrlResult$expires": "

The number of seconds the URL from CreateTestGridUrlResult$url stays active.

", "Job$created": "

When the job was created.

", "Job$started": "

The job's start time.

", "Job$stopped": "

The job's stop time.

", + "ListTestGridSessionsRequest$creationTimeAfter": "

Return only sessions created after this time.

", + "ListTestGridSessionsRequest$creationTimeBefore": "

Return only sessions created before this time.

", + "ListTestGridSessionsRequest$endTimeAfter": "

Return only sessions that ended after this time.

", + "ListTestGridSessionsRequest$endTimeBefore": "

Return only sessions that ended before this time.

", "OfferingStatus$effectiveOn": "

The date on which the offering is effective.

", "OfferingTransaction$createdOn": "

The date on which an offering transaction was created.

", "Project$created": "

When the project was created.

", @@ -410,6 +447,10 @@ "Test$created": "

When the test was created.

", "Test$started": "

The test's start time.

", "Test$stopped": "

The test's stop time.

", + "TestGridProject$created": "

When the project was created.

", + "TestGridSession$created": "

The time that the session was started.

", + "TestGridSession$ended": "

The time the session ended.

", + "TestGridSessionAction$started": "

The time that the session invoked the action.

", "Upload$created": "

When the upload was created.

" } }, @@ -473,6 +514,16 @@ "refs": { } }, + "DeleteTestGridProjectRequest": { + "base": null, + "refs": { + } + }, + "DeleteTestGridProjectResult": { + "base": null, + "refs": { + } + }, "DeleteUploadRequest": { "base": "

Represents a request to the delete upload operation.

", "refs": { @@ -496,9 +547,9 @@ "Device": { "base": "

Represents a device type that an app is tested against.

", "refs": { - "DevicePoolCompatibilityResult$device": "

The device (phone or tablet) that you wish to return information about.

", + "DevicePoolCompatibilityResult$device": "

The device (phone or tablet) to return information about.

", "Devices$member": null, - "GetDeviceResult$device": "

An object containing information about the requested device.

", + "GetDeviceResult$device": "

An object that contains information about the requested device.

", "Job$device": "

The device (phone or tablet).

", "Problem$device": "

Information about the associated device.

", "RemoteAccessSession$device": "

The device (phone or tablet) used in the remote access session.

" @@ -507,18 +558,37 @@ "DeviceAttribute": { "base": null, "refs": { - "IncompatibilityMessage$type": "

The type of incompatibility.

Allowed values include:

", - "Rule$attribute": "

The rule's stringified attribute. For example, specify the value as \"\\\"abc\\\"\".

The supported operators for each attribute are provided in the following list.

APPIUM_VERSION

The Appium version for the test.

Supported operators: CONTAINS

ARN

The Amazon Resource Name (ARN) of the device. For example, \"arn:aws:devicefarm:us-west-2::device:12345Example\".

Supported operators: EQUALS, IN, NOT_IN

AVAILABILITY

The current availability of the device. Valid values are \"AVAILABLE\", \"HIGHLY_AVAILABLE\", \"BUSY\", or \"TEMPORARY_NOT_AVAILABLE\".

Supported operators: EQUALS

FLEET_TYPE

The fleet type. Valid values are \"PUBLIC\" or \"PRIVATE\".

Supported operators: EQUALS

FORM_FACTOR

The device form factor. Valid values are \"PHONE\" or \"TABLET\".

Supported operators: EQUALS, IN, NOT_IN

INSTANCE_ARN

The Amazon Resource Name (ARN) of the device instance.

Supported operators: IN, NOT_IN

INSTANCE_LABELS

The label of the device instance.

Supported operators: CONTAINS

MANUFACTURER

The device manufacturer. For example, \"Apple\".

Supported operators: EQUALS, IN, NOT_IN

MODEL

The device model, such as \"Apple iPad Air 2\" or \"Google Pixel\".

Supported operators: CONTAINS, EQUALS, IN, NOT_IN

OS_VERSION

The operating system version. For example, \"10.3.2\".

Supported operators: EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUALS, IN, LESS_THAN, LESS_THAN_OR_EQUALS, NOT_IN

PLATFORM

The device platform. Valid values are \"ANDROID\" or \"IOS\".

Supported operators: EQUALS, IN, NOT_IN

REMOTE_ACCESS_ENABLED

Whether the device is enabled for remote access. Valid values are \"TRUE\" or \"FALSE\".

Supported operators: EQUALS

REMOTE_DEBUG_ENABLED

Whether the device is enabled for remote debugging. Valid values are \"TRUE\" or \"FALSE\".

Supported operators: EQUALS

This filter will be ignored, as remote debugging is no longer supported.

" + "IncompatibilityMessage$type": "

The type of incompatibility.

Allowed values include:

", + "Rule$attribute": "

The rule's stringified attribute. For example, specify the value as \"\\\"abc\\\"\".

The supported operators for each attribute are provided in the following list.

APPIUM_VERSION

The Appium version for the test.

Supported operators: CONTAINS

ARN

The Amazon Resource Name (ARN) of the device (for example, arn:aws:devicefarm:us-west-2::device:12345Example.

Supported operators: EQUALS, IN, NOT_IN

AVAILABILITY

The current availability of the device. Valid values are AVAILABLE, HIGHLY_AVAILABLE, BUSY, or TEMPORARY_NOT_AVAILABLE.

Supported operators: EQUALS

FLEET_TYPE

The fleet type. Valid values are PUBLIC or PRIVATE.

Supported operators: EQUALS

FORM_FACTOR

The device form factor. Valid values are PHONE or TABLET.

Supported operators: EQUALS, IN, NOT_IN

INSTANCE_ARN

The Amazon Resource Name (ARN) of the device instance.

Supported operators: IN, NOT_IN

INSTANCE_LABELS

The label of the device instance.

Supported operators: CONTAINS

MANUFACTURER

The device manufacturer (for example, Apple).

Supported operators: EQUALS, IN, NOT_IN

MODEL

The device model, such as Apple iPad Air 2 or Google Pixel.

Supported operators: CONTAINS, EQUALS, IN, NOT_IN

OS_VERSION

The operating system version (for example, 10.3.2).

Supported operators: EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUALS, IN, LESS_THAN, LESS_THAN_OR_EQUALS, NOT_IN

PLATFORM

The device platform. Valid values are ANDROID or IOS.

Supported operators: EQUALS, IN, NOT_IN

REMOTE_ACCESS_ENABLED

Whether the device is enabled for remote access. Valid values are TRUE or FALSE.

Supported operators: EQUALS

REMOTE_DEBUG_ENABLED

Whether the device is enabled for remote debugging. Valid values are TRUE or FALSE.

Supported operators: EQUALS

Because remote debugging is no longer supported, this filter is ignored.

" } }, "DeviceAvailability": { "base": null, "refs": { - "Device$availability": "

Reflects how likely a device will be available for a test run. It is currently available in the ListDevices and GetDevice API methods.

" + "Device$availability": "

Indicates how likely a device is available for a test run. Currently available in the ListDevices and GetDevice API methods.

" + } + }, + "DeviceFarmArn": { + "base": null, + "refs": { + "CreateTestGridUrlRequest$projectArn": "

ARN (from CreateTestGridProject or ListTestGridProjects) to associate with the short-term URL.

", + "DeleteTestGridProjectRequest$projectArn": "

The ARN of the project to delete, from CreateTestGridProject or ListTestGridProjects.

", + "GetTestGridProjectRequest$projectArn": "

The ARN of the Selenium testing project, from either CreateTestGridProject or ListTestGridProjects.

", + "GetTestGridSessionRequest$projectArn": "

The ARN for the project that this session belongs to. See CreateTestGridProject and ListTestGridProjects.

", + "GetTestGridSessionRequest$sessionArn": "

An ARN that uniquely identifies a TestGridSession.

", + "ListTagsForResourceRequest$ResourceARN": "

The Amazon Resource Name (ARN) of the resource or resources for which to list tags. You can associate tags with the following Device Farm resources: PROJECT, RUN, NETWORK_PROFILE, INSTANCE_PROFILE, DEVICE_INSTANCE, SESSION, DEVICE_POOL, DEVICE, and VPCE_CONFIGURATION.

", + "ListTestGridSessionActionsRequest$sessionArn": "

The ARN of the session to retrieve.

", + "ListTestGridSessionArtifactsRequest$sessionArn": "

The ARN of a TestGridSession.

", + "ListTestGridSessionsRequest$projectArn": "

ARN of a TestGridProject.

", + "TagResourceRequest$ResourceARN": "

The Amazon Resource Name (ARN) of the resource or resources to which to add tags. You can associate tags with the following Device Farm resources: PROJECT, RUN, NETWORK_PROFILE, INSTANCE_PROFILE, DEVICE_INSTANCE, SESSION, DEVICE_POOL, DEVICE, and VPCE_CONFIGURATION.

", + "TestGridProject$arn": "

The ARN for the project.

", + "TestGridSession$arn": "

The ARN of the session.

", + "UntagResourceRequest$ResourceARN": "

The Amazon Resource Name (ARN) of the resource or resources from which to delete tags. You can associate tags with the following Device Farm resources: PROJECT, RUN, NETWORK_PROFILE, INSTANCE_PROFILE, DEVICE_INSTANCE, SESSION, DEVICE_POOL, DEVICE, and VPCE_CONFIGURATION.

", + "UpdateTestGridProjectRequest$projectArn": "

ARN of the project to update.

" } }, "DeviceFilter": { - "base": "

Represents a device filter used to select a set of devices to be included in a test run. This data structure is passed in as the deviceSelectionConfiguration parameter to ScheduleRun. For an example of the JSON request syntax, see ScheduleRun.

It is also passed in as the filters parameter to ListDevices. For an example of the JSON request syntax, see ListDevices.

", + "base": "

Represents a device filter used to select a set of devices to be included in a test run. This data structure is passed in as the deviceSelectionConfiguration parameter to ScheduleRun. For an example of the JSON request syntax, see ScheduleRun.

It is also passed in as the filters parameter to ListDevices. For an example of the JSON request syntax, see ListDevices.

", "refs": { "DeviceFilters$member": null } @@ -526,48 +596,48 @@ "DeviceFilterAttribute": { "base": null, "refs": { - "DeviceFilter$attribute": "

The aspect of a device such as platform or model used as the selection criteria in a device filter.

The supported operators for each attribute are provided in the following list.

ARN

The Amazon Resource Name (ARN) of the device. For example, \"arn:aws:devicefarm:us-west-2::device:12345Example\".

Supported operators: EQUALS, IN, NOT_IN

PLATFORM

The device platform. Valid values are \"ANDROID\" or \"IOS\".

Supported operators: EQUALS

OS_VERSION

The operating system version. For example, \"10.3.2\".

Supported operators: EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUALS, IN, LESS_THAN, LESS_THAN_OR_EQUALS, NOT_IN

MODEL

The device model. For example, \"iPad 5th Gen\".

Supported operators: CONTAINS, EQUALS, IN, NOT_IN

AVAILABILITY

The current availability of the device. Valid values are \"AVAILABLE\", \"HIGHLY_AVAILABLE\", \"BUSY\", or \"TEMPORARY_NOT_AVAILABLE\".

Supported operators: EQUALS

FORM_FACTOR

The device form factor. Valid values are \"PHONE\" or \"TABLET\".

Supported operators: EQUALS

MANUFACTURER

The device manufacturer. For example, \"Apple\".

Supported operators: EQUALS, IN, NOT_IN

REMOTE_ACCESS_ENABLED

Whether the device is enabled for remote access. Valid values are \"TRUE\" or \"FALSE\".

Supported operators: EQUALS

REMOTE_DEBUG_ENABLED

Ignored.Whether the device is enabled for remote debugging. Valid values are \"TRUE\" or \"FALSE\".

Supported operators: EQUALS

This filter will be ignored, as remote debugging is no longer supported.

INSTANCE_ARN

The Amazon Resource Name (ARN) of the device instance.

Supported operators: EQUALS, IN, NOT_IN

INSTANCE_LABELS

The label of the device instance.

Supported operators: CONTAINS

FLEET_TYPE

The fleet type. Valid values are \"PUBLIC\" or \"PRIVATE\".

Supported operators: EQUALS

" + "DeviceFilter$attribute": "

The aspect of a device such as platform or model used as the selection criteria in a device filter.

The supported operators for each attribute are provided in the following list.

ARN

The Amazon Resource Name (ARN) of the device (for example, arn:aws:devicefarm:us-west-2::device:12345Example).

Supported operators: EQUALS, IN, NOT_IN

PLATFORM

The device platform. Valid values are ANDROID or IOS.

Supported operators: EQUALS

OS_VERSION

The operating system version (for example, 10.3.2).

Supported operators: EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUALS, IN, LESS_THAN, LESS_THAN_OR_EQUALS, NOT_IN

MODEL

The device model (for example, iPad 5th Gen).

Supported operators: CONTAINS, EQUALS, IN, NOT_IN

AVAILABILITY

The current availability of the device. Valid values are AVAILABLE, HIGHLY_AVAILABLE, BUSY, or TEMPORARY_NOT_AVAILABLE.

Supported operators: EQUALS

FORM_FACTOR

The device form factor. Valid values are PHONE or TABLET.

Supported operators: EQUALS

MANUFACTURER

The device manufacturer (for example, Apple).

Supported operators: EQUALS, IN, NOT_IN

REMOTE_ACCESS_ENABLED

Whether the device is enabled for remote access. Valid values are TRUE or FALSE.

Supported operators: EQUALS

REMOTE_DEBUG_ENABLED

Whether the device is enabled for remote debugging. Valid values are TRUE or FALSE.

Supported operators: EQUALS

Because remote debugging is no longer supported, this filter is ignored.

INSTANCE_ARN

The Amazon Resource Name (ARN) of the device instance.

Supported operators: EQUALS, IN, NOT_IN

INSTANCE_LABELS

The label of the device instance.

Supported operators: CONTAINS

FLEET_TYPE

The fleet type. Valid values are PUBLIC or PRIVATE.

Supported operators: EQUALS

" } }, "DeviceFilterValues": { "base": null, "refs": { - "DeviceFilter$values": "

An array of one or more filter values used in a device filter.

Operator Values

Attribute Values

" + "DeviceFilter$values": "

An array of one or more filter values used in a device filter.

Operator Values

Attribute Values

" } }, "DeviceFilters": { "base": null, "refs": { - "DeviceSelectionConfiguration$filters": "

Used to dynamically select a set of devices for a test run. A filter is made up of an attribute, an operator, and one or more values.

", + "DeviceSelectionConfiguration$filters": "

Used to dynamically select a set of devices for a test run. A filter is made up of an attribute, an operator, and one or more values.

", "DeviceSelectionResult$filters": "

The filters in a device selection result.

", - "ListDevicesRequest$filters": "

Used to select a set of devices. A filter is made up of an attribute, an operator, and one or more values.

" + "ListDevicesRequest$filters": "

Used to select a set of devices. A filter is made up of an attribute, an operator, and one or more values.

" } }, "DeviceFormFactor": { "base": null, "refs": { - "Device$formFactor": "

The device's form factor.

Allowed values include:

" + "Device$formFactor": "

The device's form factor.

Allowed values include:

" } }, "DeviceHostPaths": { "base": null, "refs": { - "CustomerArtifactPaths$deviceHostPaths": "

Comma-separated list of paths in the test execution environment where the artifacts generated by the customer's tests will be pulled from.

" + "CustomerArtifactPaths$deviceHostPaths": "

Comma-separated list of paths in the test execution environment where the artifacts generated by the customer's tests are pulled from.

" } }, "DeviceInstance": { "base": "

Represents the device instance.

", "refs": { "DeviceInstances$member": null, - "GetDeviceInstanceResult$deviceInstance": "

An object containing information about your device instance.

", - "UpdateDeviceInstanceResult$deviceInstance": "

An object containing information about your device instance.

" + "GetDeviceInstanceResult$deviceInstance": "

An object that contains information about your device instance.

", + "UpdateDeviceInstanceResult$deviceInstance": "

An object that contains information about your device instance.

" } }, "DeviceInstances": { "base": null, "refs": { - "Device$instances": "

The instances belonging to this device.

", - "ListDeviceInstancesResult$deviceInstances": "

An object containing information about your device instances.

" + "Device$instances": "

The instances that belong to this device.

", + "ListDeviceInstancesResult$deviceInstances": "

An object that contains information about your device instances.

" } }, "DeviceMinutes": { @@ -583,10 +653,10 @@ "DevicePlatform": { "base": null, "refs": { - "Device$platform": "

The device's platform.

Allowed values include:

", - "Offering$platform": "

The platform of the device (e.g., ANDROID or IOS).

", + "Device$platform": "

The device's platform.

Allowed values include:

", + "Offering$platform": "

The platform of the device (for example, ANDROID or IOS).

", "PurchasedDevicesMap$key": null, - "Run$platform": "

The run's platform.

Allowed values include:

" + "Run$platform": "

The run's platform.

Allowed values include:

" } }, "DevicePool": { @@ -594,7 +664,7 @@ "refs": { "CreateDevicePoolResult$devicePool": "

The newly created device pool.

", "DevicePools$member": null, - "GetDevicePoolResult$devicePool": "

An object containing information about the requested device pool.

", + "GetDevicePoolResult$devicePool": "

An object that contains information about the requested device pool.

", "UpdateDevicePoolResult$devicePool": "

The device pool you just updated.

" } }, @@ -625,13 +695,13 @@ } }, "DeviceSelectionConfiguration": { - "base": "

Represents the device filters used in a test run as well as the maximum number of devices to be included in the run. It is passed in as the deviceSelectionConfiguration request parameter in ScheduleRun.

", + "base": "

Represents the device filters used in a test run and the maximum number of devices to be included in the run. It is passed in as the deviceSelectionConfiguration request parameter in ScheduleRun.

", "refs": { - "ScheduleRunRequest$deviceSelectionConfiguration": "

The filter criteria used to dynamically select a set of devices for a test run, as well as the maximum number of devices to be included in the run.

Either devicePoolArn or deviceSelectionConfiguration is required in a request.

" + "ScheduleRunRequest$deviceSelectionConfiguration": "

The filter criteria used to dynamically select a set of devices for a test run and the maximum number of devices to be included in the run.

Either devicePoolArn or deviceSelectionConfiguration is required in a request.

" } }, "DeviceSelectionResult": { - "base": "

Contains the run results requested by the device selection configuration as well as how many devices were returned. For an example of the JSON response syntax, see ScheduleRun.

", + "base": "

Contains the run results requested by the device selection configuration and how many devices were returned. For an example of the JSON response syntax, see ScheduleRun.

", "refs": { "Run$deviceSelectionResult": "

The results of a device filter used to select the devices for a test run.

" } @@ -652,6 +722,7 @@ "Location$latitude": "

The latitude.

", "Location$longitude": "

The longitude.

", "MonetaryAmount$amount": "

The numerical amount of an offering or transaction.

", + "TestGridSession$billingMinutes": "

The number of billed minutes that were used for this session.

", "TrialMinutes$total": "

The total number of free trial minutes that the account started with.

", "TrialMinutes$remaining": "

The number of free trial minutes remaining in the account.

" } @@ -673,12 +744,12 @@ "ExecutionResult": { "base": null, "refs": { - "Job$result": "

The job's result.

Allowed values include:

", - "Problem$result": "

The problem's result.

Allowed values include:

", - "RemoteAccessSession$result": "

The result of the remote access session. Can be any of the following:

", - "Run$result": "

The run's result.

Allowed values include:

", - "Suite$result": "

The suite's result.

Allowed values include:

", - "Test$result": "

The test's result.

Allowed values include:

", + "Job$result": "

The job's result.

Allowed values include:

", + "Problem$result": "

The problem's result.

Allowed values include:

", + "RemoteAccessSession$result": "

The result of the remote access session. Can be any of the following:

", + "Run$result": "

The run's result.

Allowed values include:

", + "Suite$result": "

The suite's result.

Allowed values include:

", + "Test$result": "

The test's result.

Allowed values include:

", "UniqueProblemsByExecutionResultMap$key": null } }, @@ -691,11 +762,11 @@ "ExecutionStatus": { "base": null, "refs": { - "Job$status": "

The job's status.

Allowed values include:

", - "RemoteAccessSession$status": "

The status of the remote access session. Can be any of the following:

", - "Run$status": "

The run's status.

Allowed values include:

", - "Suite$status": "

The suite's status.

Allowed values include:

", - "Test$status": "

The test's status.

Allowed values include:

" + "Job$status": "

The job's status.

Allowed values include:

", + "RemoteAccessSession$status": "

The status of the remote access session. Can be any of the following:

", + "Run$status": "

The run's status.

Allowed values include:

", + "Suite$status": "

The suite's status.

Allowed values include:

", + "Test$status": "

The test's status.

Allowed values include:

" } }, "Filter": { @@ -834,6 +905,26 @@ "refs": { } }, + "GetTestGridProjectRequest": { + "base": null, + "refs": { + } + }, + "GetTestGridProjectResult": { + "base": null, + "refs": { + } + }, + "GetTestGridSessionRequest": { + "base": null, + "refs": { + } + }, + "GetTestGridSessionResult": { + "base": null, + "refs": { + } + }, "GetTestRequest": { "base": "

Represents a request to the get test operation.

", "refs": { @@ -867,7 +958,7 @@ "HostAddress": { "base": null, "refs": { - "RemoteAccessSession$hostAddress": "

IP address of the EC2 host where you need to connect to remotely debug devices. Only returned if remote debugging is enabled for the remote access session.

Remote debugging is no longer supported.

" + "RemoteAccessSession$hostAddress": "

IP address of the EC2 host where you need to connect to remotely debug devices. Only returned if remote debugging is enabled for the remote access session.

Remote debugging is no longer supported.

" } }, "IdempotencyException": { @@ -900,30 +991,30 @@ "InstanceLabels": { "base": null, "refs": { - "DeviceInstance$labels": "

An array of strings describing the device instance.

", + "DeviceInstance$labels": "

An array of strings that describe the device instance.

", "UpdateDeviceInstanceRequest$labels": "

An array of strings that you want to associate with the device instance.

" } }, "InstanceProfile": { "base": "

Represents the instance profile.

", "refs": { - "CreateInstanceProfileResult$instanceProfile": "

An object containing information about your instance profile.

", - "DeviceInstance$instanceProfile": "

A object containing information about the instance profile.

", - "GetInstanceProfileResult$instanceProfile": "

An object containing information about your instance profile.

", + "CreateInstanceProfileResult$instanceProfile": "

An object that contains information about your instance profile.

", + "DeviceInstance$instanceProfile": "

A object that contains information about the instance profile.

", + "GetInstanceProfileResult$instanceProfile": "

An object that contains information about an instance profile.

", "InstanceProfiles$member": null, - "UpdateInstanceProfileResult$instanceProfile": "

An object containing information about your instance profile.

" + "UpdateInstanceProfileResult$instanceProfile": "

An object that contains information about your instance profile.

" } }, "InstanceProfiles": { "base": null, "refs": { - "ListInstanceProfilesResult$instanceProfiles": "

An object containing information about your instance profiles.

" + "ListInstanceProfilesResult$instanceProfiles": "

An object that contains information about your instance profiles.

" } }, "InstanceStatus": { "base": null, "refs": { - "DeviceInstance$status": "

The status of the device instance. Valid values are listed below.

" + "DeviceInstance$status": "

The status of the device instance. Valid values are listed here.

" } }, "Integer": { @@ -936,17 +1027,17 @@ "Counters$errored": "

The number of errored entities.

", "Counters$stopped": "

The number of stopped entities.

", "Counters$skipped": "

The number of skipped entities.

", - "CreateDevicePoolRequest$maxDevices": "

The number of devices that Device Farm can add to your device pool. Device Farm adds devices that are available and that meet the criteria that you assign for the rules parameter. Depending on how many devices meet these constraints, your device pool might contain fewer devices than the value for this parameter.

By specifying the maximum number of devices, you can control the costs that you incur by running tests.

", - "DevicePool$maxDevices": "

The number of devices that Device Farm can add to your device pool. Device Farm adds devices that are available and that meet the criteria that you assign for the rules parameter. Depending on how many devices meet these constraints, your device pool might contain fewer devices than the value for this parameter.

By specifying the maximum number of devices, you can control the costs that you incur by running tests.

", + "CreateDevicePoolRequest$maxDevices": "

The number of devices that Device Farm can add to your device pool. Device Farm adds devices that are available and meet the criteria that you assign for the rules parameter. Depending on how many devices meet these constraints, your device pool might contain fewer devices than the value for this parameter.

By specifying the maximum number of devices, you can control the costs that you incur by running tests.

", + "DevicePool$maxDevices": "

The number of devices that Device Farm can add to your device pool. Device Farm adds devices that are available and meet the criteria that you assign for the rules parameter. Depending on how many devices meet these constraints, your device pool might contain fewer devices than the value for this parameter.

By specifying the maximum number of devices, you can control the costs that you incur by running tests.

", "DeviceSelectionConfiguration$maxDevices": "

The maximum number of devices to be included in a test run.

", "DeviceSelectionResult$matchedDevicesCount": "

The number of devices that matched the device filter selection criteria.

", "DeviceSelectionResult$maxDevices": "

The maximum number of devices to be selected by a device filter and included in a test run.

", - "ListDeviceInstancesRequest$maxResults": "

An integer specifying the maximum number of items you want to return in the API response.

", - "ListInstanceProfilesRequest$maxResults": "

An integer specifying the maximum number of items you want to return in the API response.

", - "ListVPCEConfigurationsRequest$maxResults": "

An integer specifying the maximum number of items you want to return in the API response.

", + "ListDeviceInstancesRequest$maxResults": "

An integer that specifies the maximum number of items you want to return in the API response.

", + "ListInstanceProfilesRequest$maxResults": "

An integer that specifies the maximum number of items you want to return in the API response.

", + "ListVPCEConfigurationsRequest$maxResults": "

An integer that specifies the maximum number of items you want to return in the API response.

", "MaxSlotMap$value": null, "OfferingStatus$quantity": "

The number of available devices in the offering.

", - "PurchaseOfferingRequest$quantity": "

The number of device slots you wish to purchase in an offering request.

", + "PurchaseOfferingRequest$quantity": "

The number of device slots to purchase in an offering request.

", "PurchasedDevicesMap$value": null, "RenewOfferingRequest$quantity": "

The quantity requested in an offering renewal.

", "Resolution$width": "

The screen resolution's width, expressed in pixels.

", @@ -961,8 +1052,13 @@ "InteractionMode": { "base": null, "refs": { - "CreateRemoteAccessSessionRequest$interactionMode": "

The interaction mode of the remote access session. Valid values are:

", - "RemoteAccessSession$interactionMode": "

The interaction mode of the remote access session. Valid values are:

" + "CreateRemoteAccessSessionRequest$interactionMode": "

The interaction mode of the remote access session. Valid values are:

", + "RemoteAccessSession$interactionMode": "

The interaction mode of the remote access session. Valid values are:

" + } + }, + "InternalServiceException": { + "base": "

An internal exception was raised in the service. Contact aws-devicefarm-support@amazon.com if you see this error.

", + "refs": { } }, "InvalidOperationException": { @@ -973,13 +1069,13 @@ "IosPaths": { "base": null, "refs": { - "CustomerArtifactPaths$iosPaths": "

Comma-separated list of paths on the iOS device where the artifacts generated by the customer's tests will be pulled from.

" + "CustomerArtifactPaths$iosPaths": "

Comma-separated list of paths on the iOS device where the artifacts generated by the customer's tests are pulled from.

" } }, "Job": { "base": "

Represents a device.

", "refs": { - "GetJobResult$job": "

An object containing information about the requested job.

", + "GetJobResult$job": "

An object that contains information about the requested job.

", "Jobs$member": null, "StopJobResult$job": "

The job that was stopped.

" } @@ -987,13 +1083,13 @@ "JobTimeoutMinutes": { "base": null, "refs": { - "AccountSettings$maxJobTimeoutMinutes": "

The maximum number of minutes a test run will execute before it times out.

", - "AccountSettings$defaultJobTimeoutMinutes": "

The default number of minutes (at the account level) a test run will execute before it times out. The default value is 150 minutes.

", - "CreateProjectRequest$defaultJobTimeoutMinutes": "

Sets the execution timeout value (in minutes) for a project. All test runs in this project will use the specified execution timeout value unless overridden when scheduling a run.

", - "ExecutionConfiguration$jobTimeoutMinutes": "

The number of minutes a test run will execute before it times out.

", - "Project$defaultJobTimeoutMinutes": "

The default number of minutes (at the project level) a test run will execute before it times out. The default value is 150 minutes.

", - "Run$jobTimeoutMinutes": "

The number of minutes the job will execute before it times out.

", - "UpdateProjectRequest$defaultJobTimeoutMinutes": "

The number of minutes a test run in the project will execute before it times out.

" + "AccountSettings$maxJobTimeoutMinutes": "

The maximum number of minutes a test run executes before it times out.

", + "AccountSettings$defaultJobTimeoutMinutes": "

The default number of minutes (at the account level) a test run executes before it times out. The default value is 150 minutes.

", + "CreateProjectRequest$defaultJobTimeoutMinutes": "

Sets the execution timeout value (in minutes) for a project. All test runs in this project use the specified execution timeout value unless overridden when scheduling a run.

", + "ExecutionConfiguration$jobTimeoutMinutes": "

The number of minutes a test run executes before it times out.

", + "Project$defaultJobTimeoutMinutes": "

The default number of minutes (at the project level) a test run executes before it times out. The default value is 150 minutes.

", + "Run$jobTimeoutMinutes": "

The number of minutes the job executes before it times out.

", + "UpdateProjectRequest$defaultJobTimeoutMinutes": "

The number of minutes a test run in the project executes before it times out.

" } }, "Jobs": { @@ -1167,6 +1263,46 @@ "refs": { } }, + "ListTestGridProjectsRequest": { + "base": null, + "refs": { + } + }, + "ListTestGridProjectsResult": { + "base": null, + "refs": { + } + }, + "ListTestGridSessionActionsRequest": { + "base": null, + "refs": { + } + }, + "ListTestGridSessionActionsResult": { + "base": null, + "refs": { + } + }, + "ListTestGridSessionArtifactsRequest": { + "base": null, + "refs": { + } + }, + "ListTestGridSessionArtifactsResult": { + "base": null, + "refs": { + } + }, + "ListTestGridSessionsRequest": { + "base": null, + "refs": { + } + }, + "ListTestGridSessionsResult": { + "base": null, + "refs": { + } + }, "ListTestsRequest": { "base": "

Represents a request to the list tests operation.

", "refs": { @@ -1208,7 +1344,7 @@ } }, "Location": { - "base": "

Represents a latitude and longitude pair, expressed in geographic coordinate system degrees (for example 47.6204, -122.3491).

Elevation is currently not supported.

", + "base": "

Represents a latitude and longitude pair, expressed in geographic coordinate system degrees (for example, 47.6204, -122.3491).

Elevation is currently not supported.

", "refs": { "Run$location": "

Information about the location that is used for the run.

", "ScheduleRunConfiguration$location": "

Information about the location that is used for the run.

" @@ -1231,6 +1367,7 @@ "NetworkProfile$downlinkDelayMs": "

Delay time for all packets to destination in milliseconds as an integer from 0 to 2000.

", "NetworkProfile$uplinkJitterMs": "

Time variation in the delay of received packets in milliseconds as an integer from 0 to 2000.

", "NetworkProfile$downlinkJitterMs": "

Time variation in the delay of received packets in milliseconds as an integer from 0 to 2000.

", + "TestGridSessionAction$duration": "

The time, in milliseconds, that the action took to complete in the browser.

", "UpdateNetworkProfileRequest$uplinkBandwidthBits": "

The data throughput rate in bits per second, as an integer from 0 to 104857600.

", "UpdateNetworkProfileRequest$downlinkBandwidthBits": "

The data throughput rate in bits per second, as an integer from 0 to 104857600.

", "UpdateNetworkProfileRequest$uplinkDelayMs": "

Delay time for all packets to destination in milliseconds as an integer from 0 to 2000.

", @@ -1239,6 +1376,15 @@ "UpdateNetworkProfileRequest$downlinkJitterMs": "

Time variation in the delay of received packets in milliseconds as an integer from 0 to 2000.

" } }, + "MaxPageSize": { + "base": null, + "refs": { + "ListTestGridProjectsRequest$maxResult": "

Return no more than this number of results.

", + "ListTestGridSessionActionsRequest$maxResult": "

The maximum number of sessions to return per response.

", + "ListTestGridSessionArtifactsRequest$maxResult": "

The maximum number of results to be returned by a request.

", + "ListTestGridSessionsRequest$maxResult": "

Return only this many results at a time.

" + } + }, "MaxSlotMap": { "base": null, "refs": { @@ -1249,6 +1395,7 @@ "base": null, "refs": { "ArgumentException$message": "

Any additional information about the exception.

", + "CannotDeleteException$message": null, "CreateDevicePoolRequest$description": "

The device pool's description.

", "CreateInstanceProfileRequest$description": "

The description of your instance profile.

", "CreateNetworkProfileRequest$description": "

The description of the network profile.

", @@ -1256,14 +1403,15 @@ "IdempotencyException$message": "

Any additional information about the exception.

", "IncompatibilityMessage$message": "

A message about the incompatibility.

", "InstanceProfile$description": "

The description of the instance profile.

", + "InternalServiceException$message": null, "InvalidOperationException$message": null, "Job$message": "

A message about the job's result.

", "LimitExceededException$message": "

Any additional information about the exception.

", "NetworkProfile$description": "

The description of the network profile.

", "NotEligibleException$message": "

The HTTP response code of a Not Eligible exception.

", "NotFoundException$message": "

Any additional information about the exception.

", - "Offering$description": "

A string describing the offering.

", - "OfferingPromotion$description": "

A string describing the offering promotion.

", + "Offering$description": "

A string that describes the offering.

", + "OfferingPromotion$description": "

A string that describes the offering promotion.

", "Problem$message": "

A message about the problem's result.

", "RemoteAccessSession$message": "

A message about the remote access session.

", "Run$message": "

A message about the run's result.

", @@ -1271,7 +1419,7 @@ "Suite$message": "

A message about the suite's result.

", "Test$message": "

A message about the test's result.

", "UniqueProblem$message": "

A message about the unique problems' result.

", - "UpdateDevicePoolRequest$description": "

A description of the device pool you wish to update.

", + "UpdateDevicePoolRequest$description": "

A description of the device pool to update.

", "UpdateInstanceProfileRequest$description": "

The updated description for your instance profile.

", "UpdateNetworkProfileRequest$description": "

The description of the network profile about which you are returning information.

", "Upload$message": "

A message about the upload's result.

" @@ -1284,7 +1432,7 @@ } }, "MonetaryAmount": { - "base": "

A number representing the monetary amount for an offering or transaction.

", + "base": "

A number that represents the monetary amount for an offering or transaction.

", "refs": { "OfferingTransaction$cost": "

The cost of an offering transaction.

", "RecurringCharge$cost": "

The cost of the recurring charge.

" @@ -1296,10 +1444,10 @@ "Artifact$name": "

The artifact's name.

", "CreateDevicePoolRequest$name": "

The device pool's name.

", "CreateInstanceProfileRequest$name": "

The name of your instance profile.

", - "CreateNetworkProfileRequest$name": "

The name you wish to specify for the new network profile.

", + "CreateNetworkProfileRequest$name": "

The name for the new network profile.

", "CreateProjectRequest$name": "

The project's name.

", - "CreateRemoteAccessSessionRequest$name": "

The name of the remote access session that you wish to create.

", - "CreateUploadRequest$name": "

The upload's file name. The name should not contain the '/' character. If uploading an iOS app, the file name needs to end with the .ipa extension. If uploading an Android app, the file name needs to end with the .apk extension. For all others, the file name must end with the .zip file extension.

", + "CreateRemoteAccessSessionRequest$name": "

The name of the remote access session to create.

", + "CreateUploadRequest$name": "

The upload's file name. The name should not contain any forward slashes (/). If you are uploading an iOS app, the file name must end with the .ipa extension. If you are uploading an Android app, the file name must end with the .apk extension. For all others, the file name must end with the .zip file extension.

", "Device$name": "

The device's display name.

", "DevicePool$name": "

The device pool's name.

", "InstanceProfile$name": "

The name of the instance profile.

", @@ -1312,11 +1460,11 @@ "ScheduleRunRequest$name": "

The name for the run to be scheduled.

", "Suite$name": "

The suite's name.

", "Test$name": "

The test's name.

", - "UpdateDevicePoolRequest$name": "

A string representing the name of the device pool you wish to update.

", + "UpdateDevicePoolRequest$name": "

A string that represents the name of the device pool to update.

", "UpdateInstanceProfileRequest$name": "

The updated name for your instance profile.

", "UpdateNetworkProfileRequest$name": "

The name of the network profile about which you are returning information.

", - "UpdateProjectRequest$name": "

A string representing the new name of the project that you are updating.

", - "UpdateUploadRequest$name": "

The upload's test spec file name. The name should not contain the '/' character. The test spec file name must end with the .yaml or .yml file extension.

", + "UpdateProjectRequest$name": "

A string that represents the new name of the project that you are updating.

", + "UpdateUploadRequest$name": "

The upload's test spec file name. The name must not contain any forward slashes (/). The test spec file name must end with the .yaml or .yml file extension.

", "Upload$name": "

The upload's file name.

" } }, @@ -1333,10 +1481,10 @@ "NetworkProfileType": { "base": null, "refs": { - "CreateNetworkProfileRequest$type": "

The type of network profile you wish to create. Valid values are listed below.

", - "ListNetworkProfilesRequest$type": "

The type of network profile you wish to return information about. Valid values are listed below.

", - "NetworkProfile$type": "

The type of network profile. Valid values are listed below.

", - "UpdateNetworkProfileRequest$type": "

The type of network profile you wish to return information about. Valid values are listed below.

" + "CreateNetworkProfileRequest$type": "

The type of network profile to create. Valid values are listed here.

", + "ListNetworkProfilesRequest$type": "

The type of network profile to return information about. Valid values are listed here.

", + "NetworkProfile$type": "

The type of network profile. Valid values are listed here.

", + "UpdateNetworkProfileRequest$type": "

The type of network profile to return information about. Valid values are listed here.

" } }, "NetworkProfiles": { @@ -1428,21 +1576,21 @@ "OfferingType": { "base": null, "refs": { - "Offering$type": "

The type of offering (e.g., \"RECURRING\") for a device.

" + "Offering$type": "

The type of offering (for example, RECURRING) for a device.

" } }, "Offerings": { "base": null, "refs": { - "ListOfferingsResult$offerings": "

A value representing the list offering results.

" + "ListOfferingsResult$offerings": "

A value that represents the list offering results.

" } }, "PackageIds": { "base": null, "refs": { - "CreateInstanceProfileRequest$excludeAppPackagesFromCleanup": "

An array of strings specifying the list of app packages that should not be cleaned up from the device after a test run is over.

The list of packages is only considered if you set packageCleanup to true.

", - "InstanceProfile$excludeAppPackagesFromCleanup": "

An array of strings specifying the list of app packages that should not be cleaned up from the device after a test run is over.

The list of packages is only considered if you set packageCleanup to true.

", - "UpdateInstanceProfileRequest$excludeAppPackagesFromCleanup": "

An array of strings specifying the list of app packages that should not be cleaned up from the device after a test run is over.

The list of packages is only considered if you set packageCleanup to true.

" + "CreateInstanceProfileRequest$excludeAppPackagesFromCleanup": "

An array of strings that specifies the list of app packages that should not be cleaned up from the device after a test run.

The list of packages is considered only if you set packageCleanup to true.

", + "InstanceProfile$excludeAppPackagesFromCleanup": "

An array of strings containing the list of app packages that should not be cleaned up from the device after a test run completes.

The list of packages is considered only if you set packageCleanup to true.

", + "UpdateInstanceProfileRequest$excludeAppPackagesFromCleanup": "

An array of strings that specifies the list of app packages that should not be cleaned up from the device after a test run is over.

The list of packages is only considered if you set packageCleanup to true.

" } }, "PaginationToken": { @@ -1451,17 +1599,17 @@ "GetOfferingStatusRequest$nextToken": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

", "GetOfferingStatusResult$nextToken": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

", "ListArtifactsRequest$nextToken": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

", - "ListArtifactsResult$nextToken": "

If the number of items that are returned is significantly large, this is an identifier that is also returned, which can be used in a subsequent call to this operation to return the next set of items in the list.

", + "ListArtifactsResult$nextToken": "

If the number of items that are returned is significantly large, this is an identifier that is also returned. It can be used in a subsequent call to this operation to return the next set of items in the list.

", "ListDeviceInstancesRequest$nextToken": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

", "ListDeviceInstancesResult$nextToken": "

An identifier that can be used in the next call to this operation to return the next set of items in the list.

", "ListDevicePoolsRequest$nextToken": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

", - "ListDevicePoolsResult$nextToken": "

If the number of items that are returned is significantly large, this is an identifier that is also returned, which can be used in a subsequent call to this operation to return the next set of items in the list.

", + "ListDevicePoolsResult$nextToken": "

If the number of items that are returned is significantly large, this is an identifier that is also returned. It can be used in a subsequent call to this operation to return the next set of items in the list.

", "ListDevicesRequest$nextToken": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

", - "ListDevicesResult$nextToken": "

If the number of items that are returned is significantly large, this is an identifier that is also returned, which can be used in a subsequent call to this operation to return the next set of items in the list.

", + "ListDevicesResult$nextToken": "

If the number of items that are returned is significantly large, this is an identifier that is also returned. It can be used in a subsequent call to this operation to return the next set of items in the list.

", "ListInstanceProfilesRequest$nextToken": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

", "ListInstanceProfilesResult$nextToken": "

An identifier that can be used in the next call to this operation to return the next set of items in the list.

", "ListJobsRequest$nextToken": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

", - "ListJobsResult$nextToken": "

If the number of items that are returned is significantly large, this is an identifier that is also returned, which can be used in a subsequent call to this operation to return the next set of items in the list.

", + "ListJobsResult$nextToken": "

If the number of items that are returned is significantly large, this is an identifier that is also returned. It can be used in a subsequent call to this operation to return the next set of items in the list.

", "ListNetworkProfilesRequest$nextToken": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

", "ListNetworkProfilesResult$nextToken": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

", "ListOfferingPromotionsRequest$nextToken": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

", @@ -1471,21 +1619,29 @@ "ListOfferingsRequest$nextToken": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

", "ListOfferingsResult$nextToken": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

", "ListProjectsRequest$nextToken": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

", - "ListProjectsResult$nextToken": "

If the number of items that are returned is significantly large, this is an identifier that is also returned, which can be used in a subsequent call to this operation to return the next set of items in the list.

", + "ListProjectsResult$nextToken": "

If the number of items that are returned is significantly large, this is an identifier that is also returned. It can be used in a subsequent call to this operation to return the next set of items in the list.

", "ListRemoteAccessSessionsRequest$nextToken": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

", "ListRemoteAccessSessionsResult$nextToken": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

", "ListRunsRequest$nextToken": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

", - "ListRunsResult$nextToken": "

If the number of items that are returned is significantly large, this is an identifier that is also returned, which can be used in a subsequent call to this operation to return the next set of items in the list.

", + "ListRunsResult$nextToken": "

If the number of items that are returned is significantly large, this is an identifier that is also returned. It can be used in a subsequent call to this operation to return the next set of items in the list.

", "ListSamplesRequest$nextToken": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

", - "ListSamplesResult$nextToken": "

If the number of items that are returned is significantly large, this is an identifier that is also returned, which can be used in a subsequent call to this operation to return the next set of items in the list.

", + "ListSamplesResult$nextToken": "

If the number of items that are returned is significantly large, this is an identifier that is also returned. It can be used in a subsequent call to this operation to return the next set of items in the list.

", "ListSuitesRequest$nextToken": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

", - "ListSuitesResult$nextToken": "

If the number of items that are returned is significantly large, this is an identifier that is also returned, which can be used in a subsequent call to this operation to return the next set of items in the list.

", + "ListSuitesResult$nextToken": "

If the number of items that are returned is significantly large, this is an identifier that is also returned. It can be used in a subsequent call to this operation to return the next set of items in the list.

", + "ListTestGridProjectsRequest$nextToken": "

From a response, used to continue a paginated listing.

", + "ListTestGridProjectsResult$nextToken": "

Used for pagination. Pass into ListTestGridProjects to get more results in a paginated request.

", + "ListTestGridSessionActionsRequest$nextToken": "

Pagination token.

", + "ListTestGridSessionActionsResult$nextToken": "

Pagination token.

", + "ListTestGridSessionArtifactsRequest$nextToken": "

Pagination token.

", + "ListTestGridSessionArtifactsResult$nextToken": "

Pagination token.

", + "ListTestGridSessionsRequest$nextToken": "

Pagination token.

", + "ListTestGridSessionsResult$nextToken": "

Pagination token.

", "ListTestsRequest$nextToken": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

", - "ListTestsResult$nextToken": "

If the number of items that are returned is significantly large, this is an identifier that is also returned, which can be used in a subsequent call to this operation to return the next set of items in the list.

", + "ListTestsResult$nextToken": "

If the number of items that are returned is significantly large, this is an identifier that is also returned. It can be used in a subsequent call to this operation to return the next set of items in the list.

", "ListUniqueProblemsRequest$nextToken": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

", - "ListUniqueProblemsResult$nextToken": "

If the number of items that are returned is significantly large, this is an identifier that is also returned, which can be used in a subsequent call to this operation to return the next set of items in the list.

", + "ListUniqueProblemsResult$nextToken": "

If the number of items that are returned is significantly large, this is an identifier that is also returned. It can be used in a subsequent call to this operation to return the next set of items in the list.

", "ListUploadsRequest$nextToken": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

", - "ListUploadsResult$nextToken": "

If the number of items that are returned is significantly large, this is an identifier that is also returned, which can be used in a subsequent call to this operation to return the next set of items in the list.

", + "ListUploadsResult$nextToken": "

If the number of items that are returned is significantly large, this is an identifier that is also returned. It can be used in a subsequent call to this operation to return the next set of items in the list.

", "ListVPCEConfigurationsRequest$nextToken": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

", "ListVPCEConfigurationsResult$nextToken": "

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

" } @@ -1526,9 +1682,9 @@ "base": "

Represents an operating-system neutral workspace for running and managing tests.

", "refs": { "CreateProjectResult$project": "

The newly created project.

", - "GetProjectResult$project": "

The project you wish to get information about.

", + "GetProjectResult$project": "

The project to get information about.

", "Projects$member": null, - "UpdateProjectResult$project": "

The project you wish to update.

" + "UpdateProjectResult$project": "

The project to update.

" } }, "Projects": { @@ -1543,7 +1699,7 @@ } }, "PurchaseOfferingResult": { - "base": "

The result of the purchase offering (e.g., success or failure).

", + "base": "

The result of the purchase offering (for example, success or failure).

", "refs": { } }, @@ -1562,7 +1718,7 @@ } }, "RecurringCharge": { - "base": "

Specifies whether charges for devices will be recurring.

", + "base": "

Specifies whether charges for devices are recurring.

", "refs": { "RecurringCharges$member": null } @@ -1570,7 +1726,7 @@ "RecurringChargeFrequency": { "base": null, "refs": { - "RecurringCharge$frequency": "

The frequency in which charges will recur.

" + "RecurringCharge$frequency": "

The frequency in which charges recur.

" } }, "RecurringCharges": { @@ -1585,17 +1741,17 @@ "CreateRemoteAccessSessionResult$remoteAccessSession": "

A container that describes the remote access session when the request to create a remote access session is sent.

", "GetRemoteAccessSessionResult$remoteAccessSession": "

A container that lists detailed information about the remote access session.

", "RemoteAccessSessions$member": null, - "StopRemoteAccessSessionResult$remoteAccessSession": "

A container representing the metadata from the service about the remote access session you are stopping.

" + "StopRemoteAccessSessionResult$remoteAccessSession": "

A container that represents the metadata from the service about the remote access session you are stopping.

" } }, "RemoteAccessSessions": { "base": null, "refs": { - "ListRemoteAccessSessionsResult$remoteAccessSessions": "

A container representing the metadata from the service about each remote access session you are requesting.

" + "ListRemoteAccessSessionsResult$remoteAccessSessions": "

A container that represents the metadata from the service about each remote access session you are requesting.

" } }, "RenewOfferingRequest": { - "base": "

A request representing an offering renewal.

", + "base": "

A request that represents an offering renewal.

", "refs": { } }, @@ -1610,6 +1766,26 @@ "Device$resolution": "

The resolution of the device.

" } }, + "ResourceDescription": { + "base": null, + "refs": { + "CreateTestGridProjectRequest$description": "

Human-readable description of the project.

", + "UpdateTestGridProjectRequest$description": "

Human-readable description for the project.

" + } + }, + "ResourceId": { + "base": null, + "refs": { + "GetTestGridSessionRequest$sessionId": "

An ID associated with this session.

" + } + }, + "ResourceName": { + "base": null, + "refs": { + "CreateTestGridProjectRequest$name": "

Human-readable name of the Selenium testing project.

", + "UpdateTestGridProjectRequest$name": "

Human-readable name for the project.

" + } + }, "Rule": { "base": "

Represents a condition for a device pool.

", "refs": { @@ -1619,7 +1795,7 @@ "RuleOperator": { "base": null, "refs": { - "DeviceFilter$operator": "

Specifies how Device Farm compares the filter's attribute to the value. For the operators that are supported by each attribute, see the attribute descriptions.

", + "DeviceFilter$operator": "

Specifies how Device Farm compares the filter's attribute to the value. See the attribute descriptions.

", "Rule$operator": "

Specifies how Device Farm compares the rule's attribute to the value. For the operators that are supported by each attribute, see the attribute descriptions.

" } }, @@ -1628,13 +1804,13 @@ "refs": { "CreateDevicePoolRequest$rules": "

The device pool's rules.

", "DevicePool$rules": "

Information about the device pool's rules.

", - "UpdateDevicePoolRequest$rules": "

Represents the rules you wish to modify for the device pool. Updating rules is optional; however, if you choose to update rules for your request, the update will replace the existing rules.

" + "UpdateDevicePoolRequest$rules": "

Represents the rules to modify for the device pool. Updating rules is optional. If you update rules for your request, the update replaces the existing rules.

" } }, "Run": { - "base": "

Represents a test run on a set of devices with a given app package, test parameters, etc.

", + "base": "

Represents a test run on a set of devices with a given app package, test parameters, and so on.

", "refs": { - "GetRunResult$run": "

The run you wish to get results from.

", + "GetRunResult$run": "

The run to get results from.

", "Runs$member": null, "ScheduleRunResult$run": "

Information about the scheduled run.

", "StopRunResult$run": "

The run that was stopped.

" @@ -1667,7 +1843,7 @@ "ScheduleRunConfiguration": { "base": "

Represents the settings for a run. Includes things like location, radio states, auxiliary apps, and network profiles.

", "refs": { - "GetDevicePoolCompatibilityRequest$configuration": "

An object containing information about the settings for a run.

", + "GetDevicePoolCompatibilityRequest$configuration": "

An object that contains information about the settings for a run.

", "ScheduleRunRequest$configuration": "

Information about the settings for the run to be scheduled.

" } }, @@ -1682,7 +1858,7 @@ } }, "ScheduleRunTest": { - "base": "

Represents test settings. This data structure is passed in as the \"test\" parameter to ScheduleRun. For an example of the JSON request syntax, see ScheduleRun.

", + "base": "

Represents test settings. This data structure is passed in as the test parameter to ScheduleRun. For an example of the JSON request syntax, see ScheduleRun.

", "refs": { "GetDevicePoolCompatibilityRequest$test": "

Information about the uploaded test to be run against the device pool.

", "ScheduleRunRequest$test": "

Information about the test for the run to be scheduled.

" @@ -1697,23 +1873,23 @@ "base": null, "refs": { "CreateVPCEConfigurationRequest$serviceDnsName": "

The DNS name of the service running in your VPC that you want Device Farm to test.

", - "UpdateVPCEConfigurationRequest$serviceDnsName": "

The DNS (domain) name used to connect to your private service in your Amazon VPC. The DNS name must not already be in use on the Internet.

", + "UpdateVPCEConfigurationRequest$serviceDnsName": "

The DNS (domain) name used to connect to your private service in your VPC. The DNS name must not already be in use on the internet.

", "VPCEConfiguration$serviceDnsName": "

The DNS name that maps to the private IP address of the service you want to access.

" } }, "SkipAppResign": { "base": null, "refs": { - "AccountSettings$skipAppResign": "

When set to true, for private devices, Device Farm will not sign your app again. For public devices, Device Farm always signs your apps again and this parameter has no effect.

For more information about how Device Farm re-signs your app(s), see Do you modify my app? in the AWS Device Farm FAQs.

", - "ExecutionConfiguration$skipAppResign": "

When set to true, for private devices, Device Farm will not sign your app again. For public devices, Device Farm always signs your apps again and this parameter has no effect.

For more information about how Device Farm re-signs your app(s), see Do you modify my app? in the AWS Device Farm FAQs.

", - "RemoteAccessSession$skipAppResign": "

When set to true, for private devices, Device Farm will not sign your app again. For public devices, Device Farm always signs your apps again and this parameter has no effect.

For more information about how Device Farm re-signs your app(s), see Do you modify my app? in the AWS Device Farm FAQs.

", - "Run$skipAppResign": "

When set to true, for private devices, Device Farm will not sign your app again. For public devices, Device Farm always signs your apps again and this parameter has no effect.

For more information about how Device Farm re-signs your app(s), see Do you modify my app? in the AWS Device Farm FAQs.

" + "AccountSettings$skipAppResign": "

When set to true, for private devices, Device Farm does not sign your app again. For public devices, Device Farm always signs your apps again.

For more information about how Device Farm re-signs your apps, see Do you modify my app? in the AWS Device Farm FAQs.

", + "ExecutionConfiguration$skipAppResign": "

When set to true, for private devices, Device Farm does not sign your app again. For public devices, Device Farm always signs your apps again.

For more information about how Device Farm re-signs your apps, see Do you modify my app? in the AWS Device Farm FAQs.

", + "RemoteAccessSession$skipAppResign": "

When set to true, for private devices, Device Farm does not sign your app again. For public devices, Device Farm always signs your apps again.

For more information about how Device Farm re-signs your apps, see Do you modify my app? in the AWS Device Farm FAQs.

", + "Run$skipAppResign": "

When set to true, for private devices, Device Farm does not sign your app again. For public devices, Device Farm always signs your apps again.

For more information about how Device Farm re-signs your apps, see Do you modify my app? in the AWS Device Farm FAQs.

" } }, "SshPublicKey": { "base": null, "refs": { - "CreateRemoteAccessSessionRequest$sshPublicKey": "

Ignored. The public key of the ssh key pair you want to use for connecting to remote devices in your remote debugging session. This is only required if remoteDebugEnabled is set to true.

Remote debugging is no longer supported.

" + "CreateRemoteAccessSessionRequest$sshPublicKey": "

Ignored. The public key of the ssh key pair you want to use for connecting to remote devices in your remote debugging session. This key is required only if remoteDebugEnabled is set to true.

Remote debugging is no longer supported.

" } }, "StopJobRequest": { @@ -1752,7 +1928,8 @@ "AndroidPaths$member": null, "Artifact$extension": "

The artifact's file extension.

", "CPU$frequency": "

The CPU's frequency.

", - "CPU$architecture": "

The CPU's architecture, for example x86 or ARM.

", + "CPU$architecture": "

The CPU's architecture (for example, x86 or ARM).

", + "CreateTestGridUrlResult$url": "

A signed URL, expiring in CreateTestGridUrlRequest$expiresInSeconds seconds, to be passed to a RemoteWebDriver.

", "Device$manufacturer": "

The device's manufacturer name.

", "Device$model": "

The device's model name.

", "Device$modelId": "

The device's model ID.

", @@ -1760,7 +1937,7 @@ "Device$image": "

The device's image name.

", "Device$carrier": "

The device's carrier.

", "Device$radio": "

The device's radio.

", - "Device$fleetType": "

The type of fleet to which this device belongs. Possible values for fleet type are PRIVATE and PUBLIC.

", + "Device$fleetType": "

The type of fleet to which this device belongs. Possible values are PRIVATE and PUBLIC.

", "Device$fleetName": "

The name of the fleet to which this device belongs.

", "DeviceFilterValues$member": null, "DeviceHostPaths$member": null, @@ -1771,12 +1948,20 @@ "MaxSlotMap$key": null, "PackageIds$member": null, "RemoteAccessSession$endpoint": "

The endpoint for the remote access sesssion.

", - "RemoteAccessSession$deviceUdid": "

Unique device identifier for the remote device. Only returned if remote debugging is enabled for the remote access session.

Remote debugging is no longer supported.

", + "RemoteAccessSession$deviceUdid": "

Unique device identifier for the remote device. Only returned if remote debugging is enabled for the remote access session.

Remote debugging is no longer supported.

", "Rule$value": "

The rule's value.

", - "Run$parsingResultUrl": "

Read-only URL for an object in S3 bucket where you can get the parsing results of the test package. If the test package doesn't parse, the reason why it doesn't parse appears in the file that this URL points to.

", + "Run$parsingResultUrl": "

Read-only URL for an object in an S3 bucket where you can get the parsing results of the test package. If the test package doesn't parse, the reason why it doesn't parse appears in the file that this URL points to.

", "Run$locale": "

Information about the locale that is used for the run.

", "Run$webUrl": "

The Device Farm console URL for the recording of the run.

", "ScheduleRunConfiguration$locale": "

Information about the locale that is used for the run.

", + "TestGridProject$name": "

A human-readable name for the project.

", + "TestGridProject$description": "

A human-readable description for the project.

", + "TestGridSession$seleniumProperties": "

A JSON object of options and parameters passed to the Selenium WebDriver.

", + "TestGridSessionAction$action": "

The action taken by the session.

", + "TestGridSessionAction$statusCode": "

HTTP status code returned to the browser when the action was taken.

", + "TestGridSessionAction$requestMethod": "

HTTP method that the browser used to make the request.

", + "TestGridSessionArtifact$filename": "

The file name of the artifact.

", + "TestGridSessionArtifact$url": "

A semi-stable URL to the content of the object.

", "TestParameters$key": null, "TestParameters$value": null } @@ -1795,7 +1980,7 @@ } }, "Tag": { - "base": "

The metadata that you apply to a resource to help you categorize and organize it. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.

", + "base": "

The metadata that you apply to a resource to help you categorize and organize it. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters. Tag values can have a maximum length of 256 characters.

", "refs": { "TagList$member": null } @@ -1803,7 +1988,7 @@ "TagKey": { "base": null, "refs": { - "Tag$Key": "

One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more specific tag values.

", + "Tag$Key": "

One part of a key-value pair that makes up a tag. A key is a general label that acts like a category for more specific tag values.

", "TagKeyList$member": null } }, @@ -1816,8 +2001,8 @@ "TagList": { "base": null, "refs": { - "ListTagsForResourceResponse$Tags": "

The tags to add to the resource. A tag is an array of key-value pairs. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.

", - "TagResourceRequest$Tags": "

The tags to add to the resource. A tag is an array of key-value pairs. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.

" + "ListTagsForResourceResponse$Tags": "

The tags to add to the resource. A tag is an array of key-value pairs. Tag keys can have a maximum character length of 128 characters. Tag values can have a maximum length of 256 characters.

", + "TagResourceRequest$Tags": "

The tags to add to the resource. A tag is an array of key-value pairs. Tag keys can have a maximum character length of 128 characters. Tag values can have a maximum length of 256 characters.

" } }, "TagOperationException": { @@ -1843,7 +2028,7 @@ "TagValue": { "base": null, "refs": { - "Tag$Value": "

The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key).

" + "Tag$Value": "

The optional part of a key-value pair that makes up a tag. A value acts as a descriptor in a tag category (key).

" } }, "Test": { @@ -1853,21 +2038,98 @@ "Tests$member": null } }, + "TestGridProject": { + "base": "

A Selenium testing project. Projects are used to collect and collate sessions.

", + "refs": { + "CreateTestGridProjectResult$testGridProject": "

ARN of the Selenium testing project that was created.

", + "GetTestGridProjectResult$testGridProject": "

A TestGridProject.

", + "TestGridProjects$member": null, + "UpdateTestGridProjectResult$testGridProject": "

The project, including updated information.

" + } + }, + "TestGridProjects": { + "base": null, + "refs": { + "ListTestGridProjectsResult$testGridProjects": "

The list of TestGridProjects, based on a ListTestGridProjectsRequest.

" + } + }, + "TestGridSession": { + "base": "

A TestGridSession is a single instance of a browser launched from the URL provided by a call to CreateTestGridUrl.

", + "refs": { + "GetTestGridSessionResult$testGridSession": "

The TestGridSession that was requested.

", + "TestGridSessions$member": null + } + }, + "TestGridSessionAction": { + "base": "

An action taken by a TestGridSession browser instance.

", + "refs": { + "TestGridSessionActions$member": null + } + }, + "TestGridSessionActions": { + "base": null, + "refs": { + "ListTestGridSessionActionsResult$actions": "

The action taken by the session.

" + } + }, + "TestGridSessionArtifact": { + "base": "

Artifacts are video and other files that are produced in the process of running a browser in an automated context.

Video elements might be broken up into multiple artifacts as they grow in size during creation.

", + "refs": { + "TestGridSessionArtifacts$member": null + } + }, + "TestGridSessionArtifactCategory": { + "base": null, + "refs": { + "ListTestGridSessionArtifactsRequest$type": "

Limit results to a specified type of artifact.

" + } + }, + "TestGridSessionArtifactType": { + "base": null, + "refs": { + "TestGridSessionArtifact$type": "

The kind of artifact.

" + } + }, + "TestGridSessionArtifacts": { + "base": null, + "refs": { + "ListTestGridSessionArtifactsResult$artifacts": "

A list of test grid session artifacts for a TestGridSession.

" + } + }, + "TestGridSessionStatus": { + "base": null, + "refs": { + "ListTestGridSessionsRequest$status": "

Return only sessions in this state.

", + "TestGridSession$status": "

The state of the session.

" + } + }, + "TestGridSessions": { + "base": null, + "refs": { + "ListTestGridSessionsResult$testGridSessions": "

The sessions that match the criteria in a ListTestGridSessionsRequest.

" + } + }, + "TestGridUrlExpiresInSecondsInput": { + "base": null, + "refs": { + "CreateTestGridUrlRequest$expiresInSeconds": "

Lifetime, in seconds, of the URL.

" + } + }, "TestParameters": { "base": null, "refs": { - "ScheduleRunTest$parameters": "

The test's parameters, such as test framework parameters and fixture settings. Parameters are represented by name-value pairs of strings.

For all tests:

For Calabash tests:

For Appium tests (all types):

For Fuzz tests (Android only):

For Explorer tests:

For Instrumentation:

For XCTest and XCTestUI:

For UIAutomator:

" + "ScheduleRunTest$parameters": "

The test's parameters, such as test framework parameters and fixture settings. Parameters are represented by name-value pairs of strings.

For all tests:

For Calabash tests:

For Appium tests (all types):

For fuzz tests (Android only):

For Explorer tests:

For Instrumentation:

For XCTest and XCTestUI:

For UIAutomator:

" } }, "TestType": { "base": null, "refs": { - "GetDevicePoolCompatibilityRequest$testType": "

The test type for the specified device pool.

Allowed values include the following:

", - "Job$type": "

The job's type.

Allowed values include the following:

", - "Run$type": "

The run's type.

Must be one of the following values:

", - "ScheduleRunTest$type": "

The test's type.

Must be one of the following values:

", - "Suite$type": "

The suite's type.

Must be one of the following values:

", - "Test$type": "

The test's type.

Must be one of the following values:

" + "GetDevicePoolCompatibilityRequest$testType": "

The test type for the specified device pool.

Allowed values include the following:

", + "Job$type": "

The job's type.

Allowed values include the following:

", + "Run$type": "

The run's type.

Must be one of the following values:

", + "ScheduleRunTest$type": "

The test's type.

Must be one of the following values:

", + "Suite$type": "

The suite's type.

Must be one of the following values:

", + "Test$type": "

The test's type.

Must be one of the following values:

" } }, "Tests": { @@ -1896,9 +2158,9 @@ "URL": { "base": null, "refs": { - "Artifact$url": "

The pre-signed Amazon S3 URL that can be used with a corresponding GET request to download the artifact's file.

", - "Sample$url": "

The pre-signed Amazon S3 URL that can be used with a corresponding GET request to download the sample's file.

", - "Upload$url": "

The pre-signed Amazon S3 URL that was used to store a file through a corresponding PUT request.

" + "Artifact$url": "

The presigned Amazon S3 URL that can be used with a GET request to download the artifact's file.

", + "Sample$url": "

The presigned Amazon S3 URL that can be used with a GET request to download the sample's file.

", + "Upload$url": "

The presigned Amazon S3 URL that was used to store a file using a PUT request.

" } }, "UniqueProblem": { @@ -1916,7 +2178,7 @@ "UniqueProblemsByExecutionResultMap": { "base": null, "refs": { - "ListUniqueProblemsResult$uniqueProblems": "

Information about the unique problems.

Allowed values include:

" + "ListUniqueProblemsResult$uniqueProblems": "

Information about the unique problems.

Allowed values include:

" } }, "UntagResourceRequest": { @@ -1979,6 +2241,16 @@ "refs": { } }, + "UpdateTestGridProjectRequest": { + "base": null, + "refs": { + } + }, + "UpdateTestGridProjectResult": { + "base": null, + "refs": { + } + }, "UpdateUploadRequest": { "base": null, "refs": { @@ -2018,15 +2290,15 @@ "UploadStatus": { "base": null, "refs": { - "Upload$status": "

The upload's status.

Must be one of the following values:

" + "Upload$status": "

The upload's status.

Must be one of the following values:

" } }, "UploadType": { "base": null, "refs": { - "CreateUploadRequest$type": "

The upload's upload type.

Must be one of the following values:

Note If you call CreateUpload with WEB_APP specified, AWS Device Farm throws an ArgumentException error.

", - "ListUploadsRequest$type": "

The type of upload.

Must be one of the following values:

", - "Upload$type": "

The upload's type.

Must be one of the following values:

" + "CreateUploadRequest$type": "

The upload's upload type.

Must be one of the following values:

If you call CreateUpload with WEB_APP specified, AWS Device Farm throws an ArgumentException error.

", + "ListUploadsRequest$type": "

The type of upload.

Must be one of the following values:

", + "Upload$type": "

The upload's type.

Must be one of the following values:

" } }, "Uploads": { @@ -2038,47 +2310,47 @@ "VPCEConfiguration": { "base": "

Represents an Amazon Virtual Private Cloud (VPC) endpoint configuration.

", "refs": { - "CreateVPCEConfigurationResult$vpceConfiguration": "

An object containing information about your VPC endpoint configuration.

", - "GetVPCEConfigurationResult$vpceConfiguration": "

An object containing information about your VPC endpoint configuration.

", - "UpdateVPCEConfigurationResult$vpceConfiguration": "

An object containing information about your VPC endpoint configuration.

", + "CreateVPCEConfigurationResult$vpceConfiguration": "

An object that contains information about your VPC endpoint configuration.

", + "GetVPCEConfigurationResult$vpceConfiguration": "

An object that contains information about your VPC endpoint configuration.

", + "UpdateVPCEConfigurationResult$vpceConfiguration": "

An object that contains information about your VPC endpoint configuration.

", "VPCEConfigurations$member": null } }, "VPCEConfigurationDescription": { "base": null, "refs": { - "CreateVPCEConfigurationRequest$vpceConfigurationDescription": "

An optional description, providing more details about your VPC endpoint configuration.

", - "UpdateVPCEConfigurationRequest$vpceConfigurationDescription": "

An optional description, providing more details about your VPC endpoint configuration.

", - "VPCEConfiguration$vpceConfigurationDescription": "

An optional description, providing more details about your VPC endpoint configuration.

" + "CreateVPCEConfigurationRequest$vpceConfigurationDescription": "

An optional description that provides details about your VPC endpoint configuration.

", + "UpdateVPCEConfigurationRequest$vpceConfigurationDescription": "

An optional description that provides details about your VPC endpoint configuration.

", + "VPCEConfiguration$vpceConfigurationDescription": "

An optional description that provides details about your VPC endpoint configuration.

" } }, "VPCEConfigurationName": { "base": null, "refs": { "CreateVPCEConfigurationRequest$vpceConfigurationName": "

The friendly name you give to your VPC endpoint configuration, to manage your configurations more easily.

", - "UpdateVPCEConfigurationRequest$vpceConfigurationName": "

The friendly name you give to your VPC endpoint configuration, to manage your configurations more easily.

", - "VPCEConfiguration$vpceConfigurationName": "

The friendly name you give to your VPC endpoint configuration, to manage your configurations more easily.

" + "UpdateVPCEConfigurationRequest$vpceConfigurationName": "

The friendly name you give to your VPC endpoint configuration to manage your configurations more easily.

", + "VPCEConfiguration$vpceConfigurationName": "

The friendly name you give to your VPC endpoint configuration to manage your configurations more easily.

" } }, "VPCEConfigurations": { "base": null, "refs": { - "ListVPCEConfigurationsResult$vpceConfigurations": "

An array of VPCEConfiguration objects containing information about your VPC endpoint configuration.

" + "ListVPCEConfigurationsResult$vpceConfigurations": "

An array of VPCEConfiguration objects that contain information about your VPC endpoint configuration.

" } }, "VPCEServiceName": { "base": null, "refs": { - "CreateVPCEConfigurationRequest$vpceServiceName": "

The name of the VPC endpoint service running inside your AWS account that you want Device Farm to test.

", - "UpdateVPCEConfigurationRequest$vpceServiceName": "

The name of the VPC endpoint service running inside your AWS account that you want Device Farm to test.

", - "VPCEConfiguration$vpceServiceName": "

The name of the VPC endpoint service running inside your AWS account that you want Device Farm to test.

" + "CreateVPCEConfigurationRequest$vpceServiceName": "

The name of the VPC endpoint service running in your AWS account that you want Device Farm to test.

", + "UpdateVPCEConfigurationRequest$vpceServiceName": "

The name of the VPC endpoint service running in your AWS account that you want Device Farm to test.

", + "VPCEConfiguration$vpceServiceName": "

The name of the VPC endpoint service running in your AWS account that you want Device Farm to test.

" } }, "VideoCapture": { "base": null, "refs": { - "ExecutionConfiguration$videoCapture": "

Set to true to enable video capture; otherwise, set to false. The default is true.

", - "Job$videoCapture": "

This value is set to true if video capture is enabled; otherwise, it is set to false.

" + "ExecutionConfiguration$videoCapture": "

Set to true to enable video capture. Otherwise, set to false. The default is true.

", + "Job$videoCapture": "

This value is set to true if video capture is enabled. Otherwise, it is set to false.

" } } } diff --git a/models/apis/devicefarm/2015-06-23/paginators-1.json b/models/apis/devicefarm/2015-06-23/paginators-1.json index 7f9e88c8ff1..92e2263422e 100644 --- a/models/apis/devicefarm/2015-06-23/paginators-1.json +++ b/models/apis/devicefarm/2015-06-23/paginators-1.json @@ -58,6 +58,26 @@ "output_token": "nextToken", "result_key": "suites" }, + "ListTestGridProjects": { + "input_token": "nextToken", + "limit_key": "maxResult", + "output_token": "nextToken" + }, + "ListTestGridSessionActions": { + "input_token": "nextToken", + "limit_key": "maxResult", + "output_token": "nextToken" + }, + "ListTestGridSessionArtifacts": { + "input_token": "nextToken", + "limit_key": "maxResult", + "output_token": "nextToken" + }, + "ListTestGridSessions": { + "input_token": "nextToken", + "limit_key": "maxResult", + "output_token": "nextToken" + }, "ListTests": { "input_token": "nextToken", "output_token": "nextToken", diff --git a/models/apis/dlm/2018-01-12/api-2.json b/models/apis/dlm/2018-01-12/api-2.json index c02a383ef53..5cd16f677d5 100644 --- a/models/apis/dlm/2018-01-12/api-2.json +++ b/models/apis/dlm/2018-01-12/api-2.json @@ -141,7 +141,14 @@ "max":10, "min":1 }, + "CmkArn":{ + "type":"string", + "max":2048, + "min":0, + "pattern":"arn:aws(-[a-z]{1,3}){0,2}:kms:([a-z]+-){2,3}\\d:\\d+:key/.*" + }, "CopyTags":{"type":"boolean"}, + "CopyTagsNullable":{"type":"boolean"}, "Count":{ "type":"integer", "max":1000, @@ -181,6 +188,33 @@ "Times":{"shape":"TimesList"} } }, + "CrossRegionCopyRetainRule":{ + "type":"structure", + "members":{ + "Interval":{"shape":"Interval"}, + "IntervalUnit":{"shape":"RetentionIntervalUnitValues"} + } + }, + "CrossRegionCopyRule":{ + "type":"structure", + "required":[ + "TargetRegion", + "Encrypted" + ], + "members":{ + "TargetRegion":{"shape":"TargetRegion"}, + "Encrypted":{"shape":"Encrypted"}, + "CmkArn":{"shape":"CmkArn"}, + "CopyTags":{"shape":"CopyTagsNullable"}, + "RetainRule":{"shape":"CrossRegionCopyRetainRule"} + } + }, + "CrossRegionCopyRules":{ + "type":"list", + "member":{"shape":"CrossRegionCopyRule"}, + "max":3, + "min":0 + }, "DeleteLifecyclePolicyRequest":{ "type":"structure", "required":["PolicyId"], @@ -197,6 +231,7 @@ "members":{ } }, + "Encrypted":{"type":"boolean"}, "ErrorCode":{"type":"string"}, "ErrorMessage":{"type":"string"}, "ExcludeBootVolume":{"type":"boolean"}, @@ -373,6 +408,8 @@ }, "PolicyArn":{ "type":"string", + "max":2048, + "min":0, "pattern":"^arn:aws:dlm:[A-Za-z0-9_/.-]{0,63}:\\d+:policy/[0-9A-Za-z_-]{1,128}$" }, "PolicyDescription":{ @@ -455,7 +492,8 @@ "VariableTags":{"shape":"VariableTagsList"}, "CreateRule":{"shape":"CreateRule"}, "RetainRule":{"shape":"RetainRule"}, - "FastRestoreRule":{"shape":"FastRestoreRule"} + "FastRestoreRule":{"shape":"FastRestoreRule"}, + "CrossRegionCopyRules":{"shape":"CrossRegionCopyRules"} } }, "ScheduleList":{ @@ -547,7 +585,8 @@ }, "TagValue":{ "type":"string", - "max":256 + "max":256, + "pattern":"[\\p{all}]*" }, "TagsToAddFilterList":{ "type":"list", @@ -561,6 +600,12 @@ "max":50, "min":0 }, + "TargetRegion":{ + "type":"string", + "max":16, + "min":0, + "pattern":"([a-z]+-){2,3}\\d" + }, "TargetTagList":{ "type":"list", "member":{"shape":"Tag"}, diff --git a/models/apis/dlm/2018-01-12/docs-2.json b/models/apis/dlm/2018-01-12/docs-2.json index ed472a975cc..5c349600135 100644 --- a/models/apis/dlm/2018-01-12/docs-2.json +++ b/models/apis/dlm/2018-01-12/docs-2.json @@ -24,12 +24,24 @@ "FastRestoreRule$AvailabilityZones": "

The Availability Zones in which to enable fast snapshot restore.

" } }, + "CmkArn": { + "base": null, + "refs": { + "CrossRegionCopyRule$CmkArn": "

The Amazon Resource Name (ARN) of the AWS KMS customer master key (CMK) to use for EBS encryption. If this parameter is not specified, your AWS managed CMK for EBS is used.

" + } + }, "CopyTags": { "base": null, "refs": { "Schedule$CopyTags": "

Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.

" } }, + "CopyTagsNullable": { + "base": null, + "refs": { + "CrossRegionCopyRule$CopyTags": "

Copy all user-defined tags from the source snapshot to the copied snapshot.

" + } + }, "Count": { "base": null, "refs": { @@ -50,7 +62,25 @@ "CreateRule": { "base": "

Specifies when to create snapshots of EBS volumes.

", "refs": { - "Schedule$CreateRule": "

The create rule.

" + "Schedule$CreateRule": "

The creation rule.

" + } + }, + "CrossRegionCopyRetainRule": { + "base": "

Specifies the retention rule for cross-Region snapshot copies.

", + "refs": { + "CrossRegionCopyRule$RetainRule": "

The retention rule.

" + } + }, + "CrossRegionCopyRule": { + "base": "

Specifies a rule for cross-Region snapshot copies.

", + "refs": { + "CrossRegionCopyRules$member": null + } + }, + "CrossRegionCopyRules": { + "base": null, + "refs": { + "Schedule$CrossRegionCopyRules": "

The rule for cross-Region snapshot copies.

" } }, "DeleteLifecyclePolicyRequest": { @@ -63,6 +93,12 @@ "refs": { } }, + "Encrypted": { + "base": null, + "refs": { + "CrossRegionCopyRule$Encrypted": "

To encrypt a copy of an unencrypted snapshot if encryption by default is not enabled, enable encryption using this parameter. Copies of encrypted snapshots are encrypted, even if this parameter is false or if encryption by default is not enabled.

" + } + }, "ErrorCode": { "base": null, "refs": { @@ -98,7 +134,7 @@ "FastRestoreRule": { "base": "

Specifies a rule for enabling fast snapshot restore. You can enable fast snapshot restore based on either a count or a time interval.

", "refs": { - "Schedule$FastRestoreRule": "

Enable fast snapshot restore.

" + "Schedule$FastRestoreRule": "

The rule for enabling fast snapshot restore.

" } }, "GetLifecyclePoliciesRequest": { @@ -138,6 +174,7 @@ "base": null, "refs": { "CreateRule$Interval": "

The interval between snapshots. The supported values are 2, 3, 4, 6, 8, 12, and 24.

", + "CrossRegionCopyRetainRule$Interval": "

The amount of time to retain each snapshot. The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.

", "FastRestoreRule$Interval": "

The amount of time to enable fast snapshot restore. The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.

", "RetainRule$Interval": "

The amount of time to retain each snapshot. The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.

" } @@ -283,6 +320,7 @@ "RetentionIntervalUnitValues": { "base": null, "refs": { + "CrossRegionCopyRetainRule$IntervalUnit": "

The unit of time for time-based retention.

", "FastRestoreRule$IntervalUnit": "

The unit of time for enabling fast snapshot restore.

", "RetainRule$IntervalUnit": "

The unit of time for time-based retention.

" } @@ -393,6 +431,12 @@ "Schedule$TagsToAdd": "

The tags to apply to policy-created resources. These user-defined tags are in addition to the AWS-added lifecycle tags.

" } }, + "TargetRegion": { + "base": null, + "refs": { + "CrossRegionCopyRule$TargetRegion": "

The target Region.

" + } + }, "TargetTagList": { "base": null, "refs": { diff --git a/models/apis/ec2/2016-11-15/api-2.json b/models/apis/ec2/2016-11-15/api-2.json index d431478856b..a30b3670d89 100755 --- a/models/apis/ec2/2016-11-15/api-2.json +++ b/models/apis/ec2/2016-11-15/api-2.json @@ -7909,6 +7909,7 @@ }, "DateTime":{"type":"timestamp"}, "DedicatedHostFlag":{"type":"boolean"}, + "DedicatedHostId":{"type":"string"}, "DefaultRouteTableAssociationValue":{ "type":"string", "enum":[ @@ -8157,7 +8158,7 @@ "type":"structure", "required":["KeyName"], "members":{ - "KeyName":{"shape":"String"}, + "KeyName":{"shape":"KeyPairName"}, "DryRun":{ "shape":"Boolean", "locationName":"dryRun" @@ -9549,6 +9550,10 @@ "ExportTaskIds":{ "shape":"ExportTaskIdStringList", "locationName":"exportTaskId" + }, + "Filters":{ + "shape":"FilterList", + "locationName":"Filter" } } }, @@ -10381,6 +10386,10 @@ "shape":"KeyNameStringList", "locationName":"KeyName" }, + "KeyPairIds":{ + "shape":"KeyPairIdStringList", + "locationName":"KeyPairId" + }, "DryRun":{ "shape":"Boolean", "locationName":"dryRun" @@ -10878,6 +10887,10 @@ "GroupNames":{ "shape":"PlacementGroupStringList", "locationName":"groupName" + }, + "GroupIds":{ + "shape":"PlacementGroupIdStringList", + "locationName":"GroupId" } } }, @@ -13448,6 +13461,10 @@ "InstanceId":{ "shape":"String", "locationName":"instanceId" + }, + "Tags":{ + "shape":"TagList", + "locationName":"tagSet" } } }, @@ -13989,6 +14006,10 @@ "StatusMessage":{ "shape":"String", "locationName":"statusMessage" + }, + "Tags":{ + "shape":"TagList", + "locationName":"tagSet" } } }, @@ -15343,7 +15364,6 @@ } } }, - "HostId":{"type":"string"}, "HostInstance":{ "type":"structure", "members":{ @@ -16066,6 +16086,10 @@ "shape":"String", "locationName":"statusMessage" }, + "Tags":{ + "shape":"TagList", + "locationName":"tagSet" + }, "LicenseSpecifications":{ "shape":"ImportImageLicenseSpecificationListResponse", "locationName":"licenseSpecifications" @@ -16236,7 +16260,7 @@ "locationName":"dryRun" }, "KeyName":{ - "shape":"String", + "shape":"KeyPairName", "locationName":"keyName" }, "PublicKeyMaterial":{ @@ -16302,6 +16326,10 @@ "SnapshotTaskDetail":{ "shape":"SnapshotTaskDetail", "locationName":"snapshotTaskDetail" + }, + "Tags":{ + "shape":"TagList", + "locationName":"tagSet" } } }, @@ -17698,9 +17726,9 @@ "shape":"UsageClassTypeList", "locationName":"supportedUsageClasses" }, - "SupportedRootDevices":{ + "SupportedRootDeviceTypes":{ "shape":"RootDeviceTypeList", - "locationName":"supportedRootDevices" + "locationName":"supportedRootDeviceTypes" }, "BareMetal":{ "shape":"BareMetalFlag", @@ -18024,12 +18052,27 @@ "KeyName":{ "shape":"String", "locationName":"keyName" + }, + "KeyPairId":{ + "shape":"String", + "locationName":"keyPairId" } } }, + "KeyPairIdStringList":{ + "type":"list", + "member":{ + "shape":"String", + "locationName":"KeyPairId" + } + }, "KeyPairInfo":{ "type":"structure", "members":{ + "KeyPairId":{ + "shape":"String", + "locationName":"keyPairId" + }, "KeyFingerprint":{ "shape":"String", "locationName":"keyFingerprint" @@ -18037,6 +18080,10 @@ "KeyName":{ "shape":"String", "locationName":"keyName" + }, + "Tags":{ + "shape":"TagList", + "locationName":"tagSet" } } }, @@ -19631,7 +19678,7 @@ }, "GroupName":{"shape":"PlacementGroupName"}, "HostId":{ - "shape":"HostId", + "shape":"DedicatedHostId", "locationName":"hostId" }, "InstanceId":{ @@ -21278,9 +21325,24 @@ "PartitionCount":{ "shape":"Integer", "locationName":"partitionCount" + }, + "GroupId":{ + "shape":"String", + "locationName":"groupId" + }, + "Tags":{ + "shape":"TagList", + "locationName":"tagSet" } } }, + "PlacementGroupIdStringList":{ + "type":"list", + "member":{ + "shape":"String", + "locationName":"GroupId" + } + }, "PlacementGroupInfo":{ "type":"structure", "members":{ @@ -22472,7 +22534,7 @@ "RequestHostIdSet":{ "type":"list", "member":{ - "shape":"HostId", + "shape":"DedicatedHostId", "locationName":"item" } }, @@ -23271,10 +23333,12 @@ "image", "instance", "internet-gateway", + "key-pair", "launch-template", "natgateway", "network-acl", "network-interface", + "placement-group", "reserved-instances", "route-table", "security-group", diff --git a/models/apis/ec2/2016-11-15/docs-2.json b/models/apis/ec2/2016-11-15/docs-2.json index 9d4308ee9d0..5f95b2431b1 100755 --- a/models/apis/ec2/2016-11-15/docs-2.json +++ b/models/apis/ec2/2016-11-15/docs-2.json @@ -13,7 +13,7 @@ "ApplySecurityGroupsToClientVpnTargetNetwork": "

Applies a security group to the association between the target network and the Client VPN endpoint. This action replaces the existing security groups with the specified security groups.

", "AssignIpv6Addresses": "

Assigns one or more IPv6 addresses to the specified network interface. You can specify one or more specific IPv6 addresses, or you can specify the number of IPv6 addresses to be automatically assigned from within the subnet's IPv6 CIDR block range. You can assign as many IPv6 addresses to a network interface as you can assign private IPv4 addresses, and the limit varies per instance type. For information, see IP Addresses Per Network Interface Per Instance Type in the Amazon Elastic Compute Cloud User Guide.

", "AssignPrivateIpAddresses": "

Assigns one or more secondary private IP addresses to the specified network interface.

You can specify one or more specific secondary IP addresses, or you can specify the number of secondary IP addresses to be automatically assigned within the subnet's CIDR block range. The number of secondary IP addresses that you can assign to an instance varies by instance type. For information about instance types, see Instance Types in the Amazon Elastic Compute Cloud User Guide. For more information about Elastic IP addresses, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide.

When you move a secondary private IP address to another network interface, any Elastic IP address that is associated with the IP address is also moved.

Remapping an IP address is an asynchronous operation. When you move an IP address from one network interface to another, check network/interfaces/macs/mac/local-ipv4s in the instance metadata to confirm that the remapping is complete.

", - "AssociateAddress": "

Associates an Elastic IP address with an instance or a network interface. Before you can use an Elastic IP address, you must allocate it to your account.

An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide.

[EC2-Classic, VPC in an EC2-VPC-only account] If the Elastic IP address is already associated with a different instance, it is disassociated from that instance and associated with the specified instance. If you associate an Elastic IP address with an instance that has an existing Elastic IP address, the existing address is disassociated from the instance, but remains allocated to your account.

[VPC in an EC2-Classic account] If you don't specify a private IP address, the Elastic IP address is associated with the primary IP address. If the Elastic IP address is already associated with a different instance or a network interface, you get an error unless you allow reassociation. You cannot associate an Elastic IP address with an instance or network interface that has an existing Elastic IP address.

This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error, and you may be charged for each time the Elastic IP address is remapped to the same instance. For more information, see the Elastic IP Addresses section of Amazon EC2 Pricing.

", + "AssociateAddress": "

Associates an Elastic IP address with an instance or a network interface. Before you can use an Elastic IP address, you must allocate it to your account.

An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide.

[EC2-Classic, VPC in an EC2-VPC-only account] If the Elastic IP address is already associated with a different instance, it is disassociated from that instance and associated with the specified instance. If you associate an Elastic IP address with an instance that has an existing Elastic IP address, the existing address is disassociated from the instance, but remains allocated to your account.

[VPC in an EC2-Classic account] If you don't specify a private IP address, the Elastic IP address is associated with the primary IP address. If the Elastic IP address is already associated with a different instance or a network interface, you get an error unless you allow reassociation. You cannot associate an Elastic IP address with an instance or network interface that has an existing Elastic IP address.

You cannot associate an Elastic IP address with an interface in a different network border group.

This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error, and you may be charged for each time the Elastic IP address is remapped to the same instance. For more information, see the Elastic IP Addresses section of Amazon EC2 Pricing.

", "AssociateClientVpnTargetNetwork": "

Associates a target network with a Client VPN endpoint. A target network is a subnet in a VPC. You can associate multiple subnets from the same VPC with a Client VPN endpoint. You can associate only one subnet in each Availability Zone. We recommend that you associate at least two subnets to provide Availability Zone redundancy.

", "AssociateDhcpOptions": "

Associates a set of DHCP options (that you've previously created) with the specified VPC, or associates no DHCP options with the VPC.

After you associate the options with the VPC, any existing instances and all new instances that you launch in that VPC use the options. You don't need to restart or relaunch the instances. They automatically pick up the changes within a few hours, depending on how frequently the instance renews its DHCP lease. You can explicitly renew the lease using the operating system on the instance.

For more information, see DHCP Options Sets in the Amazon Virtual Private Cloud User Guide.

", "AssociateIamInstanceProfile": "

Associates an IAM instance profile with a running or stopped instance. You cannot associate more than one IAM instance profile with an instance.

", @@ -312,7 +312,7 @@ "ModifyCapacityReservation": "

Modifies a Capacity Reservation's capacity and the conditions under which it is to be released. You cannot change a Capacity Reservation's instance type, EBS optimization, instance store settings, platform, Availability Zone, or instance eligibility. If you need to modify any of these attributes, we recommend that you cancel the Capacity Reservation, and then create a new one with the required attributes.

", "ModifyClientVpnEndpoint": "

Modifies the specified Client VPN endpoint. You can only modify an endpoint's server certificate information, client connection logging information, DNS server, and description. Modifying the DNS server resets existing client connections.

", "ModifyDefaultCreditSpecification": "

Modifies the default credit option for CPU usage of burstable performance instances. The default credit option is set at the account level per AWS Region, and is specified per instance family. All new burstable performance instances in the account launch using the default credit option.

ModifyDefaultCreditSpecification is an asynchronous operation, which works at an AWS Region level and modifies the credit option for each Availability Zone. All zones in a Region are updated within five minutes. But if instances are launched during this operation, they might not get the new credit option until the zone is updated. To verify whether the update has occurred, you can call GetDefaultCreditSpecification and check DefaultCreditSpecification for updates.

For more information, see Burstable Performance Instances in the Amazon Elastic Compute Cloud User Guide.

", - "ModifyEbsDefaultKmsKeyId": "

Changes the default customer master key (CMK) for EBS encryption by default for your account in this Region.

AWS creates a unique AWS managed CMK in each Region for use with encryption by default. If you change the default CMK to a customer managed CMK, it is used instead of the AWS managed CMK. To reset the default CMK to the AWS managed CMK for EBS, use ResetEbsDefaultKmsKeyId.

If you delete or disable the customer managed CMK that you specified for use with encryption by default, your instances will fail to launch.

For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

", + "ModifyEbsDefaultKmsKeyId": "

Changes the default customer master key (CMK) for EBS encryption by default for your account in this Region.

AWS creates a unique AWS managed CMK in each Region for use with encryption by default. If you change the default CMK to a symmetric customer managed CMK, it is used instead of the AWS managed CMK. To reset the default CMK to the AWS managed CMK for EBS, use ResetEbsDefaultKmsKeyId. Amazon EBS does not support asymmetric CMKs.

If you delete or disable the customer managed CMK that you specified for use with encryption by default, your instances will fail to launch.

For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

", "ModifyFleet": "

Modifies the specified EC2 Fleet.

You can only modify an EC2 Fleet request of type maintain.

While the EC2 Fleet is being modified, it is in the modifying state.

To scale up your EC2 Fleet, increase its target capacity. The EC2 Fleet launches the additional Spot Instances according to the allocation strategy for the EC2 Fleet request. If the allocation strategy is lowest-price, the EC2 Fleet launches instances using the Spot Instance pool with the lowest price. If the allocation strategy is diversified, the EC2 Fleet distributes the instances across the Spot Instance pools. If the allocation strategy is capacity-optimized, EC2 Fleet launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching.

To scale down your EC2 Fleet, decrease its target capacity. First, the EC2 Fleet cancels any open requests that exceed the new target capacity. You can request that the EC2 Fleet terminate Spot Instances until the size of the fleet no longer exceeds the new target capacity. If the allocation strategy is lowest-price, the EC2 Fleet terminates the instances with the highest price per unit. If the allocation strategy is capacity-optimized, the EC2 Fleet terminates the instances in the Spot Instance pools that have the least available Spot Instance capacity. If the allocation strategy is diversified, the EC2 Fleet terminates instances across the Spot Instance pools. Alternatively, you can request that the EC2 Fleet keep the fleet at its current size, but not replace any Spot Instances that are interrupted or that you terminate manually.

If you are finished with your EC2 Fleet for now, but will use it again later, you can set the target capacity to 0.

", "ModifyFpgaImageAttribute": "

Modifies the specified attribute of the specified Amazon FPGA Image (AFI).

", "ModifyHosts": "

Modify the auto-placement setting of a Dedicated Host. When auto-placement is enabled, any instances that you launch with a tenancy of host but without a specific host ID are placed onto any available Dedicated Host in your account that has auto-placement enabled. When auto-placement is disabled, you need to provide a host ID to have the instance launch onto a specific host. If no host ID is provided, the instance is launched onto a suitable host with auto-placement enabled.

You can also use this API action to modify a Dedicated Host to support either multiple instance types in an instance family, or to support a specific instance type only.

", @@ -1484,10 +1484,10 @@ "NetworkInterfaceAttachment$DeleteOnTermination": "

Indicates whether the network interface is deleted when the instance is terminated.

", "NetworkInterfaceAttachmentChanges$DeleteOnTermination": "

Indicates whether the network interface is deleted when the instance is terminated.

", "NetworkInterfacePrivateIpAddress$Primary": "

Indicates whether this IPv4 address is the primary private IPv4 address of the network interface.

", - "OnDemandOptions$SingleInstanceType": "

Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the fleet.

", - "OnDemandOptions$SingleAvailabilityZone": "

Indicates that the fleet launches all On-Demand Instances into a single Availability Zone.

", - "OnDemandOptionsRequest$SingleInstanceType": "

Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the fleet.

", - "OnDemandOptionsRequest$SingleAvailabilityZone": "

Indicates that the fleet launches all On-Demand Instances into a single Availability Zone.

", + "OnDemandOptions$SingleInstanceType": "

Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the fleet. Supported only for fleets of type instant.

", + "OnDemandOptions$SingleAvailabilityZone": "

Indicates that the fleet launches all On-Demand Instances into a single Availability Zone. Supported only for fleets of type instant.

", + "OnDemandOptionsRequest$SingleInstanceType": "

Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the fleet. Supported only for fleets of type instant.

", + "OnDemandOptionsRequest$SingleAvailabilityZone": "

Indicates that the fleet launches all On-Demand Instances into a single Availability Zone. Supported only for fleets of type instant.

", "PeeringConnectionOptions$AllowDnsResolutionFromRemoteVpc": "

If true, the public DNS hostnames of instances in the specified VPC resolve to private IP addresses when queried from instances in the peer VPC.

", "PeeringConnectionOptions$AllowEgressFromLocalClassicLinkToRemoteVpc": "

If true, enables outbound communication from an EC2-Classic instance that's linked to a local VPC using ClassicLink to instances in a peer VPC.

", "PeeringConnectionOptions$AllowEgressFromLocalVpcToRemoteClassicLink": "

If true, enables outbound communication from instances in a local VPC to an EC2-Classic instance that's linked to a peer VPC using ClassicLink.

", @@ -1571,10 +1571,10 @@ "SpotFleetMonitoring$Enabled": "

Enables monitoring for the instance.

Default: false

", "SpotFleetRequestConfigData$TerminateInstancesWithExpiration": "

Indicates whether running Spot Instances are terminated when the Spot Fleet request expires.

", "SpotFleetRequestConfigData$ReplaceUnhealthyInstances": "

Indicates whether Spot Fleet should replace unhealthy instances.

", - "SpotOptions$SingleInstanceType": "

Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.

", - "SpotOptions$SingleAvailabilityZone": "

Indicates that the fleet launches all Spot Instances into a single Availability Zone.

", - "SpotOptionsRequest$SingleInstanceType": "

Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.

", - "SpotOptionsRequest$SingleAvailabilityZone": "

Indicates that the fleet launches all Spot Instances into a single Availability Zone.

", + "SpotOptions$SingleInstanceType": "

Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet. Supported only for fleets of type instant.

", + "SpotOptions$SingleAvailabilityZone": "

Indicates that the fleet launches all Spot Instances into a single Availability Zone. Supported only for fleets of type instant.

", + "SpotOptionsRequest$SingleInstanceType": "

Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet. Supported only for fleets of type instant.

", + "SpotOptionsRequest$SingleAvailabilityZone": "

Indicates that the fleet launches all Spot Instances into a single Availability Zone. Supported only for fleets of type instant.

", "StartInstancesRequest$DryRun": "

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

", "StopInstancesRequest$Hibernate": "

Hibernates the instance if the instance was enabled for hibernation at launch. If the instance cannot hibernate successfully, a normal shutdown occurs. For more information, see Hibernate Your Instance in the Amazon Elastic Compute Cloud User Guide.

Default: false

", "StopInstancesRequest$DryRun": "

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

", @@ -1835,13 +1835,13 @@ "CapacityReservationOptions": { "base": "

Describes the strategy for using unused Capacity Reservations for fulfilling On-Demand capacity.

This strategy can only be used if the EC2 Fleet is of type instant.

For more information about Capacity Reservations, see On-Demand Capacity Reservations in the Amazon Elastic Compute Cloud User Guide. For examples of using Capacity Reservations in an EC2 Fleet, see EC2 Fleet Example Configurations in the Amazon Elastic Compute Cloud User Guide.

", "refs": { - "OnDemandOptions$CapacityReservationOptions": "

The strategy for using unused Capacity Reservations for fulfilling On-Demand capacity. Only available for fleets of type instant.

" + "OnDemandOptions$CapacityReservationOptions": "

The strategy for using unused Capacity Reservations for fulfilling On-Demand capacity. Supported only for fleets of type instant.

" } }, "CapacityReservationOptionsRequest": { "base": "

Describes the strategy for using unused Capacity Reservations for fulfilling On-Demand capacity.

This strategy can only be used if the EC2 Fleet is of type instant.

For more information about Capacity Reservations, see On-Demand Capacity Reservations in the Amazon Elastic Compute Cloud User Guide. For examples of using Capacity Reservations in an EC2 Fleet, see EC2 Fleet Example Configurations in the Amazon Elastic Compute Cloud User Guide.

", "refs": { - "OnDemandOptionsRequest$CapacityReservationOptions": "

The strategy for using unused Capacity Reservations for fulfilling On-Demand capacity. Only available for fleets of type instant.

" + "OnDemandOptionsRequest$CapacityReservationOptions": "

The strategy for using unused Capacity Reservations for fulfilling On-Demand capacity. Supported only for fleets of type instant.

" } }, "CapacityReservationPreference": { @@ -3051,6 +3051,13 @@ "InstanceTypeInfo$DedicatedHostsSupported": "

Indicates whether Dedicated Hosts are supported on the instance type.

" } }, + "DedicatedHostId": { + "base": null, + "refs": { + "ModifyInstancePlacementRequest$HostId": "

The ID of the Dedicated Host with which to associate the instance.

", + "RequestHostIdSet$member": null + } + }, "DefaultRouteTableAssociationValue": { "base": null, "refs": { @@ -4318,7 +4325,7 @@ "DescribeNetworkInterfacesMaxResults": { "base": null, "refs": { - "DescribeNetworkInterfacesRequest$MaxResults": "

The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.

" + "DescribeNetworkInterfacesRequest$MaxResults": "

The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results. You cannot specify this parameter and the network interface IDs parameter in the same request.

" } }, "DescribeNetworkInterfacesRequest": { @@ -5481,7 +5488,7 @@ "ElasticInferenceAcceleratorCount": { "base": null, "refs": { - "ElasticInferenceAccelerator$Count": "

The number of elastic inference accelerators of given type to be attached to the instance. Only positive values allowed. If not specified defaults to 1.

" + "ElasticInferenceAccelerator$Count": "

The number of elastic inference accelerators to attach to the instance.

Default: 1

" } }, "ElasticInferenceAccelerators": { @@ -5795,7 +5802,7 @@ "FilterList": { "base": null, "refs": { - "DescribeAddressesRequest$Filters": "

One or more filters. Filter names and values are case-sensitive.

", + "DescribeAddressesRequest$Filters": "

One or more filters. Filter names and values are case-sensitive.

", "DescribeAvailabilityZonesRequest$Filters": "

The filters.

", "DescribeBundleTasksRequest$Filters": "

The filters.

", "DescribeCapacityReservationsRequest$Filters": "

One or more filters.

", @@ -5810,6 +5817,7 @@ "DescribeDhcpOptionsRequest$Filters": "

One or more filters.

", "DescribeElasticGpusRequest$Filters": "

The filters.

", "DescribeExportImageTasksRequest$Filters": "

Filter tasks using the task-state filter and one of the following values: active, completed, deleting, or deleted.

", + "DescribeExportTasksRequest$Filters": null, "DescribeFastSnapshotRestoresRequest$Filters": "

The filters. The possible values are:

", "DescribeFleetInstancesRequest$Filters": "

The filters.

", "DescribeFleetsRequest$Filters": "

The filters.

", @@ -6482,13 +6490,6 @@ "HostList$member": null } }, - "HostId": { - "base": null, - "refs": { - "ModifyInstancePlacementRequest$HostId": "

The ID of the Dedicated Host with which to associate the instance.

", - "RequestHostIdSet$member": null - } - }, "HostInstance": { "base": "

Describes an instance running on a Dedicated Host.

", "refs": { @@ -6736,7 +6737,7 @@ } }, "ImportImageLicenseConfigurationResponse": { - "base": "

The response information of license configurations.

", + "base": "

The response information for license configurations.

", "refs": { "ImportImageLicenseSpecificationListResponse$member": null } @@ -6751,7 +6752,7 @@ "base": null, "refs": { "ImportImageResult$LicenseSpecifications": "

The ARNs of the license configurations.

", - "ImportImageTask$LicenseSpecifications": "

The ARNs of the license configurations associated to the import image task.

" + "ImportImageTask$LicenseSpecifications": "

The ARNs of the license configurations that are associated with the import image task.

" } }, "ImportImageRequest": { @@ -7507,7 +7508,7 @@ "LaunchTemplateEbsBlockDevice$VolumeSize": "

The size of the volume, in GiB.

", "LaunchTemplateEbsBlockDeviceRequest$Iops": "

The number of I/O operations per second (IOPS) that the volume supports. For io1, this represents the number of IOPS that are provisioned for the volume. For gp2, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide.

Condition: This parameter is required for requests to create io1 volumes; it is not used in requests to create gp2, st1, sc1, or standard volumes.

", "LaunchTemplateEbsBlockDeviceRequest$VolumeSize": "

The size of the volume, in GiB.

Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

", - "LaunchTemplateElasticInferenceAcceleratorResponse$Count": "

The number of elastic inference accelerators of given type to be attached to the instance. Only positive values allowed. If not specified defaults to 1.

", + "LaunchTemplateElasticInferenceAcceleratorResponse$Count": "

The number of elastic inference accelerators to attach to the instance.

Default: 1

", "LaunchTemplateInstanceNetworkInterfaceSpecification$DeviceIndex": "

The device index for the network interface attachment.

", "LaunchTemplateInstanceNetworkInterfaceSpecification$Ipv6AddressCount": "

The number of IPv6 addresses for the network interface.

", "LaunchTemplateInstanceNetworkInterfaceSpecification$SecondaryPrivateIpAddressCount": "

The number of secondary private IPv4 addresses for the network interface.

", @@ -7781,6 +7782,12 @@ "refs": { } }, + "KeyPairIdStringList": { + "base": null, + "refs": { + "DescribeKeyPairsRequest$KeyPairIds": "

The IDs of the key pairs.

" + } + }, "KeyPairInfo": { "base": "

Describes a key pair.

", "refs": { @@ -7796,15 +7803,17 @@ "KeyPairName": { "base": null, "refs": { - "CreateKeyPairRequest$KeyName": "

A unique name for the key pair.

Constraints: Up to 255 ASCII characters

" + "CreateKeyPairRequest$KeyName": "

A unique name for the key pair.

Constraints: Up to 255 ASCII characters

", + "DeleteKeyPairRequest$KeyName": "

The name of the key pair.

", + "ImportKeyPairRequest$KeyName": "

A unique name for the key pair.

" } }, "KmsKeyId": { "base": null, "refs": { "CreateVolumeRequest$KmsKeyId": "

The identifier of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use for Amazon EBS encryption. If this parameter is not specified, your AWS managed CMK for EBS is used. If KmsKeyId is specified, the encrypted state must be true.

You can specify the CMK using any of the following:

AWS authenticates the CMK asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid, the action can appear to complete, but eventually fails.

", - "ImportSnapshotRequest$KmsKeyId": "

An identifier for the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted snapshot. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. If a KmsKeyId is specified, the Encrypted flag must also be set.

The CMK identifier may be provided in any of the following formats:

AWS parses KmsKeyId asynchronously, meaning that the action you call may appear to complete even though you provided an invalid identifier. This action will eventually report failure.

The specified CMK must exist in the Region that the snapshot is being copied to.

", - "ModifyEbsDefaultKmsKeyIdRequest$KmsKeyId": "

The identifier of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use for Amazon EBS encryption. If this parameter is not specified, your AWS managed CMK for EBS is used. If KmsKeyId is specified, the encrypted state must be true.

You can specify the CMK using any of the following:

AWS authenticates the CMK asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid, the action can appear to complete, but eventually fails.

" + "ImportSnapshotRequest$KmsKeyId": "

An identifier for the symmetric AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted snapshot. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. If a KmsKeyId is specified, the Encrypted flag must also be set.

The CMK identifier may be provided in any of the following formats:

AWS parses KmsKeyId asynchronously, meaning that the action you call may appear to complete even though you provided an invalid identifier. This action will eventually report failure.

The specified CMK must exist in the Region that the snapshot is being copied to.

Amazon EBS does not support asymmetric CMKs.

", + "ModifyEbsDefaultKmsKeyIdRequest$KmsKeyId": "

The identifier of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use for Amazon EBS encryption. If this parameter is not specified, your AWS managed CMK for EBS is used. If KmsKeyId is specified, the encrypted state must be true.

You can specify the CMK using any of the following:

AWS authenticates the CMK asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid, the action can appear to complete, but eventually fails.

Amazon EBS does not support asymmetric CMKs.

" } }, "LaunchPermission": { @@ -7938,7 +7947,7 @@ "LaunchTemplateElasticInferenceAcceleratorCount": { "base": null, "refs": { - "LaunchTemplateElasticInferenceAccelerator$Count": "

The number of elastic inference accelerators of given type to be attached to the instance. Only positive values allowed. If not specified defaults to 1.

" + "LaunchTemplateElasticInferenceAccelerator$Count": "

The number of elastic inference accelerators to attach to the instance.

Default: 1

" } }, "LaunchTemplateElasticInferenceAcceleratorList": { @@ -8744,7 +8753,7 @@ "ModifyTransitGatewayVpcAttachmentRequestOptions": { "base": "

Describes the options for a VPC attachment.

", "refs": { - "ModifyTransitGatewayVpcAttachmentRequest$Options": "

The new VPC attachment options.

" + "ModifyTransitGatewayVpcAttachmentRequest$Options": "

The new VPC attachment options.

You cannot modify the IPv6 options.

" } }, "ModifyTransitGatewayVpcAttachmentResult": { @@ -9498,6 +9507,12 @@ "PlacementGroupList$member": null } }, + "PlacementGroupIdStringList": { + "base": null, + "refs": { + "DescribePlacementGroupsRequest$GroupIds": "

The IDs of the placement groups.

" + } + }, "PlacementGroupInfo": { "base": "

Describes the placement group support of the instance type.

", "refs": { @@ -10365,7 +10380,7 @@ "LaunchTemplateTagSpecificationRequest$ResourceType": "

The type of resource to tag. Currently, the resource types that support tagging on creation are instance and volume. To tag a resource after it has been created, see CreateTags.

", "SpotFleetTagSpecification$ResourceType": "

The type of resource. Currently, the only resource type that is supported is instance.

", "TagDescription$ResourceType": "

The resource type.

", - "TagSpecification$ResourceType": "

The type of resource to tag. Currently, the resource types that support tagging on creation are: capacity-reservation | client-vpn-endpoint | dedicated-host | fleet | fpga-image | instance | launch-template | snapshot | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-route-table | volume.

To tag a resource after it has been created, see CreateTags.

" + "TagSpecification$ResourceType": "

The type of resource to tag. Currently, the resource types that support tagging on creation are: capacity-reservation | client-vpn-endpoint | dedicated-host | fleet | fpga-image | instance | key-pair | launch-template | placement-group | snapshot | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-route-table | volume.

To tag a resource after it has been created, see CreateTags.

" } }, "ResponseError": { @@ -10441,7 +10456,7 @@ "RootDeviceTypeList": { "base": null, "refs": { - "InstanceTypeInfo$SupportedRootDevices": "

Indicates the supported root devices.

" + "InstanceTypeInfo$SupportedRootDeviceTypes": "

Indicates the supported root device types.

" } }, "Route": { @@ -11395,7 +11410,7 @@ "CopyFpgaImageResult$FpgaImageId": "

The ID of the new AFI.

", "CopyImageRequest$ClientToken": "

Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.

", "CopyImageRequest$Description": "

A description for the new AMI in the destination Region.

", - "CopyImageRequest$KmsKeyId": "

An identifier for the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. If a KmsKeyId is specified, the Encrypted flag must also be set.

To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with \"alias/\". For example:

AWS parses KmsKeyId asynchronously, meaning that the action you call may appear to complete even though you provided an invalid identifier. This action will eventually report failure.

The specified CMK must exist in the Region that the snapshot is being copied to.

", + "CopyImageRequest$KmsKeyId": "

An identifier for the symmetric AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. If a KmsKeyId is specified, the Encrypted flag must also be set.

To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with \"alias/\". For example:

AWS parses KmsKeyId asynchronously, meaning that the action you call may appear to complete even though you provided an invalid identifier. This action will eventually report failure.

The specified CMK must exist in the Region that the snapshot is being copied to.

Amazon EBS does not support asymmetric CMKs.

", "CopyImageRequest$Name": "

The name of the new AMI in the destination Region.

", "CopyImageRequest$SourceImageId": "

The ID of the AMI to copy.

", "CopyImageRequest$SourceRegion": "

The name of the Region that contains the AMI to copy.

", @@ -11542,7 +11557,6 @@ "DeleteClientVpnRouteRequest$TargetVpcSubnetId": "

The ID of the target subnet used by the route.

", "DeleteClientVpnRouteRequest$DestinationCidrBlock": "

The IPv4 address range, in CIDR notation, of the route to be deleted.

", "DeleteFleetError$Message": "

The description for the error code.

", - "DeleteKeyPairRequest$KeyName": "

The name of the key pair.

", "DeleteLaunchTemplateVersionsResponseErrorItem$LaunchTemplateId": "

The ID of the launch template.

", "DeleteLaunchTemplateVersionsResponseErrorItem$LaunchTemplateName": "

The name of the launch template.

", "DeleteLaunchTemplateVersionsResponseSuccessItem$LaunchTemplateId": "

The ID of the launch template.

", @@ -11800,7 +11814,7 @@ "ElasticGpuAssociation$ElasticGpuAssociationState": "

The state of the association between the instance and the Elastic Graphics accelerator.

", "ElasticGpuAssociation$ElasticGpuAssociationTime": "

The time the Elastic Graphics accelerator was associated with the instance.

", "ElasticGpuIdSet$member": null, - "ElasticGpuSpecification$Type": "

The type of Elastic Graphics accelerator.

", + "ElasticGpuSpecification$Type": "

The type of Elastic Graphics accelerator. For more information about the values to specify for Type, see Elastic Graphics Basics, specifically the Elastic Graphics accelerator column, in the Amazon Elastic Compute Cloud User Guide for Windows Instances.

", "ElasticGpuSpecificationResponse$Type": "

The elastic GPU type.

", "ElasticGpus$ElasticGpuId": "

The ID of the Elastic Graphics accelerator.

", "ElasticGpus$AvailabilityZone": "

The Availability Zone in the which the Elastic Graphics accelerator resides.

", @@ -11985,7 +11999,7 @@ "ImportImageRequest$ClientToken": "

The token to enable idempotency for VM import requests.

", "ImportImageRequest$Description": "

A description string for the import image task.

", "ImportImageRequest$Hypervisor": "

The target hypervisor platform.

Valid values: xen

", - "ImportImageRequest$KmsKeyId": "

An identifier for the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted AMI. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. If a KmsKeyId is specified, the Encrypted flag must also be set.

The CMK identifier may be provided in any of the following formats:

AWS parses KmsKeyId asynchronously, meaning that the action you call may appear to complete even though you provided an invalid identifier. This action will eventually report failure.

The specified CMK must exist in the Region that the AMI is being copied to.

", + "ImportImageRequest$KmsKeyId": "

An identifier for the symmetric AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted AMI. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. If a KmsKeyId is specified, the Encrypted flag must also be set.

The CMK identifier may be provided in any of the following formats:

AWS parses KmsKeyId asynchronously, meaning that the action you call may appear to complete even though you provided an invalid identifier. This action will eventually report failure.

The specified CMK must exist in the Region that the AMI is being copied to.

Amazon EBS does not support asymmetric CMKs.

", "ImportImageRequest$LicenseType": "

The license type to be used for the Amazon Machine Image (AMI) after importing.

By default, we detect the source-system operating system (OS) and apply the appropriate license. Specify AWS to replace the source-system license with an AWS license, if appropriate. Specify BYOL to retain the source-system license, if appropriate.

To use BYOL, you must have existing licenses with rights to use these licenses in a third party cloud, such as AWS. For more information, see Prerequisites in the VM Import/Export User Guide.

", "ImportImageRequest$Platform": "

The operating system of the virtual machine.

Valid values: Windows | Linux

", "ImportImageRequest$RoleName": "

The name of the role to use when not using the default role, 'vmimport'.

", @@ -11994,7 +12008,7 @@ "ImportImageResult$Hypervisor": "

The target hypervisor of the import task.

", "ImportImageResult$ImageId": "

The ID of the Amazon Machine Image (AMI) created by the import task.

", "ImportImageResult$ImportTaskId": "

The task ID of the import image task.

", - "ImportImageResult$KmsKeyId": "

The identifier for the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to create the encrypted AMI.

", + "ImportImageResult$KmsKeyId": "

The identifier for the symmetric AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to create the encrypted AMI.

", "ImportImageResult$LicenseType": "

The license type of the virtual machine.

", "ImportImageResult$Platform": "

The operating system of the virtual machine.

", "ImportImageResult$Progress": "

The progress of the task.

", @@ -12021,7 +12035,6 @@ "ImportInstanceVolumeDetailItem$Description": "

A description of the task.

", "ImportInstanceVolumeDetailItem$Status": "

The status of the import of this particular disk image.

", "ImportInstanceVolumeDetailItem$StatusMessage": "

The status information or errors related to the disk image.

", - "ImportKeyPairRequest$KeyName": "

A unique name for the key pair.

", "ImportKeyPairResult$KeyFingerprint": "

The MD5 public key fingerprint as specified in section 4 of RFC 4716.

", "ImportKeyPairResult$KeyName": "

The key pair name you provided.

", "ImportSnapshotRequest$ClientToken": "

Token to enable idempotency for VM import requests.

", @@ -12103,15 +12116,18 @@ "InternetGatewayAttachment$VpcId": "

The ID of the VPC.

", "IpPermission$IpProtocol": "

The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers).

[VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp, udp, icmp, or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp, udp, and icmp, you must specify a port range. For icmpv6, the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

", "IpRange$CidrIp": "

The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

", - "IpRange$Description": "

A description for the security group rule that references this IPv4 address range.

Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

", + "IpRange$Description": "

A description for the security group rule that references this IPv4 address range.

Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

", "IpRanges$member": null, "Ipv6AddressList$member": null, "Ipv6CidrBlock$Ipv6CidrBlock": "

The IPv6 CIDR block.

", "Ipv6Range$CidrIpv6": "

The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

", - "Ipv6Range$Description": "

A description for the security group rule that references this IPv6 address range.

Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

", + "Ipv6Range$Description": "

A description for the security group rule that references this IPv6 address range.

Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

", "KeyNameStringList$member": null, "KeyPair$KeyFingerprint": "

The SHA-1 digest of the DER encoded private key.

", "KeyPair$KeyName": "

The name of the key pair.

", + "KeyPair$KeyPairId": "

The ID of the key pair.

", + "KeyPairIdStringList$member": null, + "KeyPairInfo$KeyPairId": "

The ID of the key pair.

", "KeyPairInfo$KeyFingerprint": "

If you used CreateKeyPair to create the key pair, this is the SHA-1 digest of the DER encoded private key. If you used ImportKeyPair to provide AWS the public key, this is the MD5 public key fingerprint as specified in section 4 of RFC4716.

", "KeyPairInfo$KeyName": "

The name of the key pair.

", "LaunchPermission$UserId": "

The AWS account ID.

", @@ -12132,7 +12148,7 @@ "LaunchTemplateBlockDeviceMappingRequest$NoDevice": "

Suppresses the specified device included in the block device mapping of the AMI.

", "LaunchTemplateEbsBlockDevice$KmsKeyId": "

The ARN of the AWS Key Management Service (AWS KMS) CMK used for encryption.

", "LaunchTemplateEbsBlockDevice$SnapshotId": "

The ID of the snapshot.

", - "LaunchTemplateEbsBlockDeviceRequest$KmsKeyId": "

The ARN of the AWS Key Management Service (AWS KMS) CMK used for encryption.

", + "LaunchTemplateEbsBlockDeviceRequest$KmsKeyId": "

The ARN of the symmetric AWS Key Management Service (AWS KMS) CMK used for encryption.

", "LaunchTemplateEbsBlockDeviceRequest$SnapshotId": "

The ID of the snapshot.

", "LaunchTemplateElasticInferenceAccelerator$Type": "

The type of elastic inference accelerator. The possible values are eia1.medium, eia1.large, and eia1.xlarge.

", "LaunchTemplateElasticInferenceAcceleratorResponse$Type": "

The type of elastic inference accelerator. The possible values are eia1.medium, eia1.large, and eia1.xlarge.

", @@ -12327,6 +12343,8 @@ "Placement$SpreadDomain": "

Reserved for future use.

", "Placement$HostResourceGroupArn": "

The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host.

", "PlacementGroup$GroupName": "

The name of the placement group.

", + "PlacementGroup$GroupId": "

The ID of the placement group.

", + "PlacementGroupIdStringList$member": null, "PlacementGroupStringList$member": null, "PlacementResponse$GroupName": "

The name of the placement group that the instance is in.

", "PrefixList$PrefixListId": "

The ID of the prefix.

", @@ -12993,19 +13011,25 @@ "CustomerGateway$Tags": "

Any tags assigned to the customer gateway.

", "DeleteTagsRequest$Tags": "

The tags to delete. Specify a tag key and an optional tag value to delete specific tags. If you specify a tag key without a tag value, we delete any tag with this key regardless of its value. If you specify a tag key with an empty string as the tag value, we delete the tag only if its value is an empty string.

If you omit this parameter, we delete all user-defined tags for the specified resources. We do not delete AWS-generated tags (tags that have the aws: prefix).

", "DhcpOptions$Tags": "

Any tags assigned to the DHCP options set.

", + "ElasticGpus$Tags": "

The tags assigned to the Elastic Graphics accelerator.

", + "ExportTask$Tags": null, "FleetData$Tags": "

The tags for an EC2 Fleet resource.

", "FpgaImage$Tags": "

Any tags assigned to the AFI.

", "Host$Tags": "

Any tags assigned to the Dedicated Host.

", "HostReservation$Tags": "

Any tags assigned to the Dedicated Host Reservation.

", "Image$Tags": "

Any tags assigned to the image.

", + "ImportImageTask$Tags": "

Any tags applied to the import image task.

", + "ImportSnapshotTask$Tags": "

Any tags applied to the import snapshot task.

", "Instance$Tags": "

Any tags assigned to the instance.

", "InternetGateway$Tags": "

Any tags assigned to the internet gateway.

", + "KeyPairInfo$Tags": "

Any tags applied to the key pair.

", "LaunchTemplate$Tags": "

The tags for the launch template.

", "LaunchTemplateTagSpecification$Tags": "

The tags for the resource.

", "LaunchTemplateTagSpecificationRequest$Tags": "

The tags to apply to the resource.

", "NatGateway$Tags": "

The tags for the NAT gateway.

", "NetworkAcl$Tags": "

Any tags assigned to the network ACL.

", "NetworkInterface$TagSet": "

Any tags assigned to the network interface.

", + "PlacementGroup$Tags": "

Any tags applied to the placement group.

", "ReservedInstances$Tags": "

Any tags assigned to the resource.

", "ReservedInstancesListing$Tags": "

Any tags assigned to the resource.

", "RouteTable$Tags": "

Any tags assigned to the route table.

", diff --git a/models/apis/ecr/2015-09-21/waiters-2.json b/models/apis/ecr/2015-09-21/waiters-2.json new file mode 100644 index 00000000000..9ef9608fda4 --- /dev/null +++ b/models/apis/ecr/2015-09-21/waiters-2.json @@ -0,0 +1,45 @@ +{ + "version": 2, + "waiters": { + "ImageScanComplete": { + "description": "Wait until an image scan is complete and findings can be accessed", + "operation": "DescribeImageScanFindings", + "delay": 5, + "maxAttempts": 60, + "acceptors": [ + { + "state": "success", + "matcher": "path", + "argument": "imageScanStatus.status", + "expected": "COMPLETE" + }, + { + "state": "failure", + "matcher": "path", + "argument": "imageScanStatus.status", + "expected": "FAILED" + } + ] + }, + "LifecyclePolicyPreviewComplete": { + "description": "Wait until a lifecycle policy preview request is complete and results can be accessed", + "operation": "GetLifecyclePolicyPreview", + "delay": 5, + "maxAttempts": 20, + "acceptors": [ + { + "state": "success", + "matcher": "path", + "argument": "status", + "expected": "COMPLETE" + }, + { + "state": "failure", + "matcher": "path", + "argument": "status", + "expected": "FAILED" + } + ] + } + } +} \ No newline at end of file diff --git a/models/apis/eks/2017-11-01/api-2.json b/models/apis/eks/2017-11-01/api-2.json index 6b696687901..05e8420846e 100644 --- a/models/apis/eks/2017-11-01/api-2.json +++ b/models/apis/eks/2017-11-01/api-2.json @@ -1361,7 +1361,8 @@ "LabelsToRemove", "MaxSize", "MinSize", - "ReleaseVersion" + "ReleaseVersion", + "PublicAccessCidrs" ] }, "UpdateParams":{ @@ -1392,7 +1393,8 @@ "subnetIds":{"shape":"StringList"}, "securityGroupIds":{"shape":"StringList"}, "endpointPublicAccess":{"shape":"BoxedBoolean"}, - "endpointPrivateAccess":{"shape":"BoxedBoolean"} + "endpointPrivateAccess":{"shape":"BoxedBoolean"}, + "publicAccessCidrs":{"shape":"StringList"} } }, "VpcConfigResponse":{ @@ -1403,7 +1405,8 @@ "clusterSecurityGroupId":{"shape":"String"}, "vpcId":{"shape":"String"}, "endpointPublicAccess":{"shape":"Boolean"}, - "endpointPrivateAccess":{"shape":"Boolean"} + "endpointPrivateAccess":{"shape":"Boolean"}, + "publicAccessCidrs":{"shape":"StringList"} } }, "labelKey":{ diff --git a/models/apis/eks/2017-11-01/docs-2.json b/models/apis/eks/2017-11-01/docs-2.json index 272ce90a583..644a29ca3c0 100644 --- a/models/apis/eks/2017-11-01/docs-2.json +++ b/models/apis/eks/2017-11-01/docs-2.json @@ -3,10 +3,10 @@ "service": "

Amazon Elastic Kubernetes Service (Amazon EKS) is a managed service that makes it easy for you to run Kubernetes on AWS without needing to stand up or maintain your own Kubernetes control plane. Kubernetes is an open-source system for automating the deployment, scaling, and management of containerized applications.

Amazon EKS runs up-to-date versions of the open-source Kubernetes software, so you can use all the existing plugins and tooling from the Kubernetes community. Applications running on Amazon EKS are fully compatible with applications running on any standard Kubernetes environment, whether running in on-premises data centers or public clouds. This means that you can easily migrate any standard Kubernetes application to Amazon EKS without any code modification required.

", "operations": { "CreateCluster": "

Creates an Amazon EKS control plane.

The Amazon EKS control plane consists of control plane instances that run the Kubernetes software, such as etcd and the API server. The control plane runs in an account managed by AWS, and the Kubernetes API is exposed via the Amazon EKS API server endpoint. Each Amazon EKS cluster control plane is single-tenant and unique and runs on its own set of Amazon EC2 instances.

The cluster control plane is provisioned across multiple Availability Zones and fronted by an Elastic Load Balancing Network Load Balancer. Amazon EKS also provisions elastic network interfaces in your VPC subnets to provide connectivity from the control plane instances to the worker nodes (for example, to support kubectl exec, logs, and proxy data flows).

Amazon EKS worker nodes run in your AWS account and connect to your cluster's control plane via the Kubernetes API server endpoint and a certificate file that is created for your cluster.

You can use the endpointPublicAccess and endpointPrivateAccess parameters to enable or disable public and private access to your cluster's Kubernetes API server endpoint. By default, public access is enabled, and private access is disabled. For more information, see Amazon EKS Cluster Endpoint Access Control in the Amazon EKS User Guide .

You can use the logging parameter to enable or disable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs. By default, cluster control plane logs aren't exported to CloudWatch Logs. For more information, see Amazon EKS Cluster Control Plane Logs in the Amazon EKS User Guide .

CloudWatch Logs ingestion, archive storage, and data scanning rates apply to exported control plane logs. For more information, see Amazon CloudWatch Pricing.

Cluster creation typically takes between 10 and 15 minutes. After you create an Amazon EKS cluster, you must configure your Kubernetes tooling to communicate with the API server and launch worker nodes into your cluster. For more information, see Managing Cluster Authentication and Launching Amazon EKS Worker Nodes in the Amazon EKS User Guide.

", - "CreateFargateProfile": "

Creates an AWS Fargate profile for your Amazon EKS cluster. You must have at least one Fargate profile in a cluster to be able to schedule pods on Fargate infrastructure.

The Fargate profile allows an administrator to declare which pods run on Fargate infrastructure and specify which pods run on which Fargate profile. This declaration is done through the profile’s selectors. Each profile can have up to five selectors that contain a namespace and labels. A namespace is required for every selector. The label field consists of multiple optional key-value pairs. Pods that match the selectors are scheduled on Fargate infrastructure. If a to-be-scheduled pod matches any of the selectors in the Fargate profile, then that pod is scheduled on Fargate infrastructure.

When you create a Fargate profile, you must specify a pod execution role to use with the pods that are scheduled with the profile. This role is added to the cluster's Kubernetes Role Based Access Control (RBAC) for authorization so that the kubelet that is running on the Fargate infrastructure can register with your Amazon EKS cluster. This role is what allows Fargate infrastructure to appear in your cluster as nodes. The pod execution role also provides IAM permissions to the Fargate infrastructure to allow read access to Amazon ECR image repositories. For more information, see Pod Execution Role in the Amazon EKS User Guide.

Fargate profiles are immutable. However, you can create a new updated profile to replace an existing profile and then delete the original after the updated profile has finished creating.

If any Fargate profiles in a cluster are in the DELETING status, you must wait for that Fargate profile to finish deleting before you can create any other profiles in that cluster.

For more information, see AWS Fargate Profile in the Amazon EKS User Guide.

", + "CreateFargateProfile": "

Creates an AWS Fargate profile for your Amazon EKS cluster. You must have at least one Fargate profile in a cluster to be able to run pods on Fargate.

The Fargate profile allows an administrator to declare which pods run on Fargate and specify which pods run on which Fargate profile. This declaration is done through the profile’s selectors. Each profile can have up to five selectors that contain a namespace and labels. A namespace is required for every selector. The label field consists of multiple optional key-value pairs. Pods that match the selectors are scheduled on Fargate. If a to-be-scheduled pod matches any of the selectors in the Fargate profile, then that pod is run on Fargate.

When you create a Fargate profile, you must specify a pod execution role to use with the pods that are scheduled with the profile. This role is added to the cluster's Kubernetes Role Based Access Control (RBAC) for authorization so that the kubelet that is running on the Fargate infrastructure can register with your Amazon EKS cluster so that it can appear in your cluster as a node. The pod execution role also provides IAM permissions to the Fargate infrastructure to allow read access to Amazon ECR image repositories. For more information, see Pod Execution Role in the Amazon EKS User Guide.

Fargate profiles are immutable. However, you can create a new updated profile to replace an existing profile and then delete the original after the updated profile has finished creating.

If any Fargate profiles in a cluster are in the DELETING status, you must wait for that Fargate profile to finish deleting before you can create any other profiles in that cluster.

For more information, see AWS Fargate Profile in the Amazon EKS User Guide.

", "CreateNodegroup": "

Creates a managed worker node group for an Amazon EKS cluster. You can only create a node group for your cluster that is equal to the current Kubernetes version for the cluster. All node groups are created with the latest AMI release version for the respective minor Kubernetes version of the cluster.

An Amazon EKS managed node group is an Amazon EC2 Auto Scaling group and associated Amazon EC2 instances that are managed by AWS for an Amazon EKS cluster. Each node group uses a version of the Amazon EKS-optimized Amazon Linux 2 AMI. For more information, see Managed Node Groups in the Amazon EKS User Guide.

", "DeleteCluster": "

Deletes the Amazon EKS cluster control plane.

If you have active services in your cluster that are associated with a load balancer, you must delete those services before deleting the cluster so that the load balancers are deleted properly. Otherwise, you can have orphaned resources in your VPC that prevent you from being able to delete the VPC. For more information, see Deleting a Cluster in the Amazon EKS User Guide.

If you have managed node groups or Fargate profiles attached to the cluster, you must delete them first. For more information, see DeleteNodegroup andDeleteFargateProfile.

", - "DeleteFargateProfile": "

Deletes an AWS Fargate profile.

When you delete a Fargate profile, any pods that were scheduled onto Fargate infrastructure with the profile are deleted. If those pods match another Fargate profile, then they are scheduled on Fargate infrastructure with that profile. If they no longer match any Fargate profiles, then they are not scheduled on Fargate infrastructure.

Only one Fargate profile in a cluster can be in the DELETING status at a time. You must wait for a Fargate profile to finish deleting before you can delete any other profiles in that cluster.

", + "DeleteFargateProfile": "

Deletes an AWS Fargate profile.

When you delete a Fargate profile, any pods running on Fargate that were created with the profile are deleted. If those pods match another Fargate profile, then they are scheduled on Fargate with that profile. If they no longer match any Fargate profiles, then they are not scheduled on Fargate and they may remain in a pending state.

Only one Fargate profile in a cluster can be in the DELETING status at a time. You must wait for a Fargate profile to finish deleting before you can delete any other profiles in that cluster.

", "DeleteNodegroup": "

Deletes an Amazon EKS node group for a cluster.

", "DescribeCluster": "

Returns descriptive information about an Amazon EKS cluster.

The API server endpoint and certificate authority data returned by this operation are required for kubelet and kubectl to communicate with your Kubernetes API server. For more information, see Create a kubeconfig for Amazon EKS.

The API server endpoint and certificate authority data aren't available until the cluster reaches the ACTIVE state.

", "DescribeFargateProfile": "

Returns descriptive information about an AWS Fargate profile.

", @@ -53,16 +53,16 @@ "base": null, "refs": { "UpdateNodegroupVersionRequest$force": "

Force the update if the existing node group's pods are unable to be drained due to a pod disruption budget issue. If an update fails because pods could not be drained, you can force the update after it fails to terminate the old node whether or not any pods are running on the node.

", - "VpcConfigResponse$endpointPublicAccess": "

This parameter indicates whether the Amazon EKS public API server endpoint is enabled. If the Amazon EKS public API server endpoint is disabled, your cluster's Kubernetes API server can receive only requests that originate from within the cluster VPC.

", - "VpcConfigResponse$endpointPrivateAccess": "

This parameter indicates whether the Amazon EKS private API server endpoint is enabled. If the Amazon EKS private API server endpoint is enabled, Kubernetes API requests that originate from within your cluster's VPC use the private VPC endpoint instead of traversing the internet.

" + "VpcConfigResponse$endpointPublicAccess": "

This parameter indicates whether the Amazon EKS public API server endpoint is enabled. If the Amazon EKS public API server endpoint is disabled, your cluster's Kubernetes API server can only receive requests that originate from within the cluster VPC.

", + "VpcConfigResponse$endpointPrivateAccess": "

This parameter indicates whether the Amazon EKS private API server endpoint is enabled. If the Amazon EKS private API server endpoint is enabled, Kubernetes API requests that originate from within your cluster's VPC use the private VPC endpoint instead of traversing the internet. If this value is disabled and you have worker nodes or AWS Fargate pods in the cluster, then ensure that publicAccessCidrs includes the necessary CIDR blocks for communication with the worker nodes or Fargate pods. For more information, see Amazon EKS Cluster Endpoint Access Control in the Amazon EKS User Guide .

" } }, "BoxedBoolean": { "base": null, "refs": { "LogSetup$enabled": "

If a log type is enabled, that log type exports its control plane logs to CloudWatch Logs. If a log type isn't enabled, that log type doesn't export its control plane logs. Each individual log type can be enabled or disabled independently.

", - "VpcConfigRequest$endpointPublicAccess": "

Set this value to false to disable public access for your cluster's Kubernetes API server endpoint. If you disable public access, your cluster's Kubernetes API server can receive only requests from within the cluster VPC. The default value for this parameter is true, which enables public access for your Kubernetes API server. For more information, see Amazon EKS Cluster Endpoint Access Control in the Amazon EKS User Guide .

", - "VpcConfigRequest$endpointPrivateAccess": "

Set this value to true to enable private access for your cluster's Kubernetes API server endpoint. If you enable private access, Kubernetes API requests from within your cluster's VPC use the private VPC endpoint. The default value for this parameter is false, which disables private access for your Kubernetes API server. For more information, see Amazon EKS Cluster Endpoint Access Control in the Amazon EKS User Guide .

" + "VpcConfigRequest$endpointPublicAccess": "

Set this value to false to disable public access to your cluster's Kubernetes API server endpoint. If you disable public access, your cluster's Kubernetes API server can only receive requests from within the cluster VPC. The default value for this parameter is true, which enables public access for your Kubernetes API server. For more information, see Amazon EKS Cluster Endpoint Access Control in the Amazon EKS User Guide .

", + "VpcConfigRequest$endpointPrivateAccess": "

Set this value to true to enable private access for your cluster's Kubernetes API server endpoint. If you enable private access, Kubernetes API requests from within your cluster's VPC use the private VPC endpoint. The default value for this parameter is false, which disables private access for your Kubernetes API server. If you disable private access and you have worker nodes or AWS Fargate pods in the cluster, then ensure that publicAccessCidrs includes the necessary CIDR blocks for communication with the worker nodes or Fargate pods. For more information, see Amazon EKS Cluster Endpoint Access Control in the Amazon EKS User Guide .

" } }, "BoxedInteger": { @@ -525,7 +525,7 @@ "FargateProfile$fargateProfileName": "

The name of the Fargate profile.

", "FargateProfile$fargateProfileArn": "

The full Amazon Resource Name (ARN) of the Fargate profile.

", "FargateProfile$clusterName": "

The name of the Amazon EKS cluster that the Fargate profile belongs to.

", - "FargateProfile$podExecutionRoleArn": "

The Amazon Resource Name (ARN) of the pod execution role to use for pods that match the selectors in the Fargate profile. For more information, see Pod Execution Role in the Amazon EKS User Guide.

", + "FargateProfile$podExecutionRoleArn": "

The Amazon Resource Name (ARN) of the pod execution role to use for pods that match the selectors in the Fargate profile. For more information, see Pod Execution Role in the Amazon EKS User Guide.

", "FargateProfileLabel$key": null, "FargateProfileLabel$value": null, "FargateProfileSelector$namespace": "

The Kubernetes namespace that the selector should match.

", @@ -603,11 +603,11 @@ "StringList": { "base": null, "refs": { - "CreateFargateProfileRequest$subnets": "

The IDs of subnets to launch Fargate pods into. At this time, Fargate pods are not assigned public IP addresses, so only private subnets (with no direct route to an Internet Gateway) are accepted for this parameter.

", + "CreateFargateProfileRequest$subnets": "

The IDs of subnets to launch your pods into. At this time, pods running on Fargate are not assigned public IP addresses, so only private subnets (with no direct route to an Internet Gateway) are accepted for this parameter.

", "CreateNodegroupRequest$subnets": "

The subnets to use for the Auto Scaling group that is created for your node group. These subnets must have the tag key kubernetes.io/cluster/CLUSTER_NAME with a value of shared, where CLUSTER_NAME is replaced with the name of your cluster.

", "CreateNodegroupRequest$instanceTypes": "

The instance type to use for your node group. Currently, you can specify a single instance type for a node group. The default value for this parameter is t3.medium. If you choose a GPU instance type, be sure to specify the AL2_x86_64_GPU with the amiType parameter.

", "ErrorDetail$resourceIds": "

An optional field that contains the resource IDs associated with the error.

", - "FargateProfile$subnets": "

The IDs of subnets to launch Fargate pods into.

", + "FargateProfile$subnets": "

The IDs of subnets to launch pods into.

", "Issue$resourceIds": "

The AWS resources that are afflicted by this issue.

", "ListClustersResponse$clusters": "

A list of all of the clusters for your account in the specified Region.

", "ListFargateProfilesResponse$fargateProfileNames": "

A list of all of the Fargate profiles associated with the specified cluster.

", @@ -619,8 +619,10 @@ "UnsupportedAvailabilityZoneException$validZones": "

The supported Availability Zones for your account. Choose subnets in these Availability Zones for your cluster.

", "VpcConfigRequest$subnetIds": "

Specify subnets for your Amazon EKS worker nodes. Amazon EKS creates cross-account elastic network interfaces in these subnets to allow communication between your worker nodes and the Kubernetes control plane.

", "VpcConfigRequest$securityGroupIds": "

Specify one or more security groups for the cross-account elastic network interfaces that Amazon EKS creates to use to allow communication between your worker nodes and the Kubernetes control plane. If you don't specify a security group, the default security group for your VPC is used.

", + "VpcConfigRequest$publicAccessCidrs": "

The CIDR blocks that are allowed access to your cluster's public Kubernetes API server endpoint. Communication to the endpoint from addresses outside of the CIDR blocks that you specify is denied. The default value is 0.0.0.0/0. If you've disabled private endpoint access and you have worker nodes or AWS Fargate pods in the cluster, then ensure that you specify the necessary CIDR blocks. For more information, see Amazon EKS Cluster Endpoint Access Control in the Amazon EKS User Guide .

", "VpcConfigResponse$subnetIds": "

The subnets associated with your cluster.

", - "VpcConfigResponse$securityGroupIds": "

The security groups associated with the cross-account elastic network interfaces that are used to allow communication between your worker nodes and the Kubernetes control plane.

" + "VpcConfigResponse$securityGroupIds": "

The security groups associated with the cross-account elastic network interfaces that are used to allow communication between your worker nodes and the Kubernetes control plane.

", + "VpcConfigResponse$publicAccessCidrs": "

The CIDR blocks that are allowed access to your cluster's public Kubernetes API server endpoint. Communication to the endpoint from addresses outside of the listed CIDR blocks is denied. The default value is 0.0.0.0/0. If you've disabled private endpoint access and you have worker nodes or AWS Fargate pods in the cluster, then ensure that the necessary CIDR blocks are listed. For more information, see Amazon EKS Cluster Endpoint Access Control in the Amazon EKS User Guide .

" } }, "TagKey": { diff --git a/models/apis/fsx/2018-03-01/api-2.json b/models/apis/fsx/2018-03-01/api-2.json index 5e3abf74bfe..746efb22669 100644 --- a/models/apis/fsx/2018-03-01/api-2.json +++ b/models/apis/fsx/2018-03-01/api-2.json @@ -12,6 +12,23 @@ "uid":"fsx-2018-03-01" }, "operations":{ + "CancelDataRepositoryTask":{ + "name":"CancelDataRepositoryTask", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"CancelDataRepositoryTaskRequest"}, + "output":{"shape":"CancelDataRepositoryTaskResponse"}, + "errors":[ + {"shape":"BadRequest"}, + {"shape":"UnsupportedOperation"}, + {"shape":"DataRepositoryTaskNotFound"}, + {"shape":"DataRepositoryTaskEnded"}, + {"shape":"InternalServerError"} + ], + "idempotent":true + }, "CreateBackup":{ "name":"CreateBackup", "http":{ @@ -31,6 +48,25 @@ ], "idempotent":true }, + "CreateDataRepositoryTask":{ + "name":"CreateDataRepositoryTask", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"CreateDataRepositoryTaskRequest"}, + "output":{"shape":"CreateDataRepositoryTaskResponse"}, + "errors":[ + {"shape":"BadRequest"}, + {"shape":"UnsupportedOperation"}, + {"shape":"FileSystemNotFound"}, + {"shape":"IncompatibleParameterError"}, + {"shape":"ServiceLimitExceeded"}, + {"shape":"InternalServerError"}, + {"shape":"DataRepositoryTaskExecuting"} + ], + "idempotent":true + }, "CreateFileSystem":{ "name":"CreateFileSystem", "http":{ @@ -120,6 +156,21 @@ {"shape":"InternalServerError"} ] }, + "DescribeDataRepositoryTasks":{ + "name":"DescribeDataRepositoryTasks", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeDataRepositoryTasksRequest"}, + "output":{"shape":"DescribeDataRepositoryTasksResponse"}, + "errors":[ + {"shape":"BadRequest"}, + {"shape":"FileSystemNotFound"}, + {"shape":"DataRepositoryTaskNotFound"}, + {"shape":"InternalServerError"} + ] + }, "DescribeFileSystems":{ "name":"DescribeFileSystems", "http":{ @@ -235,11 +286,17 @@ "INVALID_DOMAIN_STAGE" ] }, - "ActiveDirectoryFullyQualifiedName":{"type":"string"}, + "ActiveDirectoryFullyQualifiedName":{ + "type":"string", + "max":255, + "min":1, + "pattern":"^.{1,255}$" + }, "ArchivePath":{ "type":"string", "max":900, - "min":3 + "min":3, + "pattern":"^.{3,900}$" }, "AutomaticBackupRetentionDays":{ "type":"integer", @@ -336,11 +393,35 @@ }, "exception":true }, + "CancelDataRepositoryTaskRequest":{ + "type":"structure", + "required":["TaskId"], + "members":{ + "TaskId":{"shape":"TaskId"} + } + }, + "CancelDataRepositoryTaskResponse":{ + "type":"structure", + "members":{ + "Lifecycle":{"shape":"DataRepositoryTaskLifecycle"}, + "TaskId":{"shape":"TaskId"} + } + }, "ClientRequestToken":{ "type":"string", - "max":255, + "max":63, "min":1, - "pattern":"[A-za-z0-9_.-]{0,255}$" + "pattern":"[A-za-z0-9_.-]{0,63}$" + }, + "CompletionReport":{ + "type":"structure", + "required":["Enabled"], + "members":{ + "Enabled":{"shape":"Flag"}, + "Path":{"shape":"ArchivePath"}, + "Format":{"shape":"ReportFormat"}, + "Scope":{"shape":"ReportScope"} + } }, "CreateBackupRequest":{ "type":"structure", @@ -360,6 +441,31 @@ "Backup":{"shape":"Backup"} } }, + "CreateDataRepositoryTaskRequest":{ + "type":"structure", + "required":[ + "Type", + "FileSystemId", + "Report" + ], + "members":{ + "Type":{"shape":"DataRepositoryTaskType"}, + "Paths":{"shape":"DataRepositoryTaskPaths"}, + "FileSystemId":{"shape":"FileSystemId"}, + "Report":{"shape":"CompletionReport"}, + "ClientRequestToken":{ + "shape":"ClientRequestToken", + "idempotencyToken":true + }, + "Tags":{"shape":"Tags"} + } + }, + "CreateDataRepositoryTaskResponse":{ + "type":"structure", + "members":{ + "DataRepositoryTask":{"shape":"DataRepositoryTask"} + } + }, "CreateFileSystemFromBackupRequest":{ "type":"structure", "required":[ @@ -457,6 +563,128 @@ "ImportedFileChunkSize":{"shape":"Megabytes"} } }, + "DataRepositoryTask":{ + "type":"structure", + "required":[ + "TaskId", + "Lifecycle", + "Type", + "CreationTime", + "FileSystemId" + ], + "members":{ + "TaskId":{"shape":"TaskId"}, + "Lifecycle":{"shape":"DataRepositoryTaskLifecycle"}, + "Type":{"shape":"DataRepositoryTaskType"}, + "CreationTime":{"shape":"CreationTime"}, + "StartTime":{"shape":"StartTime"}, + "EndTime":{"shape":"EndTime"}, + "ResourceARN":{"shape":"ResourceARN"}, + "Tags":{"shape":"Tags"}, + "FileSystemId":{"shape":"FileSystemId"}, + "Paths":{"shape":"DataRepositoryTaskPaths"}, + "FailureDetails":{"shape":"DataRepositoryTaskFailureDetails"}, + "Status":{"shape":"DataRepositoryTaskStatus"}, + "Report":{"shape":"CompletionReport"} + } + }, + "DataRepositoryTaskEnded":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"} + }, + "exception":true + }, + "DataRepositoryTaskExecuting":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"} + }, + "exception":true + }, + "DataRepositoryTaskFailureDetails":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"} + } + }, + "DataRepositoryTaskFilter":{ + "type":"structure", + "members":{ + "Name":{"shape":"DataRepositoryTaskFilterName"}, + "Values":{"shape":"DataRepositoryTaskFilterValues"} + } + }, + "DataRepositoryTaskFilterName":{ + "type":"string", + "enum":[ + "file-system-id", + "task-lifecycle" + ] + }, + "DataRepositoryTaskFilterValue":{ + "type":"string", + "max":128, + "min":1, + "pattern":"^[0-9a-zA-Z\\*\\.\\\\/\\?\\-\\_]*$" + }, + "DataRepositoryTaskFilterValues":{ + "type":"list", + "member":{"shape":"DataRepositoryTaskFilterValue"}, + "max":20 + }, + "DataRepositoryTaskFilters":{ + "type":"list", + "member":{"shape":"DataRepositoryTaskFilter"}, + "max":3 + }, + "DataRepositoryTaskLifecycle":{ + "type":"string", + "enum":[ + "PENDING", + "EXECUTING", + "FAILED", + "SUCCEEDED", + "CANCELED", + "CANCELING" + ] + }, + "DataRepositoryTaskNotFound":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"} + }, + "exception":true + }, + "DataRepositoryTaskPath":{ + "type":"string", + "max":4096, + "min":0, + "pattern":"^.{0,4096}$" + }, + "DataRepositoryTaskPaths":{ + "type":"list", + "member":{"shape":"DataRepositoryTaskPath"}, + "max":100 + }, + "DataRepositoryTaskStatus":{ + "type":"structure", + "members":{ + "TotalCount":{"shape":"TotalCount"}, + "SucceededCount":{"shape":"SucceededCount"}, + "FailedCount":{"shape":"FailedCount"}, + "LastUpdatedTime":{"shape":"LastUpdatedTime"} + } + }, + "DataRepositoryTaskType":{ + "type":"string", + "enum":["EXPORT_TO_REPOSITORY"] + }, + "DataRepositoryTasks":{ + "type":"list", + "member":{"shape":"DataRepositoryTask"}, + "max":50 + }, "DeleteBackupRequest":{ "type":"structure", "required":["BackupId"], @@ -525,6 +753,22 @@ "NextToken":{"shape":"NextToken"} } }, + "DescribeDataRepositoryTasksRequest":{ + "type":"structure", + "members":{ + "TaskIds":{"shape":"TaskIds"}, + "Filters":{"shape":"DataRepositoryTaskFilters"}, + "MaxResults":{"shape":"MaxResults"}, + "NextToken":{"shape":"NextToken"} + } + }, + "DescribeDataRepositoryTasksResponse":{ + "type":"structure", + "members":{ + "DataRepositoryTasks":{"shape":"DataRepositoryTasks"}, + "NextToken":{"shape":"NextToken"} + } + }, "DescribeFileSystemsRequest":{ "type":"structure", "members":{ @@ -550,12 +794,14 @@ "type":"string", "max":256, "min":1, + "pattern":"^.{1,256}$", "sensitive":true }, "DirectoryUserName":{ "type":"string", "max":256, - "min":1 + "min":1, + "pattern":"^.{1,256}$" }, "DnsIps":{ "type":"list", @@ -563,11 +809,13 @@ "max":2, "min":1 }, + "EndTime":{"type":"timestamp"}, "ErrorMessage":{ "type":"string", "max":256, "min":1 }, + "FailedCount":{"type":"long"}, "FileSystem":{ "type":"structure", "members":{ @@ -592,7 +840,8 @@ "FileSystemAdministratorsGroupName":{ "type":"string", "max":256, - "min":1 + "min":1, + "pattern":"^.{1,256}$" }, "FileSystemFailureDetails":{ "type":"structure", @@ -726,6 +975,8 @@ }, "IpAddress":{ "type":"string", + "max":15, + "min":7, "pattern":"^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$" }, "KmsKeyId":{ @@ -734,6 +985,7 @@ "min":1, "pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}|arn:aws[a-z-]{0,7}:kms:[a-z]{2}-[a-z-]{4,}-\\d+:\\d{12}:(key|alias)\\/([a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}|[a-zA-Z0-9:\\/_-]+)|alias\\/[a-zA-Z0-9:\\/_-]+$" }, + "LastUpdatedTime":{"type":"timestamp"}, "ListTagsForResourceRequest":{ "type":"structure", "required":["ResourceARN"], @@ -807,7 +1059,8 @@ "OrganizationalUnitDistinguishedName":{ "type":"string", "max":2000, - "min":1 + "min":1, + "pattern":"^.{1,2000}$" }, "Parameter":{ "type":"string", @@ -818,6 +1071,14 @@ "max":100, "min":0 }, + "ReportFormat":{ + "type":"string", + "enum":["REPORT_CSV_20191124"] + }, + "ReportScope":{ + "type":"string", + "enum":["FAILED_FILES_ONLY"] + }, "ResourceARN":{ "type":"string", "max":512, @@ -906,9 +1167,10 @@ }, "exception":true }, + "StartTime":{"type":"timestamp"}, "StorageCapacity":{ "type":"integer", - "min":1 + "min":0 }, "SubnetId":{ "type":"string", @@ -921,6 +1183,7 @@ "member":{"shape":"SubnetId"}, "max":50 }, + "SucceededCount":{"type":"long"}, "Tag":{ "type":"structure", "members":{ @@ -931,7 +1194,8 @@ "TagKey":{ "type":"string", "max":128, - "min":1 + "min":1, + "pattern":"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$" }, "TagKeys":{ "type":"list", @@ -958,7 +1222,8 @@ "TagValue":{ "type":"string", "max":256, - "min":0 + "min":0, + "pattern":"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$" }, "Tags":{ "type":"list", @@ -966,6 +1231,18 @@ "max":50, "min":1 }, + "TaskId":{ + "type":"string", + "max":128, + "min":12, + "pattern":"^(task-[0-9a-f]{17,})$" + }, + "TaskIds":{ + "type":"list", + "member":{"shape":"TaskId"}, + "max":50 + }, + "TotalCount":{"type":"long"}, "UnsupportedOperation":{ "type":"structure", "members":{ diff --git a/models/apis/fsx/2018-03-01/docs-2.json b/models/apis/fsx/2018-03-01/docs-2.json index cd38e702893..a5de15cd9bc 100644 --- a/models/apis/fsx/2018-03-01/docs-2.json +++ b/models/apis/fsx/2018-03-01/docs-2.json @@ -2,12 +2,15 @@ "version": "2.0", "service": "

Amazon FSx is a fully managed service that makes it easy for storage and application administrators to launch and use shared file storage.

", "operations": { + "CancelDataRepositoryTask": "

Cancels an existing Amazon FSx for Lustre data repository task if that task is in either the PENDING or EXECUTING state. When you cancel a task, Amazon FSx does the following.

", "CreateBackup": "

Creates a backup of an existing Amazon FSx for Windows File Server file system. Creating regular backups for your file system is a best practice that complements the replication that Amazon FSx for Windows File Server performs for your file system. It also enables you to restore from user modification of data.

If a backup with the specified client request token exists, and the parameters match, this operation returns the description of the existing backup. If a backup specified client request token exists, and the parameters don't match, this operation returns IncompatibleParameterError. If a backup with the specified client request token doesn't exist, CreateBackup does the following:

By using the idempotent operation, you can retry a CreateBackup operation without the risk of creating an extra backup. This approach can be useful when an initial call fails in a way that makes it unclear whether a backup was created. If you use the same client request token and the initial call created a backup, the operation returns a successful result because all the parameters are the same.

The CreateFileSystem operation returns while the backup's lifecycle state is still CREATING. You can check the file system creation status by calling the DescribeBackups operation, which returns the backup state along with other information.

", + "CreateDataRepositoryTask": "

Creates an Amazon FSx for Lustre data repository task. You use data repository tasks to perform bulk operations between your Amazon FSx file system and its linked data repository. An example of a data repository task is exporting any data and metadata changes, including POSIX metadata, to files, directories, and symbolic links (symlinks) from your FSx file system to its linked data repository. A CreateDataRepositoryTask operation will fail if a data repository is not linked to the FSx file system. To learn more about data repository tasks, see Using Data Repository Tasks. To learn more about linking a data repository to your file system, see Step 1: Create Your Amazon FSx for Lustre File System.

", "CreateFileSystem": "

Creates a new, empty Amazon FSx file system.

If a file system with the specified client request token exists and the parameters match, CreateFileSystem returns the description of the existing file system. If a file system specified client request token exists and the parameters don't match, this call returns IncompatibleParameterError. If a file system with the specified client request token doesn't exist, CreateFileSystem does the following:

This operation requires a client request token in the request that Amazon FSx uses to ensure idempotent creation. This means that calling the operation multiple times with the same client request token has no effect. By using the idempotent operation, you can retry a CreateFileSystem operation without the risk of creating an extra file system. This approach can be useful when an initial call fails in a way that makes it unclear whether a file system was created. Examples are if a transport level timeout occurred, or your connection was reset. If you use the same client request token and the initial call created a file system, the client receives success as long as the parameters are the same.

The CreateFileSystem call returns while the file system's lifecycle state is still CREATING. You can check the file-system creation status by calling the DescribeFileSystems operation, which returns the file system state along with other information.

", "CreateFileSystemFromBackup": "

Creates a new Amazon FSx file system from an existing Amazon FSx for Windows File Server backup.

If a file system with the specified client request token exists and the parameters match, this operation returns the description of the file system. If a client request token specified by the file system exists and the parameters don't match, this call returns IncompatibleParameterError. If a file system with the specified client request token doesn't exist, this operation does the following:

Parameters like Active Directory, default share name, automatic backup, and backup settings default to the parameters of the file system that was backed up, unless overridden. You can explicitly supply other settings.

By using the idempotent operation, you can retry a CreateFileSystemFromBackup call without the risk of creating an extra file system. This approach can be useful when an initial call fails in a way that makes it unclear whether a file system was created. Examples are if a transport level timeout occurred, or your connection was reset. If you use the same client request token and the initial call created a file system, the client receives success as long as the parameters are the same.

The CreateFileSystemFromBackup call returns while the file system's lifecycle state is still CREATING. You can check the file-system creation status by calling the DescribeFileSystems operation, which returns the file system state along with other information.

", "DeleteBackup": "

Deletes an Amazon FSx for Windows File Server backup, deleting its contents. After deletion, the backup no longer exists, and its data is gone.

The DeleteBackup call returns instantly. The backup will not show up in later DescribeBackups calls.

The data in a deleted backup is also deleted and can't be recovered by any means.

", - "DeleteFileSystem": "

Deletes a file system, deleting its contents. After deletion, the file system no longer exists, and its data is gone. Any existing automatic backups will also be deleted.

By default, when you delete an Amazon FSx for Windows File Server file system, a final backup is created upon deletion. This final backup is not subject to the file system's retention policy, and must be manually deleted.

The DeleteFileSystem action returns while the file system has the DELETING status. You can check the file system deletion status by calling the DescribeFileSystems action, which returns a list of file systems in your account. If you pass the file system ID for a deleted file system, the DescribeFileSystems returns a FileSystemNotFound error.

The data in a deleted file system is also deleted and can't be recovered by any means.

", + "DeleteFileSystem": "

Deletes a file system, deleting its contents. After deletion, the file system no longer exists, and its data is gone. Any existing automatic backups will also be deleted.

By default, when you delete an Amazon FSx for Windows File Server file system, a final backup is created upon deletion. This final backup is not subject to the file system's retention policy, and must be manually deleted.

The DeleteFileSystem action returns while the file system has the DELETING status. You can check the file system deletion status by calling the DescribeFileSystems action, which returns a list of file systems in your account. If you pass the file system ID for a deleted file system, the DescribeFileSystems returns a FileSystemNotFound error.

Deleting an Amazon FSx for Lustre file system will fail with a 400 BadRequest if a data repository task is in a PENDING or EXECUTING state.

The data in a deleted file system is also deleted and can't be recovered by any means.

", "DescribeBackups": "

Returns the description of specific Amazon FSx for Windows File Server backups, if a BackupIds value is provided for that backup. Otherwise, it returns all backups owned by your AWS account in the AWS Region of the endpoint that you're calling.

When retrieving all backups, you can optionally specify the MaxResults parameter to limit the number of backups in a response. If more backups remain, Amazon FSx returns a NextToken value in the response. In this case, send a later request with the NextToken request parameter set to the value of NextToken from the last response.

This action is used in an iterative process to retrieve a list of your backups. DescribeBackups is called first without a NextTokenvalue. Then the action continues to be called with the NextToken parameter set to the value of the last NextToken value until a response has no NextToken.

When using this action, keep the following in mind:

", + "DescribeDataRepositoryTasks": "

Returns the description of specific Amazon FSx for Lustre data repository tasks, if one or more TaskIds values are provided in the request, or if filters are used in the request. You can use filters to narrow the response to include just tasks for specific file systems, or tasks in a specific lifecycle state. Otherwise, it returns all data repository tasks owned by your AWS account in the AWS Region of the endpoint that you're calling.

When retrieving all tasks, you can paginate the response by using the optional MaxResults parameter to limit the number of tasks returned in a response. If more tasks remain, Amazon FSx returns a NextToken value in the response. In this case, send a later request with the NextToken request parameter set to the value of NextToken from the last response.

", "DescribeFileSystems": "

Returns the description of specific Amazon FSx file systems, if a FileSystemIds value is provided for that file system. Otherwise, it returns descriptions of all file systems owned by your AWS account in the AWS Region of the endpoint that you're calling.

When retrieving all file system descriptions, you can optionally specify the MaxResults parameter to limit the number of descriptions in a response. If more file system descriptions remain, Amazon FSx returns a NextToken value in the response. In this case, send a later request with the NextToken request parameter set to the value of NextToken from the last response.

This action is used in an iterative process to retrieve a list of your file system descriptions. DescribeFileSystems is called first without a NextTokenvalue. Then the action continues to be called with the NextToken parameter set to the value of the last NextToken value until a response has no NextToken.

When using this action, keep the following in mind:

", "ListTagsForResource": "

Lists tags for an Amazon FSx file systems and backups in the case of Amazon FSx for Windows File Server.

When retrieving all tags, you can optionally specify the MaxResults parameter to limit the number of tags in a response. If more tags remain, Amazon FSx returns a NextToken value in the response. In this case, send a later request with the NextToken request parameter set to the value of NextToken from the last response.

This action is used in an iterative process to retrieve a list of your tags. ListTagsForResource is called first without a NextTokenvalue. Then the action continues to be called with the NextToken parameter set to the value of the last NextToken value until a response has no NextToken.

When using this action, keep the following in mind:

", "TagResource": "

Tags an Amazon FSx resource.

", @@ -49,6 +52,7 @@ "ArchivePath": { "base": null, "refs": { + "CompletionReport$Path": "

Required if Enabled is set to true. Specifies the location of the report on the file system's linked S3 data repository. An absolute path that defines where the completion report will be stored in the destination location. The Path you provide must be located within the file system’s ExportPath. An example Path value is \"s3://myBucket/myExportPath/optionalPrefix\". The report provides the following information for each file in the report: FilePath, FileStatus, and ErrorCode. To learn more about a file system's ExportPath, see .

", "CreateFileSystemLustreConfiguration$ImportPath": "

(Optional) The path to the Amazon S3 bucket (including the optional prefix) that you're using as the data repository for your Amazon FSx for Lustre file system. The root of your FSx for Lustre file system will be mapped to the root of the Amazon S3 bucket you select. An example is s3://import-bucket/optional-prefix. If you specify a prefix after the Amazon S3 bucket name, only object keys with that prefix are loaded into the file system.

", "CreateFileSystemLustreConfiguration$ExportPath": "

(Optional) The path in Amazon S3 where the root of your Amazon FSx file system is exported. The path must use the same Amazon S3 bucket as specified in ImportPath. You can provide an optional prefix to which new and changed data is to be exported from your Amazon FSx for Lustre file system. If an ExportPath value is not provided, Amazon FSx sets a default export path, s3://import-bucket/FSxLustre[creation-timestamp]. The timestamp is in UTC format, for example s3://import-bucket/FSxLustre20181105T222312Z.

The Amazon S3 export bucket must be the same as the import bucket specified by ImportPath. If you only specify a bucket name, such as s3://import-bucket, you get a 1:1 mapping of file system objects to S3 bucket objects. This mapping means that the input data in S3 is overwritten on export. If you provide a custom prefix in the export path, such as s3://import-bucket/[custom-optional-prefix], Amazon FSx exports the contents of your file system to that export prefix in the Amazon S3 bucket.

", "DataRepositoryConfiguration$ImportPath": "

The import path to the Amazon S3 bucket (and optional prefix) that you're using as the data repository for your FSx for Lustre file system, for example s3://import-bucket/optional-prefix. If a prefix is specified after the Amazon S3 bucket name, only object keys with that prefix are loaded into the file system.

", @@ -132,10 +136,21 @@ "refs": { } }, + "CancelDataRepositoryTaskRequest": { + "base": "

Cancels a data repository task.

", + "refs": { + } + }, + "CancelDataRepositoryTaskResponse": { + "base": null, + "refs": { + } + }, "ClientRequestToken": { "base": "

(Optional) An idempotency token for resource creation, in a string of up to 64 ASCII characters. This token is automatically filled on your behalf when you use the AWS Command Line Interface (AWS CLI) or an AWS SDK.

", "refs": { "CreateBackupRequest$ClientRequestToken": "

(Optional) A string of up to 64 ASCII characters that Amazon FSx uses to ensure idempotent creation. This string is automatically filled on your behalf when you use the AWS Command Line Interface (AWS CLI) or an AWS SDK.

", + "CreateDataRepositoryTaskRequest$ClientRequestToken": null, "CreateFileSystemFromBackupRequest$ClientRequestToken": "

(Optional) A string of up to 64 ASCII characters that Amazon FSx uses to ensure idempotent creation. This string is automatically filled on your behalf when you use the AWS Command Line Interface (AWS CLI) or an AWS SDK.

", "CreateFileSystemRequest$ClientRequestToken": "

(Optional) A string of up to 64 ASCII characters that Amazon FSx uses to ensure idempotent creation. This string is automatically filled on your behalf when you use the AWS Command Line Interface (AWS CLI) or an AWS SDK.

", "DeleteBackupRequest$ClientRequestToken": "

(Optional) A string of up to 64 ASCII characters that Amazon FSx uses to ensure idempotent deletion. This is automatically filled on your behalf when using the AWS CLI or SDK.

", @@ -143,6 +158,13 @@ "UpdateFileSystemRequest$ClientRequestToken": "

(Optional) A string of up to 64 ASCII characters that Amazon FSx uses to ensure idempotent updates. This string is automatically filled on your behalf when you use the AWS Command Line Interface (AWS CLI) or an AWS SDK.

" } }, + "CompletionReport": { + "base": "

Provides a report detailing the data repository task results of the files processed that match the criteria specified in the report Scope parameter. FSx delivers the report to the file system's linked data repository in Amazon S3, using the path specified in the report Path parameter. You can specify whether or not a report gets generated for a task using the Enabled parameter.

", + "refs": { + "CreateDataRepositoryTaskRequest$Report": "

Defines whether or not Amazon FSx provides a CompletionReport once the task has completed. A CompletionReport provides a detailed report on the files that Amazon FSx processed that meet the criteria specified by the Scope parameter.

", + "DataRepositoryTask$Report": null + } + }, "CreateBackupRequest": { "base": "

The request object for the CreateBackup operation.

", "refs": { @@ -153,6 +175,16 @@ "refs": { } }, + "CreateDataRepositoryTaskRequest": { + "base": null, + "refs": { + } + }, + "CreateDataRepositoryTaskResponse": { + "base": null, + "refs": { + } + }, "CreateFileSystemFromBackupRequest": { "base": "

The request object for the CreateFileSystemFromBackup operation.

", "refs": { @@ -190,6 +222,7 @@ "base": "

The time that the resource was created, in seconds (since 1970-01-01T00:00:00Z), also known as Unix time.

", "refs": { "Backup$CreationTime": "

The time when a particular backup was created.

", + "DataRepositoryTask$CreationTime": null, "FileSystem$CreationTime": "

The time that the file system was created, in seconds (since 1970-01-01T00:00:00Z), also known as Unix time.

" } }, @@ -214,6 +247,103 @@ "LustreFileSystemConfiguration$DataRepositoryConfiguration": null } }, + "DataRepositoryTask": { + "base": "

A description of the data repository task. You use data repository tasks to perform bulk transfer operations between your Amazon FSx file system and its linked data repository.

", + "refs": { + "CreateDataRepositoryTaskResponse$DataRepositoryTask": "

The description of the data repository task that you just created.

", + "DataRepositoryTasks$member": null + } + }, + "DataRepositoryTaskEnded": { + "base": "

The data repository task could not be canceled because the task has already ended.

", + "refs": { + } + }, + "DataRepositoryTaskExecuting": { + "base": "

An existing data repository task is currently executing on the file system. Wait until the existing task has completed, then create the new task.

", + "refs": { + } + }, + "DataRepositoryTaskFailureDetails": { + "base": "

Provides information about why a data repository task failed. Only populated when the task Lifecycle is set to FAILED.

", + "refs": { + "DataRepositoryTask$FailureDetails": "

Failure message describing why the task failed, it is populated only when Lifecycle is set to FAILED.

" + } + }, + "DataRepositoryTaskFilter": { + "base": "

(Optional) An array of filter objects you can use to filter the response of data repository tasks you will see in the the response. You can filter the tasks returned in the response by one or more file system IDs, task lifecycles, and by task type. A filter object consists of a filter Name, and one or more Values for the filter.

", + "refs": { + "DataRepositoryTaskFilters$member": null + } + }, + "DataRepositoryTaskFilterName": { + "base": null, + "refs": { + "DataRepositoryTaskFilter$Name": "

Name of the task property to use in filtering the tasks returned in the response.

" + } + }, + "DataRepositoryTaskFilterValue": { + "base": null, + "refs": { + "DataRepositoryTaskFilterValues$member": null + } + }, + "DataRepositoryTaskFilterValues": { + "base": null, + "refs": { + "DataRepositoryTaskFilter$Values": "

Use Values to include the specific file system IDs and task lifecycle states for the filters you are using.

" + } + }, + "DataRepositoryTaskFilters": { + "base": null, + "refs": { + "DescribeDataRepositoryTasksRequest$Filters": "

(Optional) You can use filters to narrow the DescribeDataRepositoryTasks response to include just tasks for specific file systems, or tasks in a specific lifecycle state.

" + } + }, + "DataRepositoryTaskLifecycle": { + "base": null, + "refs": { + "CancelDataRepositoryTaskResponse$Lifecycle": "

The lifecycle status of the data repository task, as follows:

", + "DataRepositoryTask$Lifecycle": "

The lifecycle status of the data repository task, as follows:

You cannot delete an FSx for Lustre file system if there are data repository tasks for the file system in the PENDING or EXECUTING states. Please retry when the data repository task is finished (with a status of CANCELED, SUCCEEDED, or FAILED). You can use the DescribeDataRepositoryTask action to monitor the task status. Contact the FSx team if you need to delete your file system immediately.

" + } + }, + "DataRepositoryTaskNotFound": { + "base": "

The data repository task or tasks you specified could not be found.

", + "refs": { + } + }, + "DataRepositoryTaskPath": { + "base": null, + "refs": { + "DataRepositoryTaskPaths$member": null + } + }, + "DataRepositoryTaskPaths": { + "base": null, + "refs": { + "CreateDataRepositoryTaskRequest$Paths": "

(Optional) The path or paths on the Amazon FSx file system to use when the data repository task is processed. The default path is the file system root directory.

", + "DataRepositoryTask$Paths": "

An array of paths on the Amazon FSx for Lustre file system that specify the data for the data repository task to process. For example, in an EXPORT_TO_REPOSITORY task, the paths specify which data to export to the linked data repository.

(Default) If Paths is not specified, Amazon FSx uses the file system root directory.

" + } + }, + "DataRepositoryTaskStatus": { + "base": "

Provides the task status showing a running total of the total number of files to be processed, the number successfully processed, and the number of files the task failed to process.

", + "refs": { + "DataRepositoryTask$Status": "

Provides the status of the number of files that the task has processed successfully and failed to process.

" + } + }, + "DataRepositoryTaskType": { + "base": null, + "refs": { + "CreateDataRepositoryTaskRequest$Type": "

Specifies the type of data repository task to create.

", + "DataRepositoryTask$Type": "

The type of data repository task; EXPORT_TO_REPOSITORY is the only type currently supported.

" + } + }, + "DataRepositoryTasks": { + "base": null, + "refs": { + "DescribeDataRepositoryTasksResponse$DataRepositoryTasks": "

The collection of data repository task descriptions returned.

" + } + }, "DeleteBackupRequest": { "base": "

The request object for DeleteBackup operation.

", "refs": { @@ -256,6 +386,16 @@ "refs": { } }, + "DescribeDataRepositoryTasksRequest": { + "base": null, + "refs": { + } + }, + "DescribeDataRepositoryTasksResponse": { + "base": null, + "refs": { + } + }, "DescribeFileSystemsRequest": { "base": "

The request object for DescribeFileSystems operation.

", "refs": { @@ -294,10 +434,16 @@ "base": null, "refs": { "SelfManagedActiveDirectoryAttributes$DnsIps": "

A list of up to two IP addresses of DNS servers or domain controllers in the self-managed AD directory.

", - "SelfManagedActiveDirectoryConfiguration$DnsIps": "

A list of up to two IP addresses of DNS servers or domain controllers in the self-managed AD directory. The IP addresses need to be either in the same VPC CIDR range as the one in which your Amazon FSx file system is being created, or in the private IP version 4 (Iv4) address ranges, as specified in RFC 1918:

", + "SelfManagedActiveDirectoryConfiguration$DnsIps": "

A list of up to two IP addresses of DNS servers or domain controllers in the self-managed AD directory. The IP addresses need to be either in the same VPC CIDR range as the one in which your Amazon FSx file system is being created, or in the private IP version 4 (IPv4) address ranges, as specified in RFC 1918:

", "SelfManagedActiveDirectoryConfigurationUpdates$DnsIps": "

A list of up to two IP addresses of DNS servers or domain controllers in the self-managed AD directory.

" } }, + "EndTime": { + "base": null, + "refs": { + "DataRepositoryTask$EndTime": "

The time that Amazon FSx completed processing the task, populated after the task is complete.

" + } + }, "ErrorMessage": { "base": "

A detailed error message.

", "refs": { @@ -307,6 +453,10 @@ "BackupNotFound$Message": null, "BackupRestoring$Message": null, "BadRequest$Message": null, + "DataRepositoryTaskEnded$Message": null, + "DataRepositoryTaskExecuting$Message": null, + "DataRepositoryTaskFailureDetails$Message": null, + "DataRepositoryTaskNotFound$Message": null, "FileSystemFailureDetails$Message": "

A message describing any failures that occurred during file system creation.

", "FileSystemNotFound$Message": null, "IncompatibleParameterError$Message": null, @@ -322,6 +472,12 @@ "UnsupportedOperation$Message": null } }, + "FailedCount": { + "base": null, + "refs": { + "DataRepositoryTaskStatus$FailedCount": "

A running total of the number of files that the task failed to process.

" + } + }, "FileSystem": { "base": "

A description of a specific Amazon FSx file system.

", "refs": { @@ -350,6 +506,8 @@ "refs": { "BackupRestoring$FileSystemId": "

The ID of a file system being restored from the backup.

", "CreateBackupRequest$FileSystemId": "

The ID of the file system to back up.

", + "CreateDataRepositoryTaskRequest$FileSystemId": null, + "DataRepositoryTask$FileSystemId": null, "DeleteFileSystemRequest$FileSystemId": "

The ID of the file system you want to delete.

", "DeleteFileSystemResponse$FileSystemId": "

The ID of the file system being deleted.

", "FileSystem$FileSystemId": "

The system-generated, unique 17-digit ID of the file system.

", @@ -433,6 +591,7 @@ "Flag": { "base": null, "refs": { + "CompletionReport$Enabled": "

Set Enabled to True to generate a CompletionReport when the task completes. If set to true, then you need to provide a report Scope, Path, and Format. Set Enabled to False if you do not want a CompletionReport generated when the task completes.

", "CreateFileSystemWindowsConfiguration$CopyTagsToBackups": "

A boolean flag indicating whether tags for the file system should be copied to backups. This value defaults to false. If it's set to true, all tags for the file system are copied to all automatic and user-initiated backups where the user doesn't specify tags. If this value is true, and you specify one or more tags, only the specified tags are copied to backups.

", "DeleteFileSystemWindowsConfiguration$SkipFinalBackup": "

By default, Amazon FSx for Windows takes a final backup on your behalf when the DeleteFileSystem operation is invoked. Doing this helps protect you from data loss, and we highly recommend taking the final backup. If you want to skip this backup, use this flag to do so.

", "WindowsFileSystemConfiguration$CopyTagsToBackups": "

A boolean flag indicating whether tags on the file system should be copied to backups. This value defaults to false. If it's set to true, all tags on the file system are copied to all automatic backups and any user-initiated backups where the user doesn't specify any tags. If this value is true, and you specify one or more tags, only the specified tags are copied to backups.

" @@ -471,11 +630,17 @@ } }, "KmsKeyId": { - "base": "

The ID of your AWS Key Management Service (AWS KMS) key. This ID is used to encrypt the data in your file system at rest. For more information, see Encrypt in the AWS Key Management Service API Reference.

", + "base": "

The ID of the AWS Key Management Service (AWS KMS) key used to encrypt the file system's data for an Amazon FSx for Windows File Server file system at rest. Amazon FSx for Lustre does not support KMS encryption. For more information, see Encrypt in the AWS Key Management Service API Reference.

", "refs": { - "Backup$KmsKeyId": "

The ID of the AWS Key Management Service (AWS KMS) key used to encrypt this backup's data.

", + "Backup$KmsKeyId": "

The ID of the AWS Key Management Service (AWS KMS) key used to encrypt this backup of the Amazon FSx for Windows file system's data at rest. Amazon FSx for Lustre does not support KMS encryption.

", "CreateFileSystemRequest$KmsKeyId": null, - "FileSystem$KmsKeyId": "

The ID of the AWS Key Management Service (AWS KMS) key used to encrypt the file system's data for an Amazon FSx for Windows File Server file system.

" + "FileSystem$KmsKeyId": "

The ID of the AWS Key Management Service (AWS KMS) key used to encrypt the file system's data for an Amazon FSx for Windows File Server file system. Amazon FSx for Lustre does not support KMS encryption.

" + } + }, + "LastUpdatedTime": { + "base": null, + "refs": { + "DataRepositoryTaskStatus$LastUpdatedTime": "

The time at which the task status was last updated.

" } }, "ListTagsForResourceRequest": { @@ -498,6 +663,7 @@ "base": "

The maximum number of resources to return in the response. This value must be an integer greater than zero.

", "refs": { "DescribeBackupsRequest$MaxResults": "

(Optional) Maximum number of backups to return in the response (integer). This parameter value must be greater than 0. The number of items that Amazon FSx returns is the minimum of the MaxResults parameter specified in the request and the service's internal maximum number of items per page.

", + "DescribeDataRepositoryTasksRequest$MaxResults": null, "DescribeFileSystemsRequest$MaxResults": "

(Optional) Maximum number of file systems to return in the response (integer). This parameter value must be greater than 0. The number of items that Amazon FSx returns is the minimum of the MaxResults parameter specified in the request and the service's internal maximum number of items per page.

", "ListTagsForResourceRequest$MaxResults": "

(Optional) Maximum number of tags to return in the response (integer). This parameter value must be greater than 0. The number of items that Amazon FSx returns is the minimum of the MaxResults parameter specified in the request and the service's internal maximum number of items per page.

" } @@ -538,6 +704,8 @@ "refs": { "DescribeBackupsRequest$NextToken": "

(Optional) Opaque pagination token returned from a previous DescribeBackups operation (String). If a token present, the action continues the list from where the returning call left off.

", "DescribeBackupsResponse$NextToken": "

This is present if there are more backups than returned in the response (String). You can use the NextToken value in the later request to fetch the backups.

", + "DescribeDataRepositoryTasksRequest$NextToken": null, + "DescribeDataRepositoryTasksResponse$NextToken": null, "DescribeFileSystemsRequest$NextToken": "

(Optional) Opaque pagination token returned from a previous DescribeFileSystems operation (String). If a token present, the action continues the list from where the returning call left off.

", "DescribeFileSystemsResponse$NextToken": "

Present if there are more file systems than returned in the response (String). You can use the NextToken value in the later request to fetch the descriptions.

", "ListTagsForResourceRequest$NextToken": "

(Optional) Opaque pagination token returned from a previous ListTagsForResource operation (String). If a token present, the action continues the list from where the returning call left off.

", @@ -568,10 +736,23 @@ "Backup$ProgressPercent": null } }, + "ReportFormat": { + "base": null, + "refs": { + "CompletionReport$Format": "

Required if Enabled is set to true. Specifies the format of the CompletionReport. REPORT_CSV_20191124 is the only format currently supported. When Format is set to REPORT_CSV_20191124, the CompletionReport is provided in CSV format, and is delivered to {path}/task-{id}/failures.csv.

" + } + }, + "ReportScope": { + "base": null, + "refs": { + "CompletionReport$Scope": "

Required if Enabled is set to true. Specifies the scope of the CompletionReport; FAILED_FILES_ONLY is the only scope currently supported. When Scope is set to FAILED_FILES_ONLY, the CompletionReport only contains information about files that the data repository task failed to process.

" + } + }, "ResourceARN": { "base": "

The Amazon Resource Name (ARN) for a given resource. ARNs uniquely identify AWS resources. We require an ARN when you need to specify a resource unambiguously across all of AWS. For more information, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

", "refs": { "Backup$ResourceARN": "

The Amazon Resource Name (ARN) for the backup resource.

", + "DataRepositoryTask$ResourceARN": null, "FileSystem$ResourceARN": "

The Amazon Resource Name (ARN) for the file system resource.

", "ListTagsForResourceRequest$ResourceARN": "

The ARN of the Amazon FSx resource that will have its tags listed.

", "NotServiceResourceError$ResourceARN": "

The Amazon Resource Name (ARN) of the non-Amazon FSx resource.

", @@ -634,6 +815,12 @@ "refs": { } }, + "StartTime": { + "base": null, + "refs": { + "DataRepositoryTask$StartTime": "

The time that Amazon FSx began processing the task.

" + } + }, "StorageCapacity": { "base": "

The storage capacity for your Amazon FSx file system, in gibibytes.

", "refs": { @@ -658,6 +845,12 @@ "FileSystem$SubnetIds": "

The ID of the subnet to contain the endpoint for the file system. One and only one is supported. The file system is launched in the Availability Zone associated with this subnet.

" } }, + "SucceededCount": { + "base": null, + "refs": { + "DataRepositoryTaskStatus$SucceededCount": "

A running total of the number of files that the task has successfully processed.

" + } + }, "Tag": { "base": "

Specifies a key-value pair for a resource tag.

", "refs": { @@ -698,8 +891,10 @@ "refs": { "Backup$Tags": "

Tags associated with a particular file system.

", "CreateBackupRequest$Tags": "

The tags to apply to the backup at backup creation. The key value of the Name tag appears in the console as the backup name.

", + "CreateDataRepositoryTaskRequest$Tags": null, "CreateFileSystemFromBackupRequest$Tags": "

The tags to be applied to the file system at file system creation. The key value of the Name tag appears in the console as the file system name.

", "CreateFileSystemRequest$Tags": "

The tags to apply to the file system being created. The key value of the Name tag appears in the console as the file system name.

", + "DataRepositoryTask$Tags": null, "DeleteFileSystemWindowsConfiguration$FinalBackupTags": "

A set of tags for your final backup.

", "DeleteFileSystemWindowsResponse$FinalBackupTags": "

The set of tags applied to the final backup.

", "FileSystem$Tags": "

The tags to associate with the file system. For more information, see Tagging Your Amazon EC2 Resources in the Amazon EC2 User Guide.

", @@ -707,8 +902,29 @@ "TagResourceRequest$Tags": "

A list of tags for the resource. If a tag with a given key already exists, the value is replaced by the one specified in this parameter.

" } }, + "TaskId": { + "base": null, + "refs": { + "CancelDataRepositoryTaskRequest$TaskId": "

Specifies the data repository task to cancel.

", + "CancelDataRepositoryTaskResponse$TaskId": "

The ID of the task being canceled.

", + "DataRepositoryTask$TaskId": "

The system-generated, unique 17-digit ID of the data repository task.

", + "TaskIds$member": null + } + }, + "TaskIds": { + "base": null, + "refs": { + "DescribeDataRepositoryTasksRequest$TaskIds": "

(Optional) IDs of the tasks whose descriptions you want to retrieve (String).

" + } + }, + "TotalCount": { + "base": null, + "refs": { + "DataRepositoryTaskStatus$TotalCount": "

The total number of files that the task will process. While a task is executing, the sum of SucceededCount plus FailedCount may not equal TotalCount. When the task is complete, TotalCount equals the sum of SucceededCount plus FailedCount.

" + } + }, "UnsupportedOperation": { - "base": "

An error occured.

", + "base": "

The requested operation is not supported for this resource or API.

", "refs": { } }, diff --git a/models/apis/fsx/2018-03-01/paginators-1.json b/models/apis/fsx/2018-03-01/paginators-1.json index 912e2f2de20..43df3a5f3a7 100644 --- a/models/apis/fsx/2018-03-01/paginators-1.json +++ b/models/apis/fsx/2018-03-01/paginators-1.json @@ -5,6 +5,11 @@ "output_token": "NextToken", "limit_key": "MaxResults" }, + "DescribeDataRepositoryTasks": { + "input_token": "NextToken", + "output_token": "NextToken", + "limit_key": "MaxResults" + }, "DescribeFileSystems": { "input_token": "NextToken", "output_token": "NextToken", diff --git a/models/apis/gamelift/2015-10-01/api-2.json b/models/apis/gamelift/2015-10-01/api-2.json index eb6edf7bba0..f4f73db5fa6 100644 --- a/models/apis/gamelift/2015-10-01/api-2.json +++ b/models/apis/gamelift/2015-10-01/api-2.json @@ -40,7 +40,8 @@ {"shape":"InvalidRequestException"}, {"shape":"ConflictException"}, {"shape":"InternalServiceException"}, - {"shape":"LimitExceededException"} + {"shape":"LimitExceededException"}, + {"shape":"TaggingFailedException"} ] }, "CreateBuild":{ @@ -55,6 +56,7 @@ {"shape":"UnauthorizedException"}, {"shape":"InvalidRequestException"}, {"shape":"ConflictException"}, + {"shape":"TaggingFailedException"}, {"shape":"InternalServiceException"} ] }, @@ -72,7 +74,8 @@ {"shape":"ConflictException"}, {"shape":"LimitExceededException"}, {"shape":"InvalidRequestException"}, - {"shape":"UnauthorizedException"} + {"shape":"UnauthorizedException"}, + {"shape":"TaggingFailedException"} ] }, "CreateGameSession":{ @@ -108,7 +111,8 @@ {"shape":"InternalServiceException"}, {"shape":"InvalidRequestException"}, {"shape":"UnauthorizedException"}, - {"shape":"LimitExceededException"} + {"shape":"LimitExceededException"}, + {"shape":"TaggingFailedException"} ] }, "CreateMatchmakingConfiguration":{ @@ -124,7 +128,8 @@ {"shape":"LimitExceededException"}, {"shape":"NotFoundException"}, {"shape":"InternalServiceException"}, - {"shape":"UnsupportedRegionException"} + {"shape":"UnsupportedRegionException"}, + {"shape":"TaggingFailedException"} ] }, "CreateMatchmakingRuleSet":{ @@ -138,7 +143,8 @@ "errors":[ {"shape":"InvalidRequestException"}, {"shape":"InternalServiceException"}, - {"shape":"UnsupportedRegionException"} + {"shape":"UnsupportedRegionException"}, + {"shape":"TaggingFailedException"} ] }, "CreatePlayerSession":{ @@ -189,6 +195,7 @@ {"shape":"UnauthorizedException"}, {"shape":"InvalidRequestException"}, {"shape":"ConflictException"}, + {"shape":"TaggingFailedException"}, {"shape":"InternalServiceException"} ] }, @@ -233,6 +240,7 @@ {"shape":"UnauthorizedException"}, {"shape":"NotFoundException"}, {"shape":"InvalidRequestException"}, + {"shape":"TaggingFailedException"}, {"shape":"InternalServiceException"} ] }, @@ -247,6 +255,7 @@ {"shape":"UnauthorizedException"}, {"shape":"NotFoundException"}, {"shape":"InternalServiceException"}, + {"shape":"TaggingFailedException"}, {"shape":"InvalidRequestException"} ] }, @@ -262,7 +271,8 @@ {"shape":"InternalServiceException"}, {"shape":"InvalidFleetStatusException"}, {"shape":"UnauthorizedException"}, - {"shape":"InvalidRequestException"} + {"shape":"InvalidRequestException"}, + {"shape":"TaggingFailedException"} ] }, "DeleteGameSessionQueue":{ @@ -277,7 +287,8 @@ {"shape":"InternalServiceException"}, {"shape":"InvalidRequestException"}, {"shape":"NotFoundException"}, - {"shape":"UnauthorizedException"} + {"shape":"UnauthorizedException"}, + {"shape":"TaggingFailedException"} ] }, "DeleteMatchmakingConfiguration":{ @@ -292,7 +303,8 @@ {"shape":"InvalidRequestException"}, {"shape":"NotFoundException"}, {"shape":"InternalServiceException"}, - {"shape":"UnsupportedRegionException"} + {"shape":"UnsupportedRegionException"}, + {"shape":"TaggingFailedException"} ] }, "DeleteMatchmakingRuleSet":{ @@ -307,7 +319,8 @@ {"shape":"InvalidRequestException"}, {"shape":"InternalServiceException"}, {"shape":"UnsupportedRegionException"}, - {"shape":"NotFoundException"} + {"shape":"NotFoundException"}, + {"shape":"TaggingFailedException"} ] }, "DeleteScalingPolicy":{ @@ -335,6 +348,7 @@ {"shape":"InvalidRequestException"}, {"shape":"UnauthorizedException"}, {"shape":"NotFoundException"}, + {"shape":"TaggingFailedException"}, {"shape":"InternalServiceException"} ] }, @@ -783,6 +797,21 @@ {"shape":"InternalServiceException"} ] }, + "ListTagsForResource":{ + "name":"ListTagsForResource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListTagsForResourceRequest"}, + "output":{"shape":"ListTagsForResourceResponse"}, + "errors":[ + {"shape":"NotFoundException"}, + {"shape":"InvalidRequestException"}, + {"shape":"TaggingFailedException"}, + {"shape":"InternalServiceException"} + ] + }, "PutScalingPolicy":{ "name":"PutScalingPolicy", "http":{ @@ -950,6 +979,36 @@ {"shape":"UnsupportedRegionException"} ] }, + "TagResource":{ + "name":"TagResource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"TagResourceRequest"}, + "output":{"shape":"TagResourceResponse"}, + "errors":[ + {"shape":"NotFoundException"}, + {"shape":"InvalidRequestException"}, + {"shape":"TaggingFailedException"}, + {"shape":"InternalServiceException"} + ] + }, + "UntagResource":{ + "name":"UntagResource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"UntagResourceRequest"}, + "output":{"shape":"UntagResourceResponse"}, + "errors":[ + {"shape":"NotFoundException"}, + {"shape":"InvalidRequestException"}, + {"shape":"TaggingFailedException"}, + {"shape":"InternalServiceException"} + ] + }, "UpdateAlias":{ "name":"UpdateAlias", "http":{ @@ -1167,12 +1226,17 @@ }, "AliasId":{ "type":"string", - "pattern":"^alias-\\S+" + "pattern":"^alias-\\S+|^arn:.*:alias\\/alias-\\S+" }, "AliasList":{ "type":"list", "member":{"shape":"Alias"} }, + "AmazonResourceName":{ + "type":"string", + "max":1011, + "min":1 + }, "ArnStringModel":{ "type":"string", "max":256, @@ -1209,6 +1273,7 @@ "type":"structure", "members":{ "BuildId":{"shape":"BuildId"}, + "BuildArn":{"shape":"BuildArn"}, "Name":{"shape":"FreeText"}, "Version":{"shape":"FreeText"}, "Status":{"shape":"BuildStatus"}, @@ -1217,9 +1282,13 @@ "CreationTime":{"shape":"Timestamp"} } }, + "BuildArn":{ + "type":"string", + "pattern":"^arn:.*:build\\/build-\\S+" + }, "BuildId":{ "type":"string", - "pattern":"^build-\\S+" + "pattern":"^build-\\S+|^arn:.*:build\\/build-\\S+" }, "BuildList":{ "type":"list", @@ -1272,7 +1341,8 @@ "members":{ "Name":{"shape":"NonBlankAndLengthConstraintString"}, "Description":{"shape":"NonZeroAndMaxString"}, - "RoutingStrategy":{"shape":"RoutingStrategy"} + "RoutingStrategy":{"shape":"RoutingStrategy"}, + "Tags":{"shape":"TagList"} } }, "CreateAliasOutput":{ @@ -1287,7 +1357,8 @@ "Name":{"shape":"NonZeroAndMaxString"}, "Version":{"shape":"NonZeroAndMaxString"}, "StorageLocation":{"shape":"S3Location"}, - "OperatingSystem":{"shape":"OperatingSystem"} + "OperatingSystem":{"shape":"OperatingSystem"}, + "Tags":{"shape":"TagList"} } }, "CreateBuildOutput":{ @@ -1322,7 +1393,8 @@ "PeerVpcId":{"shape":"NonZeroAndMaxString"}, "FleetType":{"shape":"FleetType"}, "InstanceRoleArn":{"shape":"NonEmptyString"}, - "CertificateConfiguration":{"shape":"CertificateConfiguration"} + "CertificateConfiguration":{"shape":"CertificateConfiguration"}, + "Tags":{"shape":"TagList"} } }, "CreateFleetOutput":{ @@ -1359,7 +1431,8 @@ "Name":{"shape":"GameSessionQueueName"}, "TimeoutInSeconds":{"shape":"WholeNumber"}, "PlayerLatencyPolicies":{"shape":"PlayerLatencyPolicyList"}, - "Destinations":{"shape":"GameSessionQueueDestinationList"} + "Destinations":{"shape":"GameSessionQueueDestinationList"}, + "Tags":{"shape":"TagList"} } }, "CreateGameSessionQueueOutput":{ @@ -1384,13 +1457,14 @@ "RequestTimeoutSeconds":{"shape":"MatchmakingRequestTimeoutInteger"}, "AcceptanceTimeoutSeconds":{"shape":"MatchmakingAcceptanceTimeoutInteger"}, "AcceptanceRequired":{"shape":"BooleanModel"}, - "RuleSetName":{"shape":"MatchmakingIdStringModel"}, + "RuleSetName":{"shape":"MatchmakingRuleSetName"}, "NotificationTarget":{"shape":"SnsArnStringModel"}, "AdditionalPlayerCount":{"shape":"WholeNumber"}, "CustomEventData":{"shape":"CustomEventData"}, "GameProperties":{"shape":"GamePropertyList"}, "GameSessionData":{"shape":"GameSessionData"}, - "BackfillMode":{"shape":"BackfillMode"} + "BackfillMode":{"shape":"BackfillMode"}, + "Tags":{"shape":"TagList"} } }, "CreateMatchmakingConfigurationOutput":{ @@ -1407,7 +1481,8 @@ ], "members":{ "Name":{"shape":"MatchmakingIdStringModel"}, - "RuleSetBody":{"shape":"RuleSetBody"} + "RuleSetBody":{"shape":"RuleSetBody"}, + "Tags":{"shape":"TagList"} } }, "CreateMatchmakingRuleSetOutput":{ @@ -1459,7 +1534,8 @@ "Name":{"shape":"NonZeroAndMaxString"}, "Version":{"shape":"NonZeroAndMaxString"}, "StorageLocation":{"shape":"S3Location"}, - "ZipFile":{"shape":"ZipBlob"} + "ZipFile":{"shape":"ZipBlob"}, + "Tags":{"shape":"TagList"} } }, "CreateScriptOutput":{ @@ -1545,7 +1621,7 @@ "type":"structure", "required":["Name"], "members":{ - "Name":{"shape":"MatchmakingIdStringModel"} + "Name":{"shape":"MatchmakingConfigurationName"} } }, "DeleteMatchmakingConfigurationOutput":{ @@ -1557,7 +1633,7 @@ "type":"structure", "required":["Name"], "members":{ - "Name":{"shape":"MatchmakingIdStringModel"} + "Name":{"shape":"MatchmakingRuleSetName"} } }, "DeleteMatchmakingRuleSetOutput":{ @@ -1813,8 +1889,8 @@ "DescribeMatchmakingConfigurationsInput":{ "type":"structure", "members":{ - "Names":{"shape":"MatchmakingIdList"}, - "RuleSetName":{"shape":"MatchmakingIdStringModel"}, + "Names":{"shape":"MatchmakingConfigurationNameList"}, + "RuleSetName":{"shape":"MatchmakingRuleSetName"}, "Limit":{"shape":"PositiveInteger"}, "NextToken":{"shape":"NonZeroAndMaxString"} } @@ -2116,7 +2192,9 @@ "TerminationTime":{"shape":"Timestamp"}, "Status":{"shape":"FleetStatus"}, "BuildId":{"shape":"BuildId"}, + "BuildArn":{"shape":"BuildArn"}, "ScriptId":{"shape":"ScriptId"}, + "ScriptArn":{"shape":"ScriptArn"}, "ServerLaunchPath":{"shape":"NonZeroAndMaxString"}, "ServerLaunchParameters":{"shape":"NonZeroAndMaxString"}, "LogPaths":{"shape":"StringList"}, @@ -2154,7 +2232,7 @@ }, "FleetId":{ "type":"string", - "pattern":"^fleet-\\S+" + "pattern":"^fleet-\\S+|^arn:.*:fleet\\/fleet-\\S+" }, "FleetIdList":{ "type":"list", @@ -2228,6 +2306,7 @@ "GameSessionId":{"shape":"NonZeroAndMaxString"}, "Name":{"shape":"NonZeroAndMaxString"}, "FleetId":{"shape":"FleetId"}, + "FleetArn":{"shape":"ArnStringModel"}, "CreationTime":{"shape":"Timestamp"}, "TerminationTime":{"shape":"Timestamp"}, "CurrentPlayerSessionCount":{"shape":"WholeNumber"}, @@ -2345,9 +2424,9 @@ }, "GameSessionQueueName":{ "type":"string", - "max":128, + "max":256, "min":1, - "pattern":"[a-zA-Z0-9-]+" + "pattern":"[a-zA-Z0-9-]+|^arn:.*:gamesessionqueue\\/[a-zA-Z0-9-]+" }, "GameSessionQueueNameList":{ "type":"list", @@ -2588,6 +2667,19 @@ "NextToken":{"shape":"NonEmptyString"} } }, + "ListTagsForResourceRequest":{ + "type":"structure", + "required":["ResourceARN"], + "members":{ + "ResourceARN":{"shape":"AmazonResourceName"} + } + }, + "ListTagsForResourceResponse":{ + "type":"structure", + "members":{ + "Tags":{"shape":"TagList"} + } + }, "MatchedPlayerSession":{ "type":"structure", "members":{ @@ -2613,12 +2705,14 @@ "type":"structure", "members":{ "Name":{"shape":"MatchmakingIdStringModel"}, + "ConfigurationArn":{"shape":"MatchmakingConfigurationArn"}, "Description":{"shape":"NonZeroAndMaxString"}, "GameSessionQueueArns":{"shape":"QueueArnsList"}, "RequestTimeoutSeconds":{"shape":"MatchmakingRequestTimeoutInteger"}, "AcceptanceTimeoutSeconds":{"shape":"MatchmakingAcceptanceTimeoutInteger"}, "AcceptanceRequired":{"shape":"BooleanModel"}, "RuleSetName":{"shape":"MatchmakingIdStringModel"}, + "RuleSetArn":{"shape":"MatchmakingRuleSetArn"}, "NotificationTarget":{"shape":"SnsArnStringModel"}, "AdditionalPlayerCount":{"shape":"WholeNumber"}, "CustomEventData":{"shape":"CustomEventData"}, @@ -2628,10 +2722,24 @@ "BackfillMode":{"shape":"BackfillMode"} } }, + "MatchmakingConfigurationArn":{ + "type":"string", + "pattern":"^arn:.*:matchmakingconfiguration\\/[a-zA-Z0-9-\\.]*" + }, "MatchmakingConfigurationList":{ "type":"list", "member":{"shape":"MatchmakingConfiguration"} }, + "MatchmakingConfigurationName":{ + "type":"string", + "max":256, + "min":1, + "pattern":"[a-zA-Z0-9-\\.]*|^arn:.*:matchmakingconfiguration\\/[a-zA-Z0-9-\\.]*" + }, + "MatchmakingConfigurationNameList":{ + "type":"list", + "member":{"shape":"MatchmakingConfigurationName"} + }, "MatchmakingConfigurationStatus":{ "type":"string", "enum":[ @@ -2664,17 +2772,28 @@ "required":["RuleSetBody"], "members":{ "RuleSetName":{"shape":"MatchmakingIdStringModel"}, + "RuleSetArn":{"shape":"MatchmakingRuleSetArn"}, "RuleSetBody":{"shape":"RuleSetBody"}, "CreationTime":{"shape":"Timestamp"} } }, + "MatchmakingRuleSetArn":{ + "type":"string", + "pattern":"^arn:.*:matchmakingruleset\\/[a-zA-Z0-9-\\.]*" + }, "MatchmakingRuleSetList":{ "type":"list", "member":{"shape":"MatchmakingRuleSet"} }, + "MatchmakingRuleSetName":{ + "type":"string", + "max":256, + "min":1, + "pattern":"[a-zA-Z0-9-\\.]*|^arn:.*:matchmakingruleset\\/[a-zA-Z0-9-\\.]*" + }, "MatchmakingRuleSetNameList":{ "type":"list", - "member":{"shape":"MatchmakingIdStringModel"}, + "member":{"shape":"MatchmakingRuleSetName"}, "max":10, "min":1 }, @@ -2683,6 +2802,7 @@ "members":{ "TicketId":{"shape":"MatchmakingIdStringModel"}, "ConfigurationName":{"shape":"MatchmakingIdStringModel"}, + "ConfigurationArn":{"shape":"MatchmakingConfigurationArn"}, "Status":{"shape":"MatchmakingConfigurationStatus"}, "StatusReason":{"shape":"StringModel"}, "StatusMessage":{"shape":"StringModel"}, @@ -2837,6 +2957,7 @@ "PlayerId":{"shape":"NonZeroAndMaxString"}, "GameSessionId":{"shape":"NonZeroAndMaxString"}, "FleetId":{"shape":"FleetId"}, + "FleetArn":{"shape":"ArnStringModel"}, "CreationTime":{"shape":"Timestamp"}, "TerminationTime":{"shape":"Timestamp"}, "Status":{"shape":"PlayerSessionStatus"}, @@ -2951,7 +3072,8 @@ "ResolveAliasOutput":{ "type":"structure", "members":{ - "FleetId":{"shape":"FleetId"} + "FleetId":{"shape":"FleetId"}, + "FleetArn":{"shape":"ArnStringModel"} } }, "ResourceCreationLimitPolicy":{ @@ -3047,6 +3169,7 @@ "type":"structure", "members":{ "ScriptId":{"shape":"ScriptId"}, + "ScriptArn":{"shape":"ScriptArn"}, "Name":{"shape":"NonZeroAndMaxString"}, "Version":{"shape":"NonZeroAndMaxString"}, "SizeOnDisk":{"shape":"PositiveLong"}, @@ -3054,9 +3177,13 @@ "StorageLocation":{"shape":"S3Location"} } }, + "ScriptArn":{ + "type":"string", + "pattern":"^arn:.*:script\\/script-\\S+" + }, "ScriptId":{ "type":"string", - "pattern":"^script-\\S+|^arn:.*script-\\S+" + "pattern":"^script-\\S+|^arn:.*:script\\/script-\\S+" }, "ScriptList":{ "type":"list", @@ -3153,7 +3280,7 @@ ], "members":{ "TicketId":{"shape":"MatchmakingIdStringModel"}, - "ConfigurationName":{"shape":"MatchmakingIdStringModel"}, + "ConfigurationName":{"shape":"MatchmakingConfigurationName"}, "GameSessionArn":{"shape":"ArnStringModel"}, "Players":{"shape":"PlayerList"} } @@ -3172,7 +3299,7 @@ ], "members":{ "TicketId":{"shape":"MatchmakingIdStringModel"}, - "ConfigurationName":{"shape":"MatchmakingIdStringModel"}, + "ConfigurationName":{"shape":"MatchmakingConfigurationName"}, "Players":{"shape":"PlayerList"} } }, @@ -3233,6 +3360,62 @@ "member":{"shape":"NonZeroAndMaxString"} }, "StringModel":{"type":"string"}, + "Tag":{ + "type":"structure", + "required":[ + "Key", + "Value" + ], + "members":{ + "Key":{"shape":"TagKey"}, + "Value":{"shape":"TagValue"} + } + }, + "TagKey":{ + "type":"string", + "max":128, + "min":1 + }, + "TagKeyList":{ + "type":"list", + "member":{"shape":"TagKey"}, + "max":200, + "min":0 + }, + "TagList":{ + "type":"list", + "member":{"shape":"Tag"}, + "max":200, + "min":0 + }, + "TagResourceRequest":{ + "type":"structure", + "required":[ + "ResourceARN", + "Tags" + ], + "members":{ + "ResourceARN":{"shape":"AmazonResourceName"}, + "Tags":{"shape":"TagList"} + } + }, + "TagResourceResponse":{ + "type":"structure", + "members":{ + } + }, + "TagValue":{ + "type":"string", + "max":256, + "min":0 + }, + "TaggingFailedException":{ + "type":"structure", + "members":{ + "Message":{"shape":"NonEmptyString"} + }, + "exception":true + }, "TargetConfiguration":{ "type":"structure", "required":["TargetValue"], @@ -3262,6 +3445,22 @@ }, "exception":true }, + "UntagResourceRequest":{ + "type":"structure", + "required":[ + "ResourceARN", + "TagKeys" + ], + "members":{ + "ResourceARN":{"shape":"AmazonResourceName"}, + "TagKeys":{"shape":"TagKeyList"} + } + }, + "UntagResourceResponse":{ + "type":"structure", + "members":{ + } + }, "UpdateAliasInput":{ "type":"structure", "required":["AliasId"], @@ -3379,13 +3578,13 @@ "type":"structure", "required":["Name"], "members":{ - "Name":{"shape":"MatchmakingIdStringModel"}, + "Name":{"shape":"MatchmakingConfigurationName"}, "Description":{"shape":"NonZeroAndMaxString"}, "GameSessionQueueArns":{"shape":"QueueArnsList"}, "RequestTimeoutSeconds":{"shape":"MatchmakingRequestTimeoutInteger"}, "AcceptanceTimeoutSeconds":{"shape":"MatchmakingAcceptanceTimeoutInteger"}, "AcceptanceRequired":{"shape":"BooleanModel"}, - "RuleSetName":{"shape":"MatchmakingIdStringModel"}, + "RuleSetName":{"shape":"MatchmakingRuleSetName"}, "NotificationTarget":{"shape":"SnsArnStringModel"}, "AdditionalPlayerCount":{"shape":"WholeNumber"}, "CustomEventData":{"shape":"CustomEventData"}, @@ -3465,6 +3664,7 @@ "type":"structure", "members":{ "FleetId":{"shape":"FleetId"}, + "FleetArn":{"shape":"ArnStringModel"}, "IpV4CidrBlock":{"shape":"NonZeroAndMaxString"}, "VpcPeeringConnectionId":{"shape":"NonZeroAndMaxString"}, "Status":{"shape":"VpcPeeringConnectionStatus"}, diff --git a/models/apis/gamelift/2015-10-01/docs-2.json b/models/apis/gamelift/2015-10-01/docs-2.json index 0667e2ad500..8ee9551ddd4 100644 --- a/models/apis/gamelift/2015-10-01/docs-2.json +++ b/models/apis/gamelift/2015-10-01/docs-2.json @@ -3,21 +3,21 @@ "service": "Amazon GameLift Service

Amazon GameLift is a managed service for developers who need a scalable, dedicated server solution for their multiplayer games. Use Amazon GameLift for these tasks: (1) set up computing resources and deploy your game servers, (2) run game sessions and get players into games, (3) automatically scale your resources to meet player demand and manage costs, and (4) track in-depth metrics on game server performance and player usage.

When setting up hosting resources, you can deploy your custom game server or use the Amazon GameLift Realtime Servers. Realtime Servers gives you the ability to quickly stand up lightweight, efficient game servers with the core Amazon GameLift infrastructure already built in.

Get Amazon GameLift Tools and Resources

This reference guide describes the low-level service API for Amazon GameLift and provides links to language-specific SDK reference topics. See also Amazon GameLift Tools and Resources.

API Summary

The Amazon GameLift service API includes two key sets of actions:

Task-based list of API actions

", "operations": { "AcceptMatch": "

Registers a player's acceptance or rejection of a proposed FlexMatch match. A matchmaking configuration may require player acceptance; if so, then matches built with that configuration cannot be completed unless all players accept the proposed match within a specified time limit.

When FlexMatch builds a match, all the matchmaking tickets involved in the proposed match are placed into status REQUIRES_ACCEPTANCE. This is a trigger for your game to get acceptance from all players in the ticket. Acceptances are only valid for tickets when they are in this status; all other acceptances result in an error.

To register acceptance, specify the ticket ID, a response, and one or more players. Once all players have registered acceptance, the matchmaking tickets advance to status PLACING, where a new game session is created for the match.

If any player rejects the match, or if acceptances are not received before a specified timeout, the proposed match is dropped. The matchmaking tickets are then handled in one of two ways: For tickets where one or more players rejected the match, the ticket status is returned to SEARCHING to find a new match. For tickets where one or more players failed to respond, the ticket status is set to CANCELLED, and processing is terminated. A new matchmaking request for these players can be submitted as needed.

Learn more

Add FlexMatch to a Game Client

FlexMatch Events Reference

Related operations

", - "CreateAlias": "

Creates an alias for a fleet. In most situations, you can use an alias ID in place of a fleet ID. By using a fleet alias instead of a specific fleet ID, you can switch gameplay and players to a new fleet without changing your game client or other game components. For example, for games in production, using an alias allows you to seamlessly redirect your player base to a new game server update.

Amazon GameLift supports two types of routing strategies for aliases: simple and terminal. A simple alias points to an active fleet. A terminal alias is used to display messaging or link to a URL instead of routing players to an active fleet. For example, you might use a terminal alias when a game version is no longer supported and you want to direct players to an upgrade site.

To create a fleet alias, specify an alias name, routing strategy, and optional description. Each simple alias can point to only one fleet, but a fleet can have multiple aliases. If successful, a new alias record is returned, including an alias ID, which you can reference when creating a game session. You can reassign an alias to another fleet by calling UpdateAlias.

", - "CreateBuild": "

Creates a new Amazon GameLift build record for your game server binary files and points to the location of your game server build files in an Amazon Simple Storage Service (Amazon S3) location.

Game server binaries must be combined into a .zip file for use with Amazon GameLift.

To create new builds quickly and easily, use the AWS CLI command upload-build . This helper command uploads your build and creates a new build record in one step, and automatically handles the necessary permissions.

The CreateBuild operation should be used only when you need to manually upload your build files, as in the following scenarios:

If successful, this operation creates a new build record with a unique build ID and places it in INITIALIZED status. You can use DescribeBuild to check the status of your build. A build must be in READY status before it can be used to create fleets.

Learn more

Uploading Your Game

Create a Build with Files in Amazon S3

Related operations

", - "CreateFleet": "

Creates a new fleet to run your game servers. whether they are custom game builds or Realtime Servers with game-specific script. A fleet is a set of Amazon Elastic Compute Cloud (Amazon EC2) instances, each of which can host multiple game sessions. When creating a fleet, you choose the hardware specifications, set some configuration options, and specify the game server to deploy on the new fleet.

To create a new fleet, you must provide the following: (1) a fleet name, (2) an EC2 instance type and fleet type (spot or on-demand), (3) the build ID for your game build or script ID if using Realtime Servers, and (4) a run-time configuration, which determines how game servers will run on each instance in the fleet.

When creating a Realtime Servers fleet, we recommend using a minimal version of the Realtime script (see this working code example ). This will make it much easier to troubleshoot any fleet creation issues. Once the fleet is active, you can update your Realtime script as needed.

If the CreateFleet call is successful, Amazon GameLift performs the following tasks. You can track the process of a fleet by checking the fleet status or by monitoring fleet creation events:

Learn more

Working with Fleets

Debug Fleet Creation Issues

Related operations

", + "CreateAlias": "

Creates an alias for a fleet. In most situations, you can use an alias ID in place of a fleet ID. An alias provides a level of abstraction for a fleet that is useful when redirecting player traffic from one fleet to another, such as when updating your game build.

Amazon GameLift supports two types of routing strategies for aliases: simple and terminal. A simple alias points to an active fleet. A terminal alias is used to display messaging or link to a URL instead of routing players to an active fleet. For example, you might use a terminal alias when a game version is no longer supported and you want to direct players to an upgrade site.

To create a fleet alias, specify an alias name, routing strategy, and optional description. Each simple alias can point to only one fleet, but a fleet can have multiple aliases. If successful, a new alias record is returned, including an alias ID and an ARN. You can reassign an alias to another fleet by calling UpdateAlias.

", + "CreateBuild": "

Creates a new Amazon GameLift build record for your game server binary files and points to the location of your game server build files in an Amazon Simple Storage Service (Amazon S3) location.

Game server binaries must be combined into a zip file for use with Amazon GameLift.

To create new builds directly from a file directory, use the AWS CLI command upload-build . This helper command uploads build files and creates a new build record in one step, and automatically handles the necessary permissions.

The CreateBuild operation should be used only in the following scenarios:

If successful, this operation creates a new build record with a unique build ID and places it in INITIALIZED status. You can use DescribeBuild to check the status of your build. A build must be in READY status before it can be used to create fleets.

Learn more

Uploading Your Game https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html

Create a Build with Files in Amazon S3

Related operations

", + "CreateFleet": "

Creates a new fleet to run your game servers. whether they are custom game builds or Realtime Servers with game-specific script. A fleet is a set of Amazon Elastic Compute Cloud (Amazon EC2) instances, each of which can host multiple game sessions. When creating a fleet, you choose the hardware specifications, set some configuration options, and specify the game server to deploy on the new fleet.

To create a new fleet, you must provide the following: (1) a fleet name, (2) an EC2 instance type and fleet type (spot or on-demand), (3) the build ID for your game build or script ID if using Realtime Servers, and (4) a runtime configuration, which determines how game servers will run on each instance in the fleet.

If the CreateFleet call is successful, Amazon GameLift performs the following tasks. You can track the process of a fleet by checking the fleet status or by monitoring fleet creation events:

Learn more

Setting Up Fleets

Debug Fleet Creation Issues

Related operations

", "CreateGameSession": "

Creates a multiplayer game session for players. This action creates a game session record and assigns an available server process in the specified fleet to host the game session. A fleet must have an ACTIVE status before a game session can be created in it.

To create a game session, specify either fleet ID or alias ID and indicate a maximum number of players to allow in the game session. You can also provide a name and game-specific properties for this game session. If successful, a GameSession object is returned containing the game session properties and other settings you specified.

Idempotency tokens. You can add a token that uniquely identifies game session requests. This is useful for ensuring that game session requests are idempotent. Multiple requests with the same idempotency token are processed only once; subsequent requests return the original result. All response values are the same with the exception of game session status, which may change.

Resource creation limits. If you are creating a game session on a fleet with a resource creation limit policy in force, then you must specify a creator ID. Without this ID, Amazon GameLift has no way to evaluate the policy for this new game session request.

Player acceptance policy. By default, newly created game sessions are open to new players. You can restrict new player access by using UpdateGameSession to change the game session's player session creation policy.

Game session logs. Logs are retained for all active game sessions for 14 days. To access the logs, call GetGameSessionLogUrl to download the log files.

Available in Amazon GameLift Local.

", - "CreateGameSessionQueue": "

Establishes a new queue for processing requests to place new game sessions. A queue identifies where new game sessions can be hosted -- by specifying a list of destinations (fleets or aliases) -- and how long requests can wait in the queue before timing out. You can set up a queue to try to place game sessions on fleets in multiple regions. To add placement requests to a queue, call StartGameSessionPlacement and reference the queue name.

Destination order. When processing a request for a game session, Amazon GameLift tries each destination in order until it finds one with available resources to host the new game session. A queue's default order is determined by how destinations are listed. The default order is overridden when a game session placement request provides player latency information. Player latency information enables Amazon GameLift to prioritize destinations where players report the lowest average latency, as a result placing the new game session where the majority of players will have the best possible gameplay experience.

Player latency policies. For placement requests containing player latency information, use player latency policies to protect individual players from very high latencies. With a latency cap, even when a destination can deliver a low latency for most players, the game is not placed where any individual player is reporting latency higher than a policy's maximum. A queue can have multiple latency policies, which are enforced consecutively starting with the policy with the lowest latency cap. Use multiple policies to gradually relax latency controls; for example, you might set a policy with a low latency cap for the first 60 seconds, a second policy with a higher cap for the next 60 seconds, etc.

To create a new queue, provide a name, timeout value, a list of destinations and, if desired, a set of latency policies. If successful, a new queue object is returned.

", + "CreateGameSessionQueue": "

Establishes a new queue for processing requests to place new game sessions. A queue identifies where new game sessions can be hosted -- by specifying a list of destinations (fleets or aliases) -- and how long requests can wait in the queue before timing out. You can set up a queue to try to place game sessions on fleets in multiple Regions. To add placement requests to a queue, call StartGameSessionPlacement and reference the queue name.

Destination order. When processing a request for a game session, Amazon GameLift tries each destination in order until it finds one with available resources to host the new game session. A queue's default order is determined by how destinations are listed. The default order is overridden when a game session placement request provides player latency information. Player latency information enables Amazon GameLift to prioritize destinations where players report the lowest average latency, as a result placing the new game session where the majority of players will have the best possible gameplay experience.

Player latency policies. For placement requests containing player latency information, use player latency policies to protect individual players from very high latencies. With a latency cap, even when a destination can deliver a low latency for most players, the game is not placed where any individual player is reporting latency higher than a policy's maximum. A queue can have multiple latency policies, which are enforced consecutively starting with the policy with the lowest latency cap. Use multiple policies to gradually relax latency controls; for example, you might set a policy with a low latency cap for the first 60 seconds, a second policy with a higher cap for the next 60 seconds, etc.

To create a new queue, provide a name, timeout value, a list of destinations and, if desired, a set of latency policies. If successful, a new queue object is returned.

", "CreateMatchmakingConfiguration": "

Defines a new matchmaking configuration for use with FlexMatch. A matchmaking configuration sets out guidelines for matching players and getting the matches into games. You can set up multiple matchmaking configurations to handle the scenarios needed for your game. Each matchmaking ticket (StartMatchmaking or StartMatchBackfill) specifies a configuration for the match and provides player attributes to support the configuration being used.

To create a matchmaking configuration, at a minimum you must specify the following: configuration name; a rule set that governs how to evaluate players and find acceptable matches; a game session queue to use when placing a new game session for the match; and the maximum time allowed for a matchmaking attempt.

There are two ways to track the progress of matchmaking tickets: (1) polling ticket status with DescribeMatchmaking; or (2) receiving notifications with Amazon Simple Notification Service (SNS). To use notifications, you first need to set up an SNS topic to receive the notifications, and provide the topic ARN in the matchmaking configuration. Since notifications promise only \"best effort\" delivery, we recommend calling DescribeMatchmaking if no notifications are received within 30 seconds.

Learn more

Design a FlexMatch Matchmaker

Setting up Notifications for Matchmaking

Related operations

", - "CreateMatchmakingRuleSet": "

Creates a new rule set for FlexMatch matchmaking. A rule set describes the type of match to create, such as the number and size of teams, and sets the parameters for acceptable player matches, such as minimum skill level or character type. A rule set is used by a MatchmakingConfiguration.

To create a matchmaking rule set, provide unique rule set name and the rule set body in JSON format. Rule sets must be defined in the same region as the matchmaking configuration they are used with.

Since matchmaking rule sets cannot be edited, it is a good idea to check the rule set syntax using ValidateMatchmakingRuleSet before creating a new rule set.

Learn more

Related operations

", + "CreateMatchmakingRuleSet": "

Creates a new rule set for FlexMatch matchmaking. A rule set describes the type of match to create, such as the number and size of teams. It also sets the parameters for acceptable player matches, such as minimum skill level or character type. A rule set is used by a MatchmakingConfiguration.

To create a matchmaking rule set, provide unique rule set name and the rule set body in JSON format. Rule sets must be defined in the same Region as the matchmaking configuration they are used with.

Since matchmaking rule sets cannot be edited, it is a good idea to check the rule set syntax using ValidateMatchmakingRuleSet before creating a new rule set.

Learn more

Related operations

", "CreatePlayerSession": "

Reserves an open player slot in an active game session. Before a player can be added, a game session must have an ACTIVE status, have a creation policy of ALLOW_ALL, and have an open player slot. To add a group of players to a game session, use CreatePlayerSessions. When the player connects to the game server and references a player session ID, the game server contacts the Amazon GameLift service to validate the player reservation and accept the player.

To create a player session, specify a game session ID, player ID, and optionally a string of player data. If successful, a slot is reserved in the game session for the player and a new PlayerSession object is returned. Player sessions cannot be updated.

Available in Amazon GameLift Local.

", "CreatePlayerSessions": "

Reserves open slots in a game session for a group of players. Before players can be added, a game session must have an ACTIVE status, have a creation policy of ALLOW_ALL, and have an open player slot. To add a single player to a game session, use CreatePlayerSession. When a player connects to the game server and references a player session ID, the game server contacts the Amazon GameLift service to validate the player reservation and accept the player.

To create player sessions, specify a game session ID, a list of player IDs, and optionally a set of player data strings. If successful, a slot is reserved in the game session for each player and a set of new PlayerSession objects is returned. Player sessions cannot be updated.

Available in Amazon GameLift Local.

", "CreateScript": "

Creates a new script record for your Realtime Servers script. Realtime scripts are JavaScript that provide configuration settings and optional custom game logic for your game. The script is deployed when you create a Realtime Servers fleet to host your game sessions. Script logic is executed during an active game session.

To create a new script record, specify a script name and provide the script file(s). The script files and all dependencies must be zipped into a single file. You can pull the zip file from either of these locations:

If the call is successful, a new script record is created with a unique script ID. If the script file is provided as a local file, the file is uploaded to an Amazon GameLift-owned S3 bucket and the script record's storage location reflects this location. If the script file is provided as an S3 bucket, Amazon GameLift accesses the file at this storage location as needed for deployment.

Learn more

Amazon GameLift Realtime Servers

Set Up a Role for Amazon GameLift Access

Related operations

", - "CreateVpcPeeringAuthorization": "

Requests authorization to create or delete a peer connection between the VPC for your Amazon GameLift fleet and a virtual private cloud (VPC) in your AWS account. VPC peering enables the game servers on your fleet to communicate directly with other AWS resources. Once you've received authorization, call CreateVpcPeeringConnection to establish the peering connection. For more information, see VPC Peering with Amazon GameLift Fleets.

You can peer with VPCs that are owned by any AWS account you have access to, including the account that you use to manage your Amazon GameLift fleets. You cannot peer with VPCs that are in different regions.

To request authorization to create a connection, call this operation from the AWS account with the VPC that you want to peer to your Amazon GameLift fleet. For example, to enable your game servers to retrieve data from a DynamoDB table, use the account that manages that DynamoDB resource. Identify the following values: (1) The ID of the VPC that you want to peer with, and (2) the ID of the AWS account that you use to manage Amazon GameLift. If successful, VPC peering is authorized for the specified VPC.

To request authorization to delete a connection, call this operation from the AWS account with the VPC that is peered with your Amazon GameLift fleet. Identify the following values: (1) VPC ID that you want to delete the peering connection for, and (2) ID of the AWS account that you use to manage Amazon GameLift.

The authorization remains valid for 24 hours unless it is canceled by a call to DeleteVpcPeeringAuthorization. You must create or delete the peering connection while the authorization is valid.

", - "CreateVpcPeeringConnection": "

Establishes a VPC peering connection between a virtual private cloud (VPC) in an AWS account with the VPC for your Amazon GameLift fleet. VPC peering enables the game servers on your fleet to communicate directly with other AWS resources. You can peer with VPCs in any AWS account that you have access to, including the account that you use to manage your Amazon GameLift fleets. You cannot peer with VPCs that are in different regions. For more information, see VPC Peering with Amazon GameLift Fleets.

Before calling this operation to establish the peering connection, you first need to call CreateVpcPeeringAuthorization and identify the VPC you want to peer with. Once the authorization for the specified VPC is issued, you have 24 hours to establish the connection. These two operations handle all tasks necessary to peer the two VPCs, including acceptance, updating routing tables, etc.

To establish the connection, call this operation from the AWS account that is used to manage the Amazon GameLift fleets. Identify the following values: (1) The ID of the fleet you want to be enable a VPC peering connection for; (2) The AWS account with the VPC that you want to peer with; and (3) The ID of the VPC you want to peer with. This operation is asynchronous. If successful, a VpcPeeringConnection request is created. You can use continuous polling to track the request's status using DescribeVpcPeeringConnections, or by monitoring fleet events for success or failure using DescribeFleetEvents.

", + "CreateVpcPeeringAuthorization": "

Requests authorization to create or delete a peer connection between the VPC for your Amazon GameLift fleet and a virtual private cloud (VPC) in your AWS account. VPC peering enables the game servers on your fleet to communicate directly with other AWS resources. Once you've received authorization, call CreateVpcPeeringConnection to establish the peering connection. For more information, see VPC Peering with Amazon GameLift Fleets.

You can peer with VPCs that are owned by any AWS account you have access to, including the account that you use to manage your Amazon GameLift fleets. You cannot peer with VPCs that are in different Regions.

To request authorization to create a connection, call this operation from the AWS account with the VPC that you want to peer to your Amazon GameLift fleet. For example, to enable your game servers to retrieve data from a DynamoDB table, use the account that manages that DynamoDB resource. Identify the following values: (1) The ID of the VPC that you want to peer with, and (2) the ID of the AWS account that you use to manage Amazon GameLift. If successful, VPC peering is authorized for the specified VPC.

To request authorization to delete a connection, call this operation from the AWS account with the VPC that is peered with your Amazon GameLift fleet. Identify the following values: (1) VPC ID that you want to delete the peering connection for, and (2) ID of the AWS account that you use to manage Amazon GameLift.

The authorization remains valid for 24 hours unless it is canceled by a call to DeleteVpcPeeringAuthorization. You must create or delete the peering connection while the authorization is valid.

", + "CreateVpcPeeringConnection": "

Establishes a VPC peering connection between a virtual private cloud (VPC) in an AWS account with the VPC for your Amazon GameLift fleet. VPC peering enables the game servers on your fleet to communicate directly with other AWS resources. You can peer with VPCs in any AWS account that you have access to, including the account that you use to manage your Amazon GameLift fleets. You cannot peer with VPCs that are in different Regions. For more information, see VPC Peering with Amazon GameLift Fleets.

Before calling this operation to establish the peering connection, you first need to call CreateVpcPeeringAuthorization and identify the VPC you want to peer with. Once the authorization for the specified VPC is issued, you have 24 hours to establish the connection. These two operations handle all tasks necessary to peer the two VPCs, including acceptance, updating routing tables, etc.

To establish the connection, call this operation from the AWS account that is used to manage the Amazon GameLift fleets. Identify the following values: (1) The ID of the fleet you want to be enable a VPC peering connection for; (2) The AWS account with the VPC that you want to peer with; and (3) The ID of the VPC you want to peer with. This operation is asynchronous. If successful, a VpcPeeringConnection request is created. You can use continuous polling to track the request's status using DescribeVpcPeeringConnections, or by monitoring fleet events for success or failure using DescribeFleetEvents.

", "DeleteAlias": "

Deletes an alias. This action removes all record of the alias. Game clients attempting to access a server process using the deleted alias receive an error. To delete an alias, specify the alias ID to be deleted.

", "DeleteBuild": "

Deletes a build. This action permanently deletes the build record and any uploaded build files.

To delete a build, specify its ID. Deleting a build does not affect the status of any active fleets using the build, but you can no longer create new fleets with the deleted build.

Learn more

Working with Builds

Related operations

", - "DeleteFleet": "

Deletes everything related to a fleet. Before deleting a fleet, you must set the fleet's desired capacity to zero. See UpdateFleetCapacity.

If the fleet being deleted has a VPC peering connection, you first need to get a valid authorization (good for 24 hours) by calling CreateVpcPeeringAuthorization. You do not need to explicitly delete the VPC peering connection--this is done as part of the delete fleet process.

This action removes the fleet's resources and the fleet record. Once a fleet is deleted, you can no longer use that fleet.

Learn more

Working with Fleets.

Related operations

", + "DeleteFleet": "

Deletes everything related to a fleet. Before deleting a fleet, you must set the fleet's desired capacity to zero. See UpdateFleetCapacity.

If the fleet being deleted has a VPC peering connection, you first need to get a valid authorization (good for 24 hours) by calling CreateVpcPeeringAuthorization. You do not need to explicitly delete the VPC peering connection--this is done as part of the delete fleet process.

This action removes the fleet's resources and the fleet record. Once a fleet is deleted, you can no longer use that fleet.

Learn more

Working with Fleets.

Related operations

", "DeleteGameSessionQueue": "

Deletes a game session queue. This action means that any StartGameSessionPlacement requests that reference this queue will fail. To delete a queue, specify the queue name.

", "DeleteMatchmakingConfiguration": "

Permanently removes a FlexMatch matchmaking configuration. To delete, specify the configuration name. A matchmaking configuration cannot be deleted if it is being used in any active matchmaking tickets.

Related operations

", "DeleteMatchmakingRuleSet": "

Deletes an existing matchmaking rule set. To delete the rule set, provide the rule set name. Rule sets cannot be deleted if they are currently being used by a matchmaking configuration.

Learn more

Related operations

", @@ -27,22 +27,22 @@ "DeleteVpcPeeringConnection": "

Removes a VPC peering connection. To delete the connection, you must have a valid authorization for the VPC peering connection that you want to delete. You can check for an authorization by calling DescribeVpcPeeringAuthorizations or request a new one using CreateVpcPeeringAuthorization.

Once a valid authorization exists, call this operation from the AWS account that is used to manage the Amazon GameLift fleets. Identify the connection to delete by the connection ID and fleet ID. If successful, the connection is removed.

", "DescribeAlias": "

Retrieves properties for an alias. This operation returns all alias metadata and settings. To get an alias's target fleet ID only, use ResolveAlias.

To get alias properties, specify the alias ID. If successful, the requested alias record is returned.

", "DescribeBuild": "

Retrieves properties for a build. To request a build record, specify a build ID. If successful, an object containing the build properties is returned.

Learn more

Working with Builds

Related operations

", - "DescribeEC2InstanceLimits": "

Retrieves the following information for the specified EC2 instance type:

Service limits vary depending on region. Available regions for Amazon GameLift can be found in the AWS Management Console for Amazon GameLift (see the drop-down list in the upper right corner).

Learn more

Working with Fleets.

Related operations

", - "DescribeFleetAttributes": "

Retrieves fleet properties, including metadata, status, and configuration, for one or more fleets. You can request attributes for all fleets, or specify a list of one or more fleet IDs. When requesting multiple fleets, use the pagination parameters to retrieve results as a set of sequential pages. If successful, a FleetAttributes object is returned for each requested fleet ID. When specifying a list of fleet IDs, attribute objects are returned only for fleets that currently exist.

Some API actions may limit the number of fleet IDs allowed in one request. If a request exceeds this limit, the request fails and the error message includes the maximum allowed.

Learn more

Working with Fleets.

Related operations

", - "DescribeFleetCapacity": "

Retrieves the current status of fleet capacity for one or more fleets. This information includes the number of instances that have been requested for the fleet and the number currently active. You can request capacity for all fleets, or specify a list of one or more fleet IDs. When requesting multiple fleets, use the pagination parameters to retrieve results as a set of sequential pages. If successful, a FleetCapacity object is returned for each requested fleet ID. When specifying a list of fleet IDs, attribute objects are returned only for fleets that currently exist.

Some API actions may limit the number of fleet IDs allowed in one request. If a request exceeds this limit, the request fails and the error message includes the maximum allowed.

Learn more

Working with Fleets.

Related operations

", - "DescribeFleetEvents": "

Retrieves entries from the specified fleet's event log. You can specify a time range to limit the result set. Use the pagination parameters to retrieve results as a set of sequential pages. If successful, a collection of event log entries matching the request are returned.

Learn more

Working with Fleets.

Related operations

", - "DescribeFleetPortSettings": "

Retrieves the inbound connection permissions for a fleet. Connection permissions include a range of IP addresses and port settings that incoming traffic can use to access server processes in the fleet. To get a fleet's inbound connection permissions, specify a fleet ID. If successful, a collection of IpPermission objects is returned for the requested fleet ID. If the requested fleet has been deleted, the result set is empty.

Learn more

Working with Fleets.

Related operations

", - "DescribeFleetUtilization": "

Retrieves utilization statistics for one or more fleets. You can request utilization data for all fleets, or specify a list of one or more fleet IDs. When requesting multiple fleets, use the pagination parameters to retrieve results as a set of sequential pages. If successful, a FleetUtilization object is returned for each requested fleet ID. When specifying a list of fleet IDs, utilization objects are returned only for fleets that currently exist.

Some API actions may limit the number of fleet IDs allowed in one request. If a request exceeds this limit, the request fails and the error message includes the maximum allowed.

Learn more

Working with Fleets.

Related operations

", + "DescribeEC2InstanceLimits": "

Retrieves the following information for the specified EC2 instance type:

Service limits vary depending on Region. Available Regions for Amazon GameLift can be found in the AWS Management Console for Amazon GameLift (see the drop-down list in the upper right corner).

Learn more

Working with Fleets.

Related operations

", + "DescribeFleetAttributes": "

Retrieves fleet properties, including metadata, status, and configuration, for one or more fleets. You can request attributes for all fleets, or specify a list of one or more fleet IDs. When requesting multiple fleets, use the pagination parameters to retrieve results as a set of sequential pages. If successful, a FleetAttributes object is returned for each requested fleet ID. When specifying a list of fleet IDs, attribute objects are returned only for fleets that currently exist.

Some API actions may limit the number of fleet IDs allowed in one request. If a request exceeds this limit, the request fails and the error message includes the maximum allowed.

Learn more

Working with Fleets.

Related operations

", + "DescribeFleetCapacity": "

Retrieves the current status of fleet capacity for one or more fleets. This information includes the number of instances that have been requested for the fleet and the number currently active. You can request capacity for all fleets, or specify a list of one or more fleet IDs. When requesting multiple fleets, use the pagination parameters to retrieve results as a set of sequential pages. If successful, a FleetCapacity object is returned for each requested fleet ID. When specifying a list of fleet IDs, attribute objects are returned only for fleets that currently exist.

Some API actions may limit the number of fleet IDs allowed in one request. If a request exceeds this limit, the request fails and the error message includes the maximum allowed.

Learn more

Working with Fleets.

Related operations

", + "DescribeFleetEvents": "

Retrieves entries from the specified fleet's event log. You can specify a time range to limit the result set. Use the pagination parameters to retrieve results as a set of sequential pages. If successful, a collection of event log entries matching the request are returned.

Learn more

Working with Fleets.

Related operations

", + "DescribeFleetPortSettings": "

Retrieves the inbound connection permissions for a fleet. Connection permissions include a range of IP addresses and port settings that incoming traffic can use to access server processes in the fleet. To get a fleet's inbound connection permissions, specify a fleet ID. If successful, a collection of IpPermission objects is returned for the requested fleet ID. If the requested fleet has been deleted, the result set is empty.

Learn more

Working with Fleets.

Related operations

", + "DescribeFleetUtilization": "

Retrieves utilization statistics for one or more fleets. You can request utilization data for all fleets, or specify a list of one or more fleet IDs. When requesting multiple fleets, use the pagination parameters to retrieve results as a set of sequential pages. If successful, a FleetUtilization object is returned for each requested fleet ID. When specifying a list of fleet IDs, utilization objects are returned only for fleets that currently exist.

Some API actions may limit the number of fleet IDs allowed in one request. If a request exceeds this limit, the request fails and the error message includes the maximum allowed.

Learn more

Working with Fleets.

Related operations

", "DescribeGameSessionDetails": "

Retrieves properties, including the protection policy in force, for one or more game sessions. This action can be used in several ways: (1) provide a GameSessionId or GameSessionArn to request details for a specific game session; (2) provide either a FleetId or an AliasId to request properties for all game sessions running on a fleet.

To get game session record(s), specify just one of the following: game session ID, fleet ID, or alias ID. You can filter this request by game session status. Use the pagination parameters to retrieve results as a set of sequential pages. If successful, a GameSessionDetail object is returned for each session matching the request.

", "DescribeGameSessionPlacement": "

Retrieves properties and current status of a game session placement request. To get game session placement details, specify the placement ID. If successful, a GameSessionPlacement object is returned.

", - "DescribeGameSessionQueues": "

Retrieves the properties for one or more game session queues. When requesting multiple queues, use the pagination parameters to retrieve results as a set of sequential pages. If successful, a GameSessionQueue object is returned for each requested queue. When specifying a list of queues, objects are returned only for queues that currently exist in the region.

", + "DescribeGameSessionQueues": "

Retrieves the properties for one or more game session queues. When requesting multiple queues, use the pagination parameters to retrieve results as a set of sequential pages. If successful, a GameSessionQueue object is returned for each requested queue. When specifying a list of queues, objects are returned only for queues that currently exist in the Region.

", "DescribeGameSessions": "

Retrieves a set of one or more game sessions. Request a specific game session or request all game sessions on a fleet. Alternatively, use SearchGameSessions to request a set of active game sessions that are filtered by certain criteria. To retrieve protection policy settings for game sessions, use DescribeGameSessionDetails.

To get game sessions, specify one of the following: game session ID, fleet ID, or alias ID. You can filter this request by game session status. Use the pagination parameters to retrieve results as a set of sequential pages. If successful, a GameSession object is returned for each game session matching the request.

Available in Amazon GameLift Local.

", "DescribeInstances": "

Retrieves information about a fleet's instances, including instance IDs. Use this action to get details on all instances in the fleet or get details on one specific instance.

To get a specific instance, specify fleet ID and instance ID. To get all instances in a fleet, specify a fleet ID only. Use the pagination parameters to retrieve results as a set of sequential pages. If successful, an Instance object is returned for each result.

", - "DescribeMatchmaking": "

Retrieves one or more matchmaking tickets. Use this operation to retrieve ticket information, including status and--once a successful match is made--acquire connection information for the resulting new game session.

You can use this operation to track the progress of matchmaking requests (through polling) as an alternative to using event notifications. See more details on tracking matchmaking requests through polling or notifications in StartMatchmaking.

To request matchmaking tickets, provide a list of up to 10 ticket IDs. If the request is successful, a ticket object is returned for each requested ID that currently exists.

Learn more

Add FlexMatch to a Game Client

Set Up FlexMatch Event Notification

Related operations

", + "DescribeMatchmaking": "

Retrieves one or more matchmaking tickets. Use this operation to retrieve ticket information, including status and--once a successful match is made--acquire connection information for the resulting new game session.

You can use this operation to track the progress of matchmaking requests (through polling) as an alternative to using event notifications. See more details on tracking matchmaking requests through polling or notifications in StartMatchmaking.

To request matchmaking tickets, provide a list of up to 10 ticket IDs. If the request is successful, a ticket object is returned for each requested ID that currently exists.

Learn more

Add FlexMatch to a Game Client

Set Up FlexMatch Event Notification

Related operations

", "DescribeMatchmakingConfigurations": "

Retrieves the details of FlexMatch matchmaking configurations. With this operation, you have the following options: (1) retrieve all existing configurations, (2) provide the names of one or more configurations to retrieve, or (3) retrieve all configurations that use a specified rule set name. When requesting multiple items, use the pagination parameters to retrieve results as a set of sequential pages. If successful, a configuration is returned for each requested name. When specifying a list of names, only configurations that currently exist are returned.

Learn more

Setting Up FlexMatch Matchmakers

Related operations

", - "DescribeMatchmakingRuleSets": "

Retrieves the details for FlexMatch matchmaking rule sets. You can request all existing rule sets for the region, or provide a list of one or more rule set names. When requesting multiple items, use the pagination parameters to retrieve results as a set of sequential pages. If successful, a rule set is returned for each requested name.

Learn more

Related operations

", + "DescribeMatchmakingRuleSets": "

Retrieves the details for FlexMatch matchmaking rule sets. You can request all existing rule sets for the Region, or provide a list of one or more rule set names. When requesting multiple items, use the pagination parameters to retrieve results as a set of sequential pages. If successful, a rule set is returned for each requested name.

Learn more

Related operations

", "DescribePlayerSessions": "

Retrieves properties for one or more player sessions. This action can be used in several ways: (1) provide a PlayerSessionId to request properties for a specific player session; (2) provide a GameSessionId to request properties for all player sessions in the specified game session; (3) provide a PlayerId to request properties for all player sessions of a specified player.

To get game session record(s), specify only one of the following: a player session ID, a game session ID, or a player ID. You can filter this request by player session status. Use the pagination parameters to retrieve results as a set of sequential pages. If successful, a PlayerSession object is returned for each session matching the request.

Available in Amazon GameLift Local.

", - "DescribeRuntimeConfiguration": "

Retrieves the current run-time configuration for the specified fleet. The run-time configuration tells Amazon GameLift how to launch server processes on instances in the fleet.

Learn more

Working with Fleets.

Related operations

", + "DescribeRuntimeConfiguration": "

Retrieves the current runtime configuration for the specified fleet. The runtime configuration tells Amazon GameLift how to launch server processes on instances in the fleet.

Learn more

Working with Fleets.

Related operations

", "DescribeScalingPolicies": "

Retrieves all scaling policies applied to a fleet.

To get a fleet's scaling policies, specify the fleet ID. You can filter this request by policy status, such as to retrieve only active scaling policies. Use the pagination parameters to retrieve results as a set of sequential pages. If successful, set of ScalingPolicy objects is returned for the fleet.

A fleet may have all of its scaling policies suspended (StopFleetActions). This action does not affect the status of the scaling policies, which remains ACTIVE. To see whether a fleet's scaling policies are in force or suspended, call DescribeFleetAttributes and check the stopped actions.

", "DescribeScript": "

Retrieves properties for a Realtime script.

To request a script record, specify the script ID. If successful, an object containing the script properties is returned.

Learn more

Amazon GameLift Realtime Servers

Related operations

", "DescribeVpcPeeringAuthorizations": "

Retrieves valid VPC peering authorizations that are pending for the AWS account. This operation returns all VPC peering authorizations and requests for peering. This includes those initiated and received by this account.

", @@ -51,28 +51,31 @@ "GetInstanceAccess": "

Requests remote access to a fleet instance. Remote access is useful for debugging, gathering benchmarking data, or watching activity in real time.

Access requires credentials that match the operating system of the instance. For a Windows instance, Amazon GameLift returns a user name and password as strings for use with a Windows Remote Desktop client. For a Linux instance, Amazon GameLift returns a user name and RSA private key, also as strings, for use with an SSH client. The private key must be saved in the proper format to a .pem file before using. If you're making this request using the AWS CLI, saving the secret can be handled as part of the GetInstanceAccess request. (See the example later in this topic). For more information on remote access, see Remotely Accessing an Instance.

To request access to a specific instance, specify the IDs of both the instance and the fleet it belongs to. You can retrieve a fleet's instance IDs by calling DescribeInstances. If successful, an InstanceAccess object is returned containing the instance's IP address and a set of credentials.

", "ListAliases": "

Retrieves all aliases for this AWS account. You can filter the result set by alias name and/or routing strategy type. Use the pagination parameters to retrieve results in sequential pages.

Returned aliases are not listed in any particular order.

", "ListBuilds": "

Retrieves build records for all builds associated with the AWS account in use. You can limit results to builds that are in a specific status by using the Status parameter. Use the pagination parameters to retrieve results in a set of sequential pages.

Build records are not listed in any particular order.

Learn more

Working with Builds

Related operations

", - "ListFleets": "

Retrieves a collection of fleet records for this AWS account. You can filter the result set to find only those fleets that are deployed with a specific build or script. Use the pagination parameters to retrieve results in sequential pages.

Fleet records are not listed in a particular order.

Learn more

Set Up Fleets.

Related operations

", + "ListFleets": "

Retrieves a collection of fleet records for this AWS account. You can filter the result set to find only those fleets that are deployed with a specific build or script. Use the pagination parameters to retrieve results in sequential pages.

Fleet records are not listed in a particular order.

Learn more

Set Up Fleets.

Related operations

", "ListScripts": "

Retrieves script records for all Realtime scripts that are associated with the AWS account in use.

Learn more

Amazon GameLift Realtime Servers

Related operations

", + "ListTagsForResource": "

Retrieves all tags that are assigned to a GameLift resource. Resource tags are used to organize AWS resources for a range of purposes. This action handles the permissions necessary to manage tags for the following GameLift resource types:

To list tags for a resource, specify the unique ARN value for the resource.

Learn more

Tagging AWS Resources in the AWS General Reference

AWS Tagging Strategies

Related operations

", "PutScalingPolicy": "

Creates or updates a scaling policy for a fleet. Scaling policies are used to automatically scale a fleet's hosting capacity to meet player demand. An active scaling policy instructs Amazon GameLift to track a fleet metric and automatically change the fleet's capacity when a certain threshold is reached. There are two types of scaling policies: target-based and rule-based. Use a target-based policy to quickly and efficiently manage fleet scaling; this option is the most commonly used. Use rule-based policies when you need to exert fine-grained control over auto-scaling.

Fleets can have multiple scaling policies of each type in force at the same time; you can have one target-based policy, one or multiple rule-based scaling policies, or both. We recommend caution, however, because multiple auto-scaling policies can have unintended consequences.

You can temporarily suspend all scaling policies for a fleet by calling StopFleetActions with the fleet action AUTO_SCALING. To resume scaling policies, call StartFleetActions with the same fleet action. To stop just one scaling policy--or to permanently remove it, you must delete the policy with DeleteScalingPolicy.

Learn more about how to work with auto-scaling in Set Up Fleet Automatic Scaling.

Target-based policy

A target-based policy tracks a single metric: PercentAvailableGameSessions. This metric tells us how much of a fleet's hosting capacity is ready to host game sessions but is not currently in use. This is the fleet's buffer; it measures the additional player demand that the fleet could handle at current capacity. With a target-based policy, you set your ideal buffer size and leave it to Amazon GameLift to take whatever action is needed to maintain that target.

For example, you might choose to maintain a 10% buffer for a fleet that has the capacity to host 100 simultaneous game sessions. This policy tells Amazon GameLift to take action whenever the fleet's available capacity falls below or rises above 10 game sessions. Amazon GameLift will start new instances or stop unused instances in order to return to the 10% buffer.

To create or update a target-based policy, specify a fleet ID and name, and set the policy type to \"TargetBased\". Specify the metric to track (PercentAvailableGameSessions) and reference a TargetConfiguration object with your desired buffer value. Exclude all other parameters. On a successful request, the policy name is returned. The scaling policy is automatically in force as soon as it's successfully created. If the fleet's auto-scaling actions are temporarily suspended, the new policy will be in force once the fleet actions are restarted.

Rule-based policy

A rule-based policy tracks specified fleet metric, sets a threshold value, and specifies the type of action to initiate when triggered. With a rule-based policy, you can select from several available fleet metrics. Each policy specifies whether to scale up or scale down (and by how much), so you need one policy for each type of action.

For example, a policy may make the following statement: \"If the percentage of idle instances is greater than 20% for more than 15 minutes, then reduce the fleet capacity by 10%.\"

A policy's rule statement has the following structure:

If [MetricName] is [ComparisonOperator] [Threshold] for [EvaluationPeriods] minutes, then [ScalingAdjustmentType] to/by [ScalingAdjustment].

To implement the example, the rule statement would look like this:

If [PercentIdleInstances] is [GreaterThanThreshold] [20] for [15] minutes, then [PercentChangeInCapacity] to/by [10].

To create or update a scaling policy, specify a unique combination of name and fleet ID, and set the policy type to \"RuleBased\". Specify the parameter values for a policy rule statement. On a successful request, the policy name is returned. Scaling policies are automatically in force as soon as they're successfully created. If the fleet's auto-scaling actions are temporarily suspended, the new policy will be in force once the fleet actions are restarted.

", "RequestUploadCredentials": "

Retrieves a fresh set of credentials for use when uploading a new set of game build files to Amazon GameLift's Amazon S3. This is done as part of the build creation process; see CreateBuild.

To request new credentials, specify the build ID as returned with an initial CreateBuild request. If successful, a new set of credentials are returned, along with the S3 storage location associated with the build ID.

Learn more

Uploading Your Game

Related operations

", - "ResolveAlias": "

Retrieves the fleet ID that a specified alias is currently pointing to.

", - "SearchGameSessions": "

Retrieves all active game sessions that match a set of search criteria and sorts them in a specified order. You can search or sort by the following game session attributes:

Returned values for playerSessionCount and hasAvailablePlayerSessions change quickly as players join sessions and others drop out. Results should be considered a snapshot in time. Be sure to refresh search results often, and handle sessions that fill up before a player can join.

To search or sort, specify either a fleet ID or an alias ID, and provide a search filter expression, a sort expression, or both. If successful, a collection of GameSession objects matching the request is returned. Use the pagination parameters to retrieve results as a set of sequential pages.

You can search for game sessions one fleet at a time only. To find game sessions across multiple fleets, you must search each fleet separately and combine the results. This search feature finds only game sessions that are in ACTIVE status. To locate games in statuses other than active, use DescribeGameSessionDetails.

", + "ResolveAlias": "

Retrieves the fleet ID that an alias is currently pointing to.

", + "SearchGameSessions": "

Retrieves all active game sessions that match a set of search criteria and sorts them in a specified order. You can search or sort by the following game session attributes:

Returned values for playerSessionCount and hasAvailablePlayerSessions change quickly as players join sessions and others drop out. Results should be considered a snapshot in time. Be sure to refresh search results often, and handle sessions that fill up before a player can join.

To search or sort, specify either a fleet ID or an alias ID, and provide a search filter expression, a sort expression, or both. If successful, a collection of GameSession objects matching the request is returned. Use the pagination parameters to retrieve results as a set of sequential pages.

You can search for game sessions one fleet at a time only. To find game sessions across multiple fleets, you must search each fleet separately and combine the results. This search feature finds only game sessions that are in ACTIVE status. To locate games in statuses other than active, use DescribeGameSessionDetails.

", "StartFleetActions": "

Resumes activity on a fleet that was suspended with StopFleetActions. Currently, this operation is used to restart a fleet's auto-scaling activity.

To start fleet actions, specify the fleet ID and the type of actions to restart. When auto-scaling fleet actions are restarted, Amazon GameLift once again initiates scaling events as triggered by the fleet's scaling policies. If actions on the fleet were never stopped, this operation will have no effect. You can view a fleet's stopped actions using DescribeFleetAttributes.

Learn more

Working with Fleets.

Related operations

", - "StartGameSessionPlacement": "

Places a request for a new game session in a queue (see CreateGameSessionQueue). When processing a placement request, Amazon GameLift searches for available resources on the queue's destinations, scanning each until it finds resources or the placement request times out.

A game session placement request can also request player sessions. When a new game session is successfully created, Amazon GameLift creates a player session for each player included in the request.

When placing a game session, by default Amazon GameLift tries each fleet in the order they are listed in the queue configuration. Ideally, a queue's destinations are listed in preference order.

Alternatively, when requesting a game session with players, you can also provide latency data for each player in relevant regions. Latency data indicates the performance lag a player experiences when connected to a fleet in the region. Amazon GameLift uses latency data to reorder the list of destinations to place the game session in a region with minimal lag. If latency data is provided for multiple players, Amazon GameLift calculates each region's average lag for all players and reorders to get the best game play across all players.

To place a new game session request, specify the following:

If successful, a new game session placement is created.

To track the status of a placement request, call DescribeGameSessionPlacement and check the request's status. If the status is FULFILLED, a new game session has been created and a game session ARN and region are referenced. If the placement request times out, you can resubmit the request or retry it with a different queue.

", + "StartGameSessionPlacement": "

Places a request for a new game session in a queue (see CreateGameSessionQueue). When processing a placement request, Amazon GameLift searches for available resources on the queue's destinations, scanning each until it finds resources or the placement request times out.

A game session placement request can also request player sessions. When a new game session is successfully created, Amazon GameLift creates a player session for each player included in the request.

When placing a game session, by default Amazon GameLift tries each fleet in the order they are listed in the queue configuration. Ideally, a queue's destinations are listed in preference order.

Alternatively, when requesting a game session with players, you can also provide latency data for each player in relevant Regions. Latency data indicates the performance lag a player experiences when connected to a fleet in the Region. Amazon GameLift uses latency data to reorder the list of destinations to place the game session in a Region with minimal lag. If latency data is provided for multiple players, Amazon GameLift calculates each Region's average lag for all players and reorders to get the best game play across all players.

To place a new game session request, specify the following:

If successful, a new game session placement is created.

To track the status of a placement request, call DescribeGameSessionPlacement and check the request's status. If the status is FULFILLED, a new game session has been created and a game session ARN and Region are referenced. If the placement request times out, you can resubmit the request or retry it with a different queue.

", "StartMatchBackfill": "

Finds new players to fill open slots in an existing game session. This operation can be used to add players to matched games that start with fewer than the maximum number of players or to replace players when they drop out. By backfilling with the same matchmaker used to create the original match, you ensure that new players meet the match criteria and maintain a consistent experience throughout the game session. You can backfill a match anytime after a game session has been created.

To request a match backfill, specify a unique ticket ID, the existing game session's ARN, a matchmaking configuration, and a set of data that describes all current players in the game session. If successful, a match backfill ticket is created and returned with status set to QUEUED. The ticket is placed in the matchmaker's ticket pool and processed. Track the status of the ticket to respond as needed.

The process of finding backfill matches is essentially identical to the initial matchmaking process. The matchmaker searches the pool and groups tickets together to form potential matches, allowing only one backfill ticket per potential match. Once the a match is formed, the matchmaker creates player sessions for the new players. All tickets in the match are updated with the game session's connection information, and the GameSession object is updated to include matchmaker data on the new players. For more detail on how match backfill requests are processed, see How Amazon GameLift FlexMatch Works.

Learn more

Backfill Existing Games with FlexMatch

How GameLift FlexMatch Works

Related operations

", "StartMatchmaking": "

Uses FlexMatch to create a game match for a group of players based on custom matchmaking rules, and starts a new game for the matched players. Each matchmaking request specifies the type of match to build (team configuration, rules for an acceptable match, etc.). The request also specifies the players to find a match for and where to host the new game session for optimal performance. A matchmaking request might start with a single player or a group of players who want to play together. FlexMatch finds additional players as needed to fill the match. Match type, rules, and the queue used to place a new game session are defined in a MatchmakingConfiguration.

To start matchmaking, provide a unique ticket ID, specify a matchmaking configuration, and include the players to be matched. You must also include a set of player attributes relevant for the matchmaking configuration. If successful, a matchmaking ticket is returned with status set to QUEUED. Track the status of the ticket to respond as needed and acquire game session connection information for successfully completed matches.

Tracking ticket status -- A couple of options are available for tracking the status of matchmaking requests:

Processing a matchmaking request -- FlexMatch handles a matchmaking request as follows:

  1. Your client code submits a StartMatchmaking request for one or more players and tracks the status of the request ticket.

  2. FlexMatch uses this ticket and others in process to build an acceptable match. When a potential match is identified, all tickets in the proposed match are advanced to the next status.

  3. If the match requires player acceptance (set in the matchmaking configuration), the tickets move into status REQUIRES_ACCEPTANCE. This status triggers your client code to solicit acceptance from all players in every ticket involved in the match, and then call AcceptMatch for each player. If any player rejects or fails to accept the match before a specified timeout, the proposed match is dropped (see AcceptMatch for more details).

  4. Once a match is proposed and accepted, the matchmaking tickets move into status PLACING. FlexMatch locates resources for a new game session using the game session queue (set in the matchmaking configuration) and creates the game session based on the match data.

  5. When the match is successfully placed, the matchmaking tickets move into COMPLETED status. Connection information (including game session endpoint and player session) is added to the matchmaking tickets. Matched players can use the connection information to join the game.

Learn more

Add FlexMatch to a Game Client

Set Up FlexMatch Event Notification

FlexMatch Integration Roadmap

How GameLift FlexMatch Works

Related operations

", "StopFleetActions": "

Suspends activity on a fleet. Currently, this operation is used to stop a fleet's auto-scaling activity. It is used to temporarily stop scaling events triggered by the fleet's scaling policies. The policies can be retained and auto-scaling activity can be restarted using StartFleetActions. You can view a fleet's stopped actions using DescribeFleetAttributes.

To stop fleet actions, specify the fleet ID and the type of actions to suspend. When auto-scaling fleet actions are stopped, Amazon GameLift no longer initiates scaling events except to maintain the fleet's desired instances setting (FleetCapacity. Changes to the fleet's capacity must be done manually using UpdateFleetCapacity.

Learn more

Working with Fleets.

Related operations

", "StopGameSessionPlacement": "

Cancels a game session placement that is in PENDING status. To stop a placement, provide the placement ID values. If successful, the placement is moved to CANCELLED status.

", "StopMatchmaking": "

Cancels a matchmaking ticket or match backfill ticket that is currently being processed. To stop the matchmaking operation, specify the ticket ID. If successful, work on the ticket is stopped, and the ticket status is changed to CANCELLED.

This call is also used to turn off automatic backfill for an individual game session. This is for game sessions that are created with a matchmaking configuration that has automatic backfill enabled. The ticket ID is included in the MatchmakerData of an updated game session object, which is provided to the game server.

If the action is successful, the service sends back an empty JSON struct with the HTTP 200 response (not an empty HTTP body).

Learn more

Add FlexMatch to a Game Client

Related operations

", + "TagResource": "

Assigns a tag to a GameLift resource. AWS resource tags provide an additional management tool set. You can use tags to organize resources, create IAM permissions policies to manage access to groups of resources, customize AWS cost breakdowns, etc. This action handles the permissions necessary to manage tags for the following GameLift resource types:

To add a tag to a resource, specify the unique ARN value for the resource and provide a trig list containing one or more tags. The operation succeeds even if the list includes tags that are already assigned to the specified resource.

Learn more

Tagging AWS Resources in the AWS General Reference

AWS Tagging Strategies

Related operations

", + "UntagResource": "

Removes a tag that is assigned to a GameLift resource. Resource tags are used to organize AWS resources for a range of purposes. This action handles the permissions necessary to manage tags for the following GameLift resource types:

To remove a tag from a resource, specify the unique ARN value for the resource and provide a string list containing one or more tags to be removed. This action succeeds even if the list includes tags that are not currently assigned to the specified resource.

Learn more

Tagging AWS Resources in the AWS General Reference

AWS Tagging Strategies

Related operations

", "UpdateAlias": "

Updates properties for an alias. To update properties, specify the alias ID to be updated and provide the information to be changed. To reassign an alias to another fleet, provide an updated routing strategy. If successful, the updated alias record is returned.

", "UpdateBuild": "

Updates metadata in a build record, including the build name and version. To update the metadata, specify the build ID to update and provide the new values. If successful, a build object containing the updated metadata is returned.

Learn more

Working with Builds

Related operations

", - "UpdateFleetAttributes": "

Updates fleet properties, including name and description, for a fleet. To update metadata, specify the fleet ID and the property values that you want to change. If successful, the fleet ID for the updated fleet is returned.

Learn more

Working with Fleets.

Related operations

", - "UpdateFleetCapacity": "

Updates capacity settings for a fleet. Use this action to specify the number of EC2 instances (hosts) that you want this fleet to contain. Before calling this action, you may want to call DescribeEC2InstanceLimits to get the maximum capacity based on the fleet's EC2 instance type.

Specify minimum and maximum number of instances. Amazon GameLift will not change fleet capacity to values fall outside of this range. This is particularly important when using auto-scaling (see PutScalingPolicy) to allow capacity to adjust based on player demand while imposing limits on automatic adjustments.

To update fleet capacity, specify the fleet ID and the number of instances you want the fleet to host. If successful, Amazon GameLift starts or terminates instances so that the fleet's active instance count matches the desired instance count. You can view a fleet's current capacity information by calling DescribeFleetCapacity. If the desired instance count is higher than the instance type's limit, the \"Limit Exceeded\" exception occurs.

Learn more

Working with Fleets.

Related operations

", - "UpdateFleetPortSettings": "

Updates port settings for a fleet. To update settings, specify the fleet ID to be updated and list the permissions you want to update. List the permissions you want to add in InboundPermissionAuthorizations, and permissions you want to remove in InboundPermissionRevocations. Permissions to be removed must match existing fleet permissions. If successful, the fleet ID for the updated fleet is returned.

Learn more

Working with Fleets.

Related operations

", + "UpdateFleetAttributes": "

Updates fleet properties, including name and description, for a fleet. To update metadata, specify the fleet ID and the property values that you want to change. If successful, the fleet ID for the updated fleet is returned.

Learn more

Working with Fleets.

Related operations

", + "UpdateFleetCapacity": "

Updates capacity settings for a fleet. Use this action to specify the number of EC2 instances (hosts) that you want this fleet to contain. Before calling this action, you may want to call DescribeEC2InstanceLimits to get the maximum capacity based on the fleet's EC2 instance type.

Specify minimum and maximum number of instances. Amazon GameLift will not change fleet capacity to values fall outside of this range. This is particularly important when using auto-scaling (see PutScalingPolicy) to allow capacity to adjust based on player demand while imposing limits on automatic adjustments.

To update fleet capacity, specify the fleet ID and the number of instances you want the fleet to host. If successful, Amazon GameLift starts or terminates instances so that the fleet's active instance count matches the desired instance count. You can view a fleet's current capacity information by calling DescribeFleetCapacity. If the desired instance count is higher than the instance type's limit, the \"Limit Exceeded\" exception occurs.

Learn more

Working with Fleets.

Related operations

", + "UpdateFleetPortSettings": "

Updates port settings for a fleet. To update settings, specify the fleet ID to be updated and list the permissions you want to update. List the permissions you want to add in InboundPermissionAuthorizations, and permissions you want to remove in InboundPermissionRevocations. Permissions to be removed must match existing fleet permissions. If successful, the fleet ID for the updated fleet is returned.

Learn more

Working with Fleets.

Related operations

", "UpdateGameSession": "

Updates game session properties. This includes the session name, maximum player count, protection policy, which controls whether or not an active game session can be terminated during a scale-down event, and the player session creation policy, which controls whether or not new players can join the session. To update a game session, specify the game session ID and the values you want to change. If successful, an updated GameSession object is returned.

", "UpdateGameSessionQueue": "

Updates settings for a game session queue, which determines how new game session requests in the queue are processed. To update settings, specify the queue name to be updated and provide the new settings. When updating destinations, provide a complete list of destinations.

", "UpdateMatchmakingConfiguration": "

Updates settings for a FlexMatch matchmaking configuration. These changes affect all matches and game sessions that are created after the update. To update settings, specify the configuration name to be updated and provide the new settings.

Learn more

Design a FlexMatch Matchmaker

Related operations

", - "UpdateRuntimeConfiguration": "

Updates the current run-time configuration for the specified fleet, which tells Amazon GameLift how to launch server processes on instances in the fleet. You can update a fleet's run-time configuration at any time after the fleet is created; it does not need to be in an ACTIVE status.

To update run-time configuration, specify the fleet ID and provide a RuntimeConfiguration object with an updated set of server process configurations.

Each instance in a Amazon GameLift fleet checks regularly for an updated run-time configuration and changes how it launches server processes to comply with the latest version. Existing server processes are not affected by the update; run-time configuration changes are applied gradually as existing processes shut down and new processes are launched during Amazon GameLift's normal process recycling activity.

Learn more

Working with Fleets.

Related operations

", + "UpdateRuntimeConfiguration": "

Updates the current runtime configuration for the specified fleet, which tells Amazon GameLift how to launch server processes on instances in the fleet. You can update a fleet's runtime configuration at any time after the fleet is created; it does not need to be in an ACTIVE status.

To update runtime configuration, specify the fleet ID and provide a RuntimeConfiguration object with an updated set of server process configurations.

Each instance in a Amazon GameLift fleet checks regularly for an updated runtime configuration and changes how it launches server processes to comply with the latest version. Existing server processes are not affected by the update; runtime configuration changes are applied gradually as existing processes shut down and new processes are launched during Amazon GameLift's normal process recycling activity.

Learn more

Working with Fleets.

Related operations

", "UpdateScript": "

Updates Realtime script metadata and content.

To update script metadata, specify the script ID and provide updated name and/or version values.

To update script content, provide an updated zip file by pointing to either a local file or an Amazon S3 bucket location. You can use either method regardless of how the original script was uploaded. Use the Version parameter to track updates to the script.

If the call is successful, the updated metadata is stored in the script record and a revised script is uploaded to the Amazon GameLift service. Once the script is updated and acquired by a fleet instance, the new version is used for all new game sessions.

Learn more

Amazon GameLift Realtime Servers

Related operations

", "ValidateMatchmakingRuleSet": "

Validates the syntax of a matchmaking rule or rule set. This operation checks that the rule set is using syntactically correct JSON and that it conforms to allowed property expressions. To validate syntax, provide a rule set JSON string.

Learn more

Related operations

" }, @@ -94,55 +97,67 @@ } }, "Alias": { - "base": "

Properties describing a fleet alias.

", + "base": "

Properties that describe an alias resource.

", "refs": { "AliasList$member": null, - "CreateAliasOutput$Alias": "

Object that describes the newly created alias record.

", - "DescribeAliasOutput$Alias": "

Object that contains the requested alias.

", - "UpdateAliasOutput$Alias": "

Object that contains the updated alias configuration.

" + "CreateAliasOutput$Alias": "

The newly created alias resource.

", + "DescribeAliasOutput$Alias": "

The requested alias resource.

", + "UpdateAliasOutput$Alias": "

The updated alias resource.

" } }, "AliasId": { "base": null, "refs": { - "Alias$AliasId": "

Unique identifier for an alias; alias IDs are unique within a region.

", - "CreateGameSessionInput$AliasId": "

Unique identifier for an alias associated with the fleet to create a game session in. Each request must reference either a fleet ID or alias ID, but not both.

", - "DeleteAliasInput$AliasId": "

Unique identifier for a fleet alias. Specify the alias you want to delete.

", - "DescribeAliasInput$AliasId": "

Unique identifier for a fleet alias. Specify the alias you want to retrieve.

", - "DescribeGameSessionDetailsInput$AliasId": "

Unique identifier for an alias associated with the fleet to retrieve all game sessions for.

", - "DescribeGameSessionsInput$AliasId": "

Unique identifier for an alias associated with the fleet to retrieve all game sessions for.

", - "ResolveAliasInput$AliasId": "

Unique identifier for the alias you want to resolve.

", - "SearchGameSessionsInput$AliasId": "

Unique identifier for an alias associated with the fleet to search for active game sessions. Each request must reference either a fleet ID or alias ID, but not both.

", - "UpdateAliasInput$AliasId": "

Unique identifier for a fleet alias. Specify the alias you want to update.

" + "Alias$AliasId": "

A unique identifier for an alias. Alias IDs are unique within a Region.

", + "CreateGameSessionInput$AliasId": "

A unique identifier for an alias associated with the fleet to create a game session in. You can use either the alias ID or ARN value. Each request must reference either a fleet ID or alias ID, but not both.

", + "DeleteAliasInput$AliasId": "

A unique identifier of the alias that you want to delete. You can use either the alias ID or ARN value.

", + "DescribeAliasInput$AliasId": "

The unique identifier for the fleet alias that you want to retrieve. You can use either the alias ID or ARN value.

", + "DescribeGameSessionDetailsInput$AliasId": "

A unique identifier for an alias associated with the fleet to retrieve all game sessions for. You can use either the alias ID or ARN value.

", + "DescribeGameSessionsInput$AliasId": "

A unique identifier for an alias associated with the fleet to retrieve all game sessions for. You can use either the alias ID or ARN value.

", + "ResolveAliasInput$AliasId": "

The unique identifier of the alias that you want to retrieve a fleet ID for. You can use either the alias ID or ARN value.

", + "SearchGameSessionsInput$AliasId": "

A unique identifier for an alias associated with the fleet to search for active game sessions. You can use either the alias ID or ARN value. Each request must reference either a fleet ID or alias ID, but not both.

", + "UpdateAliasInput$AliasId": "

A unique identifier for the alias that you want to update. You can use either the alias ID or ARN value.

" } }, "AliasList": { "base": null, "refs": { - "ListAliasesOutput$Aliases": "

Collection of alias records that match the list request.

" + "ListAliasesOutput$Aliases": "

A collection of alias resources that match the request parameters.

" + } + }, + "AmazonResourceName": { + "base": null, + "refs": { + "ListTagsForResourceRequest$ResourceARN": "

The Amazon Resource Name (ARN) that is assigned to and uniquely identifies the GameLift resource that you want to retrieve tags for. GameLift resource ARNs are included in the data object for the resource, which can be retrieved by calling a List or Describe action for the resource type.

", + "TagResourceRequest$ResourceARN": "

The Amazon Resource Name (ARN) that is assigned to and uniquely identifies the GameLift resource that you want to assign tags to. GameLift resource ARNs are included in the data object for the resource, which can be retrieved by calling a List or Describe action for the resource type.

", + "UntagResourceRequest$ResourceARN": "

The Amazon Resource Name (ARN) that is assigned to and uniquely identifies the GameLift resource that you want to remove tags from. GameLift resource ARNs are included in the data object for the resource, which can be retrieved by calling a List or Describe action for the resource type.

" } }, "ArnStringModel": { "base": null, "refs": { - "Alias$AliasArn": "

Unique identifier for an alias; alias ARNs are unique across all regions.

", - "CreatePlayerSessionInput$GameSessionId": "

Unique identifier for the game session to add a player to.

", - "CreatePlayerSessionsInput$GameSessionId": "

Unique identifier for the game session to add players to.

", - "DescribeGameSessionDetailsInput$GameSessionId": "

Unique identifier for the game session to retrieve.

", - "DescribeGameSessionsInput$GameSessionId": "

Unique identifier for the game session to retrieve. You can use either a GameSessionId or GameSessionArn value.

", - "DescribePlayerSessionsInput$GameSessionId": "

Unique identifier for the game session to retrieve player sessions for.

", - "FleetAttributes$FleetArn": "

Identifier for a fleet that is unique across all regions.

", - "GameSessionConnectionInfo$GameSessionArn": "

Amazon Resource Name (ARN) that is assigned to a game session and uniquely identifies it.

", - "GameSessionQueue$GameSessionQueueArn": "

Amazon Resource Name (ARN) that is assigned to a game session queue and uniquely identifies it. Format is arn:aws:gamelift:<region>:<aws account>:gamesessionqueue/<queue name>.

", - "GameSessionQueueDestination$DestinationArn": "

Amazon Resource Name (ARN) assigned to fleet or fleet alias. ARNs, which include a fleet ID or alias ID and a region name, provide a unique identifier across all regions.

", - "GetGameSessionLogUrlInput$GameSessionId": "

Unique identifier for the game session to get logs for.

", + "Alias$AliasArn": "

Amazon Resource Name (ARN) that is assigned to a GameLift alias resource and uniquely identifies it. ARNs are unique across all Regions.. In a GameLift alias ARN, the resource ID matches the alias ID value.

", + "CreatePlayerSessionInput$GameSessionId": "

A unique identifier for the game session to add a player to.

", + "CreatePlayerSessionsInput$GameSessionId": "

A unique identifier for the game session to add players to.

", + "DescribeGameSessionDetailsInput$GameSessionId": "

A unique identifier for the game session to retrieve.

", + "DescribeGameSessionsInput$GameSessionId": "

A unique identifier for the game session to retrieve.

", + "DescribePlayerSessionsInput$GameSessionId": "

A unique identifier for the game session to retrieve player sessions for.

", + "FleetAttributes$FleetArn": "

The Amazon Resource Name (ARN) that is assigned to a GameLift fleet resource and uniquely identifies it. ARNs are unique across all Regions. In a GameLift fleet ARN, the resource ID matches the FleetId value.

", + "GameSession$FleetArn": "

The Amazon Resource Name (ARN) associated with the GameLift fleet that this game session is running on.

", + "GameSessionConnectionInfo$GameSessionArn": "

Amazon Resource Name (ARN) that is assigned to a game session and uniquely identifies it.

", + "GameSessionQueue$GameSessionQueueArn": "

Amazon Resource Name (ARN) that is assigned to a GameLift game session queue resource and uniquely identifies it. ARNs are unique across all Regions. In a GameLift game session queue ARN, the resource ID matches the Name value.

", + "GameSessionQueueDestination$DestinationArn": "

The Amazon Resource Name (ARN) that is assigned to fleet or fleet alias. ARNs, which include a fleet ID or alias ID and a Region name, provide a unique identifier across all Regions.

", + "GetGameSessionLogUrlInput$GameSessionId": "

A unique identifier for the game session to get logs for.

", + "PlayerSession$FleetArn": "

The Amazon Resource Name (ARN) associated with the GameLift fleet that the player's game session is running on.

", "QueueArnsList$member": null, - "StartMatchBackfillInput$GameSessionArn": "

Amazon Resource Name (ARN) that is assigned to a game session and uniquely identifies it.

", - "UpdateGameSessionInput$GameSessionId": "

Unique identifier for the game session to update.

" + "ResolveAliasOutput$FleetArn": "

The Amazon Resource Name (ARN) associated with the GameLift fleet resource that this alias points to.

", + "StartMatchBackfillInput$GameSessionArn": "

Amazon Resource Name (ARN) that is assigned to a game session and uniquely identifies it. This is the same as the game session ID.

", + "UpdateGameSessionInput$GameSessionId": "

A unique identifier for the game session to update.

", + "VpcPeeringConnection$FleetArn": "

The Amazon Resource Name (ARN) associated with the GameLift fleet resource for this connection.

" } }, "AttributeValue": { - "base": "

Values for use in Player attribute key:value pairs. This object lets you specify an attribute value using any of the valid data types: string, number, string array, or data map. Each AttributeValue object can use only one of the available properties.

", + "base": "

Values for use in Player attribute key-value pairs. This object lets you specify an attribute value using any of the valid data types: string, number, string array, or data map. Each AttributeValue object can use only one of the available properties.

", "refs": { "PlayerAttributeMap$value": null } @@ -157,46 +172,53 @@ "BackfillMode": { "base": null, "refs": { - "CreateMatchmakingConfigurationInput$BackfillMode": "

Method used to backfill game sessions created with this matchmaking configuration. Specify MANUAL when your game manages backfill requests manually or does not use the match backfill feature. Specify AUTOMATIC to have GameLift create a StartMatchBackfill request whenever a game session has one or more open slots. Learn more about manual and automatic backfill in Backfill Existing Games with FlexMatch.

", - "MatchmakingConfiguration$BackfillMode": "

Method used to backfill game sessions created with this matchmaking configuration. MANUAL indicates that the game makes backfill requests or does not use the match backfill feature. AUTOMATIC indicates that GameLift creates StartMatchBackfill requests whenever a game session has one or more open slots. Learn more about manual and automatic backfill in Backfill Existing Games with FlexMatch.

", - "UpdateMatchmakingConfigurationInput$BackfillMode": "

Method used to backfill game sessions created with this matchmaking configuration. Specify MANUAL when your game manages backfill requests manually or does not use the match backfill feature. Specify AUTOMATIC to have GameLift create a StartMatchBackfill request whenever a game session has one or more open slots. Learn more about manual and automatic backfill in Backfill Existing Games with FlexMatch.

" + "CreateMatchmakingConfigurationInput$BackfillMode": "

The method used to backfill game sessions that are created with this matchmaking configuration. Specify MANUAL when your game manages backfill requests manually or does not use the match backfill feature. Specify AUTOMATIC to have GameLift create a StartMatchBackfill request whenever a game session has one or more open slots. Learn more about manual and automatic backfill in Backfill Existing Games with FlexMatch.

", + "MatchmakingConfiguration$BackfillMode": "

The method used to backfill game sessions created with this matchmaking configuration. MANUAL indicates that the game makes backfill requests or does not use the match backfill feature. AUTOMATIC indicates that GameLift creates StartMatchBackfill requests whenever a game session has one or more open slots. Learn more about manual and automatic backfill in Backfill Existing Games with FlexMatch.

", + "UpdateMatchmakingConfigurationInput$BackfillMode": "

The method that is used to backfill game sessions created with this matchmaking configuration. Specify MANUAL when your game manages backfill requests manually or does not use the match backfill feature. Specify AUTOMATIC to have GameLift create a StartMatchBackfill request whenever a game session has one or more open slots. Learn more about manual and automatic backfill in Backfill Existing Games with FlexMatch.

" } }, "BooleanModel": { "base": null, "refs": { - "CreateMatchmakingConfigurationInput$AcceptanceRequired": "

Flag that determines whether a match that was created with this configuration must be accepted by the matched players. To require acceptance, set to TRUE.

", - "MatchmakingConfiguration$AcceptanceRequired": "

Flag that determines whether a match that was created with this configuration must be accepted by the matched players. To require acceptance, set to TRUE.

", - "UpdateMatchmakingConfigurationInput$AcceptanceRequired": "

Flag that determines whether a match that was created with this configuration must be accepted by the matched players. To require acceptance, set to TRUE.

", - "ValidateMatchmakingRuleSetOutput$Valid": "

Response indicating whether the rule set is valid.

" + "CreateMatchmakingConfigurationInput$AcceptanceRequired": "

A flag that determines whether a match that was created with this configuration must be accepted by the matched players. To require acceptance, set to TRUE.

", + "MatchmakingConfiguration$AcceptanceRequired": "

A flag that indicates whether a match that was created with this configuration must be accepted by the matched players. To require acceptance, set to TRUE.

", + "UpdateMatchmakingConfigurationInput$AcceptanceRequired": "

A flag that indicates whether a match that was created with this configuration must be accepted by the matched players. To require acceptance, set to TRUE.

", + "ValidateMatchmakingRuleSetOutput$Valid": "

A response indicating whether the rule set is valid.

" } }, "Build": { "base": "

Properties describing a custom game build.

Related operations

", "refs": { "BuildList$member": null, - "CreateBuildOutput$Build": "

The newly created build record, including a unique build ID and status.

", + "CreateBuildOutput$Build": "

The newly created build record, including a unique build IDs and status.

", "DescribeBuildOutput$Build": "

Set of properties describing the requested build.

", - "UpdateBuildOutput$Build": "

Object that contains the updated build record.

" + "UpdateBuildOutput$Build": "

The updated build record.

" + } + }, + "BuildArn": { + "base": null, + "refs": { + "Build$BuildArn": "

Amazon Resource Name (ARN) that is assigned to a GameLift build resource and uniquely identifies it. ARNs are unique across all Regions. In a GameLift build ARN, the resource ID matches the BuildId value.

", + "FleetAttributes$BuildArn": "

The Amazon Resource Name (ARN) associated with the GameLift build resource that is deployed on instances in this fleet. In a GameLift build ARN, the resource ID matches the BuildId value.

" } }, "BuildId": { "base": null, "refs": { - "Build$BuildId": "

Unique identifier for a build.

", - "CreateFleetInput$BuildId": "

Unique identifier for a build to be deployed on the new fleet. The custom game server build must have been successfully uploaded to Amazon GameLift and be in a READY status. This fleet setting cannot be changed once the fleet is created.

", - "DeleteBuildInput$BuildId": "

Unique identifier for a build to delete.

", - "DescribeBuildInput$BuildId": "

Unique identifier for a build to retrieve properties for.

", - "FleetAttributes$BuildId": "

Unique identifier for a build.

", - "ListFleetsInput$BuildId": "

Unique identifier for a build to return fleets for. Use this parameter to return only fleets using the specified build. To retrieve all fleets, leave this parameter empty.

", - "RequestUploadCredentialsInput$BuildId": "

Unique identifier for a build to get credentials for.

", - "UpdateBuildInput$BuildId": "

Unique identifier for a build to update.

" + "Build$BuildId": "

A unique identifier for a build.

", + "CreateFleetInput$BuildId": "

A unique identifier for a build to be deployed on the new fleet. You can use either the build ID or ARN value. The custom game server build must have been successfully uploaded to Amazon GameLift and be in a READY status. This fleet setting cannot be changed once the fleet is created.

", + "DeleteBuildInput$BuildId": "

A unique identifier for a build to delete. You can use either the build ID or ARN value.

", + "DescribeBuildInput$BuildId": "

A unique identifier for a build to retrieve properties for. You can use either the build ID or ARN value.

", + "FleetAttributes$BuildId": "

A unique identifier for a build.

", + "ListFleetsInput$BuildId": "

A unique identifier for a build to return fleets for. Use this parameter to return only fleets using the specified build. Use either the build ID or ARN value.To retrieve all fleets, leave this parameter empty.

", + "RequestUploadCredentialsInput$BuildId": "

A unique identifier for a build to get credentials for. You can use either the build ID or ARN value.

", + "UpdateBuildInput$BuildId": "

A unique identifier for a build to update. You can use either the build ID or ARN value.

" } }, "BuildList": { "base": null, "refs": { - "ListBuildsOutput$Builds": "

Collection of build records that match the request.

" + "ListBuildsOutput$Builds": "

A collection of build records that match the request.

" } }, "BuildStatus": { @@ -207,16 +229,16 @@ } }, "CertificateConfiguration": { - "base": null, + "base": "

Information about the use of a TLS/SSL certificate for a fleet. TLS certificate generation is enabled at the fleet level, with one certificate generated for the fleet. When this feature is enabled, the certificate can be retrieved using the GameLift Server SDK call GetInstanceCertificate. All instances in a fleet share the same certificate.

", "refs": { - "CreateFleetInput$CertificateConfiguration": null, - "FleetAttributes$CertificateConfiguration": null + "CreateFleetInput$CertificateConfiguration": "

Indicates whether to generate a TLS/SSL certificate for the new fleet. TLS certificates are used for encrypting traffic between game clients and game servers running on GameLift. If this parameter is not specified, the default value, DISABLED, is used. This fleet setting cannot be changed once the fleet is created. Learn more at Securing Client/Server Communication.

Note: This feature requires the AWS Certificate Manager (ACM) service, which is available in the AWS global partition but not in all other partitions. When working in a partition that does not support this feature, a request for a new fleet with certificate generation results fails with a 4xx unsupported Region error.

Valid values include:

", + "FleetAttributes$CertificateConfiguration": "

Indicates whether a TLS/SSL certificate was generated for the fleet.

" } }, "CertificateType": { "base": null, "refs": { - "CertificateConfiguration$CertificateType": null + "CertificateConfiguration$CertificateType": "

Indicates whether a TLS/SSL certificate was generated for a fleet.

" } }, "ComparisonOperatorType": { @@ -375,7 +397,7 @@ } }, "DeleteGameSessionQueueInput": { - "base": "

Represents the input for a request action.

", + "base": "

Represents the input for a request action.

", "refs": { } }, @@ -669,11 +691,11 @@ "DnsName": { "base": null, "refs": { - "GameSession$DnsName": null, - "GameSessionConnectionInfo$DnsName": null, - "GameSessionPlacement$DnsName": null, - "Instance$DnsName": null, - "PlayerSession$DnsName": null + "GameSession$DnsName": "

DNS identifier assigned to the instance that is running the game session. Values have the following format:

When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.

", + "GameSessionConnectionInfo$DnsName": "

DNS identifier assigned to the instance that is running the game session. Values have the following format:

When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.

", + "GameSessionPlacement$DnsName": "

DNS identifier assigned to the instance that is running the game session. Values have the following format:

When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.

", + "Instance$DnsName": "

DNS identifier assigned to the instance that is running the game session. Values have the following format:

When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.

", + "PlayerSession$DnsName": "

DNS identifier assigned to the instance that is running the game session. Values have the following format:

When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.

" } }, "Double": { @@ -692,13 +714,13 @@ } }, "EC2InstanceCounts": { - "base": "

Current status of fleet capacity. The number of active instances should match or be in the process of matching the number of desired instances. Pending and terminating counts are non-zero only if fleet capacity is adjusting to an UpdateFleetCapacity request, or if access to resources is temporarily affected.

", + "base": "

Current status of fleet capacity. The number of active instances should match or be in the process of matching the number of desired instances. Pending and terminating counts are non-zero only if fleet capacity is adjusting to an UpdateFleetCapacity request, or if access to resources is temporarily affected.

", "refs": { "FleetCapacity$InstanceCounts": "

Current status of fleet capacity.

" } }, "EC2InstanceLimit": { - "base": "

Maximum number of instances allowed based on the Amazon Elastic Compute Cloud (Amazon EC2) instance type. Instance limits can be retrieved by calling DescribeEC2InstanceLimits.

", + "base": "

The maximum number of instances allowed based on the Amazon Elastic Compute Cloud (Amazon EC2) instance type. Instance limits can be retrieved by calling DescribeEC2InstanceLimits.

", "refs": { "EC2InstanceLimitList$member": null } @@ -706,13 +728,13 @@ "EC2InstanceLimitList": { "base": null, "refs": { - "DescribeEC2InstanceLimitsOutput$EC2InstanceLimits": "

Object that contains the maximum number of instances for the specified instance type.

" + "DescribeEC2InstanceLimitsOutput$EC2InstanceLimits": "

The maximum number of instances for the specified instance type.

" } }, "EC2InstanceType": { "base": null, "refs": { - "CreateFleetInput$EC2InstanceType": "

Name of an EC2 instance type that is supported in Amazon GameLift. A fleet instance type determines the computing resources of each instance in the fleet, including CPU, memory, storage, and networking capacity. Amazon GameLift supports the following EC2 instance types. See Amazon EC2 Instance Types for detailed descriptions.

", + "CreateFleetInput$EC2InstanceType": "

The name of an EC2 instance type that is supported in Amazon GameLift. A fleet instance type determines the computing resources of each instance in the fleet, including CPU, memory, storage, and networking capacity. Amazon GameLift supports the following EC2 instance types. See Amazon EC2 Instance Types for detailed descriptions.

", "DescribeEC2InstanceLimitsInput$EC2InstanceType": "

Name of an EC2 instance type that is supported in Amazon GameLift. A fleet instance type determines the computing resources of each instance in the fleet, including CPU, memory, storage, and networking capacity. Amazon GameLift supports the following EC2 instance types. See Amazon EC2 Instance Types for detailed descriptions. Leave this parameter blank to retrieve limits for all types.

", "EC2InstanceLimit$EC2InstanceType": "

Name of an EC2 instance type that is supported in Amazon GameLift. A fleet instance type determines the computing resources of each instance in the fleet, including CPU, memory, storage, and networking capacity. Amazon GameLift supports the following EC2 instance types. See Amazon EC2 Instance Types for detailed descriptions.

", "FleetAttributes$InstanceType": "

EC2 instance type indicating the computing resources of each instance in the fleet, including CPU, memory, storage, and networking capacity. See Amazon EC2 Instance Types for detailed descriptions.

", @@ -729,13 +751,13 @@ "EventCode": { "base": null, "refs": { - "Event$EventCode": "

Type of event being logged. The following events are currently in use:

Fleet creation events:

VPC peering events:

Spot instance events:

Other fleet events:

" + "Event$EventCode": "

The type of event being logged.

Fleet creation events (ordered by fleet creation activity):

VPC peering events:

Spot instance events:

Other fleet events:

" } }, "EventList": { "base": null, "refs": { - "DescribeFleetEventsOutput$Events": "

Collection of objects containing event log entries for the specified fleet.

" + "DescribeFleetEventsOutput$Events": "

A collection of objects containing event log entries for the specified fleet.

" } }, "FleetAction": { @@ -753,7 +775,7 @@ } }, "FleetAttributes": { - "base": "

General properties describing a fleet.

", + "base": "

General properties describing a fleet.

", "refs": { "CreateFleetOutput$FleetAttributes": "

Properties for the newly created fleet.

", "FleetAttributesList$member": null @@ -762,11 +784,11 @@ "FleetAttributesList": { "base": null, "refs": { - "DescribeFleetAttributesOutput$FleetAttributes": "

Collection of objects containing attribute metadata for each requested fleet ID.

" + "DescribeFleetAttributesOutput$FleetAttributes": "

A collection of objects containing attribute metadata for each requested fleet ID.

" } }, "FleetCapacity": { - "base": "

Information about the fleet's capacity. Fleet capacity is measured in EC2 instances. By default, new fleets have a capacity of one instance, but can be updated as needed. The maximum number of instances for a fleet is determined by the fleet's instance type.

", + "base": "

Information about the fleet's capacity. Fleet capacity is measured in EC2 instances. By default, new fleets have a capacity of one instance, but can be updated as needed. The maximum number of instances for a fleet is determined by the fleet's instance type.

", "refs": { "FleetCapacityList$member": null } @@ -779,57 +801,57 @@ "FleetCapacityList": { "base": null, "refs": { - "DescribeFleetCapacityOutput$FleetCapacity": "

Collection of objects containing capacity information for each requested fleet ID. Leave this parameter empty to retrieve capacity information for all fleets.

" + "DescribeFleetCapacityOutput$FleetCapacity": "

A collection of objects containing capacity information for each requested fleet ID. Leave this parameter empty to retrieve capacity information for all fleets.

" } }, "FleetId": { "base": null, "refs": { - "CreateGameSessionInput$FleetId": "

Unique identifier for a fleet to create a game session in. Each request must reference either a fleet ID or alias ID, but not both.

", - "CreateVpcPeeringConnectionInput$FleetId": "

Unique identifier for a fleet. This tells Amazon GameLift which GameLift VPC to peer with.

", - "DeleteFleetInput$FleetId": "

Unique identifier for a fleet to be deleted.

", - "DeleteScalingPolicyInput$FleetId": "

Unique identifier for a fleet to be deleted.

", - "DeleteVpcPeeringConnectionInput$FleetId": "

Unique identifier for a fleet. This value must match the fleet ID referenced in the VPC peering connection record.

", - "DescribeFleetEventsInput$FleetId": "

Unique identifier for a fleet to get event logs for.

", - "DescribeFleetPortSettingsInput$FleetId": "

Unique identifier for a fleet to retrieve port settings for.

", - "DescribeGameSessionDetailsInput$FleetId": "

Unique identifier for a fleet to retrieve all game sessions active on the fleet.

", - "DescribeGameSessionsInput$FleetId": "

Unique identifier for a fleet to retrieve all game sessions for.

", - "DescribeInstancesInput$FleetId": "

Unique identifier for a fleet to retrieve instance information for.

", - "DescribeRuntimeConfigurationInput$FleetId": "

Unique identifier for a fleet to get the run-time configuration for.

", - "DescribeScalingPoliciesInput$FleetId": "

Unique identifier for a fleet to retrieve scaling policies for.

", - "DescribeVpcPeeringConnectionsInput$FleetId": "

Unique identifier for a fleet.

", - "FleetAttributes$FleetId": "

Unique identifier for a fleet.

", - "FleetCapacity$FleetId": "

Unique identifier for a fleet.

", + "CreateGameSessionInput$FleetId": "

A unique identifier for a fleet to create a game session in. You can use either the fleet ID or ARN value. Each request must reference either a fleet ID or alias ID, but not both.

", + "CreateVpcPeeringConnectionInput$FleetId": "

A unique identifier for a fleet. You can use either the fleet ID or ARN value. This tells Amazon GameLift which GameLift VPC to peer with.

", + "DeleteFleetInput$FleetId": "

A unique identifier for a fleet to be deleted. You can use either the fleet ID or ARN value.

", + "DeleteScalingPolicyInput$FleetId": "

A unique identifier for a fleet to be deleted. You can use either the fleet ID or ARN value.

", + "DeleteVpcPeeringConnectionInput$FleetId": "

A unique identifier for a fleet. This fleet specified must match the fleet referenced in the VPC peering connection record. You can use either the fleet ID or ARN value.

", + "DescribeFleetEventsInput$FleetId": "

A unique identifier for a fleet to get event logs for. You can use either the fleet ID or ARN value.

", + "DescribeFleetPortSettingsInput$FleetId": "

A unique identifier for a fleet to retrieve port settings for. You can use either the fleet ID or ARN value.

", + "DescribeGameSessionDetailsInput$FleetId": "

A unique identifier for a fleet to retrieve all game sessions active on the fleet. You can use either the fleet ID or ARN value.

", + "DescribeGameSessionsInput$FleetId": "

A unique identifier for a fleet to retrieve all game sessions for. You can use either the fleet ID or ARN value.

", + "DescribeInstancesInput$FleetId": "

A unique identifier for a fleet to retrieve instance information for. You can use either the fleet ID or ARN value.

", + "DescribeRuntimeConfigurationInput$FleetId": "

A unique identifier for a fleet to get the runtime configuration for. You can use either the fleet ID or ARN value.

", + "DescribeScalingPoliciesInput$FleetId": "

A unique identifier for a fleet to retrieve scaling policies for. You can use either the fleet ID or ARN value.

", + "DescribeVpcPeeringConnectionsInput$FleetId": "

A unique identifier for a fleet. You can use either the fleet ID or ARN value.

", + "FleetAttributes$FleetId": "

A unique identifier for a fleet.

", + "FleetCapacity$FleetId": "

A unique identifier for a fleet.

", "FleetIdList$member": null, - "FleetUtilization$FleetId": "

Unique identifier for a fleet.

", - "GameSession$FleetId": "

Unique identifier for a fleet that the game session is running on.

", - "GetInstanceAccessInput$FleetId": "

Unique identifier for a fleet that contains the instance you want access to. The fleet can be in any of the following statuses: ACTIVATING, ACTIVE, or ERROR. Fleets with an ERROR status may be accessible for a short time before they are deleted.

", - "Instance$FleetId": "

Unique identifier for a fleet that the instance is in.

", - "InstanceAccess$FleetId": "

Unique identifier for a fleet containing the instance being accessed.

", - "PlayerSession$FleetId": "

Unique identifier for a fleet that the player's game session is running on.

", - "PutScalingPolicyInput$FleetId": "

Unique identifier for a fleet to apply this policy to. The fleet cannot be in any of the following statuses: ERROR or DELETING.

", - "ResolveAliasOutput$FleetId": "

Fleet identifier that is associated with the requested alias.

", - "RoutingStrategy$FleetId": "

Unique identifier for a fleet that the alias points to.

", - "ScalingPolicy$FleetId": "

Unique identifier for a fleet that is associated with this scaling policy.

", - "SearchGameSessionsInput$FleetId": "

Unique identifier for a fleet to search for active game sessions. Each request must reference either a fleet ID or alias ID, but not both.

", - "StartFleetActionsInput$FleetId": "

Unique identifier for a fleet

", - "StopFleetActionsInput$FleetId": "

Unique identifier for a fleet

", - "UpdateFleetAttributesInput$FleetId": "

Unique identifier for a fleet to update attribute metadata for.

", - "UpdateFleetAttributesOutput$FleetId": "

Unique identifier for a fleet that was updated.

", - "UpdateFleetCapacityInput$FleetId": "

Unique identifier for a fleet to update capacity for.

", - "UpdateFleetCapacityOutput$FleetId": "

Unique identifier for a fleet that was updated.

", - "UpdateFleetPortSettingsInput$FleetId": "

Unique identifier for a fleet to update port settings for.

", - "UpdateFleetPortSettingsOutput$FleetId": "

Unique identifier for a fleet that was updated.

", - "UpdateRuntimeConfigurationInput$FleetId": "

Unique identifier for a fleet to update run-time configuration for.

", - "VpcPeeringConnection$FleetId": "

Unique identifier for a fleet. This ID determines the ID of the Amazon GameLift VPC for your fleet.

" + "FleetUtilization$FleetId": "

A unique identifier for a fleet.

", + "GameSession$FleetId": "

A unique identifier for a fleet that the game session is running on.

", + "GetInstanceAccessInput$FleetId": "

A unique identifier for a fleet that contains the instance you want access to. You can use either the fleet ID or ARN value. The fleet can be in any of the following statuses: ACTIVATING, ACTIVE, or ERROR. Fleets with an ERROR status may be accessible for a short time before they are deleted.

", + "Instance$FleetId": "

A unique identifier for a fleet that the instance is in.

", + "InstanceAccess$FleetId": "

A unique identifier for a fleet containing the instance being accessed.

", + "PlayerSession$FleetId": "

A unique identifier for a fleet that the player's game session is running on.

", + "PutScalingPolicyInput$FleetId": "

A unique identifier for a fleet to apply this policy to. You can use either the fleet ID or ARN value. The fleet cannot be in any of the following statuses: ERROR or DELETING.

", + "ResolveAliasOutput$FleetId": "

The fleet identifier that the alias is pointing to.

", + "RoutingStrategy$FleetId": "

The unique identifier for a fleet that the alias points to. This value is the fleet ID, not the fleet ARN.

", + "ScalingPolicy$FleetId": "

A unique identifier for a fleet that is associated with this scaling policy.

", + "SearchGameSessionsInput$FleetId": "

A unique identifier for a fleet to search for active game sessions. You can use either the fleet ID or ARN value. Each request must reference either a fleet ID or alias ID, but not both.

", + "StartFleetActionsInput$FleetId": "

A unique identifier for a fleet to start actions on. You can use either the fleet ID or ARN value.

", + "StopFleetActionsInput$FleetId": "

A unique identifier for a fleet to stop actions on. You can use either the fleet ID or ARN value.

", + "UpdateFleetAttributesInput$FleetId": "

A unique identifier for a fleet to update attribute metadata for. You can use either the fleet ID or ARN value.

", + "UpdateFleetAttributesOutput$FleetId": "

A unique identifier for a fleet that was updated. Use either the fleet ID or ARN value.

", + "UpdateFleetCapacityInput$FleetId": "

A unique identifier for a fleet to update capacity for. You can use either the fleet ID or ARN value.

", + "UpdateFleetCapacityOutput$FleetId": "

A unique identifier for a fleet that was updated.

", + "UpdateFleetPortSettingsInput$FleetId": "

A unique identifier for a fleet to update port settings for. You can use either the fleet ID or ARN value.

", + "UpdateFleetPortSettingsOutput$FleetId": "

A unique identifier for a fleet that was updated.

", + "UpdateRuntimeConfigurationInput$FleetId": "

A unique identifier for a fleet to update runtime configuration for. You can use either the fleet ID or ARN value.

", + "VpcPeeringConnection$FleetId": "

A unique identifier for a fleet. This ID determines the ID of the Amazon GameLift VPC for your fleet.

" } }, "FleetIdList": { "base": null, "refs": { - "DescribeFleetAttributesInput$FleetIds": "

Unique identifier for a fleet(s) to retrieve attributes for. To request attributes for all fleets, leave this parameter empty.

", - "DescribeFleetCapacityInput$FleetIds": "

Unique identifier for a fleet(s) to retrieve capacity information for. To request capacity information for all fleets, leave this parameter empty.

", - "DescribeFleetUtilizationInput$FleetIds": "

Unique identifier for a fleet(s) to retrieve utilization data for. To request utilization data for all fleets, leave this parameter empty.

", + "DescribeFleetAttributesInput$FleetIds": "

A unique identifier for a fleet(s) to retrieve attributes for. You can use either the fleet ID or ARN value.

", + "DescribeFleetCapacityInput$FleetIds": "

A unique identifier for a fleet(s) to retrieve capacity information for. You can use either the fleet ID or ARN value.

", + "DescribeFleetUtilizationInput$FleetIds": "

A unique identifier for a fleet(s) to retrieve utilization data for. You can use either the fleet ID or ARN value.

", "ListFleetsOutput$FleetIds": "

Set of fleet IDs matching the list request. You can retrieve additional information about all returned fleets by passing this result set to a call to DescribeFleetAttributes, DescribeFleetCapacity, or DescribeFleetUtilization.

" } }, @@ -842,12 +864,12 @@ "FleetType": { "base": null, "refs": { - "CreateFleetInput$FleetType": "

Indicates whether to use on-demand instances or spot instances for this fleet. If empty, the default is ON_DEMAND. Both categories of instances use identical hardware and configurations based on the instance type selected for this fleet. Learn more about On-Demand versus Spot Instances.

", + "CreateFleetInput$FleetType": "

Indicates whether to use On-Demand instances or Spot instances for this fleet. If empty, the default is ON_DEMAND. Both categories of instances use identical hardware and configurations based on the instance type selected for this fleet. Learn more about On-Demand versus Spot Instances.

", "FleetAttributes$FleetType": "

Indicates whether the fleet uses on-demand or spot instances. A spot instance in use may be interrupted with a two-minute notification.

" } }, "FleetUtilization": { - "base": "

Current status of fleet utilization, including the number of game and player sessions being hosted.

", + "base": "

Current status of fleet utilization, including the number of game and player sessions being hosted.

", "refs": { "FleetUtilizationList$member": null } @@ -855,26 +877,26 @@ "FleetUtilizationList": { "base": null, "refs": { - "DescribeFleetUtilizationOutput$FleetUtilization": "

Collection of objects containing utilization information for each requested fleet ID.

" + "DescribeFleetUtilizationOutput$FleetUtilization": "

A collection of objects containing utilization information for each requested fleet ID.

" } }, "Float": { "base": null, "refs": { - "PlayerLatency$LatencyInMilliseconds": "

Amount of time that represents the time lag experienced by the player when connected to the specified region.

" + "PlayerLatency$LatencyInMilliseconds": "

Amount of time that represents the time lag experienced by the player when connected to the specified Region.

" } }, "FreeText": { "base": null, "refs": { - "Alias$Description": "

Human-readable description of an alias.

", - "Build$Name": "

Descriptive label that is associated with a build. Build names do not need to be unique. It can be set using CreateBuild or UpdateBuild.

", - "Build$Version": "

Version that is associated with a build or script. Version strings do not need to be unique. This value can be set using CreateBuild or UpdateBuild.

", - "RoutingStrategy$Message": "

Message text to be used with a terminal routing strategy.

" + "Alias$Description": "

A human-readable description of an alias.

", + "Build$Name": "

A descriptive label that is associated with a build. Build names do not need to be unique. It can be set using CreateBuild or UpdateBuild.

", + "Build$Version": "

Version information that is associated with a build or script. Version strings do not need to be unique. This value can be set using CreateBuild or UpdateBuild.

", + "RoutingStrategy$Message": "

The message text to be used with a terminal routing strategy.

" } }, "GameProperty": { - "base": "

Set of key-value pairs that contain information about a game session. When included in a game session request, these properties communicate details to be used when setting up the new game session, such as to specify a game mode, level, or map. Game properties are passed to the game server process when initiating a new game session; the server process uses the properties as appropriate. For more information, see the Amazon GameLift Developer Guide.

", + "base": "

Set of key-value pairs that contain information about a game session. When included in a game session request, these properties communicate details to be used when setting up the new game session. For example, a game property might specify a game mode, level, or map. Game properties are passed to the game server process when initiating a new game session. For more information, see the Amazon GameLift Developer Guide.

", "refs": { "GamePropertyList$member": null } @@ -882,25 +904,25 @@ "GamePropertyKey": { "base": null, "refs": { - "GameProperty$Key": "

Game property identifier.

" + "GameProperty$Key": "

The game property identifier.

" } }, "GamePropertyList": { "base": null, "refs": { "CreateGameSessionInput$GameProperties": "

Set of custom properties for a game session, formatted as key:value pairs. These properties are passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session).

", - "CreateMatchmakingConfigurationInput$GameProperties": "

Set of custom properties for a game session, formatted as key:value pairs. These properties are passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session). This information is added to the new GameSession object that is created for a successful match.

", + "CreateMatchmakingConfigurationInput$GameProperties": "

A set of custom properties for a game session, formatted as key-value pairs. These properties are passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session). This information is added to the new GameSession object that is created for a successful match.

", "GameSession$GameProperties": "

Set of custom properties for a game session, formatted as key:value pairs. These properties are passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session). You can search for active game sessions based on this custom data with SearchGameSessions.

", "GameSessionPlacement$GameProperties": "

Set of custom properties for a game session, formatted as key:value pairs. These properties are passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session).

", - "MatchmakingConfiguration$GameProperties": "

Set of custom properties for a game session, formatted as key:value pairs. These properties are passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session). This information is added to the new GameSession object that is created for a successful match.

", + "MatchmakingConfiguration$GameProperties": "

A set of custom properties for a game session, formatted as key-value pairs. These properties are passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session). This information is added to the new GameSession object that is created for a successful match.

", "StartGameSessionPlacementInput$GameProperties": "

Set of custom properties for a game session, formatted as key:value pairs. These properties are passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session).

", - "UpdateMatchmakingConfigurationInput$GameProperties": "

Set of custom properties for a game session, formatted as key:value pairs. These properties are passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session). This information is added to the new GameSession object that is created for a successful match.

" + "UpdateMatchmakingConfigurationInput$GameProperties": "

A set of custom properties for a game session, formatted as key-value pairs. These properties are passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session). This information is added to the new GameSession object that is created for a successful match.

" } }, "GamePropertyValue": { "base": null, "refs": { - "GameProperty$Value": "

Game property value.

" + "GameProperty$Value": "

The game property value.

" } }, "GameSession": { @@ -909,13 +931,13 @@ "CreateGameSessionOutput$GameSession": "

Object that describes the newly created game session record.

", "GameSessionDetail$GameSession": "

Object that describes a game session.

", "GameSessionList$member": null, - "UpdateGameSessionOutput$GameSession": "

Object that contains the updated game session metadata.

" + "UpdateGameSessionOutput$GameSession": "

The updated game session metadata.

" } }, "GameSessionActivationTimeoutSeconds": { "base": null, "refs": { - "RuntimeConfiguration$GameSessionActivationTimeoutSeconds": "

Maximum amount of time (in seconds) that a game session can remain in status ACTIVATING. If the game session is not active before the timeout, activation is terminated and the game session status is changed to TERMINATED.

" + "RuntimeConfiguration$GameSessionActivationTimeoutSeconds": "

The maximum amount of time (in seconds) that a game session can remain in status ACTIVATING. If the game session is not active before the timeout, activation is terminated and the game session status is changed to TERMINATED.

" } }, "GameSessionConnectionInfo": { @@ -928,12 +950,12 @@ "base": null, "refs": { "CreateGameSessionInput$GameSessionData": "

Set of custom game session properties, formatted as a single string value. This data is passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session).

", - "CreateMatchmakingConfigurationInput$GameSessionData": "

Set of custom game session properties, formatted as a single string value. This data is passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session). This information is added to the new GameSession object that is created for a successful match.

", + "CreateMatchmakingConfigurationInput$GameSessionData": "

A set of custom game session properties, formatted as a single string value. This data is passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session). This information is added to the new GameSession object that is created for a successful match.

", "GameSession$GameSessionData": "

Set of custom game session properties, formatted as a single string value. This data is passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session).

", "GameSessionPlacement$GameSessionData": "

Set of custom game session properties, formatted as a single string value. This data is passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session).

", - "MatchmakingConfiguration$GameSessionData": "

Set of custom game session properties, formatted as a single string value. This data is passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session). This information is added to the new GameSession object that is created for a successful match.

", + "MatchmakingConfiguration$GameSessionData": "

A set of custom game session properties, formatted as a single string value. This data is passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session). This information is added to the new GameSession object that is created for a successful match.

", "StartGameSessionPlacementInput$GameSessionData": "

Set of custom game session properties, formatted as a single string value. This data is passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session).

", - "UpdateMatchmakingConfigurationInput$GameSessionData": "

Set of custom game session properties, formatted as a single string value. This data is passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session). This information is added to the new GameSession object that is created for a successful match.

" + "UpdateMatchmakingConfigurationInput$GameSessionData": "

A set of custom game session properties, formatted as a single string value. This data is passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session). This information is added to the new GameSession object that is created for a successful match.

" } }, "GameSessionDetail": { @@ -945,7 +967,7 @@ "GameSessionDetailList": { "base": null, "refs": { - "DescribeGameSessionDetailsOutput$GameSessionDetails": "

Collection of objects containing game session properties and the protection policy currently in force for each session matching the request.

" + "DescribeGameSessionDetailsOutput$GameSessionDetails": "

A collection of objects containing game session properties and the protection policy currently in force for each session matching the request.

" } }, "GameSessionFullException": { @@ -956,8 +978,8 @@ "GameSessionList": { "base": null, "refs": { - "DescribeGameSessionsOutput$GameSessions": "

Collection of objects containing game session properties for each session matching the request.

", - "SearchGameSessionsOutput$GameSessions": "

Collection of objects containing game session properties for each session matching the request.

" + "DescribeGameSessionsOutput$GameSessions": "

A collection of objects containing game session properties for each session matching the request.

", + "SearchGameSessionsOutput$GameSessions": "

A collection of objects containing game session properties for each session matching the request.

" } }, "GameSessionPlacement": { @@ -971,19 +993,19 @@ "GameSessionPlacementState": { "base": null, "refs": { - "GameSessionPlacement$Status": "

Current status of the game session placement request.

" + "GameSessionPlacement$Status": "

Current status of the game session placement request.

" } }, "GameSessionQueue": { "base": "

Configuration of a queue that is used to process game session placement requests. The queue configuration identifies several game features:

", "refs": { - "CreateGameSessionQueueOutput$GameSessionQueue": "

Object that describes the newly created game session queue.

", + "CreateGameSessionQueueOutput$GameSessionQueue": "

An object that describes the newly created game session queue.

", "GameSessionQueueList$member": null, - "UpdateGameSessionQueueOutput$GameSessionQueue": "

Object that describes the newly updated game session queue.

" + "UpdateGameSessionQueueOutput$GameSessionQueue": "

An object that describes the newly updated game session queue.

" } }, "GameSessionQueueDestination": { - "base": "

Fleet designated in a game session queue. Requests for new game sessions in the queue are fulfilled by starting a new game session on any destination configured for a queue.

", + "base": "

Fleet designated in a game session queue. Requests for new game sessions in the queue are fulfilled by starting a new game session on any destination that is configured for a queue.

", "refs": { "GameSessionQueueDestinationList$member": null } @@ -991,33 +1013,33 @@ "GameSessionQueueDestinationList": { "base": null, "refs": { - "CreateGameSessionQueueInput$Destinations": "

List of fleets that can be used to fulfill game session placement requests in the queue. Fleets are identified by either a fleet ARN or a fleet alias ARN. Destinations are listed in default preference order.

", - "GameSessionQueue$Destinations": "

List of fleets that can be used to fulfill game session placement requests in the queue. Fleets are identified by either a fleet ARN or a fleet alias ARN. Destinations are listed in default preference order.

", - "UpdateGameSessionQueueInput$Destinations": "

List of fleets that can be used to fulfill game session placement requests in the queue. Fleets are identified by either a fleet ARN or a fleet alias ARN. Destinations are listed in default preference order. When updating this list, provide a complete list of destinations.

" + "CreateGameSessionQueueInput$Destinations": "

A list of fleets that can be used to fulfill game session placement requests in the queue. Fleets are identified by either a fleet ARN or a fleet alias ARN. Destinations are listed in default preference order.

", + "GameSessionQueue$Destinations": "

A list of fleets that can be used to fulfill game session placement requests in the queue. Fleets are identified by either a fleet ARN or a fleet alias ARN. Destinations are listed in default preference order.

", + "UpdateGameSessionQueueInput$Destinations": "

A list of fleets that can be used to fulfill game session placement requests in the queue. Fleets are identified by either a fleet ARN or a fleet alias ARN. Destinations are listed in default preference order. When updating this list, provide a complete list of destinations.

" } }, "GameSessionQueueList": { "base": null, "refs": { - "DescribeGameSessionQueuesOutput$GameSessionQueues": "

Collection of objects that describes the requested game session queues.

" + "DescribeGameSessionQueuesOutput$GameSessionQueues": "

A collection of objects that describe the requested game session queues.

" } }, "GameSessionQueueName": { "base": null, "refs": { - "CreateGameSessionQueueInput$Name": "

Descriptive label that is associated with game session queue. Queue names must be unique within each region.

", - "DeleteGameSessionQueueInput$Name": "

Descriptive label that is associated with game session queue. Queue names must be unique within each region.

", - "GameSessionPlacement$GameSessionQueueName": "

Descriptive label that is associated with game session queue. Queue names must be unique within each region.

", - "GameSessionQueue$Name": "

Descriptive label that is associated with game session queue. Queue names must be unique within each region.

", + "CreateGameSessionQueueInput$Name": "

A descriptive label that is associated with game session queue. Queue names must be unique within each Region.

", + "DeleteGameSessionQueueInput$Name": "

A descriptive label that is associated with game session queue. Queue names must be unique within each Region. You can use either the queue ID or ARN value.

", + "GameSessionPlacement$GameSessionQueueName": "

A descriptive label that is associated with game session queue. Queue names must be unique within each Region.

", + "GameSessionQueue$Name": "

A descriptive label that is associated with game session queue. Queue names must be unique within each Region.

", "GameSessionQueueNameList$member": null, - "StartGameSessionPlacementInput$GameSessionQueueName": "

Name of the queue to use to place the new game session.

", - "UpdateGameSessionQueueInput$Name": "

Descriptive label that is associated with game session queue. Queue names must be unique within each region.

" + "StartGameSessionPlacementInput$GameSessionQueueName": "

Name of the queue to use to place the new game session. You can use either the qieue name or ARN value.

", + "UpdateGameSessionQueueInput$Name": "

A descriptive label that is associated with game session queue. Queue names must be unique within each Region. You can use either the queue ID or ARN value.

" } }, "GameSessionQueueNameList": { "base": null, "refs": { - "DescribeGameSessionQueuesInput$Names": "

List of queue names to retrieve information for. To request settings for all queues, leave this parameter empty.

" + "DescribeGameSessionQueuesInput$Names": "

A list of queue names to retrieve information for. You can use either the queue ID or ARN value. To request settings for all queues, leave this parameter empty.

" } }, "GameSessionStatus": { @@ -1057,10 +1079,10 @@ "refs": { "CreateGameSessionInput$GameSessionId": "

This parameter is no longer preferred. Please use IdempotencyToken instead. Custom string that uniquely identifies a request for a new game session. Maximum token length is 48 characters. If provided, this string is included in the new game session's ID. (A game session ARN has the following format: arn:aws:gamelift:<region>::gamesession/<fleet ID>/<custom ID string or idempotency token>.)

", "CreateGameSessionInput$IdempotencyToken": "

Custom string that uniquely identifies a request for a new game session. Maximum token length is 48 characters. If provided, this string is included in the new game session's ID. (A game session ARN has the following format: arn:aws:gamelift:<region>::gamesession/<fleet ID>/<custom ID string or idempotency token>.) Idempotency tokens remain in use for 30 days after a game session has ended; game session objects are retained for this time period and then deleted.

", - "DescribeGameSessionPlacementInput$PlacementId": "

Unique identifier for a game session placement to retrieve.

", - "GameSessionPlacement$PlacementId": "

Unique identifier for a game session placement.

", - "StartGameSessionPlacementInput$PlacementId": "

Unique identifier to assign to the new game session placement. This value is developer-defined. The value must be unique across all regions and cannot be reused unless you are resubmitting a canceled or timed-out placement request.

", - "StopGameSessionPlacementInput$PlacementId": "

Unique identifier for a game session placement to cancel.

" + "DescribeGameSessionPlacementInput$PlacementId": "

A unique identifier for a game session placement to retrieve.

", + "GameSessionPlacement$PlacementId": "

A unique identifier for a game session placement.

", + "StartGameSessionPlacementInput$PlacementId": "

A unique identifier to assign to the new game session placement. This value is developer-defined. The value must be unique across all Regions and cannot be reused unless you are resubmitting a canceled or timed-out placement request.

", + "StopGameSessionPlacementInput$PlacementId": "

A unique identifier for a game session placement to cancel.

" } }, "IdempotentParameterMismatchException": { @@ -1077,7 +1099,7 @@ "InstanceAccess": { "base": "

Information required to remotely connect to a fleet instance. Access is requested by calling GetInstanceAccess.

", "refs": { - "GetInstanceAccessOutput$InstanceAccess": "

Object that contains connection information for a fleet instance, including IP address and access credentials.

" + "GetInstanceAccessOutput$InstanceAccess": "

The connection information for a fleet instance, including IP address and access credentials.

" } }, "InstanceCredentials": { @@ -1089,16 +1111,16 @@ "InstanceId": { "base": null, "refs": { - "DescribeInstancesInput$InstanceId": "

Unique identifier for an instance to retrieve. Specify an instance ID or leave blank to retrieve all instances in the fleet.

", - "GetInstanceAccessInput$InstanceId": "

Unique identifier for an instance you want to get access to. You can access an instance in any status.

", - "Instance$InstanceId": "

Unique identifier for an instance.

", - "InstanceAccess$InstanceId": "

Unique identifier for an instance being accessed.

" + "DescribeInstancesInput$InstanceId": "

A unique identifier for an instance to retrieve. Specify an instance ID or leave blank to retrieve all instances in the fleet.

", + "GetInstanceAccessInput$InstanceId": "

A unique identifier for an instance you want to get access to. You can access an instance in any status.

", + "Instance$InstanceId": "

A unique identifier for an instance.

", + "InstanceAccess$InstanceId": "

A unique identifier for an instance being accessed.

" } }, "InstanceList": { "base": null, "refs": { - "DescribeInstancesOutput$Instances": "

Collection of objects containing properties for each instance returned.

" + "DescribeInstancesOutput$Instances": "

A collection of objects containing properties for each instance returned.

" } }, "InstanceStatus": { @@ -1137,15 +1159,15 @@ "IpAddress": { "base": null, "refs": { - "GameSession$IpAddress": "

IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.

", - "GameSessionPlacement$IpAddress": "

IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number. This value is set once the new game session is placed (placement status is FULFILLED).

", - "Instance$IpAddress": "

IP address assigned to the instance.

", - "InstanceAccess$IpAddress": "

IP address assigned to the instance.

", - "PlayerSession$IpAddress": "

IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.

" + "GameSession$IpAddress": "

IP address of the instance that is running the game session. When connecting to a Amazon GameLift game server, a client needs to reference an IP address (or DNS name) and port number.

", + "GameSessionPlacement$IpAddress": "

IP address of the instance that is running the game session. When connecting to a Amazon GameLift game server, a client needs to reference an IP address (or DNS name) and port number. This value is set once the new game session is placed (placement status is FULFILLED).

", + "Instance$IpAddress": "

IP address that is assigned to the instance.

", + "InstanceAccess$IpAddress": "

IP address that is assigned to the instance.

", + "PlayerSession$IpAddress": "

IP address of the instance that is running the game session. When connecting to a Amazon GameLift game server, a client needs to reference an IP address (or DNS name) and port number.

" } }, "IpPermission": { - "base": "

A range of IP addresses and port settings that allow inbound traffic to connect to server processes on an Amazon GameLift. New game sessions that are started on the fleet are assigned an IP address/port number combination, which must fall into the fleet's allowed ranges. For fleets created with a custom game server, the ranges reflect the server's game session assignments. For Realtime Servers fleets, Amazon GameLift automatically opens two port ranges, one for TCP messaging and one for UDP for use by the Realtime servers.

", + "base": "

A range of IP addresses and port settings that allow inbound traffic to connect to server processes on an Amazon GameLift hosting resource. New game sessions that are started on the fleet are assigned an IP address/port number combination, which must fall into the fleet's allowed ranges. For fleets created with a custom game server, the ranges reflect the server's game session assignments. For Realtime Servers fleets, Amazon GameLift automatically opens two port ranges, one for TCP messaging and one for UDP for use by the Realtime servers.

", "refs": { "IpPermissionsList$member": null } @@ -1153,22 +1175,22 @@ "IpPermissionsList": { "base": null, "refs": { - "CreateFleetInput$EC2InboundPermissions": "

Range of IP addresses and port settings that permit inbound traffic to access game sessions that running on the fleet. For fleets using a custom game build, this parameter is required before game sessions running on the fleet can accept connections. For Realtime Servers fleets, Amazon GameLift automatically sets TCP and UDP ranges for use by the Realtime servers. You can specify multiple permission settings or add more by updating the fleet.

", - "DescribeFleetPortSettingsOutput$InboundPermissions": "

Object that contains port settings for the requested fleet ID.

", - "UpdateFleetPortSettingsInput$InboundPermissionAuthorizations": "

Collection of port settings to be added to the fleet record.

", - "UpdateFleetPortSettingsInput$InboundPermissionRevocations": "

Collection of port settings to be removed from the fleet record.

" + "CreateFleetInput$EC2InboundPermissions": "

Range of IP addresses and port settings that permit inbound traffic to access game sessions that are running on the fleet. For fleets using a custom game build, this parameter is required before game sessions running on the fleet can accept connections. For Realtime Servers fleets, Amazon GameLift automatically sets TCP and UDP ranges for use by the Realtime servers. You can specify multiple permission settings or add more by updating the fleet.

", + "DescribeFleetPortSettingsOutput$InboundPermissions": "

The port settings for the requested fleet ID.

", + "UpdateFleetPortSettingsInput$InboundPermissionAuthorizations": "

A collection of port settings to be added to the fleet record.

", + "UpdateFleetPortSettingsInput$InboundPermissionRevocations": "

A collection of port settings to be removed from the fleet record.

" } }, "IpProtocol": { "base": null, "refs": { - "IpPermission$Protocol": "

Network communication protocol used by the fleet.

" + "IpPermission$Protocol": "

The network communication protocol used by the fleet.

" } }, "LatencyMap": { "base": null, "refs": { - "Player$LatencyInMs": "

Set of values, expressed in milliseconds, indicating the amount of latency that a player experiences when connected to AWS regions. If this property is present, FlexMatch considers placing the match only in regions for which latency is reported.

If a matchmaker has a rule that evaluates player latency, players must report latency in order to be matched. If no latency is reported in this scenario, FlexMatch assumes that no regions are available to the player and the ticket is not matchable.

" + "Player$LatencyInMs": "

Set of values, expressed in milliseconds, indicating the amount of latency that a player experiences when connected to AWS Regions. If this property is present, FlexMatch considers placing the match only in Regions for which latency is reported.

If a matchmaker has a rule that evaluates player latency, players must report latency in order to be matched. If no latency is reported in this scenario, FlexMatch assumes that no Regions are available to the player and the ticket is not matchable.

" } }, "LimitExceededException": { @@ -1216,6 +1238,16 @@ "refs": { } }, + "ListTagsForResourceRequest": { + "base": null, + "refs": { + } + }, + "ListTagsForResourceResponse": { + "base": null, + "refs": { + } + }, "MatchedPlayerSession": { "base": "

Represents a new player session that is created as a result of a successful FlexMatch match. A successful match automatically creates new player sessions for every player ID in the original matchmaking request.

When players connect to the match's game session, they must include both player ID and player session ID in order to claim their assigned player slot.

", "refs": { @@ -1225,7 +1257,7 @@ "MatchedPlayerSessionList": { "base": null, "refs": { - "GameSessionConnectionInfo$MatchedPlayerSessions": "

Collection of player session IDs, one for each player ID that was included in the original matchmaking request.

" + "GameSessionConnectionInfo$MatchedPlayerSessions": "

A collection of player session IDs, one for each player ID that was included in the original matchmaking request.

" } }, "MatchmakerData": { @@ -1238,9 +1270,9 @@ "MatchmakingAcceptanceTimeoutInteger": { "base": null, "refs": { - "CreateMatchmakingConfigurationInput$AcceptanceTimeoutSeconds": "

Length of time (in seconds) to wait for players to accept a proposed match. If any player rejects the match or fails to accept before the timeout, the ticket continues to look for an acceptable match.

", - "MatchmakingConfiguration$AcceptanceTimeoutSeconds": "

Length of time (in seconds) to wait for players to accept a proposed match. If any player rejects the match or fails to accept before the timeout, the ticket continues to look for an acceptable match.

", - "UpdateMatchmakingConfigurationInput$AcceptanceTimeoutSeconds": "

Length of time (in seconds) to wait for players to accept a proposed match. If any player rejects the match or fails to accept before the timeout, the ticket continues to look for an acceptable match.

" + "CreateMatchmakingConfigurationInput$AcceptanceTimeoutSeconds": "

The length of time (in seconds) to wait for players to accept a proposed match. If any player rejects the match or fails to accept before the timeout, the ticket continues to look for an acceptable match.

", + "MatchmakingConfiguration$AcceptanceTimeoutSeconds": "

The length of time (in seconds) to wait for players to accept a proposed match. If any player rejects the match or fails to accept before the timeout, the ticket continues to look for an acceptable match.

", + "UpdateMatchmakingConfigurationInput$AcceptanceTimeoutSeconds": "

The length of time (in seconds) to wait for players to accept a proposed match. If any player rejects the match or fails to accept before the timeout, the ticket continues to look for an acceptable match.

" } }, "MatchmakingConfiguration": { @@ -1248,13 +1280,36 @@ "refs": { "CreateMatchmakingConfigurationOutput$Configuration": "

Object that describes the newly created matchmaking configuration.

", "MatchmakingConfigurationList$member": null, - "UpdateMatchmakingConfigurationOutput$Configuration": "

Object that describes the updated matchmaking configuration.

" + "UpdateMatchmakingConfigurationOutput$Configuration": "

The updated matchmaking configuration.

" + } + }, + "MatchmakingConfigurationArn": { + "base": "Data type used for Matchmaking Configuration ARN.", + "refs": { + "MatchmakingConfiguration$ConfigurationArn": "

Amazon Resource Name (ARN) that is assigned to a GameLift matchmaking configuration resource and uniquely identifies it. ARNs are unique across all Regions. In a GameLift configuration ARN, the resource ID matches the Name value.

", + "MatchmakingTicket$ConfigurationArn": "

The Amazon Resource Name (ARN) associated with the GameLift matchmaking configuration resource that is used with this ticket.

" } }, "MatchmakingConfigurationList": { "base": null, "refs": { - "DescribeMatchmakingConfigurationsOutput$Configurations": "

Collection of requested matchmaking configuration objects.

" + "DescribeMatchmakingConfigurationsOutput$Configurations": "

A collection of requested matchmaking configurations.

" + } + }, + "MatchmakingConfigurationName": { + "base": null, + "refs": { + "DeleteMatchmakingConfigurationInput$Name": "

A unique identifier for a matchmaking configuration. You can use either the configuration name or ARN value.

", + "MatchmakingConfigurationNameList$member": null, + "StartMatchBackfillInput$ConfigurationName": "

Name of the matchmaker to use for this request. You can use either the configuration name or ARN value. The ARN of the matchmaker that was used with the original game session is listed in the GameSession object, MatchmakerData property.

", + "StartMatchmakingInput$ConfigurationName": "

Name of the matchmaking configuration to use for this request. Matchmaking configurations must exist in the same Region as this request. You can use either the configuration name or ARN value.

", + "UpdateMatchmakingConfigurationInput$Name": "

A unique identifier for a matchmaking configuration to update. You can use either the configuration name or ARN value.

" + } + }, + "MatchmakingConfigurationNameList": { + "base": null, + "refs": { + "DescribeMatchmakingConfigurationsInput$Names": "

A unique identifier for a matchmaking configuration(s) to retrieve. You can use either the configuration name or ARN value. To request all existing configurations, leave this parameter empty.

" } }, "MatchmakingConfigurationStatus": { @@ -1266,61 +1321,68 @@ "MatchmakingIdList": { "base": null, "refs": { - "DescribeMatchmakingConfigurationsInput$Names": "

Unique identifier for a matchmaking configuration(s) to retrieve. To request all existing configurations, leave this parameter empty.

", - "DescribeMatchmakingInput$TicketIds": "

Unique identifier for a matchmaking ticket. You can include up to 10 ID values.

" + "DescribeMatchmakingInput$TicketIds": "

A unique identifier for a matchmaking ticket. You can include up to 10 ID values.

" } }, "MatchmakingIdStringModel": { "base": null, "refs": { - "AcceptMatchInput$TicketId": "

Unique identifier for a matchmaking ticket. The ticket must be in status REQUIRES_ACCEPTANCE; otherwise this request will fail.

", - "CreateMatchmakingConfigurationInput$Name": "

Unique identifier for a matchmaking configuration. This name is used to identify the configuration associated with a matchmaking request or ticket.

", - "CreateMatchmakingConfigurationInput$RuleSetName": "

Unique identifier for a matchmaking rule set to use with this configuration. A matchmaking configuration can only use rule sets that are defined in the same region.

", - "CreateMatchmakingRuleSetInput$Name": "

Unique identifier for a matchmaking rule set. A matchmaking configuration identifies the rule set it uses by this name value. (Note: The rule set name is different from the optional \"name\" field in the rule set body.)

", - "DeleteMatchmakingConfigurationInput$Name": "

Unique identifier for a matchmaking configuration

", - "DeleteMatchmakingRuleSetInput$Name": "

Unique identifier for a matchmaking rule set to be deleted. (Note: The rule set name is different from the optional \"name\" field in the rule set body.)

", - "DescribeMatchmakingConfigurationsInput$RuleSetName": "

Unique identifier for a matchmaking rule set. Use this parameter to retrieve all matchmaking configurations that use this rule set.

", - "MatchmakingConfiguration$Name": "

Unique identifier for a matchmaking configuration. This name is used to identify the configuration associated with a matchmaking request or ticket.

", - "MatchmakingConfiguration$RuleSetName": "

Unique identifier for a matchmaking rule set to use with this configuration. A matchmaking configuration can only use rule sets that are defined in the same region.

", + "AcceptMatchInput$TicketId": "

A unique identifier for a matchmaking ticket. The ticket must be in status REQUIRES_ACCEPTANCE; otherwise this request will fail.

", + "CreateMatchmakingConfigurationInput$Name": "

A unique identifier for a matchmaking configuration. This name is used to identify the configuration associated with a matchmaking request or ticket.

", + "CreateMatchmakingRuleSetInput$Name": "

A unique identifier for a matchmaking rule set. A matchmaking configuration identifies the rule set it uses by this name value. Note that the rule set name is different from the optional name field in the rule set body.

", + "MatchmakingConfiguration$Name": "

A unique identifier for a matchmaking configuration. This name is used to identify the configuration associated with a matchmaking request or ticket.

", + "MatchmakingConfiguration$RuleSetName": "

A unique identifier for a matchmaking rule set to use with this configuration. A matchmaking configuration can only use rule sets that are defined in the same Region.

", "MatchmakingIdList$member": null, - "MatchmakingRuleSet$RuleSetName": "

Unique identifier for a matchmaking rule set

", - "MatchmakingRuleSetNameList$member": null, - "MatchmakingTicket$TicketId": "

Unique identifier for a matchmaking ticket.

", + "MatchmakingRuleSet$RuleSetName": "

A unique identifier for a matchmaking rule set

", + "MatchmakingTicket$TicketId": "

A unique identifier for a matchmaking ticket.

", "MatchmakingTicket$ConfigurationName": "

Name of the MatchmakingConfiguration that is used with this ticket. Matchmaking configurations determine how players are grouped into a match and how a new game session is created for the match.

", - "StartMatchBackfillInput$TicketId": "

Unique identifier for a matchmaking ticket. If no ticket ID is specified here, Amazon GameLift will generate one in the form of a UUID. Use this identifier to track the match backfill ticket status and retrieve match results.

", - "StartMatchBackfillInput$ConfigurationName": "

Name of the matchmaker to use for this request. The name of the matchmaker that was used with the original game session is listed in the GameSession object, MatchmakerData property. This property contains a matchmaking configuration ARN value, which includes the matchmaker name. (In the ARN value \"arn:aws:gamelift:us-west-2:111122223333:matchmakingconfiguration/MM-4v4\", the matchmaking configuration name is \"MM-4v4\".) Use only the name for this parameter.

", - "StartMatchmakingInput$TicketId": "

Unique identifier for a matchmaking ticket. If no ticket ID is specified here, Amazon GameLift will generate one in the form of a UUID. Use this identifier to track the matchmaking ticket status and retrieve match results.

", - "StartMatchmakingInput$ConfigurationName": "

Name of the matchmaking configuration to use for this request. Matchmaking configurations must exist in the same region as this request.

", - "StopMatchmakingInput$TicketId": "

Unique identifier for a matchmaking ticket.

", - "UpdateMatchmakingConfigurationInput$Name": "

Unique identifier for a matchmaking configuration to update.

", - "UpdateMatchmakingConfigurationInput$RuleSetName": "

Unique identifier for a matchmaking rule set to use with this configuration. A matchmaking configuration can only use rule sets that are defined in the same region.

" + "StartMatchBackfillInput$TicketId": "

A unique identifier for a matchmaking ticket. If no ticket ID is specified here, Amazon GameLift will generate one in the form of a UUID. Use this identifier to track the match backfill ticket status and retrieve match results.

", + "StartMatchmakingInput$TicketId": "

A unique identifier for a matchmaking ticket. If no ticket ID is specified here, Amazon GameLift will generate one in the form of a UUID. Use this identifier to track the matchmaking ticket status and retrieve match results.

", + "StopMatchmakingInput$TicketId": "

A unique identifier for a matchmaking ticket.

" } }, "MatchmakingRequestTimeoutInteger": { "base": null, "refs": { - "CreateMatchmakingConfigurationInput$RequestTimeoutSeconds": "

Maximum duration, in seconds, that a matchmaking ticket can remain in process before timing out. Requests that fail due to timing out can be resubmitted as needed.

", - "MatchmakingConfiguration$RequestTimeoutSeconds": "

Maximum duration, in seconds, that a matchmaking ticket can remain in process before timing out. Requests that fail due to timing out can be resubmitted as needed.

", - "UpdateMatchmakingConfigurationInput$RequestTimeoutSeconds": "

Maximum duration, in seconds, that a matchmaking ticket can remain in process before timing out. Requests that fail due to timing out can be resubmitted as needed.

" + "CreateMatchmakingConfigurationInput$RequestTimeoutSeconds": "

The maximum duration, in seconds, that a matchmaking ticket can remain in process before timing out. Requests that fail due to timing out can be resubmitted as needed.

", + "MatchmakingConfiguration$RequestTimeoutSeconds": "

The maximum duration, in seconds, that a matchmaking ticket can remain in process before timing out. Requests that fail due to timing out can be resubmitted as needed.

", + "UpdateMatchmakingConfigurationInput$RequestTimeoutSeconds": "

The maximum duration, in seconds, that a matchmaking ticket can remain in process before timing out. Requests that fail due to timing out can be resubmitted as needed.

" } }, "MatchmakingRuleSet": { "base": "

Set of rule statements, used with FlexMatch, that determine how to build your player matches. Each rule set describes a type of group to be created and defines the parameters for acceptable player matches. Rule sets are used in MatchmakingConfiguration objects.

A rule set may define the following elements for a match. For detailed information and examples showing how to construct a rule set, see Build a FlexMatch Rule Set.

", "refs": { - "CreateMatchmakingRuleSetOutput$RuleSet": "

Object that describes the newly created matchmaking rule set.

", + "CreateMatchmakingRuleSetOutput$RuleSet": "

The newly created matchmaking rule set.

", "MatchmakingRuleSetList$member": null } }, + "MatchmakingRuleSetArn": { + "base": "Data type used for Matchmaking RuleSet ARN.", + "refs": { + "MatchmakingConfiguration$RuleSetArn": "

The Amazon Resource Name (ARN) associated with the GameLift matchmaking rule set resource that this configuration uses.

", + "MatchmakingRuleSet$RuleSetArn": "

Amazon Resource Name (ARN) that is assigned to a GameLift matchmaking rule set resource and uniquely identifies it. ARNs are unique across all Regions. In a GameLift rule set ARN, the resource ID matches the RuleSetName value.

" + } + }, "MatchmakingRuleSetList": { "base": null, "refs": { - "DescribeMatchmakingRuleSetsOutput$RuleSets": "

Collection of requested matchmaking rule set objects.

" + "DescribeMatchmakingRuleSetsOutput$RuleSets": "

A collection of requested matchmaking rule set objects.

" + } + }, + "MatchmakingRuleSetName": { + "base": null, + "refs": { + "CreateMatchmakingConfigurationInput$RuleSetName": "

A unique identifier for a matchmaking rule set to use with this configuration. You can use either the rule set name or ARN value. A matchmaking configuration can only use rule sets that are defined in the same Region.

", + "DeleteMatchmakingRuleSetInput$Name": "

A unique identifier for a matchmaking rule set to be deleted. (Note: The rule set name is different from the optional \"name\" field in the rule set body.) You can use either the rule set name or ARN value.

", + "DescribeMatchmakingConfigurationsInput$RuleSetName": "

A unique identifier for a matchmaking rule set. You can use either the rule set name or ARN value. Use this parameter to retrieve all matchmaking configurations that use this rule set.

", + "MatchmakingRuleSetNameList$member": null, + "UpdateMatchmakingConfigurationInput$RuleSetName": "

A unique identifier for a matchmaking rule set to use with this configuration. You can use either the rule set name or ARN value. A matchmaking configuration can only use rule sets that are defined in the same Region.

" } }, "MatchmakingRuleSetNameList": { "base": null, "refs": { - "DescribeMatchmakingRuleSetsInput$Names": "

List of one or more matchmaking rule set names to retrieve details for. (Note: The rule set name is different from the optional \"name\" field in the rule set body.)

" + "DescribeMatchmakingRuleSetsInput$Names": "

A list of one or more matchmaking rule set names to retrieve details for. (Note: The rule set name is different from the optional \"name\" field in the rule set body.) You can use either the rule set name or ARN value.

" } }, "MatchmakingTicket": { @@ -1334,13 +1396,13 @@ "MatchmakingTicketList": { "base": null, "refs": { - "DescribeMatchmakingOutput$TicketList": "

Collection of existing matchmaking ticket objects matching the request.

" + "DescribeMatchmakingOutput$TicketList": "

A collection of existing matchmaking ticket objects matching the request.

" } }, "MaxConcurrentGameSessionActivations": { "base": null, "refs": { - "RuntimeConfiguration$MaxConcurrentGameSessionActivations": "

Maximum number of game sessions with status ACTIVATING to allow on an instance simultaneously. This setting limits the amount of instance resources that can be used for new game activations at any one time.

" + "RuntimeConfiguration$MaxConcurrentGameSessionActivations": "

The maximum number of game sessions with status ACTIVATING to allow on an instance simultaneously. This setting limits the amount of instance resources that can be used for new game activations at any one time.

" } }, "MetricGroup": { @@ -1352,7 +1414,7 @@ "MetricGroupList": { "base": null, "refs": { - "CreateFleetInput$MetricGroups": "

Name of an Amazon CloudWatch metric group to add this fleet to. A metric group aggregates the metrics for all fleets in the group. Specify an existing metric group name, or provide a new name to create a new metric group. A fleet can only be included in one metric group at a time.

", + "CreateFleetInput$MetricGroups": "

The name of an Amazon CloudWatch metric group to add this fleet to. A metric group aggregates the metrics for all fleets in the group. Specify an existing metric group name, or provide a new name to create a new metric group. A fleet can only be included in one metric group at a time.

", "FleetAttributes$MetricGroups": "

Names of metric groups that this fleet is included in. In Amazon CloudWatch, you can view metrics for an individual fleet or aggregated metrics for fleets that are in a fleet metric group. A fleet can be included in only one metric group at a time.

", "UpdateFleetAttributesInput$MetricGroups": "

Names of metric groups to include this fleet in. Amazon CloudWatch uses a fleet metric group is to aggregate metrics from multiple fleets. Use an existing metric group name to add this fleet to the group. Or use a new name to create a new metric group. A fleet can only be included in one metric group at a time.

" } @@ -1367,15 +1429,15 @@ "NonBlankAndLengthConstraintString": { "base": null, "refs": { - "Alias$Name": "

Descriptive label that is associated with an alias. Alias names do not need to be unique.

", - "CreateAliasInput$Name": "

Descriptive label that is associated with an alias. Alias names do not need to be unique.

", - "UpdateAliasInput$Name": "

Descriptive label that is associated with an alias. Alias names do not need to be unique.

" + "Alias$Name": "

A descriptive label that is associated with an alias. Alias names do not need to be unique.

", + "CreateAliasInput$Name": "

A descriptive label that is associated with an alias. Alias names do not need to be unique.

", + "UpdateAliasInput$Name": "

A descriptive label that is associated with an alias. Alias names do not need to be unique.

" } }, "NonBlankString": { "base": null, "refs": { - "IpPermission$IpRange": "

Range of allowed IP addresses. This value must be expressed in CIDR notation. Example: \"000.000.000.000/[subnet mask]\" or optionally the shortened version \"0.0.0.0/[subnet mask]\".

" + "IpPermission$IpRange": "

A range of allowed IP addresses. This value must be expressed in CIDR notation. Example: \"000.000.000.000/[subnet mask]\" or optionally the shortened version \"0.0.0.0/[subnet mask]\".

" } }, "NonEmptyString": { @@ -1385,9 +1447,9 @@ "AwsCredentials$SecretAccessKey": "

Temporary secret key allowing access to the Amazon GameLift S3 account.

", "AwsCredentials$SessionToken": "

Token used to associate a specific build ID with the files uploaded using these credentials.

", "ConflictException$Message": null, - "CreateFleetInput$InstanceRoleArn": "

Unique identifier for an AWS IAM role that manages access to your AWS services. With an instance role ARN set, any application that runs on an instance in this fleet can assume the role, including install scripts, server processes, daemons (background processes). Create a role or look up a role's ARN using the IAM dashboard in the AWS Management Console. Learn more about using on-box credentials for your game servers at Access external resources from a game server.

", + "CreateFleetInput$InstanceRoleArn": "

A unique identifier for an AWS IAM role that manages access to your AWS services. With an instance role ARN set, any application that runs on an instance in this fleet can assume the role, including install scripts, server processes, and daemons (background processes). Create a role or look up a role's ARN from the IAM dashboard in the AWS Management Console. Learn more about using on-box credentials for your game servers at Access external resources from a game server.

", "Event$Message": "

Additional information related to the event.

", - "FleetAttributes$InstanceRoleArn": "

Unique identifier for an AWS IAM role that manages access to your AWS services. With an instance role ARN set, any application that runs on an instance in this fleet can assume the role, including install scripts, server processes, daemons (background processes). Create a role or look up a role's ARN using the IAM dashboard in the AWS Management Console. Learn more about using on-box credentials for your game servers at Access external resources from a game server.

", + "FleetAttributes$InstanceRoleArn": "

A unique identifier for an AWS IAM role that manages access to your AWS services. With an instance role ARN set, any application that runs on an instance in this fleet can assume the role, including install scripts, server processes, and daemons (background processes). Create a role or look up a role's ARN from the IAM dashboard in the AWS Management Console. Learn more about using on-box credentials for your game servers at Access external resources from a game server.

", "FleetCapacityExceededException$Message": null, "GameSessionFullException$Message": null, "IdempotentParameterMismatchException$Message": null, @@ -1399,18 +1461,19 @@ "InvalidRequestException$Message": null, "LatencyMap$key": null, "LimitExceededException$Message": null, - "ListAliasesInput$Name": "

Descriptive label that is associated with an alias. Alias names do not need to be unique.

", - "ListAliasesInput$NextToken": "

Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To start at the beginning of the result set, do not specify a value.

", - "ListAliasesOutput$NextToken": "

Token that indicates where to resume retrieving results on the next call to this action. If no token is returned, these results represent the end of the list.

", + "ListAliasesInput$Name": "

A descriptive label that is associated with an alias. Alias names do not need to be unique.

", + "ListAliasesInput$NextToken": "

A token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To start at the beginning of the result set, do not specify a value.

", + "ListAliasesOutput$NextToken": "

A token that indicates where to resume retrieving results on the next call to this action. If no token is returned, these results represent the end of the list.

", "ListBuildsInput$NextToken": "

Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To start at the beginning of the result set, do not specify a value.

", "ListBuildsOutput$NextToken": "

Token that indicates where to resume retrieving results on the next call to this action. If no token is returned, these results represent the end of the list.

", - "ListScriptsInput$NextToken": "

Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To start at the beginning of the result set, do not specify a value.

", - "ListScriptsOutput$NextToken": "

Token that indicates where to resume retrieving results on the next call to this action. If no token is returned, these results represent the end of the list.

", + "ListScriptsInput$NextToken": "

A token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To start at the beginning of the result set, do not specify a value.

", + "ListScriptsOutput$NextToken": "

A token that indicates where to resume retrieving results on the next call to this action. If no token is returned, these results represent the end of the list.

", "NotFoundException$Message": null, - "S3Location$Bucket": "

Amazon S3 bucket identifier. This is the name of the S3 bucket.

", - "S3Location$Key": "

Name of the zip file containing the build files or script files.

", - "S3Location$RoleArn": "

Amazon Resource Name (ARN) for an IAM role that allows Amazon GameLift to access the S3 bucket.

", - "S3Location$ObjectVersion": "

Version of the file, if object versioning is turned on for the bucket. Amazon GameLift uses this information when retrieving files from an S3 bucket that you own. Use this parameter to specify a specific version of the file; if not set, the latest version of the file is retrieved.

", + "S3Location$Bucket": "

An Amazon S3 bucket identifier. This is the name of the S3 bucket.

", + "S3Location$Key": "

The name of the zip file that contains the build files or script files.

", + "S3Location$RoleArn": "

The Amazon Resource Name (ARN) for an IAM role that allows Amazon GameLift to access the S3 bucket.

", + "S3Location$ObjectVersion": "

The version of the file, if object versioning is turned on for the bucket. Amazon GameLift uses this information when retrieving files from an S3 bucket that you own. Use this parameter to specify a specific version of the file. If not set, the latest version of the file is retrieved.

", + "TaggingFailedException$Message": null, "TerminalRoutingStrategyException$Message": null, "UnauthorizedException$Message": null, "UnsupportedRegionException$Message": null @@ -1420,29 +1483,29 @@ "base": null, "refs": { "AttributeValue$S": "

For single string values. Maximum string length is 100 characters.

", - "CreateAliasInput$Description": "

Human-readable description of an alias.

", - "CreateBuildInput$Name": "

Descriptive label that is associated with a build. Build names do not need to be unique. You can use UpdateBuild to change this value later.

", - "CreateBuildInput$Version": "

Version that is associated with a build or script. Version strings do not need to be unique. You can use UpdateBuild to change this value later.

", - "CreateFleetInput$Name": "

Descriptive label that is associated with a fleet. Fleet names do not need to be unique.

", - "CreateFleetInput$Description": "

Human-readable description of a fleet.

", - "CreateFleetInput$ServerLaunchPath": "

This parameter is no longer used. Instead, specify a server launch path using the RuntimeConfiguration parameter. (Requests that specify a server launch path and launch parameters instead of a run-time configuration will continue to work.)

", - "CreateFleetInput$ServerLaunchParameters": "

This parameter is no longer used. Instead, specify server launch parameters in the RuntimeConfiguration parameter. (Requests that specify a server launch path and launch parameters instead of a run-time configuration will continue to work.)

", - "CreateFleetInput$PeerVpcAwsAccountId": "

Unique identifier for the AWS account with the VPC that you want to peer your Amazon GameLift fleet with. You can find your Account ID in the AWS Management Console under account settings.

", - "CreateFleetInput$PeerVpcId": "

Unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same region where your fleet is deployed. Look up a VPC ID using the VPC Dashboard in the AWS Management Console. Learn more about VPC peering in VPC Peering with Amazon GameLift Fleets.

", - "CreateGameSessionInput$Name": "

Descriptive label that is associated with a game session. Session names do not need to be unique.

", - "CreateGameSessionInput$CreatorId": "

Unique identifier for a player or entity creating the game session. This ID is used to enforce a resource protection policy (if one exists) that limits the number of concurrent active game sessions one player can have.

", - "CreateMatchmakingConfigurationInput$Description": "

Meaningful description of the matchmaking configuration.

", - "CreatePlayerSessionInput$PlayerId": "

Unique identifier for a player. Player IDs are developer-defined.

", - "CreateScriptInput$Name": "

Descriptive label that is associated with a script. Script names do not need to be unique. You can use UpdateScript to change this value later.

", - "CreateScriptInput$Version": "

Version that is associated with a build or script. Version strings do not need to be unique. You can use UpdateScript to change this value later.

", - "CreateVpcPeeringAuthorizationInput$GameLiftAwsAccountId": "

Unique identifier for the AWS account that you use to manage your Amazon GameLift fleet. You can find your Account ID in the AWS Management Console under account settings.

", - "CreateVpcPeeringAuthorizationInput$PeerVpcId": "

Unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same region where your fleet is deployed. Look up a VPC ID using the VPC Dashboard in the AWS Management Console. Learn more about VPC peering in VPC Peering with Amazon GameLift Fleets.

", - "CreateVpcPeeringConnectionInput$PeerVpcAwsAccountId": "

Unique identifier for the AWS account with the VPC that you want to peer your Amazon GameLift fleet with. You can find your Account ID in the AWS Management Console under account settings.

", - "CreateVpcPeeringConnectionInput$PeerVpcId": "

Unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same region where your fleet is deployed. Look up a VPC ID using the VPC Dashboard in the AWS Management Console. Learn more about VPC peering in VPC Peering with Amazon GameLift Fleets.

", - "DeleteScalingPolicyInput$Name": "

Descriptive label that is associated with a scaling policy. Policy names do not need to be unique.

", - "DeleteVpcPeeringAuthorizationInput$GameLiftAwsAccountId": "

Unique identifier for the AWS account that you use to manage your Amazon GameLift fleet. You can find your Account ID in the AWS Management Console under account settings.

", - "DeleteVpcPeeringAuthorizationInput$PeerVpcId": "

Unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same region where your fleet is deployed. Look up a VPC ID using the VPC Dashboard in the AWS Management Console. Learn more about VPC peering in VPC Peering with Amazon GameLift Fleets.

", - "DeleteVpcPeeringConnectionInput$VpcPeeringConnectionId": "

Unique identifier for a VPC peering connection. This value is included in the VpcPeeringConnection object, which can be retrieved by calling DescribeVpcPeeringConnections.

", + "CreateAliasInput$Description": "

A human-readable description of the alias.

", + "CreateBuildInput$Name": "

A descriptive label that is associated with a build. Build names do not need to be unique. You can use UpdateBuild to change this value later.

", + "CreateBuildInput$Version": "

Version information that is associated with a build or script. Version strings do not need to be unique. You can use UpdateBuild to change this value later.

", + "CreateFleetInput$Name": "

A descriptive label that is associated with a fleet. Fleet names do not need to be unique.

", + "CreateFleetInput$Description": "

A human-readable description of a fleet.

", + "CreateFleetInput$ServerLaunchPath": "

This parameter is no longer used. Instead, specify a server launch path using the RuntimeConfiguration parameter. Requests that specify a server launch path and launch parameters instead of a runtime configuration will continue to work.

", + "CreateFleetInput$ServerLaunchParameters": "

This parameter is no longer used. Instead, specify server launch parameters in the RuntimeConfiguration parameter. (Requests that specify a server launch path and launch parameters instead of a runtime configuration will continue to work.)

", + "CreateFleetInput$PeerVpcAwsAccountId": "

A unique identifier for the AWS account with the VPC that you want to peer your Amazon GameLift fleet with. You can find your account ID in the AWS Management Console under account settings.

", + "CreateFleetInput$PeerVpcId": "

A unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same Region as your fleet. To look up a VPC ID, use the VPC Dashboard in the AWS Management Console. Learn more about VPC peering in VPC Peering with Amazon GameLift Fleets.

", + "CreateGameSessionInput$Name": "

A descriptive label that is associated with a game session. Session names do not need to be unique.

", + "CreateGameSessionInput$CreatorId": "

A unique identifier for a player or entity creating the game session. This ID is used to enforce a resource protection policy (if one exists) that limits the number of concurrent active game sessions one player can have.

", + "CreateMatchmakingConfigurationInput$Description": "

A human-readable description of the matchmaking configuration.

", + "CreatePlayerSessionInput$PlayerId": "

A unique identifier for a player. Player IDs are developer-defined.

", + "CreateScriptInput$Name": "

A descriptive label that is associated with a script. Script names do not need to be unique. You can use UpdateScript to change this value later.

", + "CreateScriptInput$Version": "

The version that is associated with a build or script. Version strings do not need to be unique. You can use UpdateScript to change this value later.

", + "CreateVpcPeeringAuthorizationInput$GameLiftAwsAccountId": "

A unique identifier for the AWS account that you use to manage your Amazon GameLift fleet. You can find your Account ID in the AWS Management Console under account settings.

", + "CreateVpcPeeringAuthorizationInput$PeerVpcId": "

A unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same Region where your fleet is deployed. Look up a VPC ID using the VPC Dashboard in the AWS Management Console. Learn more about VPC peering in VPC Peering with Amazon GameLift Fleets.

", + "CreateVpcPeeringConnectionInput$PeerVpcAwsAccountId": "

A unique identifier for the AWS account with the VPC that you want to peer your Amazon GameLift fleet with. You can find your Account ID in the AWS Management Console under account settings.

", + "CreateVpcPeeringConnectionInput$PeerVpcId": "

A unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same Region where your fleet is deployed. Look up a VPC ID using the VPC Dashboard in the AWS Management Console. Learn more about VPC peering in VPC Peering with Amazon GameLift Fleets.

", + "DeleteScalingPolicyInput$Name": "

A descriptive label that is associated with a scaling policy. Policy names do not need to be unique.

", + "DeleteVpcPeeringAuthorizationInput$GameLiftAwsAccountId": "

A unique identifier for the AWS account that you use to manage your Amazon GameLift fleet. You can find your Account ID in the AWS Management Console under account settings.

", + "DeleteVpcPeeringAuthorizationInput$PeerVpcId": "

A unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same Region where your fleet is deployed. Look up a VPC ID using the VPC Dashboard in the AWS Management Console. Learn more about VPC peering in VPC Peering with Amazon GameLift Fleets.

", + "DeleteVpcPeeringConnectionInput$VpcPeeringConnectionId": "

A unique identifier for a VPC peering connection. This value is included in the VpcPeeringConnection object, which can be retrieved by calling DescribeVpcPeeringConnections.

", "DescribeFleetAttributesInput$NextToken": "

Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To start at the beginning of the result set, do not specify a value. This parameter is ignored when the request specifies one or a list of fleet IDs.

", "DescribeFleetAttributesOutput$NextToken": "

Token that indicates where to resume retrieving results on the next call to this action. If no token is returned, these results represent the end of the list.

", "DescribeFleetCapacityInput$NextToken": "

Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To start at the beginning of the result set, do not specify a value. This parameter is ignored when the request specifies one or a list of fleet IDs.

", @@ -1454,83 +1517,83 @@ "DescribeGameSessionDetailsInput$StatusFilter": "

Game session status to filter results on. Possible game session statuses include ACTIVE, TERMINATED, ACTIVATING and TERMINATING (the last two are transitory).

", "DescribeGameSessionDetailsInput$NextToken": "

Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To start at the beginning of the result set, do not specify a value.

", "DescribeGameSessionDetailsOutput$NextToken": "

Token that indicates where to resume retrieving results on the next call to this action. If no token is returned, these results represent the end of the list.

", - "DescribeGameSessionQueuesInput$NextToken": "

Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To start at the beginning of the result set, do not specify a value.

", - "DescribeGameSessionQueuesOutput$NextToken": "

Token that indicates where to resume retrieving results on the next call to this action. If no token is returned, these results represent the end of the list.

", + "DescribeGameSessionQueuesInput$NextToken": "

A token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To start at the beginning of the result set, do not specify a value.

", + "DescribeGameSessionQueuesOutput$NextToken": "

A token that indicates where to resume retrieving results on the next call to this action. If no token is returned, these results represent the end of the list.

", "DescribeGameSessionsInput$StatusFilter": "

Game session status to filter results on. Possible game session statuses include ACTIVE, TERMINATED, ACTIVATING, and TERMINATING (the last two are transitory).

", "DescribeGameSessionsInput$NextToken": "

Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To start at the beginning of the result set, do not specify a value.

", "DescribeGameSessionsOutput$NextToken": "

Token that indicates where to resume retrieving results on the next call to this action. If no token is returned, these results represent the end of the list.

", "DescribeInstancesInput$NextToken": "

Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To start at the beginning of the result set, do not specify a value.

", "DescribeInstancesOutput$NextToken": "

Token that indicates where to resume retrieving results on the next call to this action. If no token is returned, these results represent the end of the list.

", - "DescribeMatchmakingConfigurationsInput$NextToken": "

Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To start at the beginning of the result set, do not specify a value.

", - "DescribeMatchmakingConfigurationsOutput$NextToken": "

Token that indicates where to resume retrieving results on the next call to this action. If no token is returned, these results represent the end of the list.

", - "DescribeMatchmakingRuleSetsInput$NextToken": "

Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To start at the beginning of the result set, do not specify a value.

", - "DescribeMatchmakingRuleSetsOutput$NextToken": "

Token that indicates where to resume retrieving results on the next call to this action. If no token is returned, these results represent the end of the list.

", - "DescribePlayerSessionsInput$PlayerId": "

Unique identifier for a player to retrieve player sessions for.

", + "DescribeMatchmakingConfigurationsInput$NextToken": "

A token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To start at the beginning of the result set, do not specify a value.

", + "DescribeMatchmakingConfigurationsOutput$NextToken": "

A token that indicates where to resume retrieving results on the next call to this action. If no token is returned, these results represent the end of the list.

", + "DescribeMatchmakingRuleSetsInput$NextToken": "

A token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To start at the beginning of the result set, do not specify a value.

", + "DescribeMatchmakingRuleSetsOutput$NextToken": "

A token that indicates where to resume retrieving results on the next call to this action. If no token is returned, these results represent the end of the list.

", + "DescribePlayerSessionsInput$PlayerId": "

A unique identifier for a player to retrieve player sessions for.

", "DescribePlayerSessionsInput$PlayerSessionStatusFilter": "

Player session status to filter results on.

Possible player session statuses include the following:

", "DescribePlayerSessionsInput$NextToken": "

Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To start at the beginning of the result set, do not specify a value. If a player session ID is specified, this parameter is ignored.

", "DescribePlayerSessionsOutput$NextToken": "

Token that indicates where to resume retrieving results on the next call to this action. If no token is returned, these results represent the end of the list.

", "DescribeScalingPoliciesInput$NextToken": "

Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To start at the beginning of the result set, do not specify a value.

", "DescribeScalingPoliciesOutput$NextToken": "

Token that indicates where to resume retrieving results on the next call to this action. If no token is returned, these results represent the end of the list.

", - "DesiredPlayerSession$PlayerId": "

Unique identifier for a player to associate with the player session.

", - "Event$EventId": "

Unique identifier for a fleet event.

", - "Event$ResourceId": "

Unique identifier for an event resource, such as a fleet ID.

", + "DesiredPlayerSession$PlayerId": "

A unique identifier for a player to associate with the player session.

", + "Event$EventId": "

A unique identifier for a fleet event.

", + "Event$ResourceId": "

A unique identifier for an event resource, such as a fleet ID.

", "Event$PreSignedLogUrl": "

Location of stored logs with additional detail that is related to the event. This is useful for debugging issues. The URL is valid for 15 minutes. You can also access fleet creation logs through the Amazon GameLift console.

", "FleetAttributes$Description": "

Human-readable description of the fleet.

", - "FleetAttributes$Name": "

Descriptive label that is associated with a fleet. Fleet names do not need to be unique.

", + "FleetAttributes$Name": "

A descriptive label that is associated with a fleet. Fleet names do not need to be unique.

", "FleetAttributes$ServerLaunchPath": "

Path to a game server executable in the fleet's build, specified for fleets created before 2016-08-04 (or AWS SDK v. 0.12.16). Server launch paths for fleets created after this date are specified in the fleet's RuntimeConfiguration.

", "FleetAttributes$ServerLaunchParameters": "

Game server launch parameters specified for fleets created before 2016-08-04 (or AWS SDK v. 0.12.16). Server launch parameters for fleets created after this date are specified in the fleet's RuntimeConfiguration.

", - "GameSession$GameSessionId": "

Unique identifier for the game session. A game session ARN has the following format: arn:aws:gamelift:<region>::gamesession/<fleet ID>/<custom ID string or idempotency token>.

", - "GameSession$Name": "

Descriptive label that is associated with a game session. Session names do not need to be unique.

", - "GameSession$CreatorId": "

Unique identifier for a player. This ID is used to enforce a resource protection policy (if one exists), that limits the number of game sessions a player can create.

", - "GameSessionPlacement$GameSessionName": "

Descriptive label that is associated with a game session. Session names do not need to be unique.

", - "GameSessionPlacement$GameSessionId": "

Unique identifier for the game session. This value is set once the new game session is placed (placement status is FULFILLED).

", - "GameSessionPlacement$GameSessionArn": "

Identifier for the game session created by this placement request. This value is set once the new game session is placed (placement status is FULFILLED). This identifier is unique across all regions. You can use this value as a GameSessionId value as needed.

", - "GameSessionPlacement$GameSessionRegion": "

Name of the region where the game session created by this placement request is running. This value is set once the new game session is placed (placement status is FULFILLED).

", + "GameSession$GameSessionId": "

A unique identifier for the game session. A game session ARN has the following format: arn:aws:gamelift:<region>::gamesession/<fleet ID>/<custom ID string or idempotency token>.

", + "GameSession$Name": "

A descriptive label that is associated with a game session. Session names do not need to be unique.

", + "GameSession$CreatorId": "

A unique identifier for a player. This ID is used to enforce a resource protection policy (if one exists), that limits the number of game sessions a player can create.

", + "GameSessionPlacement$GameSessionName": "

A descriptive label that is associated with a game session. Session names do not need to be unique.

", + "GameSessionPlacement$GameSessionId": "

A unique identifier for the game session. This value is set once the new game session is placed (placement status is FULFILLED).

", + "GameSessionPlacement$GameSessionArn": "

Identifier for the game session created by this placement request. This value is set once the new game session is placed (placement status is FULFILLED). This identifier is unique across all Regions. You can use this value as a GameSessionId value as needed.

", + "GameSessionPlacement$GameSessionRegion": "

Name of the Region where the game session created by this placement request is running. This value is set once the new game session is placed (placement status is FULFILLED).

", "GetGameSessionLogUrlOutput$PreSignedUrl": "

Location of the requested game session logs, available for download. This URL is valid for 15 minutes, after which S3 will reject any download request using this URL. You can request a new URL any time within the 14-day period that the logs are retained.

", "ListFleetsInput$NextToken": "

Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To start at the beginning of the result set, do not specify a value.

", "ListFleetsOutput$NextToken": "

Token that indicates where to resume retrieving results on the next call to this action. If no token is returned, these results represent the end of the list.

", - "MatchedPlayerSession$PlayerId": "

Unique identifier for a player

", - "MatchmakingConfiguration$Description": "

Descriptive label that is associated with matchmaking configuration.

", - "PlacedPlayerSession$PlayerId": "

Unique identifier for a player that is associated with this player session.

", - "Player$PlayerId": "

Unique identifier for a player

", + "MatchedPlayerSession$PlayerId": "

A unique identifier for a player

", + "MatchmakingConfiguration$Description": "

A descriptive label that is associated with matchmaking configuration.

", + "PlacedPlayerSession$PlayerId": "

A unique identifier for a player that is associated with this player session.

", + "Player$PlayerId": "

A unique identifier for a player

", "Player$Team": "

Name of the team that the player is assigned to in a match. Team names are defined in a matchmaking rule set.

", "PlayerAttributeMap$key": null, "PlayerDataMap$key": null, "PlayerIdList$member": null, - "PlayerLatency$PlayerId": "

Unique identifier for a player associated with the latency data.

", - "PlayerLatency$RegionIdentifier": "

Name of the region that is associated with the latency value.

", - "PlayerSession$PlayerId": "

Unique identifier for a player that is associated with this player session.

", - "PlayerSession$GameSessionId": "

Unique identifier for the game session that the player session is connected to.

", - "PutScalingPolicyInput$Name": "

Descriptive label that is associated with a scaling policy. Policy names do not need to be unique. A fleet can have only one scaling policy with the same name.

", - "PutScalingPolicyOutput$Name": "

Descriptive label that is associated with a scaling policy. Policy names do not need to be unique.

", - "ScalingPolicy$Name": "

Descriptive label that is associated with a scaling policy. Policy names do not need to be unique.

", - "Script$Name": "

Descriptive label that is associated with a script. Script names do not need to be unique.

", - "Script$Version": "

Version that is associated with a build or script. Version strings do not need to be unique.

", + "PlayerLatency$PlayerId": "

A unique identifier for a player associated with the latency data.

", + "PlayerLatency$RegionIdentifier": "

Name of the Region that is associated with the latency value.

", + "PlayerSession$PlayerId": "

A unique identifier for a player that is associated with this player session.

", + "PlayerSession$GameSessionId": "

A unique identifier for the game session that the player session is connected to.

", + "PutScalingPolicyInput$Name": "

A descriptive label that is associated with a scaling policy. Policy names do not need to be unique. A fleet can have only one scaling policy with the same name.

", + "PutScalingPolicyOutput$Name": "

A descriptive label that is associated with a scaling policy. Policy names do not need to be unique.

", + "ScalingPolicy$Name": "

A descriptive label that is associated with a scaling policy. Policy names do not need to be unique.

", + "Script$Name": "

A descriptive label that is associated with a script. Script names do not need to be unique.

", + "Script$Version": "

The version that is associated with a build or script. Version strings do not need to be unique.

", "SearchGameSessionsInput$FilterExpression": "

String containing the search criteria for the session search. If no filter expression is included, the request returns results for all game sessions in the fleet that are in ACTIVE status.

A filter expression can contain one or multiple conditions. Each condition consists of the following:

To chain multiple conditions in a single expression, use the logical keywords AND, OR, and NOT and parentheses as needed. For example: x AND y AND NOT z, NOT (x OR y).

Session search evaluates conditions from left to right using the following precedence rules:

  1. =, <>, <, >, <=, >=

  2. Parentheses

  3. NOT

  4. AND

  5. OR

For example, this filter expression retrieves game sessions hosting at least ten players that have an open player slot: \"maximumSessions>=10 AND hasAvailablePlayerSessions=true\".

", "SearchGameSessionsInput$SortExpression": "

Instructions on how to sort the search results. If no sort expression is included, the request returns results in random order. A sort expression consists of the following elements:

For example, this sort expression returns the oldest active sessions first: \"SortExpression\": \"creationTimeMillis ASC\". Results with a null value for the sort operand are returned at the end of the list.

", "SearchGameSessionsInput$NextToken": "

Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To start at the beginning of the result set, do not specify a value.

", "SearchGameSessionsOutput$NextToken": "

Token that indicates where to resume retrieving results on the next call to this action. If no token is returned, these results represent the end of the list.

", - "ServerProcess$LaunchPath": "

Location of the server executable in a custom game build or the name of the Realtime script file that contains the Init() function. Game builds and Realtime scripts are installed on instances at the root:

", - "ServerProcess$Parameters": "

Optional list of parameters to pass to the server executable or Realtime script on launch.

", - "StartGameSessionPlacementInput$GameSessionName": "

Descriptive label that is associated with a game session. Session names do not need to be unique.

", + "ServerProcess$LaunchPath": "

The location of the server executable in a custom game build or the name of the Realtime script file that contains the Init() function. Game builds and Realtime scripts are installed on instances at the root:

", + "ServerProcess$Parameters": "

An optional list of parameters to pass to the server executable or Realtime script on launch.

", + "StartGameSessionPlacementInput$GameSessionName": "

A descriptive label that is associated with a game session. Session names do not need to be unique.

", "StringDoubleMap$key": null, "StringList$member": null, - "UpdateAliasInput$Description": "

Human-readable description of an alias.

", - "UpdateBuildInput$Name": "

Descriptive label that is associated with a build. Build names do not need to be unique.

", - "UpdateBuildInput$Version": "

Version that is associated with a build or script. Version strings do not need to be unique.

", - "UpdateFleetAttributesInput$Name": "

Descriptive label that is associated with a fleet. Fleet names do not need to be unique.

", + "UpdateAliasInput$Description": "

A human-readable description of the alias.

", + "UpdateBuildInput$Name": "

A descriptive label that is associated with a build. Build names do not need to be unique.

", + "UpdateBuildInput$Version": "

Version information that is associated with a build or script. Version strings do not need to be unique.

", + "UpdateFleetAttributesInput$Name": "

A descriptive label that is associated with a fleet. Fleet names do not need to be unique.

", "UpdateFleetAttributesInput$Description": "

Human-readable description of a fleet.

", - "UpdateGameSessionInput$Name": "

Descriptive label that is associated with a game session. Session names do not need to be unique.

", - "UpdateMatchmakingConfigurationInput$Description": "

Descriptive label that is associated with matchmaking configuration.

", - "UpdateScriptInput$Name": "

Descriptive label that is associated with a script. Script names do not need to be unique.

", - "UpdateScriptInput$Version": "

Version that is associated with a build or script. Version strings do not need to be unique.

", - "VpcPeeringAuthorization$GameLiftAwsAccountId": "

Unique identifier for the AWS account that you use to manage your Amazon GameLift fleet. You can find your Account ID in the AWS Management Console under account settings.

", + "UpdateGameSessionInput$Name": "

A descriptive label that is associated with a game session. Session names do not need to be unique.

", + "UpdateMatchmakingConfigurationInput$Description": "

A descriptive label that is associated with matchmaking configuration.

", + "UpdateScriptInput$Name": "

A descriptive label that is associated with a script. Script names do not need to be unique.

", + "UpdateScriptInput$Version": "

The version that is associated with a build or script. Version strings do not need to be unique.

", + "VpcPeeringAuthorization$GameLiftAwsAccountId": "

A unique identifier for the AWS account that you use to manage your Amazon GameLift fleet. You can find your Account ID in the AWS Management Console under account settings.

", "VpcPeeringAuthorization$PeerVpcAwsAccountId": "

", - "VpcPeeringAuthorization$PeerVpcId": "

Unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same region where your fleet is deployed. Look up a VPC ID using the VPC Dashboard in the AWS Management Console. Learn more about VPC peering in VPC Peering with Amazon GameLift Fleets.

", + "VpcPeeringAuthorization$PeerVpcId": "

A unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same Region where your fleet is deployed. Look up a VPC ID using the VPC Dashboard in the AWS Management Console. Learn more about VPC peering in VPC Peering with Amazon GameLift Fleets.

", "VpcPeeringConnection$IpV4CidrBlock": "

CIDR block of IPv4 addresses assigned to the VPC peering connection for the GameLift VPC. The peered VPC also has an IPv4 CIDR block associated with it; these blocks cannot overlap or the peering connection cannot be created.

", - "VpcPeeringConnection$VpcPeeringConnectionId": "

Unique identifier that is automatically assigned to the connection record. This ID is referenced in VPC peering connection events, and is used when deleting a connection with DeleteVpcPeeringConnection.

", - "VpcPeeringConnection$PeerVpcId": "

Unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same region where your fleet is deployed. Look up a VPC ID using the VPC Dashboard in the AWS Management Console. Learn more about VPC peering in VPC Peering with Amazon GameLift Fleets.

", - "VpcPeeringConnection$GameLiftVpcId": "

Unique identifier for the VPC that contains the Amazon GameLift fleet for this connection. This VPC is managed by Amazon GameLift and does not appear in your AWS account.

", + "VpcPeeringConnection$VpcPeeringConnectionId": "

A unique identifier that is automatically assigned to the connection record. This ID is referenced in VPC peering connection events, and is used when deleting a connection with DeleteVpcPeeringConnection.

", + "VpcPeeringConnection$PeerVpcId": "

A unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same Region where your fleet is deployed. Look up a VPC ID using the VPC Dashboard in the AWS Management Console. Learn more about VPC peering in VPC Peering with Amazon GameLift Fleets.

", + "VpcPeeringConnection$GameLiftVpcId": "

A unique identifier for the VPC that contains the Amazon GameLift fleet for this connection. This VPC is managed by Amazon GameLift and does not appear in your AWS account.

", "VpcPeeringConnectionStatus$Code": "

Code indicating the status of a VPC peering connection.

", "VpcPeeringConnectionStatus$Message": "

Additional messaging associated with the connection status.

" } @@ -1544,7 +1607,7 @@ "base": null, "refs": { "Build$OperatingSystem": "

Operating system that the game server binaries are built to run on. This value determines the type of fleet resources that you can use for this build.

", - "CreateBuildInput$OperatingSystem": "

Operating system that the game server binaries are built to run on. This value determines the type of fleet resources that you can use for this build. If your game build contains multiple executables, they all must run on the same operating system. If an operating system is not specified when creating a build, Amazon GameLift uses the default value (WINDOWS_2012). This value cannot be changed later.

", + "CreateBuildInput$OperatingSystem": "

The operating system that the game server binaries are built to run on. This value determines the type of fleet resources that you can use for this build. If your game build contains multiple executables, they all must run on the same operating system. If an operating system is not specified when creating a build, Amazon GameLift uses the default value (WINDOWS_2012). This value cannot be changed later.

", "FleetAttributes$OperatingSystem": "

Operating system of the fleet's computing resources. A fleet's operating system depends on the OS specified for the build that is deployed on this fleet.

", "Instance$OperatingSystem": "

Operating system that is running on this instance.

", "InstanceAccess$OperatingSystem": "

Operating system that is running on the instance.

" @@ -1559,7 +1622,7 @@ "PlacedPlayerSessionList": { "base": null, "refs": { - "GameSessionPlacement$PlacedPlayerSessions": "

Collection of information on player sessions created in response to the game session placement request. These player sessions are created only once a new game session is successfully placed (placement status is FULFILLED). This information includes the player ID (as provided in the placement request) and the corresponding player session ID. Retrieve full player sessions by calling DescribePlayerSessions with the player session ID.

" + "GameSessionPlacement$PlacedPlayerSessions": "

A collection of information on player sessions created in response to the game session placement request. These player sessions are created only once a new game session is successfully placed (placement status is FULFILLED). This information includes the player ID (as provided in the placement request) and the corresponding player session ID. Retrieve full player sessions by calling DescribePlayerSessions with the player session ID.

" } }, "Player": { @@ -1571,7 +1634,7 @@ "PlayerAttributeMap": { "base": null, "refs": { - "Player$PlayerAttributes": "

Collection of key:value pairs containing player information for use in matchmaking. Player attribute keys must match the playerAttributes used in a matchmaking rule set. Example: \"PlayerAttributes\": {\"skill\": {\"N\": \"23\"}, \"gameMode\": {\"S\": \"deathmatch\"}}.

" + "Player$PlayerAttributes": "

A collection of key:value pairs containing player information for use in matchmaking. Player attribute keys must match the playerAttributes used in a matchmaking rule set. Example: \"PlayerAttributes\": {\"skill\": {\"N\": \"23\"}, \"gameMode\": {\"S\": \"deathmatch\"}}.

" } }, "PlayerData": { @@ -1596,7 +1659,7 @@ } }, "PlayerLatency": { - "base": "

Regional latency information for a player, used when requesting a new game session with StartGameSessionPlacement. This value indicates the amount of time lag that exists when the player is connected to a fleet in the specified region. The relative difference between a player's latency values for multiple regions are used to determine which fleets are best suited to place a new game session for the player.

", + "base": "

Regional latency information for a player, used when requesting a new game session with StartGameSessionPlacement. This value indicates the amount of time lag that exists when the player is connected to a fleet in the specified Region. The relative difference between a player's latency values for multiple Regions are used to determine which fleets are best suited to place a new game session for the player.

", "refs": { "PlayerLatencyList$member": null } @@ -1604,12 +1667,12 @@ "PlayerLatencyList": { "base": null, "refs": { - "GameSessionPlacement$PlayerLatencies": "

Set of values, expressed in milliseconds, indicating the amount of latency that a player experiences when connected to AWS regions.

", - "StartGameSessionPlacementInput$PlayerLatencies": "

Set of values, expressed in milliseconds, indicating the amount of latency that a player experiences when connected to AWS regions. This information is used to try to place the new game session where it can offer the best possible gameplay experience for the players.

" + "GameSessionPlacement$PlayerLatencies": "

Set of values, expressed in milliseconds, indicating the amount of latency that a player experiences when connected to AWS Regions.

", + "StartGameSessionPlacementInput$PlayerLatencies": "

Set of values, expressed in milliseconds, indicating the amount of latency that a player experiences when connected to AWS Regions. This information is used to try to place the new game session where it can offer the best possible gameplay experience for the players.

" } }, "PlayerLatencyPolicy": { - "base": "

Queue setting that determines the highest latency allowed for individual players when placing a game session. When a latency policy is in force, a game session cannot be placed at any destination in a region where a player is reporting latency higher than the cap. Latency policies are only enforced when the placement request contains player latency information.

", + "base": "

Queue setting that determines the highest latency allowed for individual players when placing a game session. When a latency policy is in force, a game session cannot be placed with any fleet in a Region where a player reports latency higher than the cap. Latency policies are only enforced when the placement request contains player latency information.

", "refs": { "PlayerLatencyPolicyList$member": null } @@ -1617,16 +1680,16 @@ "PlayerLatencyPolicyList": { "base": null, "refs": { - "CreateGameSessionQueueInput$PlayerLatencyPolicies": "

Collection of latency policies to apply when processing game sessions placement requests with player latency information. Multiple policies are evaluated in order of the maximum latency value, starting with the lowest latency values. With just one policy, it is enforced at the start of the game session placement for the duration period. With multiple policies, each policy is enforced consecutively for its duration period. For example, a queue might enforce a 60-second policy followed by a 120-second policy, and then no policy for the remainder of the placement. A player latency policy must set a value for MaximumIndividualPlayerLatencyMilliseconds; if none is set, this API requests will fail.

", - "GameSessionQueue$PlayerLatencyPolicies": "

Collection of latency policies to apply when processing game sessions placement requests with player latency information. Multiple policies are evaluated in order of the maximum latency value, starting with the lowest latency values. With just one policy, it is enforced at the start of the game session placement for the duration period. With multiple policies, each policy is enforced consecutively for its duration period. For example, a queue might enforce a 60-second policy followed by a 120-second policy, and then no policy for the remainder of the placement.

", - "UpdateGameSessionQueueInput$PlayerLatencyPolicies": "

Collection of latency policies to apply when processing game sessions placement requests with player latency information. Multiple policies are evaluated in order of the maximum latency value, starting with the lowest latency values. With just one policy, it is enforced at the start of the game session placement for the duration period. With multiple policies, each policy is enforced consecutively for its duration period. For example, a queue might enforce a 60-second policy followed by a 120-second policy, and then no policy for the remainder of the placement. When updating policies, provide a complete collection of policies.

" + "CreateGameSessionQueueInput$PlayerLatencyPolicies": "

A collection of latency policies to apply when processing game sessions placement requests with player latency information. Multiple policies are evaluated in order of the maximum latency value, starting with the lowest latency values. With just one policy, the policy is enforced at the start of the game session placement for the duration period. With multiple policies, each policy is enforced consecutively for its duration period. For example, a queue might enforce a 60-second policy followed by a 120-second policy, and then no policy for the remainder of the placement. A player latency policy must set a value for MaximumIndividualPlayerLatencyMilliseconds. If none is set, this API request fails.

", + "GameSessionQueue$PlayerLatencyPolicies": "

A collection of latency policies to apply when processing game sessions placement requests with player latency information. Multiple policies are evaluated in order of the maximum latency value, starting with the lowest latency values. With just one policy, the policy is enforced at the start of the game session placement for the duration period. With multiple policies, each policy is enforced consecutively for its duration period. For example, a queue might enforce a 60-second policy followed by a 120-second policy, and then no policy for the remainder of the placement.

", + "UpdateGameSessionQueueInput$PlayerLatencyPolicies": "

A collection of latency policies to apply when processing game sessions placement requests with player latency information. Multiple policies are evaluated in order of the maximum latency value, starting with the lowest latency values. With just one policy, the policy is enforced at the start of the game session placement for the duration period. With multiple policies, each policy is enforced consecutively for its duration period. For example, a queue might enforce a 60-second policy followed by a 120-second policy, and then no policy for the remainder of the placement. When updating policies, provide a complete collection of policies.

" } }, "PlayerList": { "base": null, "refs": { "MatchmakingTicket$Players": "

A set of Player objects, each representing a player to find matches for. Players are identified by a unique player ID and may include latency data for use during matchmaking. If the ticket is in status COMPLETED, the Player objects include the team the players were assigned to in the resulting match.

", - "StartMatchBackfillInput$Players": "

Match information on all players that are currently assigned to the game session. This information is used by the matchmaker to find new players and add them to the existing game.

", + "StartMatchBackfillInput$Players": "

Match information on all players that are currently assigned to the game session. This information is used by the matchmaker to find new players and add them to the existing game.

", "StartMatchmakingInput$Players": "

Information on each player to be matched. This information must include a player ID, and may contain player attributes and latency data to be used in the matchmaking process. After a successful match, Player objects contain the name of the team the player is assigned to.

" } }, @@ -1647,17 +1710,17 @@ "PlayerSessionId": { "base": null, "refs": { - "DescribePlayerSessionsInput$PlayerSessionId": "

Unique identifier for a player session to retrieve.

", - "MatchedPlayerSession$PlayerSessionId": "

Unique identifier for a player session

", - "PlacedPlayerSession$PlayerSessionId": "

Unique identifier for a player session.

", - "PlayerSession$PlayerSessionId": "

Unique identifier for a player session.

" + "DescribePlayerSessionsInput$PlayerSessionId": "

A unique identifier for a player session to retrieve.

", + "MatchedPlayerSession$PlayerSessionId": "

A unique identifier for a player session

", + "PlacedPlayerSession$PlayerSessionId": "

A unique identifier for a player session.

", + "PlayerSession$PlayerSessionId": "

A unique identifier for a player session.

" } }, "PlayerSessionList": { "base": null, "refs": { - "CreatePlayerSessionsOutput$PlayerSessions": "

Collection of player session objects created for the added players.

", - "DescribePlayerSessionsOutput$PlayerSessions": "

Collection of objects containing properties for each player session that matches the request.

" + "CreatePlayerSessionsOutput$PlayerSessions": "

A collection of player session objects created for the added players.

", + "DescribePlayerSessionsOutput$PlayerSessions": "

A collection of objects containing properties for each player session that matches the request.

" } }, "PlayerSessionStatus": { @@ -1669,8 +1732,8 @@ "PolicyType": { "base": null, "refs": { - "PutScalingPolicyInput$PolicyType": "

Type of scaling policy to create. For a target-based policy, set the parameter MetricName to 'PercentAvailableGameSessions' and specify a TargetConfiguration. For a rule-based policy set the following parameters: MetricName, ComparisonOperator, Threshold, EvaluationPeriods, ScalingAdjustmentType, and ScalingAdjustment.

", - "ScalingPolicy$PolicyType": "

Type of scaling policy to create. For a target-based policy, set the parameter MetricName to 'PercentAvailableGameSessions' and specify a TargetConfiguration. For a rule-based policy set the following parameters: MetricName, ComparisonOperator, Threshold, EvaluationPeriods, ScalingAdjustmentType, and ScalingAdjustment.

" + "PutScalingPolicyInput$PolicyType": "

The type of scaling policy to create. For a target-based policy, set the parameter MetricName to 'PercentAvailableGameSessions' and specify a TargetConfiguration. For a rule-based policy set the following parameters: MetricName, ComparisonOperator, Threshold, EvaluationPeriods, ScalingAdjustmentType, and ScalingAdjustment.

", + "ScalingPolicy$PolicyType": "

The type of scaling policy to create. For a target-based policy, set the parameter MetricName to 'PercentAvailableGameSessions' and specify a TargetConfiguration. For a rule-based policy set the following parameters: MetricName, ComparisonOperator, Threshold, EvaluationPeriods, ScalingAdjustmentType, and ScalingAdjustment.

" } }, "PortNumber": { @@ -1678,49 +1741,49 @@ "refs": { "GameSession$Port": "

Port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.

", "GameSessionPlacement$Port": "

Port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number. This value is set once the new game session is placed (placement status is FULFILLED).

", - "IpPermission$FromPort": "

Starting value for a range of allowed port numbers.

", - "IpPermission$ToPort": "

Ending value for a range of allowed port numbers. Port numbers are end-inclusive. This value must be higher than FromPort.

", + "IpPermission$FromPort": "

A starting value for a range of allowed port numbers.

", + "IpPermission$ToPort": "

An ending value for a range of allowed port numbers. Port numbers are end-inclusive. This value must be higher than FromPort.

", "PlayerSession$Port": "

Port number for the game session. To connect to a Amazon GameLift server process, an app needs both the IP address and port number.

" } }, "PositiveInteger": { "base": null, "refs": { - "DescribeFleetAttributesInput$Limit": "

Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. This parameter is ignored when the request specifies one or a list of fleet IDs.

", - "DescribeFleetCapacityInput$Limit": "

Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. This parameter is ignored when the request specifies one or a list of fleet IDs.

", - "DescribeFleetEventsInput$Limit": "

Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

", - "DescribeFleetUtilizationInput$Limit": "

Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. This parameter is ignored when the request specifies one or a list of fleet IDs.

", - "DescribeGameSessionDetailsInput$Limit": "

Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

", - "DescribeGameSessionQueuesInput$Limit": "

Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

", - "DescribeGameSessionsInput$Limit": "

Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

", - "DescribeInstancesInput$Limit": "

Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

", - "DescribeMatchmakingConfigurationsInput$Limit": "

Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. This parameter is limited to 10.

", - "DescribePlayerSessionsInput$Limit": "

Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. If a player session ID is specified, this parameter is ignored.

", - "DescribeScalingPoliciesInput$Limit": "

Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

", + "DescribeFleetAttributesInput$Limit": "

The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. This parameter is ignored when the request specifies one or a list of fleet IDs.

", + "DescribeFleetCapacityInput$Limit": "

The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. This parameter is ignored when the request specifies one or a list of fleet IDs.

", + "DescribeFleetEventsInput$Limit": "

The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

", + "DescribeFleetUtilizationInput$Limit": "

The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. This parameter is ignored when the request specifies one or a list of fleet IDs.

", + "DescribeGameSessionDetailsInput$Limit": "

The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

", + "DescribeGameSessionQueuesInput$Limit": "

The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

", + "DescribeGameSessionsInput$Limit": "

The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

", + "DescribeInstancesInput$Limit": "

The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

", + "DescribeMatchmakingConfigurationsInput$Limit": "

The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. This parameter is limited to 10.

", + "DescribePlayerSessionsInput$Limit": "

The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. If a player session ID is specified, this parameter is ignored.

", + "DescribeScalingPoliciesInput$Limit": "

The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

", "GameSessionConnectionInfo$Port": "

Port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.

", "LatencyMap$value": null, - "ListAliasesInput$Limit": "

Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

", - "ListBuildsInput$Limit": "

Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

", - "ListFleetsInput$Limit": "

Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

", - "ListScriptsInput$Limit": "

Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

", + "ListAliasesInput$Limit": "

The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

", + "ListBuildsInput$Limit": "

The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

", + "ListFleetsInput$Limit": "

The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

", + "ListScriptsInput$Limit": "

The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

", "PutScalingPolicyInput$EvaluationPeriods": "

Length of time (in minutes) the metric must be at or beyond the threshold before a scaling event is triggered.

", "ScalingPolicy$EvaluationPeriods": "

Length of time (in minutes) the metric must be at or beyond the threshold before a scaling event is triggered.

", - "SearchGameSessionsInput$Limit": "

Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. The maximum number of results returned is 20, even if this value is not set or is set higher than 20.

", - "ServerProcess$ConcurrentExecutions": "

Number of server processes using this configuration to run concurrently on an instance.

" + "SearchGameSessionsInput$Limit": "

The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. The maximum number of results returned is 20, even if this value is not set or is set higher than 20.

", + "ServerProcess$ConcurrentExecutions": "

The number of server processes that use this configuration to run concurrently on an instance.

" } }, "PositiveLong": { "base": null, "refs": { "Build$SizeOnDisk": "

File size of the uploaded game build, expressed in bytes. When the build status is INITIALIZED, this value is 0.

", - "Script$SizeOnDisk": "

File size of the uploaded Realtime script, expressed in bytes. When files are uploaded from an S3 location, this value remains at \"0\".

" + "Script$SizeOnDisk": "

The file size of the uploaded Realtime script, expressed in bytes. When files are uploaded from an S3 location, this value remains at \"0\".

" } }, "ProtectionPolicy": { "base": null, "refs": { - "CreateFleetInput$NewGameSessionProtectionPolicy": "

Game session protection policy to apply to all instances in this fleet. If this parameter is not set, instances in this fleet default to no protection. You can change a fleet's protection policy using UpdateFleetAttributes, but this change will only affect sessions created after the policy change. You can also set protection for individual instances using UpdateGameSession.

", - "FleetAttributes$NewGameSessionProtectionPolicy": "

Type of game session protection to set for all new instances started in the fleet.

", + "CreateFleetInput$NewGameSessionProtectionPolicy": "

A game session protection policy to apply to all instances in this fleet. If this parameter is not set, instances in this fleet default to no protection. You can change a fleet's protection policy using UpdateFleetAttributes, but this change will only affect sessions created after the policy change. You can also set protection for individual instances using UpdateGameSession.

", + "FleetAttributes$NewGameSessionProtectionPolicy": "

The type of game session protection to set for all new instances started in the fleet.

", "GameSessionDetail$ProtectionPolicy": "

Current status of protection for the game session.

", "UpdateFleetAttributesInput$NewGameSessionProtectionPolicy": "

Game session protection policy to apply to all new instances created in this fleet. Instances that already exist are not affected. You can set protection for individual instances using UpdateGameSession.

", "UpdateGameSessionInput$ProtectionPolicy": "

Game session protection policy to apply to this game session only.

" @@ -1739,9 +1802,9 @@ "QueueArnsList": { "base": null, "refs": { - "CreateMatchmakingConfigurationInput$GameSessionQueueArns": "

Amazon Resource Name (ARN) that is assigned to a game session queue and uniquely identifies it. Format is arn:aws:gamelift:<region>:<aws account>:gamesessionqueue/<queue name>. These queues are used when placing game sessions for matches that are created with this matchmaking configuration. Queues can be located in any region.

", - "MatchmakingConfiguration$GameSessionQueueArns": "

Amazon Resource Name (ARN) that is assigned to a game session queue and uniquely identifies it. Format is arn:aws:gamelift:<region>:<aws account>:gamesessionqueue/<queue name>. These queues are used when placing game sessions for matches that are created with this matchmaking configuration. Queues can be located in any region.

", - "UpdateMatchmakingConfigurationInput$GameSessionQueueArns": "

Amazon Resource Name (ARN) that is assigned to a game session queue and uniquely identifies it. Format is arn:aws:gamelift:<region>:<aws account>:gamesessionqueue/<queue name>. These queues are used when placing game sessions for matches that are created with this matchmaking configuration. Queues can be located in any region.

" + "CreateMatchmakingConfigurationInput$GameSessionQueueArns": "

Amazon Resource Name (ARN) that is assigned to a GameLift game session queue resource and uniquely identifies it. ARNs are unique across all Regions. These queues are used when placing game sessions for matches that are created with this matchmaking configuration. Queues can be located in any Region.

", + "MatchmakingConfiguration$GameSessionQueueArns": "

Amazon Resource Name (ARN) that is assigned to a GameLift game session queue resource and uniquely identifies it. ARNs are unique across all Regions. GameLift uses the listed queues when placing game sessions for matches that are created with this matchmaking configuration. Queues can be located in any Region.

", + "UpdateMatchmakingConfigurationInput$GameSessionQueueArns": "

Amazon Resource Name (ARN) that is assigned to a GameLift game session queue resource and uniquely identifies it. ARNs are unique across all Regions. These queues are used when placing game sessions for matches that are created with this matchmaking configuration. Queues can be located in any Region.

" } }, "RequestUploadCredentialsInput": { @@ -1765,67 +1828,67 @@ } }, "ResourceCreationLimitPolicy": { - "base": "

Policy that limits the number of game sessions a player can create on the same fleet. This optional policy gives game owners control over how players can consume available game server resources. A resource creation policy makes the following statement: \"An individual player can create a maximum number of new game sessions within a specified time period\".

The policy is evaluated when a player tries to create a new game session. For example, with a policy of 10 new game sessions and a time period of 60 minutes, on receiving a CreateGameSession request, Amazon GameLift checks that the player (identified by CreatorId) has created fewer than 10 game sessions in the past 60 minutes.

", + "base": "

A policy that limits the number of game sessions a player can create on the same fleet. This optional policy gives game owners control over how players can consume available game server resources. A resource creation policy makes the following statement: \"An individual player can create a maximum number of new game sessions within a specified time period\".

The policy is evaluated when a player tries to create a new game session. For example: Assume you have a policy of 10 new game sessions and a time period of 60 minutes. On receiving a CreateGameSession request, Amazon GameLift checks that the player (identified by CreatorId) has created fewer than 10 game sessions in the past 60 minutes.

", "refs": { - "CreateFleetInput$ResourceCreationLimitPolicy": "

Policy that limits the number of game sessions an individual player can create over a span of time for this fleet.

", + "CreateFleetInput$ResourceCreationLimitPolicy": "

A policy that limits the number of game sessions an individual player can create over a span of time for this fleet.

", "FleetAttributes$ResourceCreationLimitPolicy": "

Fleet policy to limit the number of game sessions an individual player can create over a span of time.

", "UpdateFleetAttributesInput$ResourceCreationLimitPolicy": "

Policy that limits the number of game sessions an individual player can create over a span of time.

" } }, "RoutingStrategy": { - "base": "

Routing configuration for a fleet alias.

", + "base": "

The routing configuration for a fleet alias.

", "refs": { - "Alias$RoutingStrategy": "

Alias configuration for the alias, including routing type and settings.

", - "CreateAliasInput$RoutingStrategy": "

Object that specifies the fleet and routing type to use for the alias.

", - "UpdateAliasInput$RoutingStrategy": "

Object that specifies the fleet and routing type to use for the alias.

" + "Alias$RoutingStrategy": "

The routing configuration, including routing type and fleet target, for the alias.

", + "CreateAliasInput$RoutingStrategy": "

The routing configuration, including routing type and fleet target, for the alias.

", + "UpdateAliasInput$RoutingStrategy": "

The routing configuration, including routing type and fleet target, for the alias.

" } }, "RoutingStrategyType": { "base": null, "refs": { - "ListAliasesInput$RoutingStrategyType": "

Type of routing to filter results on. Use this parameter to retrieve only aliases of a certain type. To retrieve all aliases, leave this parameter empty.

Possible routing types include the following:

", - "RoutingStrategy$Type": "

Type of routing strategy.

Possible routing types include the following:

" + "ListAliasesInput$RoutingStrategyType": "

The routing type to filter results on. Use this parameter to retrieve only aliases with a certain routing type. To retrieve all aliases, leave this parameter empty.

Possible routing types include the following:

", + "RoutingStrategy$Type": "

The type of routing strategy for the alias.

Possible routing types include the following:

" } }, "RuleSetBody": { "base": null, "refs": { - "CreateMatchmakingRuleSetInput$RuleSetBody": "

Collection of matchmaking rules, formatted as a JSON string. Comments are not allowed in JSON, but most elements support a description field.

", - "MatchmakingRuleSet$RuleSetBody": "

Collection of matchmaking rules, formatted as a JSON string. Comments are not allowed in JSON, but most elements support a description field.

", - "ValidateMatchmakingRuleSetInput$RuleSetBody": "

Collection of matchmaking rules to validate, formatted as a JSON string.

" + "CreateMatchmakingRuleSetInput$RuleSetBody": "

A collection of matchmaking rules, formatted as a JSON string. Comments are not allowed in JSON, but most elements support a description field.

", + "MatchmakingRuleSet$RuleSetBody": "

A collection of matchmaking rules, formatted as a JSON string. Comments are not allowed in JSON, but most elements support a description field.

", + "ValidateMatchmakingRuleSetInput$RuleSetBody": "

A collection of matchmaking rules to validate, formatted as a JSON string.

" } }, "RuleSetLimit": { "base": null, "refs": { - "DescribeMatchmakingRuleSetsInput$Limit": "

Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

" + "DescribeMatchmakingRuleSetsInput$Limit": "

The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

" } }, "RuntimeConfiguration": { - "base": "

A collection of server process configurations that describe what processes to run on each instance in a fleet. Server processes run either a custom game build executable or a Realtime Servers script. Each instance in the fleet starts the specified server processes and continues to start new processes as existing processes end. An instance regularly checks for an updated run-time configuration.

The run-time configuration enables the instances in a fleet to run multiple processes simultaneously. Learn more about Running Multiple Processes on a Fleet .

A Amazon GameLift instance is limited to 50 processes running simultaneously. To calculate the total number of processes in a run-time configuration, add the values of the ConcurrentExecutions parameter for each ServerProcess object.

", + "base": "

A collection of server process configurations that describe what processes to run on each instance in a fleet. Server processes run either a custom game build executable or a Realtime Servers script. Each instance in the fleet starts the specified server processes and continues to start new processes as existing processes end. Each instance regularly checks for an updated runtime configuration.

The runtime configuration enables the instances in a fleet to run multiple processes simultaneously. Learn more about Running Multiple Processes on a Fleet .

A Amazon GameLift instance is limited to 50 processes running simultaneously. To calculate the total number of processes in a runtime configuration, add the values of the ConcurrentExecutions parameter for each ServerProcess object.

", "refs": { - "CreateFleetInput$RuntimeConfiguration": "

Instructions for launching server processes on each instance in the fleet. Server processes run either a custom game build executable or a Realtime Servers script. The run-time configuration lists the types of server processes to run on an instance and includes the following configuration settings: the server executable or launch script file, launch parameters, and the number of processes to run concurrently on each instance. A CreateFleet request must include a run-time configuration with at least one server process configuration.

", + "CreateFleetInput$RuntimeConfiguration": "

Instructions for launching server processes on each instance in the fleet. Server processes run either a custom game build executable or a Realtime script. The runtime configuration defines the server executables or launch script file, launch parameters, and the number of processes to run concurrently on each instance. When creating a fleet, the runtime configuration must have at least one server process configuration; otherwise the request fails with an invalid request exception. (This parameter replaces the parameters ServerLaunchPath and ServerLaunchParameters, although requests that contain values for these parameters instead of a runtime configuration will continue to work.) This parameter is required unless the parameters ServerLaunchPath and ServerLaunchParameters are defined. Runtime configuration replaced these parameters, but fleets that use them will continue to work.

", "DescribeRuntimeConfigurationOutput$RuntimeConfiguration": "

Instructions describing how server processes should be launched and maintained on each instance in the fleet.

", - "UpdateRuntimeConfigurationInput$RuntimeConfiguration": "

Instructions for launching server processes on each instance in the fleet. Server processes run either a custom game build executable or a Realtime Servers script. The run-time configuration lists the types of server processes to run on an instance and includes the following configuration settings: the server executable or launch script file, launch parameters, and the number of processes to run concurrently on each instance. A CreateFleet request must include a run-time configuration with at least one server process configuration.

", - "UpdateRuntimeConfigurationOutput$RuntimeConfiguration": "

The run-time configuration currently in force. If the update was successful, this object matches the one in the request.

" + "UpdateRuntimeConfigurationInput$RuntimeConfiguration": "

Instructions for launching server processes on each instance in the fleet. Server processes run either a custom game build executable or a Realtime Servers script. The runtime configuration lists the types of server processes to run on an instance and includes the following configuration settings: the server executable or launch script file, launch parameters, and the number of processes to run concurrently on each instance. A CreateFleet request must include a runtime configuration with at least one server process configuration.

", + "UpdateRuntimeConfigurationOutput$RuntimeConfiguration": "

The runtime configuration currently in force. If the update was successful, this object matches the one in the request.

" } }, "S3Location": { - "base": "

Location in Amazon Simple Storage Service (Amazon S3) where build or script files are stored for access by Amazon GameLift. This location is specified in CreateBuild, CreateScript, and UpdateScript requests.

", + "base": "

The location in Amazon S3 where build or script files are stored for access by Amazon GameLift. This location is specified in CreateBuild, CreateScript, and UpdateScript requests.

", "refs": { - "CreateBuildInput$StorageLocation": "

Information indicating where your game build files are stored. Use this parameter only when creating a build with files stored in an Amazon S3 bucket that you own. The storage location must specify an Amazon S3 bucket name and key, as well as a the ARN for a role that you set up to allow Amazon GameLift to access your Amazon S3 bucket. The S3 bucket must be in the same region that you want to create a new build in.

", + "CreateBuildInput$StorageLocation": "

Information indicating where your game build files are stored. Use this parameter only when creating a build with files stored in an Amazon S3 bucket that you own. The storage location must specify an Amazon S3 bucket name and key. The location must also specify a role ARN that you set up to allow Amazon GameLift to access your Amazon S3 bucket. The S3 bucket and your new build must be in the same Region.

", "CreateBuildOutput$StorageLocation": "

Amazon S3 location for your game build file, including bucket name and key.

", - "CreateScriptInput$StorageLocation": "

Location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored. The storage location must specify the Amazon S3 bucket name, the zip file name (the \"key\"), and a role ARN that allows Amazon GameLift to access the Amazon S3 storage location. The S3 bucket must be in the same region where you want to create a new script. By default, Amazon GameLift uploads the latest version of the zip file; if you have S3 object versioning turned on, you can use the ObjectVersion parameter to specify an earlier version.

", + "CreateScriptInput$StorageLocation": "

The location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored. The storage location must specify the Amazon S3 bucket name, the zip file name (the \"key\"), and a role ARN that allows Amazon GameLift to access the Amazon S3 storage location. The S3 bucket must be in the same Region where you want to create a new script. By default, Amazon GameLift uploads the latest version of the zip file; if you have S3 object versioning turned on, you can use the ObjectVersion parameter to specify an earlier version.

", "RequestUploadCredentialsOutput$StorageLocation": "

Amazon S3 path and key, identifying where the game build files are stored.

", "Script$StorageLocation": null, - "UpdateScriptInput$StorageLocation": "

Location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored. The storage location must specify the Amazon S3 bucket name, the zip file name (the \"key\"), and a role ARN that allows Amazon GameLift to access the Amazon S3 storage location. The S3 bucket must be in the same region where you want to create a new script. By default, Amazon GameLift uploads the latest version of the zip file; if you have S3 object versioning turned on, you can use the ObjectVersion parameter to specify an earlier version.

" + "UpdateScriptInput$StorageLocation": "

The location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored. The storage location must specify the Amazon S3 bucket name, the zip file name (the \"key\"), and a role ARN that allows Amazon GameLift to access the Amazon S3 storage location. The S3 bucket must be in the same Region where you want to create a new script. By default, Amazon GameLift uploads the latest version of the zip file; if you have S3 object versioning turned on, you can use the ObjectVersion parameter to specify an earlier version.

" } }, "ScalingAdjustmentType": { "base": null, "refs": { - "PutScalingPolicyInput$ScalingAdjustmentType": "

Type of adjustment to make to a fleet's instance count (see FleetCapacity):

", - "ScalingPolicy$ScalingAdjustmentType": "

Type of adjustment to make to a fleet's instance count (see FleetCapacity):

" + "PutScalingPolicyInput$ScalingAdjustmentType": "

The type of adjustment to make to a fleet's instance count (see FleetCapacity):

", + "ScalingPolicy$ScalingAdjustmentType": "

The type of adjustment to make to a fleet's instance count (see FleetCapacity):

" } }, "ScalingPolicy": { @@ -1837,7 +1900,7 @@ "ScalingPolicyList": { "base": null, "refs": { - "DescribeScalingPoliciesOutput$ScalingPolicies": "

Collection of objects containing the scaling policies matching the request.

" + "DescribeScalingPoliciesOutput$ScalingPolicies": "

A collection of objects containing the scaling policies matching the request.

" } }, "ScalingStatusType": { @@ -1850,28 +1913,35 @@ "Script": { "base": "

Properties describing a Realtime script.

Related operations

", "refs": { - "CreateScriptOutput$Script": "

The newly created script record with a unique script ID. The new script's storage location reflects an Amazon S3 location: (1) If the script was uploaded from an S3 bucket under your account, the storage location reflects the information that was provided in the CreateScript request; (2) If the script file was uploaded from a local zip file, the storage location reflects an S3 location controls by the Amazon GameLift service.

", - "DescribeScriptOutput$Script": "

Set of properties describing the requested script.

", + "CreateScriptOutput$Script": "

The newly created script record with a unique script ID and ARN. The new script's storage location reflects an Amazon S3 location: (1) If the script was uploaded from an S3 bucket under your account, the storage location reflects the information that was provided in the CreateScript request; (2) If the script file was uploaded from a local zip file, the storage location reflects an S3 location controls by the Amazon GameLift service.

", + "DescribeScriptOutput$Script": "

A set of properties describing the requested script.

", "ScriptList$member": null, "UpdateScriptOutput$Script": "

The newly created script record with a unique script ID. The new script's storage location reflects an Amazon S3 location: (1) If the script was uploaded from an S3 bucket under your account, the storage location reflects the information that was provided in the CreateScript request; (2) If the script file was uploaded from a local zip file, the storage location reflects an S3 location controls by the Amazon GameLift service.

" } }, + "ScriptArn": { + "base": null, + "refs": { + "FleetAttributes$ScriptArn": "

The Amazon Resource Name (ARN) associated with the GameLift script resource that is deployed on instances in this fleet. In a GameLift script ARN, the resource ID matches the ScriptId value.

", + "Script$ScriptArn": "

Amazon Resource Name (ARN) that is assigned to a GameLift script resource and uniquely identifies it. ARNs are unique across all Regions. In a GameLift script ARN, the resource ID matches the ScriptId value.

" + } + }, "ScriptId": { "base": null, "refs": { - "CreateFleetInput$ScriptId": "

Unique identifier for a Realtime script to be deployed on the new fleet. The Realtime script must have been successfully uploaded to Amazon GameLift. This fleet setting cannot be changed once the fleet is created.

", - "DeleteScriptInput$ScriptId": "

Unique identifier for a Realtime script to delete.

", - "DescribeScriptInput$ScriptId": "

Unique identifier for a Realtime script to retrieve properties for.

", - "FleetAttributes$ScriptId": "

Unique identifier for a Realtime script.

", - "ListFleetsInput$ScriptId": "

Unique identifier for a Realtime script to return fleets for. Use this parameter to return only fleets using the specified script. To retrieve all fleets, leave this parameter empty.

", - "Script$ScriptId": "

Unique identifier for a Realtime script

", - "UpdateScriptInput$ScriptId": "

Unique identifier for a Realtime script to update.

" + "CreateFleetInput$ScriptId": "

A unique identifier for a Realtime script to be deployed on the new fleet. You can use either the script ID or ARN value. The Realtime script must have been successfully uploaded to Amazon GameLift. This fleet setting cannot be changed once the fleet is created.

", + "DeleteScriptInput$ScriptId": "

A unique identifier for a Realtime script to delete. You can use either the script ID or ARN value.

", + "DescribeScriptInput$ScriptId": "

A unique identifier for a Realtime script to retrieve properties for. You can use either the script ID or ARN value.

", + "FleetAttributes$ScriptId": "

A unique identifier for a Realtime script.

", + "ListFleetsInput$ScriptId": "

A unique identifier for a Realtime script to return fleets for. Use this parameter to return only fleets using the specified script. Use either the script ID or ARN value.To retrieve all fleets, leave this parameter empty.

", + "Script$ScriptId": "

A unique identifier for a Realtime script

", + "UpdateScriptInput$ScriptId": "

A unique identifier for a Realtime script to update. You can use either the script ID or ARN value.

" } }, "ScriptList": { "base": null, "refs": { - "ListScriptsOutput$Scripts": "

Set of properties describing the requested script.

" + "ListScriptsOutput$Scripts": "

A set of properties describing the requested script.

" } }, "SearchGameSessionsInput": { @@ -1893,15 +1963,15 @@ "ServerProcessList": { "base": null, "refs": { - "RuntimeConfiguration$ServerProcesses": "

Collection of server process configurations that describe which server processes to run on each instance in a fleet.

" + "RuntimeConfiguration$ServerProcesses": "

A collection of server process configurations that describe which server processes to run on each instance in a fleet.

" } }, "SnsArnStringModel": { "base": null, "refs": { - "CreateMatchmakingConfigurationInput$NotificationTarget": "

SNS topic ARN that is set up to receive matchmaking notifications.

", - "MatchmakingConfiguration$NotificationTarget": "

SNS topic ARN that is set up to receive matchmaking notifications.

", - "UpdateMatchmakingConfigurationInput$NotificationTarget": "

SNS topic ARN that is set up to receive matchmaking notifications. See Setting up Notifications for Matchmaking for more information.

" + "CreateMatchmakingConfigurationInput$NotificationTarget": "

An SNS topic ARN that is set up to receive matchmaking notifications.

", + "MatchmakingConfiguration$NotificationTarget": "

An SNS topic ARN that is set up to receive matchmaking notifications.

", + "UpdateMatchmakingConfigurationInput$NotificationTarget": "

An SNS topic ARN that is set up to receive matchmaking notifications. See Setting up Notifications for Matchmaking for more information.

" } }, "StartFleetActionsInput": { @@ -1983,7 +2053,7 @@ "StringList": { "base": null, "refs": { - "AcceptMatchInput$PlayerIds": "

Unique identifier for a player delivering the response. This parameter can include one or multiple player IDs.

", + "AcceptMatchInput$PlayerIds": "

A unique identifier for a player delivering the response. This parameter can include one or multiple player IDs.

", "AttributeValue$SL": "

For a list of up to 10 strings. Maximum length for each string is 100 characters. Duplicate values are not recognized; all occurrences of the repeated value after the first of a repeated value are ignored.

", "CreateFleetInput$LogPaths": "

This parameter is no longer used. Instead, to specify where Amazon GameLift should store log files once a server process shuts down, use the Amazon GameLift server API ProcessReady() and specify one or more directory paths in logParameters. See more information in the Server API Reference.

", "FleetAttributes$LogPaths": "

Location of default log files. When a server process is shut down, Amazon GameLift captures and stores any log files in this location. These logs are in addition to game session logs; see more on game session logs in the Amazon GameLift Developer Guide. If no default log path for a fleet is specified, Amazon GameLift automatically uploads logs that are stored on each instance at C:\\game\\logs (for Windows) or /local/game/logs (for Linux). Use the Amazon GameLift console to access stored logs.

" @@ -1992,16 +2062,70 @@ "StringModel": { "base": null, "refs": { - "GameSessionConnectionInfo$IpAddress": "

IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.

", + "GameSessionConnectionInfo$IpAddress": "

IP address of the instance that is running the game session. When connecting to a Amazon GameLift game server, a client needs to reference an IP address (or DNS name) and port number.

", "MatchmakingTicket$StatusReason": "

Code to explain the current status. For example, a status reason may indicate when a ticket has returned to SEARCHING status after a proposed match fails to receive player acceptances.

", "MatchmakingTicket$StatusMessage": "

Additional information about the current status.

" } }, + "Tag": { + "base": "

A label that can be assigned to a GameLift resource.

Learn more

Tagging AWS Resources in the AWS General Reference

AWS Tagging Strategies

Related operations

", + "refs": { + "TagList$member": null + } + }, + "TagKey": { + "base": null, + "refs": { + "Tag$Key": "

The key for a developer-defined key:value pair for tagging an AWS resource.

", + "TagKeyList$member": null + } + }, + "TagKeyList": { + "base": null, + "refs": { + "UntagResourceRequest$TagKeys": "

A list of one or more tags to remove from the specified GameLift resource. Tags are developer-defined and structured as key-value pairs.

" + } + }, + "TagList": { + "base": null, + "refs": { + "CreateAliasInput$Tags": "

A list of labels to assign to the new alias resource. Tags are developer-defined key-value pairs. Tagging AWS resources are useful for resource management, access management and cost allocation. For more information, see Tagging AWS Resources in the AWS General Reference. Once the resource is created, you can use TagResource, UntagResource, and ListTagsForResource to add, remove, and view tags. The maximum tag limit may be lower than stated. See the AWS General Reference for actual tagging limits.

", + "CreateBuildInput$Tags": "

A list of labels to assign to the new build resource. Tags are developer-defined key-value pairs. Tagging AWS resources are useful for resource management, access management and cost allocation. For more information, see Tagging AWS Resources in the AWS General Reference. Once the resource is created, you can use TagResource, UntagResource, and ListTagsForResource to add, remove, and view tags. The maximum tag limit may be lower than stated. See the AWS General Reference for actual tagging limits.

", + "CreateFleetInput$Tags": "

A list of labels to assign to the new fleet resource. Tags are developer-defined key-value pairs. Tagging AWS resources are useful for resource management, access management and cost allocation. For more information, see Tagging AWS Resources in the AWS General Reference. Once the resource is created, you can use TagResource, UntagResource, and ListTagsForResource to add, remove, and view tags. The maximum tag limit may be lower than stated. See the AWS General Reference for actual tagging limits.

", + "CreateGameSessionQueueInput$Tags": "

A list of labels to assign to the new game session queue resource. Tags are developer-defined key-value pairs. Tagging AWS resources are useful for resource management, access management and cost allocation. For more information, see Tagging AWS Resources in the AWS General Reference. Once the resource is created, you can use TagResource, UntagResource, and ListTagsForResource to add, remove, and view tags. The maximum tag limit may be lower than stated. See the AWS General Reference for actual tagging limits.

", + "CreateMatchmakingConfigurationInput$Tags": "

A list of labels to assign to the new matchmaking configuration resource. Tags are developer-defined key-value pairs. Tagging AWS resources are useful for resource management, access management and cost allocation. For more information, see Tagging AWS Resources in the AWS General Reference. Once the resource is created, you can use TagResource, UntagResource, and ListTagsForResource to add, remove, and view tags. The maximum tag limit may be lower than stated. See the AWS General Reference for actual tagging limits.

", + "CreateMatchmakingRuleSetInput$Tags": "

A list of labels to assign to the new matchmaking rule set resource. Tags are developer-defined key-value pairs. Tagging AWS resources are useful for resource management, access management and cost allocation. For more information, see Tagging AWS Resources in the AWS General Reference. Once the resource is created, you can use TagResource, UntagResource, and ListTagsForResource to add, remove, and view tags. The maximum tag limit may be lower than stated. See the AWS General Reference for actual tagging limits.

", + "CreateScriptInput$Tags": "

A list of labels to assign to the new script resource. Tags are developer-defined key-value pairs. Tagging AWS resources are useful for resource management, access management and cost allocation. For more information, see Tagging AWS Resources in the AWS General Reference. Once the resource is created, you can use TagResource, UntagResource, and ListTagsForResource to add, remove, and view tags. The maximum tag limit may be lower than stated. See the AWS General Reference for actual tagging limits.

", + "ListTagsForResourceResponse$Tags": "

The collection of tags that have been assigned to the specified resource.

", + "TagResourceRequest$Tags": "

A list of one or more tags to assign to the specified GameLift resource. Tags are developer-defined and structured as key-value pairs. The maximum tag limit may be lower than stated. See Tagging AWS Resources for actual tagging limits.

" + } + }, + "TagResourceRequest": { + "base": null, + "refs": { + } + }, + "TagResourceResponse": { + "base": null, + "refs": { + } + }, + "TagValue": { + "base": null, + "refs": { + "Tag$Value": "

The value for a developer-defined key:value pair for tagging an AWS resource.

" + } + }, + "TaggingFailedException": { + "base": "

The requested tagging operation did not succeed. This may be due to invalid tag format or the maximum tag limit may have been exceeded. Resolve the issue before retrying.

", + "refs": { + } + }, "TargetConfiguration": { "base": "

Settings for a target-based scaling policy (see ScalingPolicy. A target-based policy tracks a particular fleet metric specifies a target value for the metric. As player usage changes, the policy triggers Amazon GameLift to adjust capacity so that the metric returns to the target value. The target configuration specifies settings as needed for the target based policy, including the target value.

", "refs": { - "PutScalingPolicyInput$TargetConfiguration": "

Object that contains settings for a target-based scaling policy.

", - "ScalingPolicy$TargetConfiguration": "

Object that contains settings for a target-based scaling policy.

" + "PutScalingPolicyInput$TargetConfiguration": "

The settings for a target-based scaling policy.

", + "ScalingPolicy$TargetConfiguration": "

The settings for a target-based scaling policy.

" } }, "TerminalRoutingStrategyException": { @@ -2012,8 +2136,8 @@ "Timestamp": { "base": null, "refs": { - "Alias$CreationTime": "

Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example \"1469498468.057\").

", - "Alias$LastUpdatedTime": "

Time stamp indicating when this data object was last modified. Format is a number expressed in Unix time as milliseconds (for example \"1469498468.057\").

", + "Alias$CreationTime": "

A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example \"1469498468.057\").

", + "Alias$LastUpdatedTime": "

The time that this data object was last modified. Format is a number expressed in Unix time as milliseconds (for example \"1469498468.057\").

", "Build$CreationTime": "

Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example \"1469498468.057\").

", "DescribeFleetEventsInput$StartTime": "

Earliest date to retrieve event logs for. If no start time is specified, this call returns entries starting from when the fleet was created to the specified end time. Format is a number expressed in Unix time as milliseconds (ex: \"1469498468.057\").

", "DescribeFleetEventsInput$EndTime": "

Most recent date to retrieve event logs for. If no end time is specified, this call returns entries from the specified start time up to the present. Format is a number expressed in Unix time as milliseconds (ex: \"1469498468.057\").

", @@ -2025,13 +2149,13 @@ "GameSessionPlacement$StartTime": "

Time stamp indicating when this request was placed in the queue. Format is a number expressed in Unix time as milliseconds (for example \"1469498468.057\").

", "GameSessionPlacement$EndTime": "

Time stamp indicating when this request was completed, canceled, or timed out.

", "Instance$CreationTime": "

Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example \"1469498468.057\").

", - "MatchmakingConfiguration$CreationTime": "

Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example \"1469498468.057\").

", - "MatchmakingRuleSet$CreationTime": "

Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example \"1469498468.057\").

", + "MatchmakingConfiguration$CreationTime": "

The time stamp indicating when this data object was created. The format is a number expressed in Unix time as milliseconds (for example \"1469498468.057\").

", + "MatchmakingRuleSet$CreationTime": "

The time stamp indicating when this data object was created. The format is a number expressed in Unix time as milliseconds (for example \"1469498468.057\").

", "MatchmakingTicket$StartTime": "

Time stamp indicating when this matchmaking request was received. Format is a number expressed in Unix time as milliseconds (for example \"1469498468.057\").

", "MatchmakingTicket$EndTime": "

Time stamp indicating when this matchmaking request stopped being processed due to success, failure, or cancellation. Format is a number expressed in Unix time as milliseconds (for example \"1469498468.057\").

", "PlayerSession$CreationTime": "

Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example \"1469498468.057\").

", "PlayerSession$TerminationTime": "

Time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (for example \"1469498468.057\").

", - "Script$CreationTime": "

Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example \"1469498468.057\").

", + "Script$CreationTime": "

A time stamp indicating when this data object was created. The format is a number expressed in Unix time as milliseconds (for example \"1469498468.057\").

", "VpcPeeringAuthorization$CreationTime": "

Time stamp indicating when this authorization was issued. Format is a number expressed in Unix time as milliseconds (for example \"1469498468.057\").

", "VpcPeeringAuthorization$ExpirationTime": "

Time stamp indicating when this authorization expires (24 hours after issuance). Format is a number expressed in Unix time as milliseconds (for example \"1469498468.057\").

" } @@ -2042,7 +2166,17 @@ } }, "UnsupportedRegionException": { - "base": "

The requested operation is not supported in the region specified.

", + "base": "

The requested operation is not supported in the Region specified.

", + "refs": { + } + }, + "UntagResourceRequest": { + "base": null, + "refs": { + } + }, + "UntagResourceResponse": { + "base": null, "refs": { } }, @@ -2166,7 +2300,7 @@ "VpcPeeringAuthorizationList": { "base": null, "refs": { - "DescribeVpcPeeringAuthorizationsOutput$VpcPeeringAuthorizations": "

Collection of objects that describe all valid VPC peering operations for the current AWS account.

" + "DescribeVpcPeeringAuthorizationsOutput$VpcPeeringAuthorizations": "

A collection of objects that describe all valid VPC peering operations for the current AWS account.

" } }, "VpcPeeringConnection": { @@ -2178,24 +2312,24 @@ "VpcPeeringConnectionList": { "base": null, "refs": { - "DescribeVpcPeeringConnectionsOutput$VpcPeeringConnections": "

Collection of VPC peering connection records that match the request.

" + "DescribeVpcPeeringConnectionsOutput$VpcPeeringConnections": "

A collection of VPC peering connection records that match the request.

" } }, "VpcPeeringConnectionStatus": { "base": "

Represents status information for a VPC peering connection. Status is associated with a VpcPeeringConnection object. Status codes and messages are provided from EC2 (see VpcPeeringConnectionStateReason). Connection status information is also communicated as a fleet Event.

", "refs": { - "VpcPeeringConnection$Status": "

Object that contains status information about the connection. Status indicates if a connection is pending, successful, or failed.

" + "VpcPeeringConnection$Status": "

The status information about the connection. Status indicates if a connection is pending, successful, or failed.

" } }, "WholeNumber": { "base": null, "refs": { - "CreateGameSessionInput$MaximumPlayerSessionCount": "

Maximum number of players that can be connected simultaneously to the game session.

", - "CreateGameSessionQueueInput$TimeoutInSeconds": "

Maximum time, in seconds, that a new game session placement request remains in the queue. When a request exceeds this time, the game session placement changes to a TIMED_OUT status.

", - "CreateMatchmakingConfigurationInput$AdditionalPlayerCount": "

Number of player slots in a match to keep open for future players. For example, if the configuration's rule set specifies a match for a single 12-person team, and the additional player count is set to 2, only 10 players are selected for the match.

", + "CreateGameSessionInput$MaximumPlayerSessionCount": "

The maximum number of players that can be connected simultaneously to the game session.

", + "CreateGameSessionQueueInput$TimeoutInSeconds": "

The maximum time, in seconds, that a new game session placement request remains in the queue. When a request exceeds this time, the game session placement changes to a TIMED_OUT status.

", + "CreateMatchmakingConfigurationInput$AdditionalPlayerCount": "

The number of player slots in a match to keep open for future players. For example, assume that the configuration's rule set specifies a match for a single 12-person team. If the additional player count is set to 2, only 10 players are initially selected for the match.

", "EC2InstanceCounts$DESIRED": "

Ideal number of active instances in the fleet.

", - "EC2InstanceCounts$MINIMUM": "

Minimum value allowed for the fleet's instance count.

", - "EC2InstanceCounts$MAXIMUM": "

Maximum value allowed for the fleet's instance count.

", + "EC2InstanceCounts$MINIMUM": "

The minimum value allowed for the fleet's instance count.

", + "EC2InstanceCounts$MAXIMUM": "

The maximum value allowed for the fleet's instance count.

", "EC2InstanceCounts$PENDING": "

Number of instances in the fleet that are starting but not yet active.

", "EC2InstanceCounts$ACTIVE": "

Actual number of active instances in the fleet.

", "EC2InstanceCounts$IDLE": "

Number of active instances in the fleet that are not currently hosting a game session.

", @@ -2205,31 +2339,31 @@ "FleetUtilization$ActiveServerProcessCount": "

Number of server processes in an ACTIVE status currently running across all instances in the fleet

", "FleetUtilization$ActiveGameSessionCount": "

Number of active game sessions currently being hosted on all instances in the fleet.

", "FleetUtilization$CurrentPlayerSessionCount": "

Number of active player sessions currently being hosted on all instances in the fleet.

", - "FleetUtilization$MaximumPlayerSessionCount": "

Maximum players allowed across all game sessions currently being hosted on all instances in the fleet.

", + "FleetUtilization$MaximumPlayerSessionCount": "

The maximum number of players allowed across all game sessions currently being hosted on all instances in the fleet.

", "GameSession$CurrentPlayerSessionCount": "

Number of players currently in the game session.

", - "GameSession$MaximumPlayerSessionCount": "

Maximum number of players that can be connected simultaneously to the game session.

", - "GameSessionPlacement$MaximumPlayerSessionCount": "

Maximum number of players that can be connected simultaneously to the game session.

", - "GameSessionQueue$TimeoutInSeconds": "

Maximum time, in seconds, that a new game session placement request remains in the queue. When a request exceeds this time, the game session placement changes to a TIMED_OUT status.

", - "MatchmakingConfiguration$AdditionalPlayerCount": "

Number of player slots in a match to keep open for future players. For example, if the configuration's rule set specifies a match for a single 12-person team, and the additional player count is set to 2, only 10 players are selected for the match.

", + "GameSession$MaximumPlayerSessionCount": "

The maximum number of players that can be connected simultaneously to the game session.

", + "GameSessionPlacement$MaximumPlayerSessionCount": "

The maximum number of players that can be connected simultaneously to the game session.

", + "GameSessionQueue$TimeoutInSeconds": "

The maximum time, in seconds, that a new game session placement request remains in the queue. When a request exceeds this time, the game session placement changes to a TIMED_OUT status.

", + "MatchmakingConfiguration$AdditionalPlayerCount": "

The number of player slots in a match to keep open for future players. For example, assume that the configuration's rule set specifies a match for a single 12-person team. If the additional player count is set to 2, only 10 players are initially selected for the match.

", "MatchmakingTicket$EstimatedWaitTime": "

Average amount of time (in seconds) that players are currently waiting for a match. If there is not enough recent data, this property may be empty.

", "PlayerLatencyPolicy$MaximumIndividualPlayerLatencyMilliseconds": "

The maximum latency value that is allowed for any player, in milliseconds. All policies must have a value set for this property.

", "PlayerLatencyPolicy$PolicyDurationSeconds": "

The length of time, in seconds, that the policy is enforced while placing a new game session. A null value for this property means that the policy is enforced until the queue times out.

", - "ResourceCreationLimitPolicy$NewGameSessionsPerCreator": "

Maximum number of game sessions that an individual can create during the policy period.

", - "ResourceCreationLimitPolicy$PolicyPeriodInMinutes": "

Time span used in evaluating the resource creation limit policy.

", - "StartGameSessionPlacementInput$MaximumPlayerSessionCount": "

Maximum number of players that can be connected simultaneously to the game session.

", + "ResourceCreationLimitPolicy$NewGameSessionsPerCreator": "

The maximum number of game sessions that an individual can create during the policy period.

", + "ResourceCreationLimitPolicy$PolicyPeriodInMinutes": "

The time span used in evaluating the resource creation limit policy.

", + "StartGameSessionPlacementInput$MaximumPlayerSessionCount": "

The maximum number of players that can be connected simultaneously to the game session.

", "UpdateFleetCapacityInput$DesiredInstances": "

Number of EC2 instances you want this fleet to host.

", - "UpdateFleetCapacityInput$MinSize": "

Minimum value allowed for the fleet's instance count. Default if not set is 0.

", - "UpdateFleetCapacityInput$MaxSize": "

Maximum value allowed for the fleet's instance count. Default if not set is 1.

", - "UpdateGameSessionInput$MaximumPlayerSessionCount": "

Maximum number of players that can be connected simultaneously to the game session.

", - "UpdateGameSessionQueueInput$TimeoutInSeconds": "

Maximum time, in seconds, that a new game session placement request remains in the queue. When a request exceeds this time, the game session placement changes to a TIMED_OUT status.

", - "UpdateMatchmakingConfigurationInput$AdditionalPlayerCount": "

Number of player slots in a match to keep open for future players. For example, if the configuration's rule set specifies a match for a single 12-person team, and the additional player count is set to 2, only 10 players are selected for the match.

" + "UpdateFleetCapacityInput$MinSize": "

The minimum value allowed for the fleet's instance count. Default if not set is 0.

", + "UpdateFleetCapacityInput$MaxSize": "

The maximum value allowed for the fleet's instance count. Default if not set is 1.

", + "UpdateGameSessionInput$MaximumPlayerSessionCount": "

The maximum number of players that can be connected simultaneously to the game session.

", + "UpdateGameSessionQueueInput$TimeoutInSeconds": "

The maximum time, in seconds, that a new game session placement request remains in the queue. When a request exceeds this time, the game session placement changes to a TIMED_OUT status.

", + "UpdateMatchmakingConfigurationInput$AdditionalPlayerCount": "

The number of player slots in a match to keep open for future players. For example, assume that the configuration's rule set specifies a match for a single 12-person team. If the additional player count is set to 2, only 10 players are initially selected for the match.

" } }, "ZipBlob": { "base": null, "refs": { - "CreateScriptInput$ZipFile": "

Data object containing your Realtime scripts and dependencies as a zip file. The zip file can have one or multiple files. Maximum size of a zip file is 5 MB.

When using the AWS CLI tool to create a script, this parameter is set to the zip file name. It must be prepended with the string \"fileb://\" to indicate that the file data is a binary object. For example: --zip-file fileb://myRealtimeScript.zip.

", - "UpdateScriptInput$ZipFile": "

Data object containing your Realtime scripts and dependencies as a zip file. The zip file can have one or multiple files. Maximum size of a zip file is 5 MB.

When using the AWS CLI tool to create a script, this parameter is set to the zip file name. It must be prepended with the string \"fileb://\" to indicate that the file data is a binary object. For example: --zip-file fileb://myRealtimeScript.zip.

" + "CreateScriptInput$ZipFile": "

A data object containing your Realtime scripts and dependencies as a zip file. The zip file can have one or multiple files. Maximum size of a zip file is 5 MB.

When using the AWS CLI tool to create a script, this parameter is set to the zip file name. It must be prepended with the string \"fileb://\" to indicate that the file data is a binary object. For example: --zip-file fileb://myRealtimeScript.zip.

", + "UpdateScriptInput$ZipFile": "

A data object containing your Realtime scripts and dependencies as a zip file. The zip file can have one or multiple files. Maximum size of a zip file is 5 MB.

When using the AWS CLI tool to create a script, this parameter is set to the zip file name. It must be prepended with the string \"fileb://\" to indicate that the file data is a binary object. For example: --zip-file fileb://myRealtimeScript.zip.

" } } } diff --git a/models/apis/health/2016-08-04/api-2.json b/models/apis/health/2016-08-04/api-2.json index 4d342f4b76e..b6aa4532ef4 100644 --- a/models/apis/health/2016-08-04/api-2.json +++ b/models/apis/health/2016-08-04/api-2.json @@ -13,6 +13,19 @@ "uid":"health-2016-08-04" }, "operations":{ + "DescribeAffectedAccountsForOrganization":{ + "name":"DescribeAffectedAccountsForOrganization", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeAffectedAccountsForOrganizationRequest"}, + "output":{"shape":"DescribeAffectedAccountsForOrganizationResponse"}, + "errors":[ + {"shape":"InvalidPaginationToken"} + ], + "idempotent":true + }, "DescribeAffectedEntities":{ "name":"DescribeAffectedEntities", "http":{ @@ -27,6 +40,20 @@ ], "idempotent":true }, + "DescribeAffectedEntitiesForOrganization":{ + "name":"DescribeAffectedEntitiesForOrganization", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeAffectedEntitiesForOrganizationRequest"}, + "output":{"shape":"DescribeAffectedEntitiesForOrganizationResponse"}, + "errors":[ + {"shape":"InvalidPaginationToken"}, + {"shape":"UnsupportedLocale"} + ], + "idempotent":true + }, "DescribeEntityAggregates":{ "name":"DescribeEntityAggregates", "http":{ @@ -63,6 +90,19 @@ ], "idempotent":true }, + "DescribeEventDetailsForOrganization":{ + "name":"DescribeEventDetailsForOrganization", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeEventDetailsForOrganizationRequest"}, + "output":{"shape":"DescribeEventDetailsForOrganizationResponse"}, + "errors":[ + {"shape":"UnsupportedLocale"} + ], + "idempotent":true + }, "DescribeEventTypes":{ "name":"DescribeEventTypes", "http":{ @@ -90,6 +130,51 @@ {"shape":"UnsupportedLocale"} ], "idempotent":true + }, + "DescribeEventsForOrganization":{ + "name":"DescribeEventsForOrganization", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeEventsForOrganizationRequest"}, + "output":{"shape":"DescribeEventsForOrganizationResponse"}, + "errors":[ + {"shape":"InvalidPaginationToken"}, + {"shape":"UnsupportedLocale"} + ], + "idempotent":true + }, + "DescribeHealthServiceStatusForOrganization":{ + "name":"DescribeHealthServiceStatusForOrganization", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "output":{"shape":"DescribeHealthServiceStatusForOrganizationResponse"}, + "idempotent":true + }, + "DisableHealthServiceAccessForOrganization":{ + "name":"DisableHealthServiceAccessForOrganization", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "errors":[ + {"shape":"ConcurrentModificationException"} + ], + "idempotent":true + }, + "EnableHealthServiceAccessForOrganization":{ + "name":"EnableHealthServiceAccessForOrganization", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "errors":[ + {"shape":"ConcurrentModificationException"} + ], + "idempotent":true } }, "shapes":{ @@ -106,6 +191,13 @@ "tags":{"shape":"tagSet"} } }, + "ConcurrentModificationException":{ + "type":"structure", + "members":{ + "message":{"shape":"string"} + }, + "exception":true + }, "DateTimeRange":{ "type":"structure", "members":{ @@ -113,6 +205,44 @@ "to":{"shape":"timestamp"} } }, + "DescribeAffectedAccountsForOrganizationRequest":{ + "type":"structure", + "required":["eventArn"], + "members":{ + "eventArn":{"shape":"eventArn"}, + "nextToken":{"shape":"nextToken"}, + "maxResults":{"shape":"maxResults"} + } + }, + "DescribeAffectedAccountsForOrganizationResponse":{ + "type":"structure", + "members":{ + "affectedAccounts":{"shape":"affectedAccountsList"}, + "nextToken":{"shape":"nextToken"} + } + }, + "DescribeAffectedEntitiesForOrganizationFailedSet":{ + "type":"list", + "member":{"shape":"OrganizationAffectedEntitiesErrorItem"} + }, + "DescribeAffectedEntitiesForOrganizationRequest":{ + "type":"structure", + "required":["organizationEntityFilters"], + "members":{ + "organizationEntityFilters":{"shape":"OrganizationEntityFiltersList"}, + "locale":{"shape":"locale"}, + "nextToken":{"shape":"nextToken"}, + "maxResults":{"shape":"maxResults"} + } + }, + "DescribeAffectedEntitiesForOrganizationResponse":{ + "type":"structure", + "members":{ + "entities":{"shape":"EntityList"}, + "failedSet":{"shape":"DescribeAffectedEntitiesForOrganizationFailedSet"}, + "nextToken":{"shape":"nextToken"} + } + }, "DescribeAffectedEntitiesRequest":{ "type":"structure", "required":["filter"], @@ -163,6 +293,29 @@ "type":"list", "member":{"shape":"EventDetailsErrorItem"} }, + "DescribeEventDetailsForOrganizationFailedSet":{ + "type":"list", + "member":{"shape":"OrganizationEventDetailsErrorItem"} + }, + "DescribeEventDetailsForOrganizationRequest":{ + "type":"structure", + "required":["organizationEventDetailFilters"], + "members":{ + "organizationEventDetailFilters":{"shape":"OrganizationEventDetailFiltersList"}, + "locale":{"shape":"locale"} + } + }, + "DescribeEventDetailsForOrganizationResponse":{ + "type":"structure", + "members":{ + "successfulSet":{"shape":"DescribeEventDetailsForOrganizationSuccessfulSet"}, + "failedSet":{"shape":"DescribeEventDetailsForOrganizationFailedSet"} + } + }, + "DescribeEventDetailsForOrganizationSuccessfulSet":{ + "type":"list", + "member":{"shape":"OrganizationEventDetails"} + }, "DescribeEventDetailsRequest":{ "type":"structure", "required":["eventArns"], @@ -198,6 +351,22 @@ "nextToken":{"shape":"nextToken"} } }, + "DescribeEventsForOrganizationRequest":{ + "type":"structure", + "members":{ + "filter":{"shape":"OrganizationEventFilter"}, + "nextToken":{"shape":"nextToken"}, + "maxResults":{"shape":"maxResults"}, + "locale":{"shape":"locale"} + } + }, + "DescribeEventsForOrganizationResponse":{ + "type":"structure", + "members":{ + "events":{"shape":"OrganizationEventList"}, + "nextToken":{"shape":"nextToken"} + } + }, "DescribeEventsRequest":{ "type":"structure", "members":{ @@ -214,6 +383,12 @@ "nextToken":{"shape":"nextToken"} } }, + "DescribeHealthServiceStatusForOrganizationResponse":{ + "type":"structure", + "members":{ + "healthServiceAccessStatusForOrganization":{"shape":"healthServiceAccessStatusForOrganization"} + } + }, "EntityAggregate":{ "type":"structure", "members":{ @@ -256,6 +431,17 @@ "statusCode":{"shape":"eventStatusCode"} } }, + "EventAccountFilter":{ + "type":"structure", + "required":[ + "eventArn", + "awsAccountId" + ], + "members":{ + "eventArn":{"shape":"eventArn"}, + "awsAccountId":{"shape":"accountId"} + } + }, "EventAggregate":{ "type":"structure", "members":{ @@ -356,6 +542,79 @@ }, "exception":true }, + "OrganizationAffectedEntitiesErrorItem":{ + "type":"structure", + "members":{ + "awsAccountId":{"shape":"accountId"}, + "eventArn":{"shape":"eventArn"}, + "errorName":{"shape":"string"}, + "errorMessage":{"shape":"string"} + } + }, + "OrganizationEntityFiltersList":{ + "type":"list", + "member":{"shape":"EventAccountFilter"}, + "max":10, + "min":1 + }, + "OrganizationEvent":{ + "type":"structure", + "members":{ + "arn":{"shape":"eventArn"}, + "service":{"shape":"service"}, + "eventTypeCode":{"shape":"eventTypeCode"}, + "eventTypeCategory":{"shape":"eventTypeCategory"}, + "region":{"shape":"region"}, + "startTime":{"shape":"timestamp"}, + "endTime":{"shape":"timestamp"}, + "lastUpdatedTime":{"shape":"timestamp"}, + "statusCode":{"shape":"eventStatusCode"} + } + }, + "OrganizationEventDetailFiltersList":{ + "type":"list", + "member":{"shape":"EventAccountFilter"}, + "max":10, + "min":1 + }, + "OrganizationEventDetails":{ + "type":"structure", + "members":{ + "awsAccountId":{"shape":"accountId"}, + "event":{"shape":"Event"}, + "eventDescription":{"shape":"EventDescription"}, + "eventMetadata":{"shape":"eventMetadata"} + } + }, + "OrganizationEventDetailsErrorItem":{ + "type":"structure", + "members":{ + "awsAccountId":{"shape":"accountId"}, + "eventArn":{"shape":"eventArn"}, + "errorName":{"shape":"string"}, + "errorMessage":{"shape":"string"} + } + }, + "OrganizationEventFilter":{ + "type":"structure", + "members":{ + "eventTypeCodes":{"shape":"eventTypeList"}, + "awsAccountIds":{"shape":"awsAccountIdsList"}, + "services":{"shape":"serviceList"}, + "regions":{"shape":"regionList"}, + "startTime":{"shape":"DateTimeRange"}, + "endTime":{"shape":"DateTimeRange"}, + "lastUpdatedTime":{"shape":"DateTimeRange"}, + "entityArns":{"shape":"entityArnList"}, + "entityValues":{"shape":"entityValueList"}, + "eventTypeCategories":{"shape":"eventTypeCategoryList"}, + "eventStatusCodes":{"shape":"eventStatusCodeList"} + } + }, + "OrganizationEventList":{ + "type":"list", + "member":{"shape":"OrganizationEvent"} + }, "UnsupportedLocale":{ "type":"structure", "members":{ @@ -365,17 +624,30 @@ }, "accountId":{ "type":"string", - "pattern":"[0-9]{12}" + "max":12, + "pattern":"^\\S+$" + }, + "affectedAccountsList":{ + "type":"list", + "member":{"shape":"accountId"} }, "aggregateValue":{"type":"string"}, "availabilityZone":{ "type":"string", + "max":18, + "min":6, "pattern":"[a-z]{2}\\-[0-9a-z\\-]{4,16}" }, "availabilityZones":{ "type":"list", "member":{"shape":"availabilityZone"} }, + "awsAccountIdsList":{ + "type":"list", + "member":{"shape":"accountId"}, + "max":50, + "min":1 + }, "count":{"type":"integer"}, "dateTimeRangeList":{ "type":"list", @@ -385,7 +657,8 @@ }, "entityArn":{ "type":"string", - "max":1600 + "max":1600, + "pattern":".{0,1600}" }, "entityArnList":{ "type":"list", @@ -407,13 +680,11 @@ "max":3, "min":1 }, - "entityUrl":{ - "type":"string", - "pattern":"https?://.+\\.(amazon\\.com|amazonaws\\.com|amazonaws\\.cn|c2s\\.ic\\.gov|sc2s\\.sgov\\.gov|amazonaws-us-gov.com)/.*" - }, + "entityUrl":{"type":"string"}, "entityValue":{ "type":"string", - "max":256 + "max":256, + "pattern":".{0,256}" }, "entityValueList":{ "type":"list", @@ -459,7 +730,8 @@ "eventType":{ "type":"string", "max":100, - "min":3 + "min":3, + "pattern":"[^:/]{3,100}" }, "eventTypeCategory":{ "type":"string", @@ -481,7 +753,8 @@ "eventTypeCode":{ "type":"string", "max":100, - "min":3 + "min":3, + "pattern":"[a-zA-Z0-9\\_\\-]{3,100}" }, "eventTypeList":{ "type":"list", @@ -489,10 +762,12 @@ "max":10, "min":1 }, + "healthServiceAccessStatusForOrganization":{"type":"string"}, "locale":{ "type":"string", "max":256, - "min":2 + "min":2, + "pattern":".{2,256}" }, "maxResults":{ "type":"integer", @@ -506,10 +781,14 @@ }, "nextToken":{ "type":"string", - "pattern":"[a-zA-Z0-9=/+_.-]{4,512}" + "max":10000, + "min":4, + "pattern":"[a-zA-Z0-9=/+_.-]{4,10000}" }, "region":{ "type":"string", + "max":25, + "min":2, "pattern":"[^:/]{2,25}" }, "regionList":{ @@ -521,7 +800,8 @@ "service":{ "type":"string", "max":30, - "min":2 + "min":2, + "pattern":"[^:/]{2,30}" }, "serviceList":{ "type":"list", @@ -537,7 +817,8 @@ }, "tagKey":{ "type":"string", - "max":127 + "max":127, + "pattern":".{0,127}" }, "tagSet":{ "type":"map", @@ -547,7 +828,8 @@ }, "tagValue":{ "type":"string", - "max":255 + "max":255, + "pattern":".{0,255}" }, "timestamp":{"type":"timestamp"} } diff --git a/models/apis/health/2016-08-04/docs-2.json b/models/apis/health/2016-08-04/docs-2.json index 09366ada5aa..980b9762011 100644 --- a/models/apis/health/2016-08-04/docs-2.json +++ b/models/apis/health/2016-08-04/docs-2.json @@ -1,13 +1,20 @@ { "version": "2.0", - "service": "AWS Health

The AWS Health API provides programmatic access to the AWS Health information that is presented in the AWS Personal Health Dashboard. You can get information about events that affect your AWS resources:

In addition, these operations provide information about event types and summary counts of events or affected entities:

The Health API requires a Business or Enterprise support plan from AWS Support. Calling the Health API from an account that does not have a Business or Enterprise support plan causes a SubscriptionRequiredException.

For authentication of requests, AWS Health uses the Signature Version 4 Signing Process.

See the AWS Health User Guide for information about how to use the API.

Service Endpoint

The HTTP endpoint for the AWS Health API is:

", + "service": "AWS Health

The AWS Health API provides programmatic access to the AWS Health information that is presented in the AWS Personal Health Dashboard. You can get information about events that affect your AWS resources:

In addition, these operations provide information about event types and summary counts of events or affected entities:

AWS Health integrates with AWS Organizations to provide a centralized view of AWS Health events across all accounts in your organization.

You can use the following operations to enable or disable AWS Health from working with AWS Organizations.

The Health API requires a Business or Enterprise support plan from AWS Support. Calling the Health API from an account that does not have a Business or Enterprise support plan causes a SubscriptionRequiredException.

For authentication of requests, AWS Health uses the Signature Version 4 Signing Process.

See the AWS Health User Guide for information about how to use the API.

Service Endpoint

The HTTP endpoint for the AWS Health API is:

", "operations": { + "DescribeAffectedAccountsForOrganization": "

Returns a list of accounts in the organization from AWS Organizations that are affected by the provided event.

Before you can call this operation, you must first enable AWS Health to work with AWS Organizations. To do this, call the EnableHealthServiceAccessForOrganization operation from your organization's master account.

", "DescribeAffectedEntities": "

Returns a list of entities that have been affected by the specified events, based on the specified filter criteria. Entities can refer to individual customer resources, groups of customer resources, or any other construct, depending on the AWS service. Events that have impact beyond that of the affected entities, or where the extent of impact is unknown, include at least one entity indicating this.

At least one event ARN is required. Results are sorted by the lastUpdatedTime of the entity, starting with the most recent.

", + "DescribeAffectedEntitiesForOrganization": "

Returns a list of entities that have been affected by one or more events for one or more accounts in your organization in AWS Organizations, based on the filter criteria. Entities can refer to individual customer resources, groups of customer resources, or any other construct, depending on the AWS service.

At least one event ARN and account ID are required. Results are sorted by the lastUpdatedTime of the entity, starting with the most recent.

Before you can call this operation, you must first enable AWS Health to work with AWS Organizations. To do this, call the EnableHealthServiceAccessForOrganization operation from your organization's master account.

", "DescribeEntityAggregates": "

Returns the number of entities that are affected by each of the specified events. If no events are specified, the counts of all affected entities are returned.

", "DescribeEventAggregates": "

Returns the number of events of each event type (issue, scheduled change, and account notification). If no filter is specified, the counts of all events in each category are returned.

", - "DescribeEventDetails": "

Returns detailed information about one or more specified events. Information includes standard event data (region, service, etc., as returned by DescribeEvents), a detailed event description, and possible additional metadata that depends upon the nature of the event. Affected entities are not included; to retrieve those, use the DescribeAffectedEntities operation.

If a specified event cannot be retrieved, an error message is returned for that event.

", + "DescribeEventDetails": "

Returns detailed information about one or more specified events. Information includes standard event data (region, service, and so on, as returned by DescribeEvents), a detailed event description, and possible additional metadata that depends upon the nature of the event. Affected entities are not included; to retrieve those, use the DescribeAffectedEntities operation.

If a specified event cannot be retrieved, an error message is returned for that event.

", + "DescribeEventDetailsForOrganization": "

Returns detailed information about one or more specified events for one or more accounts in your organization. Information includes standard event data (Region, service, and so on, as returned by DescribeEventsForOrganization, a detailed event description, and possible additional metadata that depends upon the nature of the event. Affected entities are not included; to retrieve those, use the DescribeAffectedEntitiesForOrganization operation.

Before you can call this operation, you must first enable AWS Health to work with AWS Organizations. To do this, call the EnableHealthServiceAccessForOrganization operation from your organization's master account.

", "DescribeEventTypes": "

Returns the event types that meet the specified filter criteria. If no filter criteria are specified, all event types are returned, in no particular order.

", - "DescribeEvents": "

Returns information about events that meet the specified filter criteria. Events are returned in a summary form and do not include the detailed description, any additional metadata that depends on the event type, or any affected resources. To retrieve that information, use the DescribeEventDetails and DescribeAffectedEntities operations.

If no filter criteria are specified, all events are returned. Results are sorted by lastModifiedTime, starting with the most recent.

" + "DescribeEvents": "

Returns information about events that meet the specified filter criteria. Events are returned in a summary form and do not include the detailed description, any additional metadata that depends on the event type, or any affected resources. To retrieve that information, use the DescribeEventDetails and DescribeAffectedEntities operations.

If no filter criteria are specified, all events are returned. Results are sorted by lastModifiedTime, starting with the most recent.

", + "DescribeEventsForOrganization": "

Returns information about events across your organization in AWS Organizations, meeting the specified filter criteria. Events are returned in a summary form and do not include the accounts impacted, detailed description, any additional metadata that depends on the event type, or any affected resources. To retrieve that information, use the DescribeAffectedAccountsForOrganization, DescribeEventDetailsForOrganization, and DescribeAffectedEntitiesForOrganization operations.

If no filter criteria are specified, all events across your organization are returned. Results are sorted by lastModifiedTime, starting with the most recent.

Before you can call this operation, you must first enable Health to work with AWS Organizations. To do this, call the EnableHealthServiceAccessForOrganization operation from your organization's master account.

", + "DescribeHealthServiceStatusForOrganization": "

This operation provides status information on enabling or disabling AWS Health to work with your organization. To call this operation, you must sign in as an IAM user, assume an IAM role, or sign in as the root user (not recommended) in the organization's master account.

", + "DisableHealthServiceAccessForOrganization": "

Calling this operation disables Health from working with AWS Organizations. This does not remove the Service Linked Role (SLR) from the the master account in your organization. Use the IAM console, API, or AWS CLI to remove the SLR if desired. To call this operation, you must sign in as an IAM user, assume an IAM role, or sign in as the root user (not recommended) in the organization's master account.

", + "EnableHealthServiceAccessForOrganization": "

Calling this operation enables AWS Health to work with AWS Organizations. This applies a Service Linked Role (SLR) to the master account in the organization. To learn more about the steps in this process, visit enabling service access for AWS Health in AWS Organizations. To call this operation, you must sign in as an IAM user, assume an IAM role, or sign in as the root user (not recommended) in the organization's master account.

" }, "shapes": { "AffectedEntity": { @@ -16,12 +23,46 @@ "EntityList$member": null } }, + "ConcurrentModificationException": { + "base": "

EnableHealthServiceAccessForOrganization is already in progress. Wait for the action to complete before trying again. To get the current status, use the DescribeHealthServiceStatusForOrganization operation.

", + "refs": { + } + }, "DateTimeRange": { "base": "

A range of dates and times that is used by the EventFilter and EntityFilter objects. If from is set and to is set: match items where the timestamp (startTime, endTime, or lastUpdatedTime) is between from and to inclusive. If from is set and to is not set: match items where the timestamp value is equal to or after from. If from is not set and to is set: match items where the timestamp value is equal to or before to.

", "refs": { + "OrganizationEventFilter$startTime": null, + "OrganizationEventFilter$endTime": null, + "OrganizationEventFilter$lastUpdatedTime": null, "dateTimeRangeList$member": null } }, + "DescribeAffectedAccountsForOrganizationRequest": { + "base": null, + "refs": { + } + }, + "DescribeAffectedAccountsForOrganizationResponse": { + "base": null, + "refs": { + } + }, + "DescribeAffectedEntitiesForOrganizationFailedSet": { + "base": null, + "refs": { + "DescribeAffectedEntitiesForOrganizationResponse$failedSet": "

A JSON set of elements of the failed response, including the awsAccountId, errorMessage, errorName, and eventArn.

" + } + }, + "DescribeAffectedEntitiesForOrganizationRequest": { + "base": null, + "refs": { + } + }, + "DescribeAffectedEntitiesForOrganizationResponse": { + "base": null, + "refs": { + } + }, "DescribeAffectedEntitiesRequest": { "base": null, "refs": { @@ -58,6 +99,28 @@ "DescribeEventDetailsResponse$failedSet": "

Error messages for any events that could not be retrieved.

" } }, + "DescribeEventDetailsForOrganizationFailedSet": { + "base": null, + "refs": { + "DescribeEventDetailsForOrganizationResponse$failedSet": "

Error messages for any events that could not be retrieved.

" + } + }, + "DescribeEventDetailsForOrganizationRequest": { + "base": null, + "refs": { + } + }, + "DescribeEventDetailsForOrganizationResponse": { + "base": null, + "refs": { + } + }, + "DescribeEventDetailsForOrganizationSuccessfulSet": { + "base": null, + "refs": { + "DescribeEventDetailsForOrganizationResponse$successfulSet": "

Information about the events that could be retrieved.

" + } + }, "DescribeEventDetailsRequest": { "base": null, "refs": { @@ -84,6 +147,16 @@ "refs": { } }, + "DescribeEventsForOrganizationRequest": { + "base": null, + "refs": { + } + }, + "DescribeEventsForOrganizationResponse": { + "base": null, + "refs": { + } + }, "DescribeEventsRequest": { "base": null, "refs": { @@ -94,6 +167,11 @@ "refs": { } }, + "DescribeHealthServiceStatusForOrganizationResponse": { + "base": null, + "refs": { + } + }, "EntityAggregate": { "base": "

The number of entities that are affected by one or more events. Returned by the DescribeEntityAggregates operation.

", "refs": { @@ -109,20 +187,29 @@ "EntityFilter": { "base": "

The values to use to filter results from the DescribeAffectedEntities operation.

", "refs": { - "DescribeAffectedEntitiesRequest$filter": "

Values to narrow the results returned. At least one event ARN is required.

" + "DescribeAffectedEntitiesRequest$filter": "

Values to narrow the results returned. At least one event ARN is required.

" } }, "EntityList": { "base": null, "refs": { + "DescribeAffectedEntitiesForOrganizationResponse$entities": "

A JSON set of elements including the awsAccountId and its entityArn, entityValue and its entityArn, lastUpdatedTime, statusCode, and tags.

", "DescribeAffectedEntitiesResponse$entities": "

The entities that match the filter criteria.

" } }, "Event": { - "base": "

Summary information about an event, returned by the DescribeEvents operation. The DescribeEventDetails operation also returns this information, as well as the EventDescription and additional event metadata.

", + "base": "

Summary information about an AWS Health event.

", "refs": { "EventDetails$event": "

Summary information about the event.

", - "EventList$member": null + "EventList$member": null, + "OrganizationEventDetails$event": null + } + }, + "EventAccountFilter": { + "base": "

The values used to filter results from the DescribeEventDetailsForOrganization and DescribeAffectedEntitiesForOrganization operations.

", + "refs": { + "OrganizationEntityFiltersList$member": null, + "OrganizationEventDetailFiltersList$member": null } }, "EventAggregate": { @@ -146,7 +233,8 @@ "EventDescription": { "base": "

The detailed description of the event. Included in the information returned by the DescribeEventDetails operation.

", "refs": { - "EventDetails$eventDescription": "

The most recent description of the event.

" + "EventDetails$eventDescription": "

The most recent description of the event.

", + "OrganizationEventDetails$eventDescription": null } }, "EventDetails": { @@ -209,6 +297,54 @@ "refs": { } }, + "OrganizationAffectedEntitiesErrorItem": { + "base": "

Error information returned when a DescribeAffectedEntitiesForOrganization operation cannot find or process a specific entity.

", + "refs": { + "DescribeAffectedEntitiesForOrganizationFailedSet$member": null + } + }, + "OrganizationEntityFiltersList": { + "base": null, + "refs": { + "DescribeAffectedEntitiesForOrganizationRequest$organizationEntityFilters": "

A JSON set of elements including the awsAccountId and the eventArn.

" + } + }, + "OrganizationEvent": { + "base": "

Summary information about an event, returned by the DescribeEventsForOrganization operation.

", + "refs": { + "OrganizationEventList$member": null + } + }, + "OrganizationEventDetailFiltersList": { + "base": null, + "refs": { + "DescribeEventDetailsForOrganizationRequest$organizationEventDetailFilters": "

A set of JSON elements that includes the awsAccountId and the eventArn.

" + } + }, + "OrganizationEventDetails": { + "base": "

Detailed information about an event. A combination of an Event object, an EventDescription object, and additional metadata about the event. Returned by the DescribeEventDetailsForOrganization operation.

", + "refs": { + "DescribeEventDetailsForOrganizationSuccessfulSet$member": null + } + }, + "OrganizationEventDetailsErrorItem": { + "base": "

Error information returned when a DescribeEventDetailsForOrganization operation cannot find a specified event.

", + "refs": { + "DescribeEventDetailsForOrganizationFailedSet$member": null + } + }, + "OrganizationEventFilter": { + "base": "

The values to filter results from the DescribeEventsForOrganization operation.

", + "refs": { + "DescribeEventsForOrganizationRequest$filter": "

Values to narrow the results returned.

" + } + }, + "OrganizationEventList": { + "base": null, + "refs": { + "DescribeEventsForOrganizationResponse$events": "

The events that match the specified filter criteria.

" + } + }, "UnsupportedLocale": { "base": "

The specified locale is not supported.

", "refs": { @@ -217,7 +353,19 @@ "accountId": { "base": null, "refs": { - "AffectedEntity$awsAccountId": "

The 12-digit AWS account number that contains the affected entity.

" + "AffectedEntity$awsAccountId": "

The 12-digit AWS account number that contains the affected entity.

", + "EventAccountFilter$awsAccountId": "

The 12-digit AWS account numbers that contains the affected entities.

", + "OrganizationAffectedEntitiesErrorItem$awsAccountId": "

The 12-digit AWS account numbers that contains the affected entities.

", + "OrganizationEventDetails$awsAccountId": "

The 12-digit AWS account numbers that contains the affected entities.

", + "OrganizationEventDetailsErrorItem$awsAccountId": "

Error information returned when a DescribeEventDetailsForOrganization operation cannot find a specified event.

", + "affectedAccountsList$member": null, + "awsAccountIdsList$member": null + } + }, + "affectedAccountsList": { + "base": null, + "refs": { + "DescribeAffectedAccountsForOrganizationResponse$affectedAccounts": "

A JSON set of elements of the affected accounts.

" } }, "aggregateValue": { @@ -239,6 +387,12 @@ "EventFilter$availabilityZones": "

A list of AWS availability zones.

" } }, + "awsAccountIdsList": { + "base": null, + "refs": { + "OrganizationEventFilter$awsAccountIds": "

A list of 12-digit AWS account numbers that contains the affected entities.

" + } + }, "count": { "base": null, "refs": { @@ -266,7 +420,8 @@ "base": null, "refs": { "EntityFilter$entityArns": "

A list of entity ARNs (unique identifiers).

", - "EventFilter$entityArns": "

A list of entity ARNs (unique identifiers).

" + "EventFilter$entityArns": "

A list of entity ARNs (unique identifiers).

", + "OrganizationEventFilter$entityArns": "

REPLACEME

" } }, "entityStatusCode": { @@ -285,7 +440,7 @@ "entityUrl": { "base": null, "refs": { - "AffectedEntity$entityUrl": null + "AffectedEntity$entityUrl": "

The URL of the affected entity.

" } }, "entityValue": { @@ -299,7 +454,8 @@ "base": null, "refs": { "EntityFilter$entityValues": "

A list of IDs for affected entities.

", - "EventFilter$entityValues": "

A list of entity identifiers, such as EC2 instance IDs (i-34ab692e) or EBS volumes (vol-426ab23e).

" + "EventFilter$entityValues": "

A list of entity identifiers, such as EC2 instance IDs (i-34ab692e) or EBS volumes (vol-426ab23e).

", + "OrganizationEventFilter$entityValues": "

A list of entity identifiers, such as EC2 instance IDs (i-34ab692e) or EBS volumes (vol-426ab23e).

" } }, "eventAggregateField": { @@ -312,10 +468,15 @@ "base": null, "refs": { "AffectedEntity$eventArn": "

The unique identifier for the event. Format: arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID . Example: Example: arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456

", + "DescribeAffectedAccountsForOrganizationRequest$eventArn": "

The unique identifier for the event. Format: arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID . Example: Example: arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456

", "EntityAggregate$eventArn": "

The unique identifier for the event. Format: arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID . Example: Example: arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456

", "Event$arn": "

The unique identifier for the event. Format: arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID . Example: Example: arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456

", + "EventAccountFilter$eventArn": "

The unique identifier for the event. Format: arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID . Example: Example: arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456

", "EventArnsList$member": null, "EventDetailsErrorItem$eventArn": "

The unique identifier for the event. Format: arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID . Example: Example: arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456

", + "OrganizationAffectedEntitiesErrorItem$eventArn": "

The unique identifier for the event. Format: arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID . Example: Example: arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456

", + "OrganizationEvent$arn": "

The unique identifier for the event. Format: arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID . Example: Example: arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456

", + "OrganizationEventDetailsErrorItem$eventArn": "

The unique identifier for the event. Format: arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID . Example: Example: arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456

", "eventArnList$member": null } }, @@ -336,20 +497,23 @@ "eventMetadata": { "base": null, "refs": { - "EventDetails$eventMetadata": "

Additional metadata about the event.

" + "EventDetails$eventMetadata": "

Additional metadata about the event.

", + "OrganizationEventDetails$eventMetadata": "

Additional metadata about the event.

" } }, "eventStatusCode": { "base": null, "refs": { "Event$statusCode": "

The most recent status of the event. Possible values are open, closed, and upcoming.

", + "OrganizationEvent$statusCode": "

The most recent status of the event. Possible values are open, closed, and upcoming.

", "eventStatusCodeList$member": null } }, "eventStatusCodeList": { "base": null, "refs": { - "EventFilter$eventStatusCodes": "

A list of event status codes.

" + "EventFilter$eventStatusCodes": "

A list of event status codes.

", + "OrganizationEventFilter$eventStatusCodes": "

A list of event status codes.

" } }, "eventType": { @@ -364,13 +528,15 @@ "Event$eventTypeCategory": "

The category of the event. Possible values are issue, scheduledChange, and accountNotification.

", "EventType$category": "

A list of event type category codes (issue, scheduledChange, or accountNotification).

", "EventTypeCategoryList$member": null, + "OrganizationEvent$eventTypeCategory": "

The category of the event type.

", "eventTypeCategoryList$member": null } }, "eventTypeCategoryList": { "base": null, "refs": { - "EventFilter$eventTypeCategories": "

A list of event type category codes (issue, scheduledChange, or accountNotification).

" + "EventFilter$eventTypeCategories": "

A list of event type category codes (issue, scheduledChange, or accountNotification).

", + "OrganizationEventFilter$eventTypeCategories": "

REPLACEME

" } }, "eventTypeCode": { @@ -378,30 +544,44 @@ "refs": { "Event$eventTypeCode": "

The unique identifier for the event type. The format is AWS_SERVICE_DESCRIPTION ; for example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT.

", "EventType$code": "

The unique identifier for the event type. The format is AWS_SERVICE_DESCRIPTION ; for example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT.

", - "EventTypeCodeList$member": null + "EventTypeCodeList$member": null, + "OrganizationEvent$eventTypeCode": "

The unique identifier for the event type. The format is AWS_SERVICE_DESCRIPTION. For example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT.

" } }, "eventTypeList": { "base": null, "refs": { - "EventFilter$eventTypeCodes": "

A list of unique identifiers for event types. For example, \"AWS_EC2_SYSTEM_MAINTENANCE_EVENT\",\"AWS_RDS_MAINTENANCE_SCHEDULED\"

" + "EventFilter$eventTypeCodes": "

A list of unique identifiers for event types. For example, \"AWS_EC2_SYSTEM_MAINTENANCE_EVENT\",\"AWS_RDS_MAINTENANCE_SCHEDULED\".

", + "OrganizationEventFilter$eventTypeCodes": "

A list of unique identifiers for event types. For example, \"AWS_EC2_SYSTEM_MAINTENANCE_EVENT\",\"AWS_RDS_MAINTENANCE_SCHEDULED\".

" + } + }, + "healthServiceAccessStatusForOrganization": { + "base": null, + "refs": { + "DescribeHealthServiceStatusForOrganizationResponse$healthServiceAccessStatusForOrganization": "

Information about the status of enabling or disabling AWS Health Organizational View in your organization.

Valid values are ENABLED | DISABLED | PENDING.

" } }, "locale": { "base": null, "refs": { + "DescribeAffectedEntitiesForOrganizationRequest$locale": "

The locale (language) to return information in. English (en) is the default and the only supported value at this time.

", "DescribeAffectedEntitiesRequest$locale": "

The locale (language) to return information in. English (en) is the default and the only supported value at this time.

", + "DescribeEventDetailsForOrganizationRequest$locale": "

The locale (language) to return information in. English (en) is the default and the only supported value at this time.

", "DescribeEventDetailsRequest$locale": "

The locale (language) to return information in. English (en) is the default and the only supported value at this time.

", "DescribeEventTypesRequest$locale": "

The locale (language) to return information in. English (en) is the default and the only supported value at this time.

", + "DescribeEventsForOrganizationRequest$locale": "

The locale (language) to return information in. English (en) is the default and the only supported value at this time.

", "DescribeEventsRequest$locale": "

The locale (language) to return information in. English (en) is the default and the only supported value at this time.

" } }, "maxResults": { "base": null, "refs": { + "DescribeAffectedAccountsForOrganizationRequest$maxResults": "

The maximum number of items to return in one batch, between 10 and 100, inclusive.

", + "DescribeAffectedEntitiesForOrganizationRequest$maxResults": "

The maximum number of items to return in one batch, between 10 and 100, inclusive.

", "DescribeAffectedEntitiesRequest$maxResults": "

The maximum number of items to return in one batch, between 10 and 100, inclusive.

", "DescribeEventAggregatesRequest$maxResults": "

The maximum number of items to return in one batch, between 10 and 100, inclusive.

", "DescribeEventTypesRequest$maxResults": "

The maximum number of items to return in one batch, between 10 and 100, inclusive.

", + "DescribeEventsForOrganizationRequest$maxResults": "

The maximum number of items to return in one batch, between 10 and 100, inclusive.

", "DescribeEventsRequest$maxResults": "

The maximum number of items to return in one batch, between 10 and 100, inclusive.

" } }, @@ -420,12 +600,18 @@ "nextToken": { "base": null, "refs": { + "DescribeAffectedAccountsForOrganizationRequest$nextToken": "

If the results of a search are large, only a portion of the results are returned, and a nextToken pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.

", + "DescribeAffectedAccountsForOrganizationResponse$nextToken": "

If the results of a search are large, only a portion of the results are returned, and a nextToken pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.

", + "DescribeAffectedEntitiesForOrganizationRequest$nextToken": "

If the results of a search are large, only a portion of the results are returned, and a nextToken pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.

", + "DescribeAffectedEntitiesForOrganizationResponse$nextToken": "

If the results of a search are large, only a portion of the results are returned, and a nextToken pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.

", "DescribeAffectedEntitiesRequest$nextToken": "

If the results of a search are large, only a portion of the results are returned, and a nextToken pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.

", "DescribeAffectedEntitiesResponse$nextToken": "

If the results of a search are large, only a portion of the results are returned, and a nextToken pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.

", "DescribeEventAggregatesRequest$nextToken": "

If the results of a search are large, only a portion of the results are returned, and a nextToken pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.

", "DescribeEventAggregatesResponse$nextToken": "

If the results of a search are large, only a portion of the results are returned, and a nextToken pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.

", "DescribeEventTypesRequest$nextToken": "

If the results of a search are large, only a portion of the results are returned, and a nextToken pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.

", "DescribeEventTypesResponse$nextToken": "

If the results of a search are large, only a portion of the results are returned, and a nextToken pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.

", + "DescribeEventsForOrganizationRequest$nextToken": "

If the results of a search are large, only a portion of the results are returned, and a nextToken pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.

", + "DescribeEventsForOrganizationResponse$nextToken": "

If the results of a search are large, only a portion of the results are returned, and a nextToken pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.

", "DescribeEventsRequest$nextToken": "

If the results of a search are large, only a portion of the results are returned, and a nextToken pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.

", "DescribeEventsResponse$nextToken": "

If the results of a search are large, only a portion of the results are returned, and a nextToken pagination token is returned in the response. To retrieve the next batch of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.

" } @@ -434,13 +620,15 @@ "base": null, "refs": { "Event$region": "

The AWS region name of the event.

", + "OrganizationEvent$region": "

The AWS Region name of the event.

", "regionList$member": null } }, "regionList": { "base": null, "refs": { - "EventFilter$regions": "

A list of AWS regions.

" + "EventFilter$regions": "

A list of AWS regions.

", + "OrganizationEventFilter$regions": "

A list of AWS Regions.

" } }, "service": { @@ -448,6 +636,7 @@ "refs": { "Event$service": "

The AWS service that is affected by the event. For example, EC2, RDS.

", "EventType$service": "

The AWS service that is affected by the event. For example, EC2, RDS.

", + "OrganizationEvent$service": "

The AWS service that is affected by the event. For example, EC2, RDS.

", "serviceList$member": null } }, @@ -455,15 +644,21 @@ "base": null, "refs": { "EventFilter$services": "

The AWS services associated with the event. For example, EC2, RDS.

", - "EventTypeFilter$services": "

The AWS services associated with the event. For example, EC2, RDS.

" + "EventTypeFilter$services": "

The AWS services associated with the event. For example, EC2, RDS.

", + "OrganizationEventFilter$services": "

The AWS services associated with the event. For example, EC2, RDS.

" } }, "string": { "base": null, "refs": { + "ConcurrentModificationException$message": null, "EventDetailsErrorItem$errorName": "

The name of the error.

", "EventDetailsErrorItem$errorMessage": "

A message that describes the error.

", "InvalidPaginationToken$message": null, + "OrganizationAffectedEntitiesErrorItem$errorName": "

The name of the error.

", + "OrganizationAffectedEntitiesErrorItem$errorMessage": "

The unique identifier for the event type. The format is AWS_SERVICE_DESCRIPTION. For example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT.

", + "OrganizationEventDetailsErrorItem$errorName": "

The name of the error.

", + "OrganizationEventDetailsErrorItem$errorMessage": "

A message that describes the error.

", "UnsupportedLocale$message": null } }, @@ -501,7 +696,10 @@ "DateTimeRange$to": "

The ending date and time of a time range.

", "Event$startTime": "

The date and time that the event began.

", "Event$endTime": "

The date and time that the event ended.

", - "Event$lastUpdatedTime": "

The most recent date and time that the event was updated.

" + "Event$lastUpdatedTime": "

The most recent date and time that the event was updated.

", + "OrganizationEvent$startTime": "

The date and time that the event began.

", + "OrganizationEvent$endTime": "

The date and time that the event ended.

", + "OrganizationEvent$lastUpdatedTime": "

The most recent date and time that the event was updated.

" } } } diff --git a/models/apis/health/2016-08-04/paginators-1.json b/models/apis/health/2016-08-04/paginators-1.json index 3a30b016714..e7e6c2ad880 100644 --- a/models/apis/health/2016-08-04/paginators-1.json +++ b/models/apis/health/2016-08-04/paginators-1.json @@ -1,11 +1,26 @@ { "pagination": { + "DescribeAffectedAccountsForOrganization": { + "input_token": "nextToken", + "limit_key": "maxResults", + "output_token": "nextToken", + "result_key": "affectedAccounts" + }, "DescribeAffectedEntities": { "input_token": "nextToken", "limit_key": "maxResults", "output_token": "nextToken", "result_key": "entities" }, + "DescribeAffectedEntitiesForOrganization": { + "input_token": "nextToken", + "limit_key": "maxResults", + "non_aggregate_keys": [ + "failedSet" + ], + "output_token": "nextToken", + "result_key": "entities" + }, "DescribeEntityAggregates": { "result_key": "entityAggregates" }, @@ -26,6 +41,12 @@ "limit_key": "maxResults", "output_token": "nextToken", "result_key": "events" + }, + "DescribeEventsForOrganization": { + "input_token": "nextToken", + "limit_key": "maxResults", + "output_token": "nextToken", + "result_key": "events" } } } \ No newline at end of file diff --git a/models/apis/lex-models/2017-04-19/api-2.json b/models/apis/lex-models/2017-04-19/api-2.json index 976e32ea04a..3f728ab5b53 100644 --- a/models/apis/lex-models/2017-04-19/api-2.json +++ b/models/apis/lex-models/2017-04-19/api-2.json @@ -631,7 +631,8 @@ "botName":{"shape":"BotName"}, "lastUpdatedDate":{"shape":"Timestamp"}, "createdDate":{"shape":"Timestamp"}, - "checksum":{"shape":"String"} + "checksum":{"shape":"String"}, + "conversationLogs":{"shape":"ConversationLogsResponse"} } }, "BotAliasMetadataList":{ @@ -780,6 +781,24 @@ "CustomPayload" ] }, + "ConversationLogsRequest":{ + "type":"structure", + "required":[ + "logSettings", + "iamRoleArn" + ], + "members":{ + "logSettings":{"shape":"LogSettingsRequestList"}, + "iamRoleArn":{"shape":"IamRoleArn"} + } + }, + "ConversationLogsResponse":{ + "type":"structure", + "members":{ + "logSettings":{"shape":"LogSettingsResponseList"}, + "iamRoleArn":{"shape":"IamRoleArn"} + } + }, "Count":{"type":"integer"}, "CreateBotVersionRequest":{ "type":"structure", @@ -1035,6 +1054,13 @@ "max":200, "min":0 }, + "Destination":{ + "type":"string", + "enum":[ + "CLOUDWATCH_LOGS", + "S3" + ] + }, "EnumerationValue":{ "type":"structure", "required":["value"], @@ -1118,7 +1144,8 @@ "botName":{"shape":"BotName"}, "lastUpdatedDate":{"shape":"Timestamp"}, "createdDate":{"shape":"Timestamp"}, - "checksum":{"shape":"String"} + "checksum":{"shape":"String"}, + "conversationLogs":{"shape":"ConversationLogsResponse"} } }, "GetBotAliasesRequest":{ @@ -1697,6 +1724,12 @@ "max":5, "min":1 }, + "IamRoleArn":{ + "type":"string", + "max":2048, + "min":20, + "pattern":"^arn:[\\w\\-]+:iam::[\\d]{12}:role\\/[\\w+=,\\.@\\-]{1,64}$" + }, "ImportStatus":{ "type":"string", "enum":[ @@ -1755,6 +1788,12 @@ "exception":true, "fault":true }, + "KmsKeyArn":{ + "type":"string", + "max":2048, + "min":20, + "pattern":"^arn:[\\w\\-]+:kms:[\\w\\-]+:[\\d]{12}:(?:key\\/[\\w\\-]+|alias\\/[a-zA-Z0-9:\\/_\\-]{1,256})$" + }, "LambdaARN":{ "type":"string", "max":2048, @@ -1794,6 +1833,45 @@ "type":"list", "member":{"shape":"Locale"} }, + "LogSettingsRequest":{ + "type":"structure", + "required":[ + "logType", + "destination", + "resourceArn" + ], + "members":{ + "logType":{"shape":"LogType"}, + "destination":{"shape":"Destination"}, + "kmsKeyArn":{"shape":"KmsKeyArn"}, + "resourceArn":{"shape":"ResourceArn"} + } + }, + "LogSettingsRequestList":{ + "type":"list", + "member":{"shape":"LogSettingsRequest"} + }, + "LogSettingsResponse":{ + "type":"structure", + "members":{ + "logType":{"shape":"LogType"}, + "destination":{"shape":"Destination"}, + "kmsKeyArn":{"shape":"KmsKeyArn"}, + "resourceArn":{"shape":"ResourceArn"}, + "resourcePrefix":{"shape":"ResourcePrefix"} + } + }, + "LogSettingsResponseList":{ + "type":"list", + "member":{"shape":"LogSettingsResponse"} + }, + "LogType":{ + "type":"string", + "enum":[ + "AUDIO", + "TEXT" + ] + }, "MaxResults":{ "type":"integer", "box":true, @@ -1851,6 +1929,13 @@ "min":1, "pattern":"[0-9]+" }, + "ObfuscationSetting":{ + "type":"string", + "enum":[ + "NONE", + "DEFAULT_OBFUSCATION" + ] + }, "PreconditionFailedException":{ "type":"structure", "members":{ @@ -1908,7 +1993,8 @@ "location":"uri", "locationName":"botName" }, - "checksum":{"shape":"String"} + "checksum":{"shape":"String"}, + "conversationLogs":{"shape":"ConversationLogsRequest"} } }, "PutBotAliasResponse":{ @@ -1920,7 +2006,8 @@ "botName":{"shape":"BotName"}, "lastUpdatedDate":{"shape":"Timestamp"}, "createdDate":{"shape":"Timestamp"}, - "checksum":{"shape":"String"} + "checksum":{"shape":"String"}, + "conversationLogs":{"shape":"ConversationLogsResponse"} } }, "PutBotRequest":{ @@ -2055,6 +2142,12 @@ "BotChannel" ] }, + "ResourceArn":{ + "type":"string", + "max":2048, + "min":1, + "pattern":"^arn:[\\w\\-]+:(?:logs:[\\w\\-]+:[\\d]{12}:log-group:[\\.\\-_/#A-Za-z0-9]{1,512}(?::\\*)?|s3:::[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9])$" + }, "ResourceInUseException":{ "type":"structure", "members":{ @@ -2064,6 +2157,10 @@ "error":{"httpStatusCode":400}, "exception":true }, + "ResourcePrefix":{ + "type":"string", + "max":1024 + }, "ResourceReference":{ "type":"structure", "members":{ @@ -2104,7 +2201,8 @@ "valueElicitationPrompt":{"shape":"Prompt"}, "priority":{"shape":"Priority"}, "sampleUtterances":{"shape":"SlotUtteranceList"}, - "responseCard":{"shape":"ResponseCard"} + "responseCard":{"shape":"ResponseCard"}, + "obfuscationSetting":{"shape":"ObfuscationSetting"} } }, "SlotConstraint":{ diff --git a/models/apis/lex-models/2017-04-19/docs-2.json b/models/apis/lex-models/2017-04-19/docs-2.json index c6c4ceaa56c..b0510daea05 100644 --- a/models/apis/lex-models/2017-04-19/docs-2.json +++ b/models/apis/lex-models/2017-04-19/docs-2.json @@ -278,6 +278,20 @@ "Message$contentType": "

The content type of the message string.

" } }, + "ConversationLogsRequest": { + "base": "

Provides the settings needed for conversation logs.

", + "refs": { + "PutBotAliasRequest$conversationLogs": "

Settings for conversation logs for the alias.

" + } + }, + "ConversationLogsResponse": { + "base": "

Contains information about conversation log settings.

", + "refs": { + "BotAliasMetadata$conversationLogs": "

Settings that determine how Amazon Lex uses conversation logs for the alias.

", + "GetBotAliasResponse$conversationLogs": "

The settings that determine how Amazon Lex uses conversation logs for the alias.

", + "PutBotAliasResponse$conversationLogs": "

The settings that determine how Amazon Lex uses conversation logs for the alias.

" + } + }, "Count": { "base": null, "refs": { @@ -393,6 +407,13 @@ "SlotTypeMetadata$description": "

A description of the slot type.

" } }, + "Destination": { + "base": null, + "refs": { + "LogSettingsRequest$destination": "

Where the logs will be delivered. Text logs are delivered to a CloudWatch Logs log group. Audio logs are delivered to an S3 bucket.

", + "LogSettingsResponse$destination": "

The destination where logs are delivered.

" + } + }, "EnumerationValue": { "base": "

Each slot type can have a set of values. Each enumeration value represents a value the slot type can take.

For example, a pizza ordering bot could have a slot type that specifies the type of crust that the pizza should have. The slot type could include the values

", "refs": { @@ -641,6 +662,13 @@ "Message$groupNumber": "

Identifies the message group that the message belongs to. When a group is assigned to a message, Amazon Lex returns one message from each group in the response.

" } }, + "IamRoleArn": { + "base": null, + "refs": { + "ConversationLogsRequest$iamRoleArn": "

The Amazon Resource Name (ARN) of an IAM role with permission to write to your CloudWatch Logs for text logs and your S3 bucket for audio logs. If audio encryption is enabled, this role also provides access permission for the AWS KMS key used for encrypting audio logs. For more information, see Creating an IAM Role and Policy for Conversation Logs.

", + "ConversationLogsResponse$iamRoleArn": "

The Amazon Resource Name (ARN) of the IAM role used to write your logs to CloudWatch Logs or an S3 bucket.

" + } + }, "ImportStatus": { "base": null, "refs": { @@ -707,6 +735,13 @@ "refs": { } }, + "KmsKeyArn": { + "base": null, + "refs": { + "LogSettingsRequest$kmsKeyArn": "

The Amazon Resource Name (ARN) of the AWS KMS customer managed key for encrypting audio logs delivered to an S3 bucket. The key does not apply to CloudWatch Logs and is optional for S3 buckets.

", + "LogSettingsResponse$kmsKeyArn": "

The Amazon Resource Name (ARN) of the key used to encrypt audio logs in an S3 bucket.

" + } + }, "LambdaARN": { "base": null, "refs": { @@ -750,6 +785,37 @@ "GetBuiltinIntentResponse$supportedLocales": "

A list of locales that the intent supports.

" } }, + "LogSettingsRequest": { + "base": "

Settings used to configure delivery mode and destination for conversation logs.

", + "refs": { + "LogSettingsRequestList$member": null + } + }, + "LogSettingsRequestList": { + "base": null, + "refs": { + "ConversationLogsRequest$logSettings": "

The settings for your conversation logs. You can log the conversation text, conversation audio, or both.

" + } + }, + "LogSettingsResponse": { + "base": "

The settings for conversation logs.

", + "refs": { + "LogSettingsResponseList$member": null + } + }, + "LogSettingsResponseList": { + "base": null, + "refs": { + "ConversationLogsResponse$logSettings": "

The settings for your conversation logs. You can log text, audio, or both.

" + } + }, + "LogType": { + "base": null, + "refs": { + "LogSettingsRequest$logType": "

The type of logging to enable. Text logs are delivered to a CloudWatch Logs log group. Audio logs are delivered to an S3 bucket.

", + "LogSettingsResponse$logType": "

The type of logging that is enabled.

" + } + }, "MaxResults": { "base": null, "refs": { @@ -842,6 +908,12 @@ "GetExportResponse$version": "

The version of the bot being exported.

" } }, + "ObfuscationSetting": { + "base": null, + "refs": { + "Slot$obfuscationSetting": "

Determines whether a slot is obfuscated in conversation logs and stored utterances. When you obfuscate a slot, the value is replaced by the slot name in curly braces ({}). For example, if the slot name is \"full_name\", obfuscated values are replaced with \"{full_name}\". For more information, see Slot Obfuscation .

" + } + }, "PreconditionFailedException": { "base": "

The checksum of the resource that you are trying to change does not match the checksum in the request. Check the resource's checksum and try again.

", "refs": { @@ -926,11 +998,24 @@ "ResourceInUseException$referenceType": null } }, + "ResourceArn": { + "base": null, + "refs": { + "LogSettingsRequest$resourceArn": "

The Amazon Resource Name (ARN) of the CloudWatch Logs log group or S3 bucket where the logs should be delivered.

", + "LogSettingsResponse$resourceArn": "

The Amazon Resource Name (ARN) of the CloudWatch Logs log group or S3 bucket where the logs are delivered.

" + } + }, "ResourceInUseException": { "base": "

The resource that you are attempting to delete is referred to by another resource. Use this information to remove references to the resource that you are trying to delete.

The body of the exception contains a JSON object that describes the resource.

{ \"resourceType\": BOT | BOTALIAS | BOTCHANNEL | INTENT,

\"resourceReference\": {

\"name\": string, \"version\": string } }

", "refs": { } }, + "ResourcePrefix": { + "base": null, + "refs": { + "LogSettingsResponse$resourcePrefix": "

The resource prefix is the first part of the S3 object key within the S3 bucket that you specified to contain audio logs. For CloudWatch Logs it is the prefix of the log stream name within the log group that you specified.

" + } + }, "ResourceReference": { "base": "

Describes the resource that refers to the resource that you are attempting to delete. This object is returned as part of the ResourceInUseException exception.

", "refs": { diff --git a/models/apis/lightsail/2016-11-28/api-2.json b/models/apis/lightsail/2016-11-28/api-2.json index 665966170e2..73575940824 100644 --- a/models/apis/lightsail/2016-11-28/api-2.json +++ b/models/apis/lightsail/2016-11-28/api-2.json @@ -4574,7 +4574,8 @@ "preferredMaintenanceWindow":{"shape":"NonEmptyString"}, "publiclyAccessible":{"shape":"boolean"}, "masterEndpoint":{"shape":"RelationalDatabaseEndpoint"}, - "pendingMaintenanceActions":{"shape":"PendingMaintenanceActionList"} + "pendingMaintenanceActions":{"shape":"PendingMaintenanceActionList"}, + "caCertificateIdentifier":{"shape":"string"} } }, "RelationalDatabaseBlueprint":{ @@ -4996,7 +4997,8 @@ "enableBackupRetention":{"shape":"boolean"}, "disableBackupRetention":{"shape":"boolean"}, "publiclyAccessible":{"shape":"boolean"}, - "applyImmediately":{"shape":"boolean"} + "applyImmediately":{"shape":"boolean"}, + "caCertificateIdentifier":{"shape":"string"} } }, "UpdateRelationalDatabaseResult":{ diff --git a/models/apis/lightsail/2016-11-28/docs-2.json b/models/apis/lightsail/2016-11-28/docs-2.json index 0e796496fc3..ac722419817 100644 --- a/models/apis/lightsail/2016-11-28/docs-2.json +++ b/models/apis/lightsail/2016-11-28/docs-2.json @@ -8,7 +8,7 @@ "AttachLoadBalancerTlsCertificate": "

Attaches a Transport Layer Security (TLS) certificate to your load balancer. TLS is just an updated, more secure version of Secure Socket Layer (SSL).

Once you create and validate your certificate, you can attach it to your load balancer. You can also use this API to rotate the certificates on your account. Use the attach load balancer tls certificate operation with the non-attached certificate, and it will replace the existing one and become the attached certificate.

The attach load balancer tls certificate operation supports tag-based access control via resource tags applied to the resource identified by load balancer name. For more information, see the Lightsail Dev Guide.

", "AttachStaticIp": "

Attaches a static IP address to a specific Amazon Lightsail instance.

", "CloseInstancePublicPorts": "

Closes the public ports on a specific Amazon Lightsail instance.

The close instance public ports operation supports tag-based access control via resource tags applied to the resource identified by instance name. For more information, see the Lightsail Dev Guide.

", - "CopySnapshot": "

Copies a manual instance or disk snapshot as another manual snapshot, or copies an automatic instance or disk snapshot as a manual snapshot. This operation can also be used to copy a manual or automatic snapshot of an instance or a disk from one AWS Region to another in Amazon Lightsail.

When copying a manual snapshot, be sure to define the source region, source snapshot name, and target snapshot name parameters.

When copying an automatic snapshot, be sure to define the source region, source resource name, target snapshot name, and either the restore date or the use latest restorable auto snapshot parameters.

Database snapshots cannot be copied at this time.

", + "CopySnapshot": "

Copies a manual snapshot of an instance or disk as another manual snapshot, or copies an automatic snapshot of an instance or disk as a manual snapshot. This operation can also be used to copy a manual or automatic snapshot of an instance or a disk from one AWS Region to another in Amazon Lightsail.

When copying a manual snapshot, be sure to define the source region, source snapshot name, and target snapshot name parameters.

When copying an automatic snapshot, be sure to define the source region, source resource name, target snapshot name, and either the restore date or the use latest restorable auto snapshot parameters.

", "CreateCloudFormationStack": "

Creates an AWS CloudFormation stack, which creates a new Amazon EC2 instance from an exported Amazon Lightsail snapshot. This operation results in a CloudFormation stack record that can be used to track the AWS CloudFormation stack created. Use the get cloud formation stack records operation to get a list of the CloudFormation stacks created.

Wait until after your new Amazon EC2 instance is created before running the create cloud formation stack operation again with the same export snapshot record.

", "CreateDisk": "

Creates a block storage disk that can be attached to an Amazon Lightsail instance in the same Availability Zone (e.g., us-east-2a).

The create disk operation supports tag-based access control via request tags. For more information, see the Lightsail Dev Guide.

", "CreateDiskFromSnapshot": "

Creates a block storage disk from a manual or automatic snapshot of a disk. The resulting disk can be attached to an Amazon Lightsail instance in the same Availability Zone (e.g., us-east-2a).

The create disk from snapshot operation supports tag-based access control via request tags and resource tags applied to the resource identified by disk snapshot name. For more information, see the Lightsail Dev Guide.

", @@ -24,7 +24,7 @@ "CreateRelationalDatabase": "

Creates a new database in Amazon Lightsail.

The create relational database operation supports tag-based access control via request tags. For more information, see the Lightsail Dev Guide.

", "CreateRelationalDatabaseFromSnapshot": "

Creates a new database from an existing database snapshot in Amazon Lightsail.

You can create a new database from a snapshot in if something goes wrong with your original database, or to change it to a different plan, such as a high availability or standard plan.

The create relational database from snapshot operation supports tag-based access control via request tags and resource tags applied to the resource identified by relationalDatabaseSnapshotName. For more information, see the Lightsail Dev Guide.

", "CreateRelationalDatabaseSnapshot": "

Creates a snapshot of your database in Amazon Lightsail. You can use snapshots for backups, to make copies of a database, and to save data before deleting a database.

The create relational database snapshot operation supports tag-based access control via request tags. For more information, see the Lightsail Dev Guide.

", - "DeleteAutoSnapshot": "

Deletes an automatic snapshot for an instance or disk.

", + "DeleteAutoSnapshot": "

Deletes an automatic snapshot of an instance or disk. For more information, see the Lightsail Dev Guide.

", "DeleteDisk": "

Deletes the specified block storage disk. The disk must be in the available state (not attached to a Lightsail instance).

The disk may remain in the deleting state for several minutes.

The delete disk operation supports tag-based access control via resource tags applied to the resource identified by disk name. For more information, see the Lightsail Dev Guide.

", "DeleteDiskSnapshot": "

Deletes the specified disk snapshot.

When you make periodic snapshots of a disk, the snapshots are incremental, and only the blocks on the device that have changed since your last snapshot are saved in the new snapshot. When you delete a snapshot, only the data not needed for any other snapshot is removed. So regardless of which prior snapshots have been deleted, all active snapshots will have access to all the information needed to restore the disk.

The delete disk snapshot operation supports tag-based access control via resource tags applied to the resource identified by disk snapshot name. For more information, see the Lightsail Dev Guide.

", "DeleteDomain": "

Deletes the specified domain recordset and all of its domain records.

The delete domain operation supports tag-based access control via resource tags applied to the resource identified by domain name. For more information, see the Lightsail Dev Guide.

", @@ -45,7 +45,7 @@ "EnableAddOn": "

Enables or modifies an add-on for an Amazon Lightsail resource. For more information, see the Lightsail Dev Guide.

", "ExportSnapshot": "

Exports an Amazon Lightsail instance or block storage disk snapshot to Amazon Elastic Compute Cloud (Amazon EC2). This operation results in an export snapshot record that can be used with the create cloud formation stack operation to create new Amazon EC2 instances.

Exported instance snapshots appear in Amazon EC2 as Amazon Machine Images (AMIs), and the instance system disk appears as an Amazon Elastic Block Store (Amazon EBS) volume. Exported disk snapshots appear in Amazon EC2 as Amazon EBS volumes. Snapshots are exported to the same Amazon Web Services Region in Amazon EC2 as the source Lightsail snapshot.

The export snapshot operation supports tag-based access control via resource tags applied to the resource identified by source snapshot name. For more information, see the Lightsail Dev Guide.

Use the get instance snapshots or get disk snapshots operations to get a list of snapshots that you can export to Amazon EC2.

", "GetActiveNames": "

Returns the names of all active (not deleted) resources.

", - "GetAutoSnapshots": "

Returns the available automatic snapshots for the specified resource name. For more information, see the Lightsail Dev Guide.

", + "GetAutoSnapshots": "

Returns the available automatic snapshots for an instance or disk. For more information, see the Lightsail Dev Guide.

", "GetBlueprints": "

Returns the list of available instance images, or blueprints. You can use a blueprint to create a new instance already running a specific operating system, as well as a preinstalled app or development stack. The software each instance is running depends on the blueprint image you choose.

Use active blueprints when creating new instances. Inactive blueprints are listed to support customers with existing instances and are not necessarily available to create new instances. Blueprints are marked inactive when they become outdated due to operating system updates or new application releases.

", "GetBundles": "

Returns the list of bundles that are available for purchase. A bundle describes the specs for your virtual private server (or instance).

", "GetCloudFormationStackRecords": "

Returns the CloudFormation stack record created as a result of the create cloud formation stack operation.

An AWS CloudFormation stack is used to create a new Amazon EC2 instance from an exported Lightsail snapshot.

", @@ -106,7 +106,7 @@ "UpdateDomainEntry": "

Updates a domain recordset after it is created.

The update domain entry operation supports tag-based access control via resource tags applied to the resource identified by domain name. For more information, see the Lightsail Dev Guide.

", "UpdateLoadBalancerAttribute": "

Updates the specified attribute for a load balancer. You can only update one attribute at a time.

The update load balancer attribute operation supports tag-based access control via resource tags applied to the resource identified by load balancer name. For more information, see the Lightsail Dev Guide.

", "UpdateRelationalDatabase": "

Allows the update of one or more attributes of a database in Amazon Lightsail.

Updates are applied immediately, or in cases where the updates could result in an outage, are applied during the database's predefined maintenance window.

The update relational database operation supports tag-based access control via resource tags applied to the resource identified by relationalDatabaseName. For more information, see the Lightsail Dev Guide.

", - "UpdateRelationalDatabaseParameters": "

Allows the update of one or more parameters of a database in Amazon Lightsail.

Parameter updates don't cause outages; therefore, their application is not subject to the preferred maintenance window. However, there are two ways in which paramater updates are applied: dynamic or pending-reboot. Parameters marked with a dynamic apply type are applied immediately. Parameters marked with a pending-reboot apply type are applied only after the database is rebooted using the reboot relational database operation.

The update relational database parameters operation supports tag-based access control via resource tags applied to the resource identified by relationalDatabaseName. For more information, see the Lightsail Dev Guide.

" + "UpdateRelationalDatabaseParameters": "

Allows the update of one or more parameters of a database in Amazon Lightsail.

Parameter updates don't cause outages; therefore, their application is not subject to the preferred maintenance window. However, there are two ways in which parameter updates are applied: dynamic or pending-reboot. Parameters marked with a dynamic apply type are applied immediately. Parameters marked with a pending-reboot apply type are applied only after the database is rebooted using the reboot relational database operation.

The update relational database parameters operation supports tag-based access control via resource tags applied to the resource identified by relationalDatabaseName. For more information, see the Lightsail Dev Guide.

" }, "shapes": { "AccessDeniedException": { @@ -238,7 +238,7 @@ "AutoSnapshotDate": { "base": null, "refs": { - "DeleteAutoSnapshotRequest$date": "

The date of the automatic snapshot to delete in YYYY-MM-DD format.

Use the get auto snapshots operation to get the available automatic snapshots for a resource.

" + "DeleteAutoSnapshotRequest$date": "

The date of the automatic snapshot to delete in YYYY-MM-DD format. Use the get auto snapshots operation to get the available automatic snapshots for a resource.

" } }, "AutoSnapshotDetails": { @@ -250,7 +250,7 @@ "AutoSnapshotDetailsList": { "base": null, "refs": { - "GetAutoSnapshotsResult$autoSnapshots": "

An array of objects that describe the automatic snapshots that are available for the specified source resource.asdf

" + "GetAutoSnapshotsResult$autoSnapshots": "

An array of objects that describe the automatic snapshots that are available for the specified source instance or disk.

" } }, "AutoSnapshotStatus": { @@ -2265,17 +2265,17 @@ "Blueprint$name": "

The friendly name of the blueprint (e.g., Amazon Linux).

", "CloseInstancePublicPortsRequest$instanceName": "

The name of the instance on which you're attempting to close the public ports.

", "CloudFormationStackRecord$name": "

The name of the CloudFormation stack record. It starts with CloudFormationStackRecord followed by a GUID.

", - "CopySnapshotRequest$sourceSnapshotName": "

The name of the source instance or disk snapshot to be copied.

Define this parameter only when copying a manual snapshot as another manual snapshot.

", - "CopySnapshotRequest$targetSnapshotName": "

The name of the new instance or disk snapshot to be created as a copy.

", + "CopySnapshotRequest$sourceSnapshotName": "

The name of the source manual snapshot to copy.

Constraint:

", + "CopySnapshotRequest$targetSnapshotName": "

The name of the new manual snapshot to be created as a copy.

", "CreateDiskFromSnapshotRequest$diskName": "

The unique Lightsail disk name (e.g., my-disk).

", - "CreateDiskFromSnapshotRequest$diskSnapshotName": "

The name of the disk snapshot (e.g., my-snapshot) from which to create the new storage disk.

This parameter cannot be defined together with the source disk name parameter. The disk snapshot name and source disk name parameters are mutually exclusive.

", + "CreateDiskFromSnapshotRequest$diskSnapshotName": "

The name of the disk snapshot (e.g., my-snapshot) from which to create the new storage disk.

Constraint:

", "CreateDiskRequest$diskName": "

The unique Lightsail disk name (e.g., my-disk).

", "CreateDiskSnapshotRequest$diskName": "

The unique name of the source disk (e.g., Disk-Virginia-1).

This parameter cannot be defined together with the instance name parameter. The disk name and instance name parameters are mutually exclusive.

", "CreateDiskSnapshotRequest$diskSnapshotName": "

The name of the destination disk snapshot (e.g., my-disk-snapshot) based on the source disk.

", "CreateDiskSnapshotRequest$instanceName": "

The unique name of the source instance (e.g., Amazon_Linux-512MB-Virginia-1). When this is defined, a snapshot of the instance's system volume is created.

This parameter cannot be defined together with the disk name parameter. The instance name and disk name parameters are mutually exclusive.

", "CreateInstanceSnapshotRequest$instanceSnapshotName": "

The name for your new snapshot.

", "CreateInstanceSnapshotRequest$instanceName": "

The Lightsail instance on which to base your snapshot.

", - "CreateInstancesFromSnapshotRequest$instanceSnapshotName": "

The name of the instance snapshot on which you are basing your new instances. Use the get instance snapshots operation to return information about your existing snapshots.

This parameter cannot be defined together with the source instance name parameter. The instance snapshot name and source instance name parameters are mutually exclusive.

", + "CreateInstancesFromSnapshotRequest$instanceSnapshotName": "

The name of the instance snapshot on which you are basing your new instances. Use the get instance snapshots operation to return information about your existing snapshots.

Constraint:

", "CreateInstancesFromSnapshotRequest$keyPairName": "

The name for your key pair.

", "CreateInstancesRequest$customImageName": "

(Deprecated) The name for your custom image.

In releases prior to June 12, 2017, this parameter was ignored by the API. It is now deprecated.

", "CreateInstancesRequest$keyPairName": "

The name of your key pair.

", @@ -2290,7 +2290,7 @@ "CreateRelationalDatabaseRequest$relationalDatabaseName": "

The name to use for your new database.

Constraints:

", "CreateRelationalDatabaseSnapshotRequest$relationalDatabaseName": "

The name of the database on which to base your new snapshot.

", "CreateRelationalDatabaseSnapshotRequest$relationalDatabaseSnapshotName": "

The name for your new database snapshot.

Constraints:

", - "DeleteAutoSnapshotRequest$resourceName": "

The name of the source resource from which to delete the automatic snapshot.

", + "DeleteAutoSnapshotRequest$resourceName": "

The name of the source instance or disk from which to delete the automatic snapshot.

", "DeleteDiskRequest$diskName": "

The unique name of the disk you want to delete (e.g., my-disk).

", "DeleteDiskSnapshotRequest$diskSnapshotName": "

The name of the disk snapshot you want to delete (e.g., my-disk-snapshot).

", "DeleteInstanceRequest$instanceName": "

The name of the instance to delete.

", @@ -2306,7 +2306,7 @@ "DetachDiskRequest$diskName": "

The unique name of the disk you want to detach from your instance (e.g., my-disk).

", "DetachInstancesFromLoadBalancerRequest$loadBalancerName": "

The name of the Lightsail load balancer.

", "DetachStaticIpRequest$staticIpName": "

The name of the static IP to detach from the instance.

", - "DisableAddOnRequest$resourceName": "

The name of the source resource from which to disable the add-on.

", + "DisableAddOnRequest$resourceName": "

The name of the source resource for which to disable the add-on.

", "Disk$name": "

The unique name of the disk.

", "Disk$attachedTo": "

The resources to which the disk is attached.

", "DiskMap$newDiskName": "

The new disk name (e.g., my-new-disk).

", @@ -2317,8 +2317,8 @@ "EnableAddOnRequest$resourceName": "

The name of the source resource for which to enable or modify the add-on.

", "ExportSnapshotRecord$name": "

The export snapshot record name.

", "ExportSnapshotRequest$sourceSnapshotName": "

The name of the instance or disk snapshot to be exported to Amazon EC2.

", - "GetAutoSnapshotsRequest$resourceName": "

The name of the source resource from which to get automatic snapshot information.

", - "GetAutoSnapshotsResult$resourceName": "

The name of the source resource for the automatic snapshots.

", + "GetAutoSnapshotsRequest$resourceName": "

The name of the source instance or disk from which to get automatic snapshot information.

", + "GetAutoSnapshotsResult$resourceName": "

The name of the source instance or disk for the automatic snapshots.

", "GetDiskRequest$diskName": "

The name of the disk (e.g., my-disk).

", "GetDiskSnapshotRequest$diskSnapshotName": "

The name of the disk snapshot (e.g., my-disk-snapshot).

", "GetInstanceAccessDetailsRequest$instanceName": "

The name of the instance to access.

", @@ -2631,9 +2631,9 @@ "refs": { "Blueprint$isActive": "

A Boolean value indicating whether the blueprint is active. Inactive blueprints are listed to support customers with existing instances but are not necessarily available for launch of new instances. Blueprints are marked inactive when they become outdated due to operating system updates or new application releases.

", "Bundle$isActive": "

A Boolean value indicating whether the bundle is active.

", - "CopySnapshotRequest$useLatestRestorableAutoSnapshot": "

A Boolean value to indicate whether to use the latest available automatic snapshot.

This parameter cannot be defined together with the restore date parameter. The use latest restorable auto snapshot and restore date parameters are mutually exclusive.

Define this parameter only when copying an automatic snapshot as a manual snapshot. For more information, see the Lightsail Dev Guide.

", - "CreateDiskFromSnapshotRequest$useLatestRestorableAutoSnapshot": "

A Boolean value to indicate whether to use the latest available automatic snapshot.

This parameter cannot be defined together with the restore date parameter. The use latest restorable auto snapshot and restore date parameters are mutually exclusive.

Define this parameter only when creating a new disk from an automatic snapshot. For more information, see the Lightsail Dev Guide.

", - "CreateInstancesFromSnapshotRequest$useLatestRestorableAutoSnapshot": "

A Boolean value to indicate whether to use the latest available automatic snapshot.

This parameter cannot be defined together with the restore date parameter. The use latest restorable auto snapshot and restore date parameters are mutually exclusive.

Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the Lightsail Dev Guide.

", + "CopySnapshotRequest$useLatestRestorableAutoSnapshot": "

A Boolean value to indicate whether to use the latest available automatic snapshot of the specified source instance or disk.

Constraints:

", + "CreateDiskFromSnapshotRequest$useLatestRestorableAutoSnapshot": "

A Boolean value to indicate whether to use the latest available automatic snapshot.

Constraints:

", + "CreateInstancesFromSnapshotRequest$useLatestRestorableAutoSnapshot": "

A Boolean value to indicate whether to use the latest available automatic snapshot.

Constraints:

", "CreateRelationalDatabaseFromSnapshotRequest$publiclyAccessible": "

Specifies the accessibility options for your new database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.

", "CreateRelationalDatabaseFromSnapshotRequest$useLatestRestorableTime": "

Specifies whether your database is restored from the latest backup time. A value of true restores from the latest backup time.

Default: false

Constraints: Cannot be specified if the restore time parameter is provided.

", "CreateRelationalDatabaseRequest$publiclyAccessible": "

Specifies the accessibility options for your new database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.

", @@ -2748,14 +2748,14 @@ "Blueprint$licenseUrl": "

The end-user license agreement URL for the image or blueprint.

", "Bundle$instanceType": "

The Amazon EC2 instance type (e.g., t2.micro).

", "Bundle$name": "

A friendly name for the bundle (e.g., Micro).

", - "CopySnapshotRequest$sourceResourceName": "

The name of the source resource from which the automatic snapshot was created.

Define this parameter only when copying an automatic snapshot as a manual snapshot. For more information, see the Lightsail Dev Guide.

", - "CopySnapshotRequest$restoreDate": "

The date of the automatic snapshot to copy for the new manual snapshot.

Use the get auto snapshots operation to identify the dates of the available automatic snapshots.

Constraints:

Define this parameter only when copying an automatic snapshot as a manual snapshot. For more information, see the Lightsail Dev Guide.

", - "CreateDiskFromSnapshotRequest$sourceDiskName": "

The name of the source disk from which the source automatic snapshot was created.

This parameter cannot be defined together with the disk snapshot name parameter. The source disk name and disk snapshot name parameters are mutually exclusive.

Define this parameter only when creating a new disk from an automatic snapshot. For more information, see the Lightsail Dev Guide.

", - "CreateDiskFromSnapshotRequest$restoreDate": "

The date of the automatic snapshot to use for the new disk.

Use the get auto snapshots operation to identify the dates of the available automatic snapshots.

Constraints:

Define this parameter only when creating a new disk from an automatic snapshot. For more information, see the Lightsail Dev Guide.

", + "CopySnapshotRequest$sourceResourceName": "

The name of the source instance or disk from which the source automatic snapshot was created.

Constraint:

", + "CopySnapshotRequest$restoreDate": "

The date of the source automatic snapshot to copy. Use the get auto snapshots operation to identify the dates of the available automatic snapshots.

Constraints:

", + "CreateDiskFromSnapshotRequest$sourceDiskName": "

The name of the source disk from which the source automatic snapshot was created.

Constraints:

", + "CreateDiskFromSnapshotRequest$restoreDate": "

The date of the automatic snapshot to use for the new disk. Use the get auto snapshots operation to identify the dates of the available automatic snapshots.

Constraints:

", "CreateInstancesFromSnapshotRequest$availabilityZone": "

The Availability Zone where you want to create your instances. Use the following formatting: us-east-2a (case sensitive). You can get a list of Availability Zones by using the get regions operation. Be sure to add the include Availability Zones parameter to your request.

", "CreateInstancesFromSnapshotRequest$userData": "

You can create a launch script that configures a server with additional user data. For example, apt-get -y update.

Depending on the machine image you choose, the command to get software on your instance varies. Amazon Linux and CentOS use yum, Debian and Ubuntu use apt-get, and FreeBSD uses pkg. For a complete list, see the Dev Guide.

", - "CreateInstancesFromSnapshotRequest$sourceInstanceName": "

The name of the source instance from which the source automatic snapshot was created.

This parameter cannot be defined together with the instance snapshot name parameter. The source instance name and instance snapshot name parameters are mutually exclusive.

Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the Lightsail Dev Guide.

", - "CreateInstancesFromSnapshotRequest$restoreDate": "

The date of the automatic snapshot to use for the new instance.

Use the get auto snapshots operation to identify the dates of the available automatic snapshots.

Constraints:

Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the Lightsail Dev Guide.

", + "CreateInstancesFromSnapshotRequest$sourceInstanceName": "

The name of the source instance from which the source automatic snapshot was created.

Constraints:

", + "CreateInstancesFromSnapshotRequest$restoreDate": "

The date of the automatic snapshot to use for the new instance. Use the get auto snapshots operation to identify the dates of the available automatic snapshots.

Constraints:

", "CreateInstancesRequest$availabilityZone": "

The Availability Zone in which to create your instance. Use the following format: us-east-2a (case sensitive). You can get a list of Availability Zones by using the get regions operation. Be sure to add the include Availability Zones parameter to your request.

", "CreateInstancesRequest$userData": "

A launch script you can create that configures a server with additional user data. For example, you might want to run apt-get -y update.

Depending on the machine image you choose, the command to get software on your instance varies. Amazon Linux and CentOS use yum, Debian and Ubuntu use apt-get, and FreeBSD uses pkg. For a complete list, see the Dev Guide.

", "CreateLoadBalancerRequest$healthCheckPath": "

The path you provided to perform the load balancer health check. If you didn't specify a health check path, Lightsail uses the root path of your website (e.g., \"/\").

You may want to specify a custom health check path other than the root of your application if your home page loads slowly or has a lot of media or scripting on it.

", @@ -2871,6 +2871,7 @@ "RelationalDatabase$supportCode": "

The support code for the database. Include this code in your email to support when you have questions about a database in Lightsail. This code enables our support team to look up your Lightsail information more easily.

", "RelationalDatabase$masterDatabaseName": "

The name of the master database created when the Lightsail database resource is created.

", "RelationalDatabase$secondaryAvailabilityZone": "

Describes the secondary Availability Zone of a high availability database.

The secondary database is used for failover support of a high availability database.

", + "RelationalDatabase$caCertificateIdentifier": "

The certificate associated with the database.

", "RelationalDatabaseBlueprint$blueprintId": "

The ID for the database blueprint.

", "RelationalDatabaseBlueprint$engineVersion": "

The database engine version for the database blueprint (for example, 5.7.23).

", "RelationalDatabaseBlueprint$engineDescription": "

The description of the database engine for the database blueprint.

", @@ -2900,7 +2901,8 @@ "UnauthenticatedException$message": null, "UnauthenticatedException$tip": null, "UpdateRelationalDatabaseRequest$preferredBackupWindow": "

The daily time range during which automated backups are created for your database if automated backups are enabled.

Constraints:

", - "UpdateRelationalDatabaseRequest$preferredMaintenanceWindow": "

The weekly time range during which system maintenance can occur on your database.

The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week.

Constraints:

" + "UpdateRelationalDatabaseRequest$preferredMaintenanceWindow": "

The weekly time range during which system maintenance can occur on your database.

The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week.

Constraints:

", + "UpdateRelationalDatabaseRequest$caCertificateIdentifier": "

Indicates the certificate that needs to be associated with the database.

" } }, "timestamp": { diff --git a/models/apis/opsworkscm/2016-11-01/api-2.json b/models/apis/opsworkscm/2016-11-01/api-2.json index cdf9aa01e79..665f471ffd4 100644 --- a/models/apis/opsworkscm/2016-11-01/api-2.json +++ b/models/apis/opsworkscm/2016-11-01/api-2.json @@ -178,6 +178,19 @@ {"shape":"InvalidStateException"} ] }, + "ListTagsForResource":{ + "name":"ListTagsForResource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListTagsForResourceRequest"}, + "output":{"shape":"ListTagsForResourceResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"ValidationException"} + ] + }, "RestoreServer":{ "name":"RestoreServer", "http":{ @@ -206,6 +219,34 @@ {"shape":"ValidationException"} ] }, + "TagResource":{ + "name":"TagResource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"TagResourceRequest"}, + "output":{"shape":"TagResourceResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"ValidationException"}, + {"shape":"InvalidStateException"} + ] + }, + "UntagResource":{ + "name":"UntagResource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"UntagResourceRequest"}, + "output":{"shape":"UntagResourceResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"ValidationException"}, + {"shape":"InvalidStateException"} + ] + }, "UpdateServer":{ "name":"UpdateServer", "http":{ @@ -236,6 +277,10 @@ } }, "shapes":{ + "AWSOpsWorksCMResourceArn":{ + "type":"string", + "pattern":"arn:aws.*:opsworks-cm:.*:[0-9]{12}:.*" + }, "AccountAttribute":{ "type":"structure", "members":{ @@ -348,7 +393,8 @@ "required":["ServerName"], "members":{ "ServerName":{"shape":"ServerName"}, - "Description":{"shape":"String"} + "Description":{"shape":"String"}, + "Tags":{"shape":"TagList"} } }, "CreateBackupResponse":{ @@ -385,6 +431,7 @@ "SecurityGroupIds":{"shape":"Strings"}, "ServiceRoleArn":{"shape":"ServiceRoleArn"}, "SubnetIds":{"shape":"Strings"}, + "Tags":{"shape":"TagList"}, "BackupId":{"shape":"BackupId"} } }, @@ -601,6 +648,22 @@ }, "exception":true }, + "ListTagsForResourceRequest":{ + "type":"structure", + "required":["ResourceArn"], + "members":{ + "ResourceArn":{"shape":"AWSOpsWorksCMResourceArn"}, + "NextToken":{"shape":"NextToken"}, + "MaxResults":{"shape":"MaxResults"} + } + }, + "ListTagsForResourceResponse":{ + "type":"structure", + "members":{ + "Tags":{"shape":"TagList"}, + "NextToken":{"shape":"NextToken"} + } + }, "MaintenanceStatus":{ "type":"string", "enum":[ @@ -765,12 +828,79 @@ "type":"list", "member":{"shape":"String"} }, + "Tag":{ + "type":"structure", + "required":[ + "Key", + "Value" + ], + "members":{ + "Key":{"shape":"TagKey"}, + "Value":{"shape":"TagValue"} + } + }, + "TagKey":{ + "type":"string", + "max":128, + "min":1, + "pattern":"^([\\p{L}\\p{Z}\\p{N}_.:\\/=+\\\\\\-@]*)$" + }, + "TagKeyList":{ + "type":"list", + "member":{"shape":"TagKey"}, + "max":200, + "min":0 + }, + "TagList":{ + "type":"list", + "member":{"shape":"Tag"}, + "max":200, + "min":0 + }, + "TagResourceRequest":{ + "type":"structure", + "required":[ + "ResourceArn", + "Tags" + ], + "members":{ + "ResourceArn":{"shape":"AWSOpsWorksCMResourceArn"}, + "Tags":{"shape":"TagList"} + } + }, + "TagResourceResponse":{ + "type":"structure", + "members":{ + } + }, + "TagValue":{ + "type":"string", + "max":256, + "min":0, + "pattern":"^([\\p{L}\\p{Z}\\p{N}_.:\\/=+\\\\\\-@]*)$" + }, "TimeWindowDefinition":{ "type":"string", "max":10000, "pattern":"^((Mon|Tue|Wed|Thu|Fri|Sat|Sun):)?([0-1][0-9]|2[0-3]):[0-5][0-9]$" }, "Timestamp":{"type":"timestamp"}, + "UntagResourceRequest":{ + "type":"structure", + "required":[ + "ResourceArn", + "TagKeys" + ], + "members":{ + "ResourceArn":{"shape":"AWSOpsWorksCMResourceArn"}, + "TagKeys":{"shape":"TagKeyList"} + } + }, + "UntagResourceResponse":{ + "type":"structure", + "members":{ + } + }, "UpdateServerEngineAttributesRequest":{ "type":"structure", "required":[ diff --git a/models/apis/opsworkscm/2016-11-01/docs-2.json b/models/apis/opsworkscm/2016-11-01/docs-2.json index 68b2cecaa51..2b55d9be2ff 100644 --- a/models/apis/opsworkscm/2016-11-01/docs-2.json +++ b/models/apis/opsworkscm/2016-11-01/docs-2.json @@ -14,12 +14,23 @@ "DescribeServers": "

Lists all configuration management servers that are identified with your account. Only the stored results from Amazon DynamoDB are returned. AWS OpsWorks CM does not query other services.

This operation is synchronous.

A ResourceNotFoundException is thrown when the server does not exist. A ValidationException is raised when parameters of the request are not valid.

", "DisassociateNode": "

Disassociates a node from an AWS OpsWorks CM server, and removes the node from the server's managed nodes. After a node is disassociated, the node key pair is no longer valid for accessing the configuration manager's API. For more information about how to associate a node, see AssociateNode.

A node can can only be disassociated from a server that is in a HEALTHY state. Otherwise, an InvalidStateException is thrown. A ResourceNotFoundException is thrown when the server does not exist. A ValidationException is raised when parameters of the request are not valid.

", "ExportServerEngineAttribute": "

Exports a specified server engine attribute as a base64-encoded string. For example, you can export user data that you can use in EC2 to associate nodes with a server.

This operation is synchronous.

A ValidationException is raised when parameters of the request are not valid. A ResourceNotFoundException is thrown when the server does not exist. An InvalidStateException is thrown when the server is in any of the following states: CREATING, TERMINATED, FAILED or DELETING.

", - "RestoreServer": "

Restores a backup to a server that is in a CONNECTION_LOST, HEALTHY, RUNNING, UNHEALTHY, or TERMINATED state. When you run RestoreServer, the server's EC2 instance is deleted, and a new EC2 instance is configured. RestoreServer maintains the existing server endpoint, so configuration management of the server's client devices (nodes) should continue to work.

This operation is asynchronous.

An InvalidStateException is thrown when the server is not in a valid state. A ResourceNotFoundException is thrown when the server does not exist. A ValidationException is raised when parameters of the request are not valid.

", + "ListTagsForResource": "

Returns a list of tags that are applied to the specified AWS OpsWorks for Chef Automate or AWS OpsWorks for Puppet Enterprise servers or backups.

", + "RestoreServer": "

Restores a backup to a server that is in a CONNECTION_LOST, HEALTHY, RUNNING, UNHEALTHY, or TERMINATED state. When you run RestoreServer, the server's EC2 instance is deleted, and a new EC2 instance is configured. RestoreServer maintains the existing server endpoint, so configuration management of the server's client devices (nodes) should continue to work.

Restoring from a backup is performed by creating a new EC2 instance. If restoration is successful, and the server is in a HEALTHY state, AWS OpsWorks CM switches traffic over to the new instance. After restoration is finished, the old EC2 instance is maintained in a Running or Stopped state, but is eventually terminated.

This operation is asynchronous.

An InvalidStateException is thrown when the server is not in a valid state. A ResourceNotFoundException is thrown when the server does not exist. A ValidationException is raised when parameters of the request are not valid.

", "StartMaintenance": "

Manually starts server maintenance. This command can be useful if an earlier maintenance attempt failed, and the underlying cause of maintenance failure has been resolved. The server is in an UNDER_MAINTENANCE state while maintenance is in progress.

Maintenance can only be started on servers in HEALTHY and UNHEALTHY states. Otherwise, an InvalidStateException is thrown. A ResourceNotFoundException is thrown when the server does not exist. A ValidationException is raised when parameters of the request are not valid.

", + "TagResource": "

Applies tags to an AWS OpsWorks for Chef Automate or AWS OpsWorks for Puppet Enterprise server, or to server backups.

", + "UntagResource": "

Removes specified tags from an AWS OpsWorks-CM server or backup.

", "UpdateServer": "

Updates settings for a server.

This operation is synchronous.

", "UpdateServerEngineAttributes": "

Updates engine-specific attributes on a specified server. The server enters the MODIFYING state when this operation is in progress. Only one update can occur at a time. You can use this command to reset a Chef server's public key (CHEF_PIVOTAL_KEY) or a Puppet server's admin password (PUPPET_ADMIN_PASSWORD).

This operation is asynchronous.

This operation can only be called for servers in HEALTHY or UNHEALTHY states. Otherwise, an InvalidStateException is raised. A ResourceNotFoundException is thrown when the server does not exist. A ValidationException is raised when parameters of the request are not valid.

" }, "shapes": { + "AWSOpsWorksCMResourceArn": { + "base": null, + "refs": { + "ListTagsForResourceRequest$ResourceArn": "

The Amazon Resource Number (ARN) of an AWS OpsWorks for Chef Automate or AWS OpsWorks for Puppet Enterprise server for which you want to show applied tags. For example, arn:aws:opsworks-cm:us-west-2:123456789012:server/test-owcm-server/EXAMPLE-66b0-4196-8274-d1a2bEXAMPLE.

", + "TagResourceRequest$ResourceArn": "

The Amazon Resource Number (ARN) of a resource to which you want to apply tags. For example, arn:aws:opsworks-cm:us-west-2:123456789012:server/test-owcm-server/EXAMPLE-66b0-4196-8274-d1a2bEXAMPLE.

", + "UntagResourceRequest$ResourceArn": "

The Amazon Resource Number (ARN) of a resource from which you want to remove tags. For example, arn:aws:opsworks-cm:us-west-2:123456789012:server/test-owcm-server/EXAMPLE-66b0-4196-8274-d1a2bEXAMPLE.

" + } + }, "AccountAttribute": { "base": "

Stores account attributes.

", "refs": { @@ -128,20 +139,20 @@ "CustomCertificate": { "base": null, "refs": { - "CreateServerRequest$CustomCertificate": "

A PEM-formatted HTTPS certificate. The value can be be a single, self-signed certificate, or a certificate chain. If you specify a custom certificate, you must also specify values for CustomDomain and CustomPrivateKey. The following are requirements for the CustomCertificate value:

" + "CreateServerRequest$CustomCertificate": "

Supported on servers running Chef Automate 2. A PEM-formatted HTTPS certificate. The value can be be a single, self-signed certificate, or a certificate chain. If you specify a custom certificate, you must also specify values for CustomDomain and CustomPrivateKey. The following are requirements for the CustomCertificate value:

" } }, "CustomDomain": { "base": null, "refs": { - "CreateServerRequest$CustomDomain": "

An optional public endpoint of a server, such as https://aws.my-company.com. To access the server, create a CNAME DNS record in your preferred DNS service that points the custom domain to the endpoint that is generated when the server is created (the value of the CreateServer Endpoint attribute). You cannot access the server by using the generated Endpoint value if the server is using a custom domain. If you specify a custom domain, you must also specify values for CustomCertificate and CustomPrivateKey.

", + "CreateServerRequest$CustomDomain": "

Supported on servers running Chef Automate 2. An optional public endpoint of a server, such as https://aws.my-company.com. To access the server, create a CNAME DNS record in your preferred DNS service that points the custom domain to the endpoint that is generated when the server is created (the value of the CreateServer Endpoint attribute). You cannot access the server by using the generated Endpoint value if the server is using a custom domain. If you specify a custom domain, you must also specify values for CustomCertificate and CustomPrivateKey.

", "Server$CustomDomain": "

An optional public endpoint of a server, such as https://aws.my-company.com. You cannot access the server by using the Endpoint value if the server has a CustomDomain specified.

" } }, "CustomPrivateKey": { "base": null, "refs": { - "CreateServerRequest$CustomPrivateKey": "

A private key in PEM format for connecting to the server by using HTTPS. The private key must not be encrypted; it cannot be protected by a password or passphrase. If you specify a custom private key, you must also specify values for CustomDomain and CustomCertificate.

" + "CreateServerRequest$CustomPrivateKey": "

Supported on servers running Chef Automate 2. A private key in PEM format for connecting to the server by using HTTPS. The private key must not be encrypted; it cannot be protected by a password or passphrase. If you specify a custom private key, you must also specify values for CustomDomain and CustomCertificate.

" } }, "DeleteBackupRequest": { @@ -252,7 +263,7 @@ "DisassociateNodeRequest$EngineAttributes": "

Engine attributes that are used for disassociating the node. No attributes are required for Puppet.

Attributes required in a DisassociateNode request for Chef

", "ExportServerEngineAttributeRequest$InputAttributes": "

The list of engine attributes. The list type is EngineAttribute. An EngineAttribute list item is a pair that includes an attribute name and its value. For the Userdata ExportAttributeName, the following are supported engine attribute names.

", "Server$EngineAttributes": "

The response of a createServer() request returns the master credential to access the server in EngineAttributes. These credentials are not stored by AWS OpsWorks CM; they are returned only as part of the result of createServer().

Attributes returned in a createServer response for Chef

Attributes returned in a createServer response for Puppet

", - "StartMaintenanceRequest$EngineAttributes": "

Engine attributes that are specific to the server on which you want to run maintenance.

" + "StartMaintenanceRequest$EngineAttributes": "

Engine attributes that are specific to the server on which you want to run maintenance.

" } }, "ExportServerEngineAttributeRequest": { @@ -303,6 +314,16 @@ "refs": { } }, + "ListTagsForResourceRequest": { + "base": null, + "refs": { + } + }, + "ListTagsForResourceResponse": { + "base": null, + "refs": { + } + }, "MaintenanceStatus": { "base": null, "refs": { @@ -314,7 +335,8 @@ "refs": { "DescribeBackupsRequest$MaxResults": "

This is not currently implemented for DescribeBackups requests.

", "DescribeEventsRequest$MaxResults": "

To receive a paginated response, use this parameter to specify the maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a NextToken value that you can assign to the NextToken request parameter to get the next set of results.

", - "DescribeServersRequest$MaxResults": "

This is not currently implemented for DescribeServers requests.

" + "DescribeServersRequest$MaxResults": "

This is not currently implemented for DescribeServers requests.

", + "ListTagsForResourceRequest$MaxResults": "

To receive a paginated response, use this parameter to specify the maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a NextToken value that you can assign to the NextToken request parameter to get the next set of results.

" } }, "NextToken": { @@ -322,7 +344,9 @@ "refs": { "DescribeBackupsRequest$NextToken": "

This is not currently implemented for DescribeBackups requests.

", "DescribeEventsRequest$NextToken": "

NextToken is a string that is returned in some command responses. It indicates that not all entries have been returned, and that you must run at least one more request to get remaining items. To get remaining results, call DescribeEvents again, and assign the token from the previous results as the value of the nextToken parameter. If there are no more results, the response object's nextToken parameter value is null. Setting a nextToken value that was not returned in your previous results causes an InvalidNextTokenException to occur.

", - "DescribeServersRequest$NextToken": "

This is not currently implemented for DescribeServers requests.

" + "DescribeServersRequest$NextToken": "

This is not currently implemented for DescribeServers requests.

", + "ListTagsForResourceRequest$NextToken": "

NextToken is a string that is returned in some command responses. It indicates that not all entries have been returned, and that you must run at least one more request to get remaining items. To get remaining results, call ListTagsForResource again, and assign the token from the previous results as the value of the nextToken parameter. If there are no more results, the response object's nextToken parameter value is null. Setting a nextToken value that was not returned in your previous results causes an InvalidNextTokenException to occur.

", + "ListTagsForResourceResponse$NextToken": "

A token that you can use as the value of NextToken in subsequent calls to the API to show more results.

" } }, "NodeAssociationStatus": { @@ -500,6 +524,50 @@ "Server$SubnetIds": "

The subnet IDs specified in a CreateServer request.

" } }, + "Tag": { + "base": "

A map that contains tag keys and tag values to attach to an AWS OpsWorks for Chef Automate or AWS OpsWorks for Puppet Enterprise server. Leading and trailing white spaces are trimmed from both the key and value. A maximum of 50 user-applied tags is allowed for tag-supported AWS OpsWorks-CM resources.

", + "refs": { + "TagList$member": null + } + }, + "TagKey": { + "base": null, + "refs": { + "Tag$Key": "

A tag key, such as Stage or Name. A tag key cannot be empty. The key can be a maximum of 127 characters, and can contain only Unicode letters, numbers, or separators, or the following special characters: + - = . _ : /

", + "TagKeyList$member": null + } + }, + "TagKeyList": { + "base": null, + "refs": { + "UntagResourceRequest$TagKeys": "

The keys of tags that you want to remove.

" + } + }, + "TagList": { + "base": null, + "refs": { + "CreateBackupRequest$Tags": "

A map that contains tag keys and tag values to attach to an AWS OpsWorks-CM server backup.

", + "CreateServerRequest$Tags": "

A map that contains tag keys and tag values to attach to an AWS OpsWorks for Chef Automate or AWS OpsWorks for Puppet Enterprise server.

", + "ListTagsForResourceResponse$Tags": "

Tags that have been applied to the resource.

", + "TagResourceRequest$Tags": "

A map that contains tag keys and tag values to attach to AWS OpsWorks-CM servers or backups.

" + } + }, + "TagResourceRequest": { + "base": null, + "refs": { + } + }, + "TagResourceResponse": { + "base": null, + "refs": { + } + }, + "TagValue": { + "base": null, + "refs": { + "Tag$Value": "

An optional tag value, such as Production or test-owcm-server. The value can be a maximum of 255 characters, and contain only Unicode letters, numbers, or separators, or the following special characters: + - = . _ : /

" + } + }, "TimeWindowDefinition": { "base": "

DDD:HH:MM (weekly start time) or HH:MM (daily start time).

Time windows always use coordinated universal time (UTC). Valid strings for day of week (DDD) are: Mon, Tue, Wed, Thr, Fri, Sat, or Sun.

", "refs": { @@ -521,6 +589,16 @@ "ServerEvent$CreatedAt": "

The time when the event occurred.

" } }, + "UntagResourceRequest": { + "base": null, + "refs": { + } + }, + "UntagResourceResponse": { + "base": null, + "refs": { + } + }, "UpdateServerEngineAttributesRequest": { "base": null, "refs": { diff --git a/models/apis/personalize-runtime/2018-05-22/api-2.json b/models/apis/personalize-runtime/2018-05-22/api-2.json index d5a41d778e3..35577bb1c4a 100644 --- a/models/apis/personalize-runtime/2018-05-22/api-2.json +++ b/models/apis/personalize-runtime/2018-05-22/api-2.json @@ -47,6 +47,22 @@ "max":256, "pattern":"arn:([a-z\\d-]+):personalize:.*:.*:.+" }, + "AttributeName":{ + "type":"string", + "max":150, + "pattern":"[A-Za-z\\d_]+" + }, + "AttributeValue":{ + "type":"string", + "max":1000, + "sensitive":true + }, + "Context":{ + "type":"map", + "key":{"shape":"AttributeName"}, + "value":{"shape":"AttributeValue"}, + "max":150 + }, "ErrorMessage":{"type":"string"}, "GetPersonalizedRankingRequest":{ "type":"structure", @@ -58,7 +74,8 @@ "members":{ "campaignArn":{"shape":"Arn"}, "inputList":{"shape":"InputList"}, - "userId":{"shape":"UserID"} + "userId":{"shape":"UserID"}, + "context":{"shape":"Context"} } }, "GetPersonalizedRankingResponse":{ @@ -74,7 +91,8 @@ "campaignArn":{"shape":"Arn"}, "itemId":{"shape":"ItemID"}, "userId":{"shape":"UserID"}, - "numResults":{"shape":"NumResults"} + "numResults":{"shape":"NumResults"}, + "context":{"shape":"Context"} } }, "GetRecommendationsResponse":{ diff --git a/models/apis/personalize-runtime/2018-05-22/docs-2.json b/models/apis/personalize-runtime/2018-05-22/docs-2.json index acef16c1d38..678ea18f981 100644 --- a/models/apis/personalize-runtime/2018-05-22/docs-2.json +++ b/models/apis/personalize-runtime/2018-05-22/docs-2.json @@ -13,6 +13,25 @@ "GetRecommendationsRequest$campaignArn": "

The Amazon Resource Name (ARN) of the campaign to use for getting recommendations.

" } }, + "AttributeName": { + "base": null, + "refs": { + "Context$key": null + } + }, + "AttributeValue": { + "base": null, + "refs": { + "Context$value": null + } + }, + "Context": { + "base": null, + "refs": { + "GetPersonalizedRankingRequest$context": "

The contextual metadata to use when getting recommendations. Contextual metadata includes any interaction information that might be relevant when getting a user's recommendations, such as the user's current location or device type. For more information, see Contextual Metadata.

", + "GetRecommendationsRequest$context": "

The contextual metadata to use when getting recommendations. Contextual metadata includes any interaction information that might be relevant when getting a user's recommendations, such as the user's current location or device type. For more information, see Contextual Metadata.

" + } + }, "ErrorMessage": { "base": null, "refs": { @@ -43,7 +62,7 @@ "InputList": { "base": null, "refs": { - "GetPersonalizedRankingRequest$inputList": "

A list of items (itemId's) to rank. If an item was not included in the training dataset, the item is appended to the end of the reranked list.

" + "GetPersonalizedRankingRequest$inputList": "

A list of items (itemId's) to rank. If an item was not included in the training dataset, the item is appended to the end of the reranked list. The maximum is 500.

" } }, "InvalidInputException": { @@ -62,14 +81,14 @@ "ItemList": { "base": null, "refs": { - "GetPersonalizedRankingResponse$personalizedRanking": "

A list of items in order of most likely interest to the user.

", - "GetRecommendationsResponse$itemList": "

A list of recommendations.

" + "GetPersonalizedRankingResponse$personalizedRanking": "

A list of items in order of most likely interest to the user. The maximum is 500.

", + "GetRecommendationsResponse$itemList": "

A list of recommendations sorted in ascending order by prediction score. There can be a maximum of 500 items in the list.

" } }, "NumResults": { "base": null, "refs": { - "GetRecommendationsRequest$numResults": "

The number of results to return. The default is 25. The maximum is 100.

" + "GetRecommendationsRequest$numResults": "

The number of results to return. The default is 25. The maximum is 500.

" } }, "PredictedItem": { diff --git a/models/apis/pinpoint/2016-12-01/api-2.json b/models/apis/pinpoint/2016-12-01/api-2.json index 78536558c79..bba246ea169 100644 --- a/models/apis/pinpoint/2016-12-01/api-2.json +++ b/models/apis/pinpoint/2016-12-01/api-2.json @@ -2528,8 +2528,40 @@ "output": { "shape": "ListTagsForResourceResponse" }, + "errors": [] + }, + "ListTemplateVersions": { + "name": "ListTemplateVersions", + "http": { + "method": "GET", + "requestUri": "/v1/templates/{template-name}/{template-type}/versions", + "responseCode": 200 + }, + "input": { + "shape": "ListTemplateVersionsRequest" + }, + "output": { + "shape": "ListTemplateVersionsResponse" + }, "errors": [ - + { + "shape": "BadRequestException" + }, + { + "shape": "InternalServerErrorException" + }, + { + "shape": "ForbiddenException" + }, + { + "shape": "NotFoundException" + }, + { + "shape": "MethodNotAllowedException" + }, + { + "shape": "TooManyRequestsException" + } ] }, "ListTemplates": { @@ -2777,9 +2809,7 @@ "input": { "shape": "TagResourceRequest" }, - "errors": [ - - ] + "errors": [] }, "UntagResource": { "name": "UntagResource", @@ -2791,9 +2821,7 @@ "input": { "shape": "UntagResourceRequest" }, - "errors": [ - - ] + "errors": [] }, "UpdateAdmChannel": { "name": "UpdateAdmChannel", @@ -3441,6 +3469,40 @@ } ] }, + "UpdateTemplateActiveVersion": { + "name": "UpdateTemplateActiveVersion", + "http": { + "method": "PUT", + "requestUri": "/v1/templates/{template-name}/{template-type}/active-version", + "responseCode": 200 + }, + "input": { + "shape": "UpdateTemplateActiveVersionRequest" + }, + "output": { + "shape": "UpdateTemplateActiveVersionResponse" + }, + "errors": [ + { + "shape": "BadRequestException" + }, + { + "shape": "InternalServerErrorException" + }, + { + "shape": "ForbiddenException" + }, + { + "shape": "NotFoundException" + }, + { + "shape": "MethodNotAllowedException" + }, + { + "shape": "TooManyRequestsException" + } + ] + }, "UpdateVoiceChannel": { "name": "UpdateVoiceChannel", "http": { @@ -5344,6 +5406,11 @@ "shape": "__string", "location": "uri", "locationName": "template-name" + }, + "Version": { + "shape": "__string", + "location": "querystring", + "locationName": "version" } }, "required": [ @@ -5481,6 +5548,11 @@ "shape": "__string", "location": "uri", "locationName": "template-name" + }, + "Version": { + "shape": "__string", + "location": "querystring", + "locationName": "version" } }, "required": [ @@ -5562,6 +5634,11 @@ "shape": "__string", "location": "uri", "locationName": "template-name" + }, + "Version": { + "shape": "__string", + "location": "querystring", + "locationName": "version" } }, "required": [ @@ -5643,6 +5720,11 @@ "shape": "__string", "location": "uri", "locationName": "template-name" + }, + "Version": { + "shape": "__string", + "location": "querystring", + "locationName": "version" } }, "required": [ @@ -5835,6 +5917,9 @@ }, "TemplateName": { "shape": "__string" + }, + "TemplateVersion": { + "shape": "__string" } } }, @@ -5898,6 +5983,9 @@ }, "TextPart": { "shape": "__string" + }, + "Version": { + "shape": "__string" } }, "required": [ @@ -7185,6 +7273,11 @@ "shape": "__string", "location": "uri", "locationName": "template-name" + }, + "Version": { + "shape": "__string", + "location": "querystring", + "locationName": "version" } }, "required": [ @@ -7599,6 +7692,11 @@ "shape": "__string", "location": "uri", "locationName": "template-name" + }, + "Version": { + "shape": "__string", + "location": "querystring", + "locationName": "version" } }, "required": [ @@ -7875,6 +7973,11 @@ "shape": "__string", "location": "uri", "locationName": "template-name" + }, + "Version": { + "shape": "__string", + "location": "querystring", + "locationName": "version" } }, "required": [ @@ -7956,6 +8059,11 @@ "shape": "__string", "location": "uri", "locationName": "template-name" + }, + "Version": { + "shape": "__string", + "location": "querystring", + "locationName": "version" } }, "required": [ @@ -8432,6 +8540,47 @@ ], "payload": "TagsModel" }, + "ListTemplateVersionsRequest": { + "type": "structure", + "members": { + "NextToken": { + "shape": "__string", + "location": "querystring", + "locationName": "next-token" + }, + "PageSize": { + "shape": "__string", + "location": "querystring", + "locationName": "page-size" + }, + "TemplateName": { + "shape": "__string", + "location": "uri", + "locationName": "template-name" + }, + "TemplateType": { + "shape": "__string", + "location": "uri", + "locationName": "template-type" + } + }, + "required": [ + "TemplateName", + "TemplateType" + ] + }, + "ListTemplateVersionsResponse": { + "type": "structure", + "members": { + "TemplateVersionsResponse": { + "shape": "TemplateVersionsResponse" + } + }, + "required": [ + "TemplateVersionsResponse" + ], + "payload": "TemplateVersionsResponse" + }, "ListTemplatesRequest": { "type": "structure", "members": { @@ -8900,13 +9049,16 @@ }, "TemplateType": { "shape": "TemplateType" + }, + "Version": { + "shape": "__string" } }, "required": [ "LastModifiedDate", "CreationDate", - "TemplateName", - "TemplateType" + "TemplateType", + "TemplateName" ] }, "PutEventStreamRequest": { @@ -9237,6 +9389,9 @@ }, "TemplateType": { "shape": "TemplateType" + }, + "Version": { + "shape": "__string" } }, "required": [ @@ -9733,6 +9888,17 @@ "members": { "Name": { "shape": "__string" + }, + "Version": { + "shape": "__string" + } + } + }, + "TemplateActiveVersionRequest": { + "type": "structure", + "members": { + "Version": { + "shape": "__string" } } }, @@ -9780,6 +9946,9 @@ }, "TemplateType": { "shape": "TemplateType" + }, + "Version": { + "shape": "__string" } }, "required": [ @@ -9798,6 +9967,58 @@ "PUSH" ] }, + "TemplateVersionResponse": { + "type": "structure", + "members": { + "CreationDate": { + "shape": "__string" + }, + "DefaultSubstitutions": { + "shape": "__string" + }, + "LastModifiedDate": { + "shape": "__string" + }, + "TemplateDescription": { + "shape": "__string" + }, + "TemplateName": { + "shape": "__string" + }, + "TemplateType": { + "shape": "__string" + }, + "Version": { + "shape": "__string" + } + }, + "required": [ + "LastModifiedDate", + "CreationDate", + "TemplateName", + "TemplateType" + ] + }, + "TemplateVersionsResponse": { + "type": "structure", + "members": { + "Item": { + "shape": "ListOfTemplateVersionResponse" + }, + "Message": { + "shape": "__string" + }, + "NextToken": { + "shape": "__string" + }, + "RequestID": { + "shape": "__string" + } + }, + "required": [ + "Item" + ] + }, "TemplatesResponse": { "type": "structure", "members": { @@ -10174,6 +10395,11 @@ "UpdateEmailTemplateRequest": { "type": "structure", "members": { + "CreateNewVersion": { + "shape": "__boolean", + "location": "querystring", + "locationName": "create-new-version" + }, "EmailTemplateRequest": { "shape": "EmailTemplateRequest" }, @@ -10181,6 +10407,11 @@ "shape": "__string", "location": "uri", "locationName": "template-name" + }, + "Version": { + "shape": "__string", + "location": "querystring", + "locationName": "version" } }, "required": [ @@ -10372,6 +10603,11 @@ "UpdatePushTemplateRequest": { "type": "structure", "members": { + "CreateNewVersion": { + "shape": "__boolean", + "location": "querystring", + "locationName": "create-new-version" + }, "PushNotificationTemplateRequest": { "shape": "PushNotificationTemplateRequest" }, @@ -10379,6 +10615,11 @@ "shape": "__string", "location": "uri", "locationName": "template-name" + }, + "Version": { + "shape": "__string", + "location": "querystring", + "locationName": "version" } }, "required": [ @@ -10468,6 +10709,11 @@ "UpdateSmsTemplateRequest": { "type": "structure", "members": { + "CreateNewVersion": { + "shape": "__boolean", + "location": "querystring", + "locationName": "create-new-version" + }, "SMSTemplateRequest": { "shape": "SMSTemplateRequest" }, @@ -10475,6 +10721,11 @@ "shape": "__string", "location": "uri", "locationName": "template-name" + }, + "Version": { + "shape": "__string", + "location": "querystring", + "locationName": "version" } }, "required": [ @@ -10495,6 +10746,42 @@ ], "payload": "MessageBody" }, + "UpdateTemplateActiveVersionRequest": { + "type": "structure", + "members": { + "TemplateActiveVersionRequest": { + "shape": "TemplateActiveVersionRequest" + }, + "TemplateName": { + "shape": "__string", + "location": "uri", + "locationName": "template-name" + }, + "TemplateType": { + "shape": "__string", + "location": "uri", + "locationName": "template-type" + } + }, + "required": [ + "TemplateName", + "TemplateType", + "TemplateActiveVersionRequest" + ], + "payload": "TemplateActiveVersionRequest" + }, + "UpdateTemplateActiveVersionResponse": { + "type": "structure", + "members": { + "MessageBody": { + "shape": "MessageBody" + } + }, + "required": [ + "MessageBody" + ], + "payload": "MessageBody" + }, "UpdateVoiceChannelRequest": { "type": "structure", "members": { @@ -10528,11 +10815,21 @@ "UpdateVoiceTemplateRequest": { "type": "structure", "members": { + "CreateNewVersion": { + "shape": "__boolean", + "location": "querystring", + "locationName": "create-new-version" + }, "TemplateName": { "shape": "__string", "location": "uri", "locationName": "template-name" }, + "Version": { + "shape": "__string", + "location": "querystring", + "locationName": "version" + }, "VoiceTemplateRequest": { "shape": "VoiceTemplateRequest" } @@ -10679,6 +10976,9 @@ "TemplateType": { "shape": "TemplateType" }, + "Version": { + "shape": "__string" + }, "VoiceId": { "shape": "__string" } @@ -11000,6 +11300,12 @@ "shape": "TemplateResponse" } }, + "ListOfTemplateVersionResponse": { + "type": "list", + "member": { + "shape": "TemplateVersionResponse" + } + }, "ListOfTreatmentResource": { "type": "list", "member": { @@ -11186,4 +11492,4 @@ "timestampFormat": "unixTimestamp" } } -} \ No newline at end of file +} diff --git a/models/apis/pinpoint/2016-12-01/docs-2.json b/models/apis/pinpoint/2016-12-01/docs-2.json index d1a0ee431d1..0d6db24d147 100644 --- a/models/apis/pinpoint/2016-12-01/docs-2.json +++ b/models/apis/pinpoint/2016-12-01/docs-2.json @@ -4,14 +4,14 @@ "operations" : { "CreateApp" : "

Creates an application.

", "CreateCampaign" : "

Creates a new campaign for an application or updates the settings of an existing campaign for an application.

", - "CreateEmailTemplate" : "

Creates a message template that you can use in messages that are sent through the email channel.

", + "CreateEmailTemplate" : "

Creates a message template for messages that are sent through the email channel.

", "CreateExportJob" : "

Creates an export job for an application.

", "CreateImportJob" : "

Creates an import job for an application.

", "CreateJourney" : "

Creates a journey for an application.

", - "CreatePushTemplate" : "

Creates a message template that you can use in messages that are sent through a push notification channel.

", + "CreatePushTemplate" : "

Creates a message template for messages that are sent through a push notification channel.

", "CreateSegment" : "

Creates a new segment for an application or updates the configuration, dimension, and other settings for an existing segment that's associated with an application.

", - "CreateSmsTemplate" : "

Creates a message template that you can use in messages that are sent through the SMS channel.

", - "CreateVoiceTemplate" : "

Creates a message template that you can use in messages that are sent through the voice channel.

", + "CreateSmsTemplate" : "

Creates a message template for messages that are sent through the SMS channel.

", + "CreateVoiceTemplate" : "

Creates a message template for messages that are sent through the voice channel.

", "DeleteAdmChannel" : "

Disables the ADM channel for an application and deletes any existing settings for the channel.

", "DeleteApnsChannel" : "

Disables the APNs channel for an application and deletes any existing settings for the channel.

", "DeleteApnsSandboxChannel" : "

Disables the APNs sandbox channel for an application and deletes any existing settings for the channel.

", @@ -21,18 +21,18 @@ "DeleteBaiduChannel" : "

Disables the Baidu channel for an application and deletes any existing settings for the channel.

", "DeleteCampaign" : "

Deletes a campaign from an application.

", "DeleteEmailChannel" : "

Disables the email channel for an application and deletes any existing settings for the channel.

", - "DeleteEmailTemplate" : "

Deletes a message template that was designed for use in messages that were sent through the email channel.

", + "DeleteEmailTemplate" : "

Deletes a message template for messages that were sent through the email channel.

", "DeleteEndpoint" : "

Deletes an endpoint from an application.

", "DeleteEventStream" : "

Deletes the event stream for an application.

", "DeleteGcmChannel" : "

Disables the GCM channel for an application and deletes any existing settings for the channel.

", "DeleteJourney" : "

Deletes a journey from an application.

", - "DeletePushTemplate" : "

Deletes a message template that was designed for use in messages that were sent through a push notification channel.

", + "DeletePushTemplate" : "

Deletes a message template for messages that were sent through a push notification channel.

", "DeleteSegment" : "

Deletes a segment from an application.

", "DeleteSmsChannel" : "

Disables the SMS channel for an application and deletes any existing settings for the channel.

", - "DeleteSmsTemplate" : "

Deletes a message template that was designed for use in messages that were sent through the SMS channel.

", + "DeleteSmsTemplate" : "

Deletes a message template for messages that were sent through the SMS channel.

", "DeleteUserEndpoints" : "

Deletes all the endpoints that are associated with a specific user ID.

", "DeleteVoiceChannel" : "

Disables the voice channel for an application and deletes any existing settings for the channel.

", - "DeleteVoiceTemplate" : "

Deletes a message template that was designed for use in messages that were sent through the voice channel.

", + "DeleteVoiceTemplate" : "

Deletes a message template for messages that were sent through the voice channel.

", "GetAdmChannel" : "

Retrieves information about the status and settings of the ADM channel for an application.

", "GetApnsChannel" : "

Retrieves information about the status and settings of the APNs channel for an application.

", "GetApnsSandboxChannel" : "

Retrieves information about the status and settings of the APNs sandbox channel for an application.

", @@ -41,7 +41,7 @@ "GetApp" : "

Retrieves information about an application.

", "GetApplicationDateRangeKpi" : "

Retrieves (queries) pre-aggregated data for a standard metric that applies to an application.

", "GetApplicationSettings" : "

Retrieves information about the settings for an application.

", - "GetApps" : "

Retrieves information about all of your applications.

", + "GetApps" : "

Retrieves information about all the applications that are associated with your Amazon Pinpoint account.

", "GetBaiduChannel" : "

Retrieves information about the status and settings of the Baidu channel for an application.

", "GetCampaign" : "

Retrieves information about the status, configuration, and other settings for a campaign.

", "GetCampaignActivities" : "

Retrieves information about all the activities for a campaign.

", @@ -51,7 +51,7 @@ "GetCampaigns" : "

Retrieves information about the status, configuration, and other settings for all the campaigns that are associated with an application.

", "GetChannels" : "

Retrieves information about the history and status of each channel for an application.

", "GetEmailChannel" : "

Retrieves information about the status and settings of the email channel for an application.

", - "GetEmailTemplate" : "

Retrieves the content and settings for a message template that you can use in messages that are sent through the email channel.

", + "GetEmailTemplate" : "

Retrieves the content and settings of a message template for messages that are sent through the email channel.

", "GetEndpoint" : "

Retrieves information about the settings and attributes of a specific endpoint for an application.

", "GetEventStream" : "

Retrieves information about the event stream settings for an application.

", "GetExportJob" : "

Retrieves information about the status and settings of a specific export job for an application.

", @@ -63,20 +63,21 @@ "GetJourneyDateRangeKpi" : "

Retrieves (queries) pre-aggregated data for a standard engagement metric that applies to a journey.

", "GetJourneyExecutionActivityMetrics" : "

Retrieves (queries) pre-aggregated data for a standard execution metric that applies to a journey activity.

", "GetJourneyExecutionMetrics" : "

Retrieves (queries) pre-aggregated data for a standard execution metric that applies to a journey.

", - "GetPushTemplate" : "

Retrieves the content and settings for a message template that you can use in messages that are sent through a push notification channel.

", + "GetPushTemplate" : "

Retrieves the content and settings of a message template for messages that are sent through a push notification channel.

", "GetSegment" : "

Retrieves information about the configuration, dimension, and other settings for a specific segment that's associated with an application.

", "GetSegmentExportJobs" : "

Retrieves information about the status and settings of the export jobs for a segment.

", "GetSegmentImportJobs" : "

Retrieves information about the status and settings of the import jobs for a segment.

", "GetSegmentVersion" : "

Retrieves information about the configuration, dimension, and other settings for a specific version of a segment that's associated with an application.

", - "GetSegmentVersions" : "

Retrieves information about the configuration, dimension, and other settings for all versions of a specific segment that's associated with an application.

", + "GetSegmentVersions" : "

Retrieves information about the configuration, dimension, and other settings for all the versions of a specific segment that's associated with an application.

", "GetSegments" : "

Retrieves information about the configuration, dimension, and other settings for all the segments that are associated with an application.

", "GetSmsChannel" : "

Retrieves information about the status and settings of the SMS channel for an application.

", - "GetSmsTemplate" : "

Retrieves the content and settings for a message template that you can use in messages that are sent through the SMS channel.

", + "GetSmsTemplate" : "

Retrieves the content and settings of a message template for messages that are sent through the SMS channel.

", "GetUserEndpoints" : "

Retrieves information about all the endpoints that are associated with a specific user ID.

", "GetVoiceChannel" : "

Retrieves information about the status and settings of the voice channel for an application.

", - "GetVoiceTemplate" : "

Retrieves the content and settings for a message template that you can use in messages that are sent through the voice channel.

", + "GetVoiceTemplate" : "

Retrieves the content and settings of a message template for messages that are sent through the voice channel.

", "ListJourneys" : "

Retrieves information about the status, configuration, and other settings for all the journeys that are associated with an application.

", "ListTagsForResource" : "

Retrieves all the tags (keys and values) that are associated with an application, campaign, journey, message template, or segment.

", + "ListTemplateVersions" : "

Retrieves information about all the versions of a specific message template.

", "ListTemplates" : "

Retrieves information about all the message templates that are associated with your Amazon Pinpoint account.

", "PhoneNumberValidate" : "

Retrieves information about a phone number.

", "PutEventStream" : "

Creates a new event stream for an application or updates the settings of an existing event stream for an application.

", @@ -95,18 +96,19 @@ "UpdateBaiduChannel" : "

Enables the Baidu channel for an application or updates the status and settings of the Baidu channel for an application.

", "UpdateCampaign" : "

Updates the configuration and other settings for a campaign.

", "UpdateEmailChannel" : "

Enables the email channel for an application or updates the status and settings of the email channel for an application.

", - "UpdateEmailTemplate" : "

Updates an existing message template that you can use in messages that are sent through the email channel.

", + "UpdateEmailTemplate" : "

Updates an existing message template for messages that are sent through the email channel.

", "UpdateEndpoint" : "

Creates a new endpoint for an application or updates the settings and attributes of an existing endpoint for an application. You can also use this operation to define custom attributes (Attributes, Metrics, and UserAttributes properties) for an endpoint.

", "UpdateEndpointsBatch" : "

Creates a new batch of endpoints for an application or updates the settings and attributes of a batch of existing endpoints for an application. You can also use this operation to define custom attributes (Attributes, Metrics, and UserAttributes properties) for a batch of endpoints.

", "UpdateGcmChannel" : "

Enables the GCM channel for an application or updates the status and settings of the GCM channel for an application.

", "UpdateJourney" : "

Updates the configuration and other settings for a journey.

", - "UpdateJourneyState" : "

Cancels an active journey.

", - "UpdatePushTemplate" : "

Updates an existing message template that you can use in messages that are sent through a push notification channel.

", + "UpdateJourneyState" : "

Cancels (stops) an active journey.

", + "UpdatePushTemplate" : "

Updates an existing message template for messages that are sent through a push notification channel.

", "UpdateSegment" : "

Creates a new segment for an application or updates the configuration, dimension, and other settings for an existing segment that's associated with an application.

", "UpdateSmsChannel" : "

Enables the SMS channel for an application or updates the status and settings of the SMS channel for an application.

", - "UpdateSmsTemplate" : "

Updates an existing message template that you can use in messages that are sent through the SMS channel.

", + "UpdateSmsTemplate" : "

Updates an existing message template for messages that are sent through the SMS channel.

", + "UpdateTemplateActiveVersion" : "

Changes the status of a specific version of a message template to active.

", "UpdateVoiceChannel" : "

Enables the voice channel for an application or updates the status and settings of the voice channel for an application.

", - "UpdateVoiceTemplate" : "

Updates an existing message template that you can use in messages that are sent through the voice channel.

" + "UpdateVoiceTemplate" : "

Updates an existing message template for messages that are sent through the voice channel.

" }, "shapes" : { "ADMChannelRequest" : { @@ -698,7 +700,7 @@ "refs" : { } }, "JourneyExecutionMetricsResponse" : { - "base" : "

Provides the results of a query that retrieved the data for a standard execution metric that applies to a journey.

", + "base" : "

Provides the results of a query that retrieved the data for a standard execution metric that applies to a journey, and provides information about that query.

", "refs" : { } }, "JourneyLimits" : { @@ -796,9 +798,9 @@ } }, "MultiConditionalSplitActivity" : { - "base" : "

Specifies the settings for a multivariate split activity in a journey. This type of activity sends participants down one of as many as five paths in a journey, based on conditions that you specify.

", + "base" : "

Specifies the settings for a multivariate split activity in a journey. This type of activity sends participants down one of as many as five paths (including a default Else path) in a journey, based on conditions that you specify.

", "refs" : { - "Activity$MultiCondition" : "

The settings for a multivariate split activity. This type of activity sends participants down one of as many as five paths in a journey, based on conditions that you specify.

" + "Activity$MultiCondition" : "

The settings for a multivariate split activity. This type of activity sends participants down one of as many as five paths (including a default Else path) in a journey, based on conditions that you specify.

" } }, "NotFoundException" : { @@ -1055,7 +1057,7 @@ "State" : { "base" : null, "refs" : { - "JourneyResponse$State" : "

The current status of the journey. Possible values are:

", + "JourneyResponse$State" : "

The current status of the journey. Possible values are:

", "JourneyStateRequest$State" : "

The status of the journey. Currently, the only supported value is CANCELLED.

If you cancel a journey, Amazon Pinpoint continues to perform activities that are currently in progress, until those activities are complete. Amazon Pinpoint also continues to collect and aggregate analytics data for those activities, until they are complete, and any activities that were complete when you cancelled the journey.

After you cancel a journey, you can't add, change, or remove any activities from the journey. In addition, Amazon Pinpoint stops evaluating the journey and doesn't perform any activities that haven't started.

", "WriteJourneyRequest$State" : "

The status of the journey. Valid values are:

The CANCELLED, COMPLETED, and CLOSED values are not supported in requests to create or update a journey. To cancel a journey, use the Journey State resource.

" } @@ -1065,7 +1067,7 @@ "refs" : { } }, "Template" : { - "base" : "

Specifies the name of the message template to use for the message.

", + "base" : "

Specifies the name and version of the message template to use for the message.

", "refs" : { "TemplateConfiguration$EmailTemplate" : "

The email template to use for the message.

", "TemplateConfiguration$PushTemplate" : "

The push notification template to use for the message.

", @@ -1073,6 +1075,10 @@ "TemplateConfiguration$VoiceTemplate" : "

The voice template to use for the message.

" } }, + "TemplateActiveVersionRequest" : { + "base" : "

Specifies which version of a message template to use as the active version of the template.

", + "refs" : { } + }, "TemplateConfiguration" : { "base" : "

Specifies the message template to use for the message, for each type of channel.

", "refs" : { @@ -1096,10 +1102,20 @@ "EmailTemplateResponse$TemplateType" : "

The type of channel that the message template is designed for. For an email template, this value is EMAIL.

", "PushNotificationTemplateResponse$TemplateType" : "

The type of channel that the message template is designed for. For a push notification template, this value is PUSH.

", "SMSTemplateResponse$TemplateType" : "

The type of channel that the message template is designed for. For an SMS template, this value is SMS.

", - "TemplateResponse$TemplateType" : "

The type of channel that the message template is designed for.

", + "TemplateResponse$TemplateType" : "

The type of channel that the message template is designed for. Possible values are: EMAIL, PUSH, SMS, and VOICE.

", "VoiceTemplateResponse$TemplateType" : "

The type of channel that the message template is designed for. For a voice template, this value is VOICE.

" } }, + "TemplateVersionResponse" : { + "base" : "

Provides information about a specific version of a message template.

", + "refs" : { + "ListOfTemplateVersionResponse$member" : null + } + }, + "TemplateVersionsResponse" : { + "base" : "

Provides information about all the versions of a specific message template.

", + "refs" : { } + }, "TemplatesResponse" : { "base" : "

Provides information about all the message templates that are associated with your Amazon Pinpoint account.

", "refs" : { } @@ -1304,7 +1320,7 @@ "ExportJobResponse$TotalProcessed" : "

The total number of endpoint definitions that were processed by the export job.

", "GCMChannelResponse$Version" : "

The current version of the GCM channel.

", "GCMMessage$TimeToLive" : "

The amount of time, in seconds, that FCM should store and attempt to deliver the push notification, if the service is unable to deliver the notification the first time. If you don't specify this value, FCM defaults to the maximum value, which is 2,419,200 seconds (28 days).

Amazon Pinpoint specifies this value in the FCM time_to_live parameter when it sends the notification message to FCM.

", - "HoldoutActivity$Percentage" : "

The percentage of participants who shouldn't continue the journey.

", + "HoldoutActivity$Percentage" : "

The percentage of participants who shouldn't continue the journey.

To determine which participants are held out, Amazon Pinpoint applies a probability-based algorithm to the percentage that you specify. Therefore, the actual percentage of participants who are held out may not be equal to the percentage that you specify.

", "ImportJobResponse$CompletedPieces" : "

The number of pieces that were processed successfully (completed) by the import job, as of the time of the request.

", "ImportJobResponse$FailedPieces" : "

The number of pieces that weren't processed successfully (failed) by the import job, as of the time of the request.

", "ImportJobResponse$TotalFailures" : "

The total number of endpoint definitions that weren't processed successfully (failed) by the import job, typically because an error, such as a syntax error, occurred.

", @@ -1316,7 +1332,7 @@ "Message$TimeToLive" : "

The number of seconds that the push-notification service should keep the message, if the service is unable to deliver the notification the first time. This value is converted to an expiration value when it's sent to a push-notification service. If this value is 0, the service treats the notification as if it expires immediately and the service doesn't store or try to deliver the notification again.

This value doesn't apply to messages that are sent through the Amazon Device Messaging (ADM) service.

", "MessageResult$StatusCode" : "

The downstream service status code for delivering the message.

", "NumberValidateResponse$PhoneTypeCode" : "

The phone type, represented by an integer. Valid values are: 0 (mobile), 1 (landline), 2 (VoIP), 3 (invalid), 4 (other), and 5 (prepaid).

", - "RandomSplitEntry$Percentage" : "

The percentage of participants to send down the activity path.

", + "RandomSplitEntry$Percentage" : "

The percentage of participants to send down the activity path.

To determine which participants are sent down each path, Amazon Pinpoint applies a probability-based algorithm to the percentages that you specify for the paths. Therefore, the actual percentage of participants who are sent down a path may not be equal to the percentage that you specify.

", "SMSChannelResponse$PromotionalMessagesPerSecond" : "

The maximum number of promotional messages that you can send through the SMS channel each second.

", "SMSChannelResponse$TransactionalMessagesPerSecond" : "

The maximum number of transactional messages that you can send through the SMS channel each second.

", "SMSChannelResponse$Version" : "

The current version of the SMS channel.

", @@ -1441,6 +1457,12 @@ "TemplatesResponse$Item" : "

An array of responses, one for each message template that's associated with your Amazon Pinpoint account and meets any filter criteria that you specified in the request.

" } }, + "ListOfTemplateVersionResponse" : { + "base" : null, + "refs" : { + "TemplateVersionsResponse$Item" : "

An array of responses, one for each version of the message template.

" + } + }, "ListOfTreatmentResource" : { "base" : null, "refs" : { @@ -1469,8 +1491,8 @@ "MapOfActivity" : { "base" : null, "refs" : { - "JourneyResponse$Activities" : "

The configuration and other settings for the activities that comprise the journey.

", - "WriteJourneyRequest$Activities" : "

The configuration and other settings for the activities that comprise the journey.

" + "JourneyResponse$Activities" : "

A map that contains a set of Activity objects, one object for each activity in the journey. For each Activity object, the key is the unique identifier (string) for an activity and the value is the settings for the activity.

", + "WriteJourneyRequest$Activities" : "

A map that contains a set of Activity objects, one object for each activity in the journey. For each Activity object, the key is the unique identifier (string) for an activity and the value is the settings for the activity. An activity identifier can contain a maximum of 128 characters. The characters must be alphanumeric characters.

" } }, "MapOfAddressConfiguration" : { @@ -1785,7 +1807,7 @@ "CampaignHook$WebUrl" : "

The web URL that Amazon Pinpoint calls to invoke the AWS Lambda function over HTTPS.

", "CampaignResponse$ApplicationId" : "

The unique identifier for the application that the campaign applies to.

", "CampaignResponse$Arn" : "

The Amazon Resource Name (ARN) of the campaign.

", - "CampaignResponse$CreationDate" : "

The date, ISO 8601 format, when the campaign was created.

", + "CampaignResponse$CreationDate" : "

The date, in ISO 8601 format, when the campaign was created.

", "CampaignResponse$Description" : "

The custom description of the campaign.

", "CampaignResponse$Id" : "

The unique identifier for the campaign.

", "CampaignResponse$LastModifiedDate" : "

The date, in ISO 8601 format, when the campaign was last modified.

", @@ -1801,8 +1823,8 @@ "ChannelResponse$Id" : "

(Deprecated) An identifier for the channel. This property is retained only for backward compatibility.

", "ChannelResponse$LastModifiedBy" : "

The user who last modified the channel.

", "ChannelResponse$LastModifiedDate" : "

The date and time, in ISO 8601 format, when the channel was last modified.

", - "ConditionalSplitActivity$FalseActivity" : "

The unique identifier for the activity to perform if the condition isn't met.

", - "ConditionalSplitActivity$TrueActivity" : "

The unique identifier for the activity to perform if the condition is met.

", + "ConditionalSplitActivity$FalseActivity" : "

The unique identifier for the activity to perform if the conditions aren't met.

", + "ConditionalSplitActivity$TrueActivity" : "

The unique identifier for the activity to perform if the conditions are met.

", "CreateApplicationRequest$Name" : "

The display name of the application. This name is displayed as the Project name on the Amazon Pinpoint console.

", "CreateTemplateMessageBody$Arn" : "

The Amazon Resource Name (ARN) of the message template that was created.

", "CreateTemplateMessageBody$Message" : "

The message that's returned from the API for the request to create the message template.

", @@ -1834,20 +1856,22 @@ "EmailMessage$FromAddress" : "

The verified email address to send the email message from. The default value is the FromAddress specified for the email channel.

", "EmailMessageActivity$NextActivity" : "

The unique identifier for the next activity to perform, after the message is sent.

", "EmailMessageActivity$TemplateName" : "

The name of the email template to use for the message.

", + "EmailMessageActivity$TemplateVersion" : "

The unique identifier for the version of the email template to use for the message. If specified, this value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the Template Versions resource.

If you don't specify a value for this property, Amazon Pinpoint uses the active version of the template. The active version is typically the version of a template that's been most recently reviewed and approved for use, depending on your workflow. It isn't necessarily the latest version of a template.

", "EmailTemplateRequest$DefaultSubstitutions" : "

A JSON object that specifies the default values to use for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable. When you create a message that's based on the template, you can override these defaults with message-specific and address-specific variables and values.

", "EmailTemplateRequest$HtmlPart" : "

The message body, in HTML format, to use in email messages that are based on the message template. We recommend using HTML format for email clients that render HTML content. You can include links, formatted text, and more in an HTML message.

", "EmailTemplateRequest$Subject" : "

The subject line, or title, to use in email messages that are based on the message template.

", "EmailTemplateRequest$TemplateDescription" : "

A custom description of the message template.

", "EmailTemplateRequest$TextPart" : "

The message body, in plain text format, to use in email messages that are based on the message template. We recommend using plain text format for email clients that don't render HTML content and clients that are connected to high-latency networks, such as mobile devices.

", "EmailTemplateResponse$Arn" : "

The Amazon Resource Name (ARN) of the message template.

", - "EmailTemplateResponse$CreationDate" : "

The date when the message template was created.

", + "EmailTemplateResponse$CreationDate" : "

The date, in ISO 8601 format, when the message template was created.

", "EmailTemplateResponse$DefaultSubstitutions" : "

The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.

", "EmailTemplateResponse$HtmlPart" : "

The message body, in HTML format, that's used in email messages that are based on the message template.

", - "EmailTemplateResponse$LastModifiedDate" : "

The date when the message template was last modified.

", + "EmailTemplateResponse$LastModifiedDate" : "

The date, in ISO 8601 format, when the message template was last modified.

", "EmailTemplateResponse$Subject" : "

The subject line, or title, that's used in email messages that are based on the message template.

", "EmailTemplateResponse$TemplateDescription" : "

The custom description of the message template.

", "EmailTemplateResponse$TemplateName" : "

The name of the message template.

", "EmailTemplateResponse$TextPart" : "

The message body, in plain text format, that's used in email messages that are based on the message template.

", + "EmailTemplateResponse$Version" : "

The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.

", "EndpointBatchItem$Address" : "

The destination address for messages or push notifications that you send to the endpoint. The address varies by channel. For a push-notification channel, use the token provided by the push notification service, such as an Apple Push Notification service (APNs) device token or a Firebase Cloud Messaging (FCM) registration token. For the SMS channel, use a phone number in E.164 format, such as +12065550100. For the email channel, use an email address.

", "EndpointBatchItem$EffectiveDate" : "

The date and time, in ISO 8601 format, when the endpoint was created or updated.

", "EndpointBatchItem$EndpointStatus" : "

Specifies whether to send messages or push notifications to the endpoint. Valid values are: ACTIVE, messages are sent to the endpoint; and, INACTIVE, messages aren’t sent to the endpoint.

Amazon Pinpoint automatically sets this value to ACTIVE when you create an endpoint or update an existing endpoint. Amazon Pinpoint automatically sets this value to INACTIVE if you update another endpoint that has the same address specified by the Address property.

", @@ -1856,10 +1880,10 @@ "EndpointBatchItem$RequestId" : "

The unique identifier for the request to create or update the endpoint.

", "EndpointDemographic$AppVersion" : "

The version of the app that's associated with the endpoint.

", "EndpointDemographic$Locale" : "

The locale of the endpoint, in the following format: the ISO 639-1 alpha-2 code, followed by an underscore (_), followed by an ISO 3166-1 alpha-2 value.

", - "EndpointDemographic$Make" : "

The manufacturer of the endpoint device, such as Apple or Samsung.

", - "EndpointDemographic$Model" : "

The model name or number of the endpoint device, such as iPhone.

", + "EndpointDemographic$Make" : "

The manufacturer of the endpoint device, such as apple or samsung.

", + "EndpointDemographic$Model" : "

The model name or number of the endpoint device, such as iPhone or SM-G900F.

", "EndpointDemographic$ModelVersion" : "

The model version of the endpoint device.

", - "EndpointDemographic$Platform" : "

The platform of the endpoint device, such as iOS or Android.

", + "EndpointDemographic$Platform" : "

The platform of the endpoint device, such as ios.

", "EndpointDemographic$PlatformVersion" : "

The platform version of the endpoint device.

", "EndpointDemographic$Timezone" : "

The time zone of the endpoint, specified as a tz database name value, such as America/Los_Angeles.

", "EndpointItemResponse$Message" : "

The custom message that's returned in the response as a result of processing the endpoint data.

", @@ -1998,7 +2022,7 @@ "MessageResult$UpdatedToken" : "

For push notifications that are sent through the GCM channel, specifies whether the endpoint's device registration token was updated as part of delivering the message.

", "MetricDimension$ComparisonOperator" : "

The operator to use when comparing metric values. Valid values are: GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, and EQUAL.

", "MultiConditionalBranch$NextActivity" : "

The unique identifier for the next activity to perform, after completing the activity for the path.

", - "MultiConditionalSplitActivity$DefaultActivity" : "

The activity to perform by default for any path in the activity.

", + "MultiConditionalSplitActivity$DefaultActivity" : "

The unique identifier for the activity to perform for participants who don't meet any of the conditions specified for other paths in the activity.

", "NumberValidateRequest$IsoCountryCode" : "

The two-character code, in ISO 3166-1 alpha-2 format, for the country or region where the phone number was originally registered.

", "NumberValidateRequest$PhoneNumber" : "

The phone number to retrieve information about. The phone number that you provide should include a valid numeric country code. Otherwise, the operation might result in an error.

", "NumberValidateResponse$Carrier" : "

The carrier or service provider that the phone number is currently registered with. In some countries and regions, this value may be the carrier or service provider that the phone number was originally registered with.

", @@ -2022,11 +2046,12 @@ "PushNotificationTemplateRequest$DefaultSubstitutions" : "

A JSON object that specifies the default values to use for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable. When you create a message that's based on the template, you can override these defaults with message-specific and address-specific variables and values.

", "PushNotificationTemplateRequest$TemplateDescription" : "

A custom description of the message template.

", "PushNotificationTemplateResponse$Arn" : "

The Amazon Resource Name (ARN) of the message template.

", - "PushNotificationTemplateResponse$CreationDate" : "

The date when the message template was created.

", + "PushNotificationTemplateResponse$CreationDate" : "

The date, in ISO 8601 format, when the message template was created.

", "PushNotificationTemplateResponse$DefaultSubstitutions" : "

The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.

", - "PushNotificationTemplateResponse$LastModifiedDate" : "

The date when the message template was last modified.

", + "PushNotificationTemplateResponse$LastModifiedDate" : "

The date, in ISO 8601 format, when the message template was last modified.

", "PushNotificationTemplateResponse$TemplateDescription" : "

The custom description of the message template.

", "PushNotificationTemplateResponse$TemplateName" : "

The name of the message template.

", + "PushNotificationTemplateResponse$Version" : "

The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.

", "QuietTime$End" : "

The specific time when quiet time ends. This value has to use 24-hour notation and be in HH:MM format, where HH is the hour (with a leading zero, if applicable) and MM is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

", "QuietTime$Start" : "

The specific time when quiet time begins. This value has to use 24-hour notation and be in HH:MM format, where HH is the hour (with a leading zero, if applicable) and MM is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

", "RandomSplitEntry$NextActivity" : "

The unique identifier for the next activity to perform, after completing the activity for the path.

", @@ -2053,11 +2078,12 @@ "SMSTemplateRequest$TemplateDescription" : "

A custom description of the message template.

", "SMSTemplateResponse$Arn" : "

The Amazon Resource Name (ARN) of the message template.

", "SMSTemplateResponse$Body" : "

The message body that's used in text messages that are based on the message template.

", - "SMSTemplateResponse$CreationDate" : "

The date when the message template was created.

", + "SMSTemplateResponse$CreationDate" : "

The date, in ISO 8601 format, when the message template was created.

", "SMSTemplateResponse$DefaultSubstitutions" : "

The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.

", - "SMSTemplateResponse$LastModifiedDate" : "

The date when the message template was last modified.

", + "SMSTemplateResponse$LastModifiedDate" : "

The date, in ISO 8601 format, when the message template was last modified.

", "SMSTemplateResponse$TemplateDescription" : "

The custom description of the message template.

", "SMSTemplateResponse$TemplateName" : "

The name of the message template.

", + "SMSTemplateResponse$Version" : "

The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.

", "Schedule$EndTime" : "

The scheduled time, in ISO 8601 format, when the campaign ended or will end.

", "Schedule$StartTime" : "

The scheduled time, in ISO 8601 format, when the campaign began or will begin.

", "Schedule$Timezone" : "

The starting UTC offset for the campaign schedule, if the value of the IsLocalTime property is true. Valid values are: UTC, UTC+01, UTC+02, UTC+03, UTC+03:30, UTC+04, UTC+04:30, UTC+05,\n UTC+05:30, UTC+05:45, UTC+06, UTC+06:30, UTC+07, UTC+08, UTC+09, UTC+09:30,\n UTC+10, UTC+10:30, UTC+11, UTC+12, UTC+13, UTC-02, UTC-03, UTC-04, UTC-05, UTC-06,\n UTC-07, UTC-08, UTC-09, UTC-10, and UTC-11.

", @@ -2083,12 +2109,25 @@ "SimpleEmailPart$Data" : "

The textual data of the message content.

", "StartCondition$Description" : "

The custom description of the condition.

", "Template$Name" : "

The name of the message template to use for the message. If specified, this value must match the name of an existing message template.

", + "Template$Version" : "

The unique identifier for the version of the message template to use for the message. If specified, this value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the Template Versions resource.

If you don't specify a value for this property, Amazon Pinpoint uses the active version of the template. The active version is typically the version of a template that's been most recently reviewed and approved for use, depending on your workflow. It isn't necessarily the latest version of a template.

", + "TemplateActiveVersionRequest$Version" : "

The unique identifier for the version of the message template to use as the active version of the template. If specified, this value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the Template Versions resource.

", "TemplateResponse$Arn" : "

The Amazon Resource Name (ARN) of the message template.

", - "TemplateResponse$CreationDate" : "

The date when the message template was created.

", + "TemplateResponse$CreationDate" : "

The date, in ISO 8601 format, when the message template was created.

", "TemplateResponse$DefaultSubstitutions" : "

The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.

", - "TemplateResponse$LastModifiedDate" : "

The date when the message template was last modified.

", + "TemplateResponse$LastModifiedDate" : "

The date, in ISO 8601 format, when the message template was last modified.

", "TemplateResponse$TemplateDescription" : "

The custom description of the message template.

", "TemplateResponse$TemplateName" : "

The name of the message template.

", + "TemplateResponse$Version" : "

The unique identifier, as an integer, for the active version of the message template.

", + "TemplateVersionResponse$CreationDate" : "

The date, in ISO 8601 format, when the version of the message template was created.

", + "TemplateVersionResponse$DefaultSubstitutions" : "

A JSON object that specifies the default values that are used for message variables in the version of the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.

", + "TemplateVersionResponse$LastModifiedDate" : "

The date, in ISO 8601 format, when the version of the message template was last modified.

", + "TemplateVersionResponse$TemplateDescription" : "

The custom description of the version of the message template.

", + "TemplateVersionResponse$TemplateName" : "

The name of the message template.

", + "TemplateVersionResponse$TemplateType" : "

The type of channel that the message template is designed for. Possible values are: EMAIL, PUSH, SMS, and VOICE.

", + "TemplateVersionResponse$Version" : "

The unique identifier for the version of the message template. This value is an integer that Amazon Pinpoint automatically increments and assigns to each new version of a template.

", + "TemplateVersionsResponse$Message" : "

The message that's returned from the API for the request to retrieve information about all the versions of the message template.

", + "TemplateVersionsResponse$NextToken" : "

The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.

", + "TemplateVersionsResponse$RequestID" : "

The unique identifier for the request to retrieve information about all the versions of the message template.

", "TemplatesResponse$NextToken" : "

The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.

", "TreatmentResource$Id" : "

The unique identifier for the treatment.

", "TreatmentResource$TreatmentDescription" : "

The custom description of the treatment.

", @@ -2110,12 +2149,13 @@ "VoiceTemplateRequest$VoiceId" : "

The name of the voice to use when delivering messages that are based on the message template. For a list of supported voices, see the Amazon Polly Developer Guide.

", "VoiceTemplateResponse$Arn" : "

The Amazon Resource Name (ARN) of the message template.

", "VoiceTemplateResponse$Body" : "

The text of the script that's used in messages that are based on the message template, in plain text format.

", - "VoiceTemplateResponse$CreationDate" : "

The date when the message template was created.

", + "VoiceTemplateResponse$CreationDate" : "

The date, in ISO 8601 format, when the message template was created.

", "VoiceTemplateResponse$DefaultSubstitutions" : "

The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.

", "VoiceTemplateResponse$LanguageCode" : "

The code for the language that's used when synthesizing the text of the script in messages that are based on the message template. For a list of supported languages and the code for each one, see the Amazon Polly Developer Guide.

", - "VoiceTemplateResponse$LastModifiedDate" : "

The date when the message template was last modified.

", + "VoiceTemplateResponse$LastModifiedDate" : "

The date, in ISO 8601 format, when the message template was last modified.

", "VoiceTemplateResponse$TemplateDescription" : "

The custom description of the message template.

", "VoiceTemplateResponse$TemplateName" : "

The name of the message template.

", + "VoiceTemplateResponse$Version" : "

The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.

", "VoiceTemplateResponse$VoiceId" : "

The name of the voice that's used when delivering messages that are based on the message template. For a list of supported voices, see the Amazon Polly Developer Guide.

", "WaitActivity$NextActivity" : "

The unique identifier for the next activity to perform, after performing the wait activity.

", "WaitTime$WaitFor" : "

The amount of time to wait, as a duration in ISO 8601 format, before determining whether the activity's conditions have been met or moving participants to the next activity in the journey.

", @@ -2131,7 +2171,7 @@ "WriteJourneyRequest$LastModifiedDate" : "

The date, in ISO 8601 format, when the journey was last modified.

", "WriteJourneyRequest$Name" : "

The name of the journey. A journey name can contain a maximum of 150 characters. The characters can be alphanumeric characters or symbols, such as underscores (_) or hyphens (-). A journey name can't contain any spaces.

", "WriteJourneyRequest$RefreshFrequency" : "

The frequency with which Amazon Pinpoint evaluates segment and event data for the journey, as a duration in ISO 8601 format.

", - "WriteJourneyRequest$StartActivity" : "

The unique identifier for the first activity in the journey.

", + "WriteJourneyRequest$StartActivity" : "

The unique identifier for the first activity in the journey. An activity identifier can contain a maximum of 128 characters. The characters must be alphanumeric characters.

", "WriteSegmentRequest$Name" : "

The name of the segment.

", "WriteTreatmentResource$TreatmentDescription" : "

A custom description of the treatment.

", "WriteTreatmentResource$TreatmentName" : "

The custom name of the treatment. A treatment is a variation of a campaign that's used for A/B testing of a campaign.

", diff --git a/models/apis/rds/2014-10-31/api-2.json b/models/apis/rds/2014-10-31/api-2.json index e9d65b6a2a0..8ff4f18e458 100644 --- a/models/apis/rds/2014-10-31/api-2.json +++ b/models/apis/rds/2014-10-31/api-2.json @@ -5752,7 +5752,8 @@ "ProcessorFeatures":{"shape":"ProcessorFeatureList"}, "UseDefaultProcessorFeatures":{"shape":"BooleanOptional"}, "DeletionProtection":{"shape":"BooleanOptional"}, - "MaxAllocatedStorage":{"shape":"IntegerOptional"} + "MaxAllocatedStorage":{"shape":"IntegerOptional"}, + "CertificateRotationRestart":{"shape":"BooleanOptional"} } }, "ModifyDBInstanceResult":{ diff --git a/models/apis/rds/2014-10-31/docs-2.json b/models/apis/rds/2014-10-31/docs-2.json index ec4a38eb1ac..c2b4daa3928 100644 --- a/models/apis/rds/2014-10-31/docs-2.json +++ b/models/apis/rds/2014-10-31/docs-2.json @@ -12,7 +12,7 @@ "CopyDBClusterParameterGroup": "

Copies the specified DB cluster parameter group.

This action only applies to Aurora DB clusters.

", "CopyDBClusterSnapshot": "

Copies a snapshot of a DB cluster.

To copy a DB cluster snapshot from a shared manual DB cluster snapshot, SourceDBClusterSnapshotIdentifier must be the Amazon Resource Name (ARN) of the shared DB cluster snapshot.

You can copy an encrypted DB cluster snapshot from another AWS Region. In that case, the AWS Region where you call the CopyDBClusterSnapshot action is the destination AWS Region for the encrypted DB cluster snapshot to be copied to. To copy an encrypted DB cluster snapshot from another AWS Region, you must provide the following values:

To cancel the copy operation once it is in progress, delete the target DB cluster snapshot identified by TargetDBClusterSnapshotIdentifier while that DB cluster snapshot is in \"copying\" status.

For more information on copying encrypted DB cluster snapshots from one AWS Region to another, see Copying a Snapshot in the Amazon Aurora User Guide.

For more information on Amazon Aurora, see What Is Amazon Aurora? in the Amazon Aurora User Guide.

This action only applies to Aurora DB clusters.

", "CopyDBParameterGroup": "

Copies the specified DB parameter group.

", - "CopyDBSnapshot": "

Copies the specified DB snapshot. The source DB snapshot must be in the \"available\" state.

You can copy a snapshot from one AWS Region to another. In that case, the AWS Region where you call the CopyDBSnapshot action is the destination AWS Region for the DB snapshot copy.

For more information about copying snapshots, see Copying a DB Snapshot in the Amazon RDS User Guide.

", + "CopyDBSnapshot": "

Copies the specified DB snapshot. The source DB snapshot must be in the \"available\" state.

You can copy a snapshot from one AWS Region to another. In that case, the AWS Region where you call the CopyDBSnapshot action is the destination AWS Region for the DB snapshot copy.

For more information about copying snapshots, see Copying a DB Snapshot in the Amazon RDS User Guide.

", "CopyOptionGroup": "

Copies the specified option group.

", "CreateCustomAvailabilityZone": "

Creates a custom Availability Zone (AZ).

A custom AZ is an on-premises AZ that is integrated with a VMware vSphere cluster.

For more information about RDS on VMware, see the RDS on VMware User Guide.

", "CreateDBCluster": "

Creates a new Amazon Aurora DB cluster.

You can use the ReplicationSourceIdentifier parameter to create the DB cluster as a Read Replica of another DB cluster or Amazon RDS MySQL DB instance. For cross-region replication where the DB cluster identified by ReplicationSourceIdentifier is encrypted, you must also specify the PreSignedUrl parameter.

For more information on Amazon Aurora, see What Is Amazon Aurora? in the Amazon Aurora User Guide.

This action only applies to Aurora DB clusters.

", @@ -428,6 +428,7 @@ "ModifyDBInstanceMessage$EnablePerformanceInsights": "

A value that indicates whether to enable Performance Insights for the DB instance.

For more information, see Using Amazon Performance Insights in the Amazon Relational Database Service User Guide.

", "ModifyDBInstanceMessage$UseDefaultProcessorFeatures": "

A value that indicates whether the DB instance class of the DB instance uses its default processor features.

", "ModifyDBInstanceMessage$DeletionProtection": "

A value that indicates whether the DB instance has deletion protection enabled. The database can't be deleted when deletion protection is enabled. By default, deletion protection is disabled. For more information, see Deleting a DB Instance.

", + "ModifyDBInstanceMessage$CertificateRotationRestart": "

A value that indicates whether the DB instance is restarted when you rotate your SSL/TLS certificate.

By default, the DB instance is restarted when you rotate your SSL/TLS certificate. The certificate is not updated until the DB instance is restarted.

Set this parameter only if you are not using SSL/TLS to connect to the DB instance.

If you are using SSL/TLS to connect to the DB instance, follow the appropriate instructions for your DB engine to rotate your SSL/TLS certificate:

", "ModifyDBProxyRequest$RequireTLS": "

Whether Transport Layer Security (TLS) encryption is required for connections to the proxy. By enabling this setting, you can enforce encrypted TLS connections to the proxy, even if the associated database doesn't use TLS.

", "ModifyDBProxyRequest$DebugLogging": "

Whether the proxy includes detailed information about SQL statements in its logs. This information helps you to debug issues involving SQL behavior or the performance and scalability of the proxy connections. The debug information includes the text of SQL statements that you submit through the proxy. Thus, only enable this setting when needed for debugging, and only when you have security measures in place to safeguard any sensitive information that appears in the logs.

", "ModifyEventSubscriptionMessage$Enabled": "

A value that indicates whether to activate the subscription.

", @@ -3573,7 +3574,7 @@ "DBProxy$Endpoint": "

The endpoint that you can use to connect to the proxy. You include the endpoint value in the connection string for a database client application.

", "DBProxyTarget$TargetArn": "

The Amazon Resource Name (ARN) for the RDS DB instance or Aurora DB cluster.

", "DBProxyTarget$Endpoint": "

The writer endpoint for the RDS DB instance or Aurora DB cluster.

", - "DBProxyTarget$TrackedClusterId": "

The DB cluster identifier when the target represents an Aurora DB cluster. This field is blank when the target represents an

", + "DBProxyTarget$TrackedClusterId": "

The DB cluster identifier when the target represents an Aurora DB cluster. This field is blank when the target represents an RDS DB instance.

", "DBProxyTarget$RdsResourceId": "

The identifier representing the target. It can be the instance identifier for an RDS DB instance, or the cluster identifier for an Aurora DB cluster.

", "DBProxyTargetGroup$DBProxyName": "

The identifier for the RDS proxy associated with this target group.

", "DBProxyTargetGroup$TargetGroupName": "

The identifier for the target group. This name must be unique for all target groups owned by your AWS account in the specified AWS Region.

", diff --git a/models/apis/redshift/2012-12-01/docs-2.json b/models/apis/redshift/2012-12-01/docs-2.json index 694dfd728e7..62201417ea5 100644 --- a/models/apis/redshift/2012-12-01/docs-2.json +++ b/models/apis/redshift/2012-12-01/docs-2.json @@ -82,7 +82,7 @@ "PurchaseReservedNodeOffering": "

Allows you to purchase reserved nodes. Amazon Redshift offers a predefined set of reserved node offerings. You can purchase one or more of the offerings. You can call the DescribeReservedNodeOfferings API to obtain the available reserved node offerings. You can call this API by providing a specific reserved node offering and the number of nodes you want to reserve.

For more information about reserved node offerings, go to Purchasing Reserved Nodes in the Amazon Redshift Cluster Management Guide.

", "RebootCluster": "

Reboots a cluster. This action is taken as soon as possible. It results in a momentary outage to the cluster, during which the cluster status is set to rebooting. A cluster event is created when the reboot is completed. Any pending cluster modifications (see ModifyCluster) are applied at this reboot. For more information about managing clusters, go to Amazon Redshift Clusters in the Amazon Redshift Cluster Management Guide.

", "ResetClusterParameterGroup": "

Sets one or more parameters of the specified parameter group to their default values and sets the source values of the parameters to \"engine-default\". To reset the entire parameter group specify the ResetAllParameters parameter. For parameter changes to take effect you must reboot any associated clusters.

", - "ResizeCluster": "

Changes the size of the cluster. You can change the cluster's type, or change the number or type of nodes. The default behavior is to use the elastic resize method. With an elastic resize, your cluster is available for read and write operations more quickly than with the classic resize method.

Elastic resize operations have the following restrictions:

", + "ResizeCluster": "

Changes the size of the cluster. You can change the cluster's type, or change the number or type of nodes. The default behavior is to use the elastic resize method. With an elastic resize, your cluster is available for read and write operations more quickly than with the classic resize method.

Elastic resize operations have the following restrictions:

", "RestoreFromClusterSnapshot": "

Creates a new cluster from a snapshot. By default, Amazon Redshift creates the resulting cluster with the same configuration as the original cluster from which the snapshot was created, except that the new cluster is created with the default cluster security and parameter groups. After Amazon Redshift creates the cluster, you can use the ModifyCluster API to associate a different security group and different parameter group with the restored cluster. If you are using a DS node type, you can also choose to change to another DS node type of the same size during restore.

If you restore a cluster into a VPC, you must provide a cluster subnet group where you want the cluster restored.

For more information about working with snapshots, go to Amazon Redshift Snapshots in the Amazon Redshift Cluster Management Guide.

", "RestoreTableFromClusterSnapshot": "

Creates a new table from a table in an Amazon Redshift cluster snapshot. You must create the new table within the Amazon Redshift cluster that the snapshot was taken from.

You cannot use RestoreTableFromClusterSnapshot to restore a table with the same name as an existing table in an Amazon Redshift cluster. That is, you cannot overwrite an existing table in a cluster with a restored table. If you want to replace your original table with a new, restored table, then rename or drop your original table before you call RestoreTableFromClusterSnapshot. When you have renamed your original table, then you can pass the original name of the table as the NewTableName parameter value in the call to RestoreTableFromClusterSnapshot. This way, you can replace the original table with the table created from the snapshot.

", "RevokeClusterSecurityGroupIngress": "

Revokes an ingress rule in an Amazon Redshift security group for a previously authorized IP range or Amazon EC2 security group. To add an ingress rule, see AuthorizeClusterSecurityGroupIngress. For information about managing security groups, go to Amazon Redshift Cluster Security Groups in the Amazon Redshift Cluster Management Guide.

", @@ -2347,7 +2347,7 @@ "CreateClusterMessage$DBName": "

The name of the first database to be created when the cluster is created.

To create additional databases after the cluster is created, connect to the cluster with a SQL client and use SQL commands to create a database. For more information, go to Create a Database in the Amazon Redshift Database Developer Guide.

Default: dev

Constraints:

", "CreateClusterMessage$ClusterIdentifier": "

A unique identifier for the cluster. You use this identifier to refer to the cluster for any subsequent cluster operations such as deleting or modifying. The identifier also appears in the Amazon Redshift console.

Constraints:

Example: myexamplecluster

", "CreateClusterMessage$ClusterType": "

The type of the cluster. When cluster type is specified as

Valid Values: multi-node | single-node

Default: multi-node

", - "CreateClusterMessage$NodeType": "

The node type to be provisioned for the cluster. For information about node types, go to Working with Clusters in the Amazon Redshift Cluster Management Guide.

Valid Values: ds2.xlarge | ds2.8xlarge | ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge | dc2.large | dc2.8xlarge

", + "CreateClusterMessage$NodeType": "

The node type to be provisioned for the cluster. For information about node types, go to Working with Clusters in the Amazon Redshift Cluster Management Guide.

Valid Values: ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge | dc2.large | dc2.8xlarge | ra3.16xlarge

", "CreateClusterMessage$MasterUsername": "

The user name associated with the master user account for the cluster that is being created.

Constraints:

", "CreateClusterMessage$MasterUserPassword": "

The password associated with the master user account for the cluster that is being created.

Constraints:

", "CreateClusterMessage$ClusterSubnetGroupName": "

The name of a cluster subnet group to be associated with this cluster.

If this parameter is not provided the resulting cluster will be deployed outside virtual private cloud (VPC).

", @@ -2537,7 +2537,7 @@ "ModifyClusterMaintenanceMessage$DeferMaintenanceIdentifier": "

A unique identifier for the deferred maintenance window.

", "ModifyClusterMessage$ClusterIdentifier": "

The unique identifier of the cluster to be modified.

Example: examplecluster

", "ModifyClusterMessage$ClusterType": "

The new cluster type.

When you submit your cluster resize request, your existing cluster goes into a read-only mode. After Amazon Redshift provisions a new cluster based on your resize requirements, there will be outage for a period while the old cluster is deleted and your connection is switched to the new cluster. You can use DescribeResize to track the progress of the resize request.

Valid Values: multi-node | single-node

", - "ModifyClusterMessage$NodeType": "

The new node type of the cluster. If you specify a new node type, you must also specify the number of nodes parameter.

When you submit your request to resize a cluster, Amazon Redshift sets access permissions for the cluster to read-only. After Amazon Redshift provisions a new cluster according to your resize requirements, there will be a temporary outage while the old cluster is deleted and your connection is switched to the new cluster. When the new connection is complete, the original access permissions for the cluster are restored. You can use DescribeResize to track the progress of the resize request.

Valid Values: ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge | dc2.large | dc2.8xlarge

", + "ModifyClusterMessage$NodeType": "

The new node type of the cluster. If you specify a new node type, you must also specify the number of nodes parameter.

When you submit your request to resize a cluster, Amazon Redshift sets access permissions for the cluster to read-only. After Amazon Redshift provisions a new cluster according to your resize requirements, there will be a temporary outage while the old cluster is deleted and your connection is switched to the new cluster. When the new connection is complete, the original access permissions for the cluster are restored. You can use DescribeResize to track the progress of the resize request.

Valid Values: ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge | dc2.large | dc2.8xlarge | ra3.16xlarge

", "ModifyClusterMessage$MasterUserPassword": "

The new password for the cluster master user. This change is asynchronously applied as soon as possible. Between the time of the request and the completion of the request, the MasterUserPassword element exists in the PendingModifiedValues element of the operation response.

Operations never return the password, so this operation provides a way to regain access to the master user account for a cluster if the password is lost.

Default: Uses existing setting.

Constraints:

", "ModifyClusterMessage$ClusterParameterGroupName": "

The name of the cluster parameter group to apply to this cluster. This change is applied only after the cluster is rebooted. To reboot a cluster use RebootCluster.

Default: Uses existing setting.

Constraints: The cluster parameter group must be in the same parameter group family that matches the cluster version.

", "ModifyClusterMessage$PreferredMaintenanceWindow": "

The weekly time range (in UTC) during which system maintenance can occur, if necessary. If system maintenance is necessary during the window, it may result in an outage.

This maintenance window change is made immediately. If the new maintenance window indicates the current time, there must be at least 120 minutes between the current time and end of the window in order to ensure that pending changes are applied.

Default: Uses existing setting.

Format: ddd:hh24:mi-ddd:hh24:mi, for example wed:07:30-wed:08:00.

Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun

Constraints: Must be at least 30 minutes.

", diff --git a/models/apis/resourcegroupstaggingapi/2017-01-26/docs-2.json b/models/apis/resourcegroupstaggingapi/2017-01-26/docs-2.json index 58833357bbb..77c39baa811 100644 --- a/models/apis/resourcegroupstaggingapi/2017-01-26/docs-2.json +++ b/models/apis/resourcegroupstaggingapi/2017-01-26/docs-2.json @@ -336,8 +336,8 @@ "TagKeyList": { "base": null, "refs": { - "ComplianceDetails$NoncompliantKeys": "

The tag key is noncompliant with the effective tag policy.

", - "ComplianceDetails$KeysWithNoncompliantValues": "

The tag value is noncompliant with the effective tag policy.

", + "ComplianceDetails$NoncompliantKeys": "

These tag keys on the resource are noncompliant with the effective tag policy.

", + "ComplianceDetails$KeysWithNoncompliantValues": "

These are keys defined in the effective policy that are on the resource with either incorrect case treatment or noncompliant values.

", "GetTagKeysOutput$TagKeys": "

A list of all tag keys in the AWS account.

" } }, diff --git a/models/apis/s3/2006-03-01/docs-2.json b/models/apis/s3/2006-03-01/docs-2.json index 473ffcab864..129e9b2f6b7 100644 --- a/models/apis/s3/2006-03-01/docs-2.json +++ b/models/apis/s3/2006-03-01/docs-2.json @@ -4,9 +4,9 @@ "operations": { "AbortMultipartUpload": "

This operation aborts a multipart upload. After a multipart upload is aborted, no additional parts can be uploaded using that upload ID. The storage consumed by any previously uploaded parts will be freed. However, if any part uploads are currently in progress, those part uploads might or might not succeed. As a result, it might be necessary to abort a given multipart upload multiple times in order to completely free all storage consumed by all parts.

To verify that all parts have been removed, so you don't get charged for the part storage, you should call the ListParts operation and ensure that the parts list is empty.

For information about permissions required to use the multipart upload API, see Multipart Upload API and Permissions.

The following operations are related to AbortMultipartUpload:

", "CompleteMultipartUpload": "

Completes a multipart upload by assembling previously uploaded parts.

You first initiate the multipart upload and then upload all parts using the UploadPart operation. After successfully uploading all relevant parts of an upload, you call this operation to complete the upload. Upon receiving this request, Amazon S3 concatenates all the parts in ascending order by part number to create a new object. In the Complete Multipart Upload request, you must provide the parts list. You must ensure that the parts list is complete. This operation concatenates the parts that you provide in the list. For each part in the list, you must provide the part number and the ETag value, returned after that part was uploaded.

Processing of a Complete Multipart Upload request could take several minutes to complete. After Amazon S3 begins processing the request, it sends an HTTP response header that specifies a 200 OK response. While processing is in progress, Amazon S3 periodically sends white space characters to keep the connection from timing out. Because a request could fail after the initial 200 OK response has been sent, it is important that you check the response body to determine whether the request succeeded.

Note that if CompleteMultipartUpload fails, applications should be prepared to retry the failed requests. For more information, see Amazon S3 Error Best Practices.

For more information about multipart uploads, see Uploading Objects Using Multipart Upload.

For information about permissions required to use the multipart upload API, see Multipart Upload API and Permissions.

GetBucketLifecycle has the following special errors:

The following operations are related to DeleteBucketMetricsConfiguration:

", - "CopyObject": "

Creates a copy of an object that is already stored in Amazon S3.

You can store individual objects of up to 5 TB in Amazon S3. You create a copy of your object up to 5 GB in size in a single atomic operation using this API. However, for copying an object greater than 5 GB, you must use the multipart upload Upload Part - Copy API. For more information, see Copy Object Using the REST Multipart Upload API.

When copying an object, you can preserve all metadata (default) or specify new metadata. However, the ACL is not preserved and is set to private for the user making the request. To override the default ACL setting, specify a new ACL when generating a copy request. For more information, see Using ACLs.

Amazon S3 transfer acceleration does not support cross-region copies. If you request a cross-region copy using a transfer acceleration endpoint, you get a 400 Bad Request error. For more information about transfer acceleration, see Transfer Acceleration.

All copy requests must be authenticated. Additionally, you must have read access to the source object and write access to the destination bucket. For more information, see REST Authentication. Both the Region that you want to copy the object from and the Region that you want to copy the object to must be enabled for your account.

To only copy an object under certain conditions, such as whether the Etag matches or whether the object was modified before or after a specified date, use the request parameters x-amz-copy-source-if-match, x-amz-copy-source-if-none-match, x-amz-copy-source-if-unmodified-since, or x-amz-copy-source-if-modified-since.

All headers with the x-amz- prefix, including x-amz-copy-source, must be signed.

You can use this operation to change the storage class of an object that is already stored in Amazon S3 using the StorageClass parameter. For more information, see Storage Classes.

The source object that you are copying can be encrypted or unencrypted. If the source object is encrypted, it can be encrypted by server-side encryption using AWS managed encryption keys or by using a customer-provided encryption key. When copying an object, you can request that Amazon S3 encrypt the target object by using either the AWS managed encryption keys or by using your own encryption key. You can do this regardless of the form of server-side encryption that was used to encrypt the source, or even if the source object was not encrypted. For more information about server-side encryption, see Using Server-Side Encryption.

A copy request might return an error when Amazon S3 receives the copy request or while Amazon S3 is copying the files. If the error occurs before the copy operation starts, you receive a standard Amazon S3 error. If the error occurs during the copy operation, the error response is embedded in the 200 OK response. This means that a 200 OK response can contain either a success or an error. Design your application to parse the contents of the response and handle it appropriately.

If the copy is successful, you receive a response with information about the copied object.

If the request is an HTTP 1.1 request, the response is chunk encoded. If it were not, it would not contain the content-length, and you would need to read the entire body.

Consider the following when using request headers:

The copy request charge is based on the storage class and Region you specify for the destination object. For pricing information, see Amazon S3 Pricing.

Following are other considerations when using CopyObject:

Versioning

By default, x-amz-copy-source identifies the current version of an object to copy. (If the current version is a delete marker, Amazon S3 behaves as if the object was deleted.) To copy a different version, use the versionId subresource.

If you enable versioning on the target bucket, Amazon S3 generates a unique version ID for the object being copied. This version ID is different from the version ID of the source object. Amazon S3 returns the version ID of the copied object in the x-amz-version-id response header in the response.

If you do not enable versioning or suspend it on the target bucket, the version ID that Amazon S3 generates is always null.

If the source object's storage class is GLACIER, you must restore a copy of this object before you can use it as a source object for the copy operation. For more information, see .

Access Permissions

When copying an object, you can optionally specify the accounts or groups that should be granted specific permissions on the new object. There are two ways to grant the permissions using the request headers:

  • Specify a canned ACL with the x-amz-acl request header. For more information, see Canned ACL.

  • Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, x-amz-grant-write-acp, and x-amz-grant-full-control headers. These parameters map to the set of permissions that Amazon S3 supports in an ACL. For more information, see Access Control List (ACL) Overview.

You can use either a canned ACL or specify access permissions explicitly. You cannot do both.

Server-Side- Encryption-Specific Request Headers

To encrypt the target object, you must provide the appropriate encryption-related request headers. The one you use depends on whether you want to use AWS managed encryption keys or provide your own encryption key.

  • To encrypt the target object using server-side encryption with an AWS managed encryption key, provide the following request headers, as appropriate.

    • x-amz-server-side​-encryption

    • x-amz-server-side-encryption-aws-kms-key-id

    • x-amz-server-side-encryption-context

    If you specify x-amz-server-side-encryption:aws:kms but don't provide x-amz-server-side- encryption-aws-kms-key-id, Amazon S3 uses the AWS managed customer master key (CMK) in AWS KMS to protect the data.

    All GET and PUT requests for an object protected by AWS KMS fail if you don't make them with SSL or by using SigV4.

    For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see Protecting Data Using Server-Side Encryption with CMKs stored in KMS.

  • To encrypt the target object using server-side encryption with an encryption key that you provide, use the following headers.

    • x-amz-server-side​-encryption​-customer-algorithm

    • x-amz-server-side​-encryption​-customer-key

    • x-amz-server-side​-encryption​-customer-key-MD5

  • If the source object is encrypted using server-side encryption with customer-provided encryption keys, you must use the following headers.

    • x-amz-copy-source​-server-side​-encryption​-customer-algorithm

    • x-amz-copy-source​-server-side​-encryption​-customer-key

    • x-amz-copy-source-​server-side​-encryption​-customer-key-MD5

    For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see Protecting Data Using Server-Side Encryption with CMKs stored in Amazon KMS.

Access-Control-List (ACL)-Specific Request Headers

You also can use the following access control–related headers with this operation. By default, all objects are private. Only the owner has full access control. When adding a new object, you can grant permissions to individual AWS accounts or to predefined groups defined by Amazon S3. These permissions are then added to the access control list (ACL) on the object. For more information, see Using ACLs. With this operation, you can grant access permissions using one of the following two methods:

  • Specify a canned ACL (x-amz-acl) — Amazon S3 supports a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined set of grantees and permissions. For more information, see Canned ACL.

  • Specify access permissions explicitly — To explicitly grant access permissions to specific AWS accounts or groups, use the following headers. Each header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see Access Control List (ACL) Overview. In the header, you specify a list of grantees who get the specific permission. To grant permissions explicitly, use:

    • x-amz-grant-read

    • x-amz-grant-write

    • x-amz-grant-read-acp

    • x-amz-grant-write-acp

    • x-amz-grant-full-control

    You specify each grantee as a type=value pair, where the type is one of the following:

    • emailAddress – if the value specified is the email address of an AWS account

    • id – if the value specified is the canonical user ID of an AWS account

    • uri – if you are granting permissions to a predefined group

    For example, the following x-amz-grant-read header grants the AWS accounts identified by email addresses permissions to read object data and its metadata:

    x-amz-grant-read: emailAddress=\"xyz@amazon.com\", emailAddress=\"abc@amazon.com\"

The following operations are related to CopyObject:

For more information, see Copying Objects.

", + "CopyObject": "

Creates a copy of an object that is already stored in Amazon S3.

You can store individual objects of up to 5 TB in Amazon S3. You create a copy of your object up to 5 GB in size in a single atomic operation using this API. However, for copying an object greater than 5 GB, you must use the multipart upload Upload Part - Copy API. For more information, see Copy Object Using the REST Multipart Upload API.

When copying an object, you can preserve all metadata (default) or specify new metadata. However, the ACL is not preserved and is set to private for the user making the request. To override the default ACL setting, specify a new ACL when generating a copy request. For more information, see Using ACLs.

Amazon S3 transfer acceleration does not support cross-region copies. If you request a cross-region copy using a transfer acceleration endpoint, you get a 400 Bad Request error. For more information about transfer acceleration, see Transfer Acceleration.

All copy requests must be authenticated. Additionally, you must have read access to the source object and write access to the destination bucket. For more information, see REST Authentication. Both the Region that you want to copy the object from and the Region that you want to copy the object to must be enabled for your account.

To only copy an object under certain conditions, such as whether the Etag matches or whether the object was modified before or after a specified date, use the request parameters x-amz-copy-source-if-match, x-amz-copy-source-if-none-match, x-amz-copy-source-if-unmodified-since, or x-amz-copy-source-if-modified-since.

All headers with the x-amz- prefix, including x-amz-copy-source, must be signed.

You can use this operation to change the storage class of an object that is already stored in Amazon S3 using the StorageClass parameter. For more information, see Storage Classes.

The source object that you are copying can be encrypted or unencrypted. If the source object is encrypted, it can be encrypted by server-side encryption using AWS managed encryption keys or by using a customer-provided encryption key. When copying an object, you can request that Amazon S3 encrypt the target object by using either the AWS managed encryption keys or by using your own encryption key. You can do this regardless of the form of server-side encryption that was used to encrypt the source, or even if the source object was not encrypted. For more information about server-side encryption, see Using Server-Side Encryption.

A copy request might return an error when Amazon S3 receives the copy request or while Amazon S3 is copying the files. If the error occurs before the copy operation starts, you receive a standard Amazon S3 error. If the error occurs during the copy operation, the error response is embedded in the 200 OK response. This means that a 200 OK response can contain either a success or an error. Design your application to parse the contents of the response and handle it appropriately.

If the copy is successful, you receive a response with information about the copied object.

If the request is an HTTP 1.1 request, the response is chunk encoded. If it were not, it would not contain the content-length, and you would need to read the entire body.

Consider the following when using request headers:

The copy request charge is based on the storage class and Region you specify for the destination object. For pricing information, see Amazon S3 Pricing.

Following are other considerations when using CopyObject:

Versioning

By default, x-amz-copy-source identifies the current version of an object to copy. (If the current version is a delete marker, Amazon S3 behaves as if the object was deleted.) To copy a different version, use the versionId subresource.

If you enable versioning on the target bucket, Amazon S3 generates a unique version ID for the object being copied. This version ID is different from the version ID of the source object. Amazon S3 returns the version ID of the copied object in the x-amz-version-id response header in the response.

If you do not enable versioning or suspend it on the target bucket, the version ID that Amazon S3 generates is always null.

If the source object's storage class is GLACIER, you must restore a copy of this object before you can use it as a source object for the copy operation. For more information, see .

Access Permissions

When copying an object, you can optionally specify the accounts or groups that should be granted specific permissions on the new object. There are two ways to grant the permissions using the request headers:

  • Specify a canned ACL with the x-amz-acl request header. For more information, see Canned ACL.

  • Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, x-amz-grant-write-acp, and x-amz-grant-full-control headers. These parameters map to the set of permissions that Amazon S3 supports in an ACL. For more information, see Access Control List (ACL) Overview.

You can use either a canned ACL or specify access permissions explicitly. You cannot do both.

Server-Side- Encryption-Specific Request Headers

To encrypt the target object, you must provide the appropriate encryption-related request headers. The one you use depends on whether you want to use AWS managed encryption keys or provide your own encryption key.

  • To encrypt the target object using server-side encryption with an AWS managed encryption key, provide the following request headers, as appropriate.

    • x-amz-server-side​-encryption

    • x-amz-server-side-encryption-aws-kms-key-id

    • x-amz-server-side-encryption-context

    If you specify x-amz-server-side-encryption:aws:kms, but don't provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the AWS managed CMK in AWS KMS to protect the data. If you want to use a customer managed AWS KMS CMK, you must provide the x-amz-server-side-encryption-aws-kms-key-id of the symmetric customer managed CMK. Amazon S3 only supports symmetric CMKs and not asymmetric CMKs. For more information, see Using Symmetric and Asymmetric Keys in the AWS Key Management Service Developer Guide.

    All GET and PUT requests for an object protected by AWS KMS fail if you don't make them with SSL or by using SigV4.

    For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see Protecting Data Using Server-Side Encryption with CMKs stored in KMS.

  • To encrypt the target object using server-side encryption with an encryption key that you provide, use the following headers.

    • x-amz-server-side​-encryption​-customer-algorithm

    • x-amz-server-side​-encryption​-customer-key

    • x-amz-server-side​-encryption​-customer-key-MD5

  • If the source object is encrypted using server-side encryption with customer-provided encryption keys, you must use the following headers.

    • x-amz-copy-source​-server-side​-encryption​-customer-algorithm

    • x-amz-copy-source​-server-side​-encryption​-customer-key

    • x-amz-copy-source-​server-side​-encryption​-customer-key-MD5

    For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see Protecting Data Using Server-Side Encryption with CMKs stored in Amazon KMS.

Access-Control-List (ACL)-Specific Request Headers

You also can use the following access control–related headers with this operation. By default, all objects are private. Only the owner has full access control. When adding a new object, you can grant permissions to individual AWS accounts or to predefined groups defined by Amazon S3. These permissions are then added to the access control list (ACL) on the object. For more information, see Using ACLs. With this operation, you can grant access permissions using one of the following two methods:

  • Specify a canned ACL (x-amz-acl) — Amazon S3 supports a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined set of grantees and permissions. For more information, see Canned ACL.

  • Specify access permissions explicitly — To explicitly grant access permissions to specific AWS accounts or groups, use the following headers. Each header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see Access Control List (ACL) Overview. In the header, you specify a list of grantees who get the specific permission. To grant permissions explicitly, use:

    • x-amz-grant-read

    • x-amz-grant-write

    • x-amz-grant-read-acp

    • x-amz-grant-write-acp

    • x-amz-grant-full-control

    You specify each grantee as a type=value pair, where the type is one of the following:

    • emailAddress – if the value specified is the email address of an AWS account

    • id – if the value specified is the canonical user ID of an AWS account

    • uri – if you are granting permissions to a predefined group

    For example, the following x-amz-grant-read header grants the AWS accounts identified by email addresses permissions to read object data and its metadata:

    x-amz-grant-read: emailAddress=\"xyz@amazon.com\", emailAddress=\"abc@amazon.com\"

The following operations are related to CopyObject:

For more information, see Copying Objects.

", "CreateBucket": "

Creates a new bucket. To create a bucket, you must register with Amazon S3 and have a valid AWS Access Key ID to authenticate requests. Anonymous requests are never allowed to create buckets. By creating the bucket, you become the bucket owner.

Not every string is an acceptable bucket name. For information on bucket naming restrictions, see Working with Amazon S3 Buckets.

By default, the bucket is created in the US East (N. Virginia) Region. You can optionally specify a Region in the request body. You might choose a Region to optimize latency, minimize costs, or address regulatory requirements. For example, if you reside in Europe, you will probably find it advantageous to create buckets in the EU (Ireland) Region. For more information, see How to Select a Region for Your Buckets.

If you send your create bucket request to the s3.amazonaws.com endpoint, the request goes to the us-east-1 Region. Accordingly, the signature calculations in Signature Version 4 must use us-east-1 as the Region, even if the location constraint in the request specifies another Region where the bucket is to be created. If you create a bucket in a Region other than US East (N. Virginia), your application must be able to handle 307 redirect. For more information, see Virtual Hosting of Buckets.

When creating a bucket using this operation, you can optionally specify the accounts or groups that should be granted specific permissions on the bucket. There are two ways to grant the appropriate permissions using the request headers.

You can use either a canned ACL or specify access permissions explicitly. You cannot do both.

The following operations are related to CreateBucket:

", - "CreateMultipartUpload": "

This operation initiates a multipart upload and returns an upload ID. This upload ID is used to associate all of the parts in the specific multipart upload. You specify this upload ID in each of your subsequent upload part requests (see UploadPart). You also include this upload ID in the final request to either complete or abort the multipart upload request.

For more information about multipart uploads, see Multipart Upload Overview.

If you have configured a lifecycle rule to abort incomplete multipart uploads, the upload must complete within the number of days specified in the bucket lifecycle configuration. Otherwise, the incomplete multipart upload becomes eligible for an abort operation and Amazon S3 aborts the multipart upload. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Policy.

For information about the permissions required to use the multipart upload API, see Multipart Upload API and Permissions.

For request signing, multipart upload is just a series of regular requests. You initiate a multipart upload, send one or more requests to upload parts, and then complete the multipart upload process. You sign each request individually. There is nothing special about signing multipart upload requests. For more information about signing, see Authenticating Requests (AWS Signature Version 4).

After you initiate a multipart upload and upload one or more parts, to stop being charged for storing the uploaded parts, you must either complete or abort the multipart upload. Amazon S3 frees up the space used to store the parts and stop charging you for storing them only after you either complete or abort a multipart upload.

You can optionally request server-side encryption. For server-side encryption, Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it when you access it. You can provide your own encryption key, or use AWS Key Management Service (AWS KMS) customer master keys (CMKs) or Amazon S3-managed encryption keys. If you choose to provide your own encryption key, the request headers you provide in UploadPart) and UploadPartCopy) requests must match the headers you used in the request to initiate the upload by using CreateMultipartUpload.

To perform a multipart upload with encryption using an AWS KMS CMK, the requester must have permission to the kms:Encrypt, kms:Decrypt, kms:ReEncrypt*, kms:GenerateDataKey*, and kms:DescribeKey actions on the key. These permissions are required because Amazon S3 must decrypt and read data from the encrypted file parts before it completes the multipart upload.

If your AWS Identity and Access Management (IAM) user or role is in the same AWS account as the AWS KMS CMK, then you must have these permissions on the key policy. If your IAM user or role belongs to a different account than the key, then you must have the permissions on both the key policy and your IAM user or role.

For more information, see Protecting Data Using Server-Side Encryption.

Access Permissions

When copying an object, you can optionally specify the accounts or groups that should be granted specific permissions on the new object. There are two ways to grant the permissions using the request headers:

  • Specify a canned ACL with the x-amz-acl request header. For more information, see Canned ACL.

  • Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, x-amz-grant-write-acp, and x-amz-grant-full-control headers. These parameters map to the set of permissions that Amazon S3 supports in an ACL. For more information, see Access Control List (ACL) Overview.

You can use either a canned ACL or specify access permissions explicitly. You cannot do both.

Server-Side- Encryption-Specific Request Headers

You can optionally tell Amazon S3 to encrypt data at rest using server-side encryption. Server-side encryption is for data encryption at rest. Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it when you access it. The option you use depends on whether you want to use AWS managed encryption keys or provide your own encryption key.

  • Use encryption keys managed by Amazon S3 or customer master keys (CMKs) stored in AWS Key Management Service (AWS KMS) – If you want AWS to manage the keys used to encrypt data, specify the following headers in the request.

    • x-amz-server-side​-encryption

    • x-amz-server-side-encryption-aws-kms-key-id

    • x-amz-server-side-encryption-context

    If you specify x-amz-server-side-encryption:aws:kms, but don't provide x-amz-server-side- encryption-aws-kms-key-id, Amazon S3 uses the AWS managed CMK in AWS KMS to protect the data.

    All GET and PUT requests for an object protected by AWS KMS fail if you don't make them with SSL or by using SigV4.

    For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see Protecting Data Using Server-Side Encryption with CMKs stored in AWS KMS.

  • Use customer-provided encryption keys – If you want to manage your own encryption keys, provide all the following headers in the request.

    • x-amz-server-side​-encryption​-customer-algorithm

    • x-amz-server-side​-encryption​-customer-key

    • x-amz-server-side​-encryption​-customer-key-MD5

    For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see Protecting Data Using Server-Side Encryption with CMKs stored in AWS KMS.

Access-Control-List (ACL)-Specific Request Headers

You also can use the following access control–related headers with this operation. By default, all objects are private. Only the owner has full access control. When adding a new object, you can grant permissions to individual AWS accounts or to predefined groups defined by Amazon S3. These permissions are then added to the access control list (ACL) on the object. For more information, see Using ACLs. With this operation, you can grant access permissions using one of the following two methods:

  • Specify a canned ACL (x-amz-acl) — Amazon S3 supports a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined set of grantees and permissions. For more information, see Canned ACL.

  • Specify access permissions explicitly — To explicitly grant access permissions to specific AWS accounts or groups, use the following headers. Each header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see Access Control List (ACL) Overview. In the header, you specify a list of grantees who get the specific permission. To grant permissions explicitly, use:

    • x-amz-grant-read

    • x-amz-grant-write

    • x-amz-grant-read-acp

    • x-amz-grant-write-acp

    • x-amz-grant-full-control

    You specify each grantee as a type=value pair, where the type is one of the following:

    • emailAddress – if the value specified is the email address of an AWS account

    • id – if the value specified is the canonical user ID of an AWS account

    • uri – if you are granting permissions to a predefined group

    For example, the following x-amz-grant-read header grants the AWS accounts identified by email addresses permissions to read object data and its metadata:

    x-amz-grant-read: emailAddress=\"xyz@amazon.com\", emailAddress=\"abc@amazon.com\"

The following operations are related to CreateMultipartUpload:

", + "CreateMultipartUpload": "

This operation initiates a multipart upload and returns an upload ID. This upload ID is used to associate all of the parts in the specific multipart upload. You specify this upload ID in each of your subsequent upload part requests (see UploadPart). You also include this upload ID in the final request to either complete or abort the multipart upload request.

For more information about multipart uploads, see Multipart Upload Overview.

If you have configured a lifecycle rule to abort incomplete multipart uploads, the upload must complete within the number of days specified in the bucket lifecycle configuration. Otherwise, the incomplete multipart upload becomes eligible for an abort operation and Amazon S3 aborts the multipart upload. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Policy.

For information about the permissions required to use the multipart upload API, see Multipart Upload API and Permissions.

For request signing, multipart upload is just a series of regular requests. You initiate a multipart upload, send one or more requests to upload parts, and then complete the multipart upload process. You sign each request individually. There is nothing special about signing multipart upload requests. For more information about signing, see Authenticating Requests (AWS Signature Version 4).

After you initiate a multipart upload and upload one or more parts, to stop being charged for storing the uploaded parts, you must either complete or abort the multipart upload. Amazon S3 frees up the space used to store the parts and stop charging you for storing them only after you either complete or abort a multipart upload.

You can optionally request server-side encryption. For server-side encryption, Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it when you access it. You can provide your own encryption key, or use AWS Key Management Service (AWS KMS) customer master keys (CMKs) or Amazon S3-managed encryption keys. If you choose to provide your own encryption key, the request headers you provide in UploadPart) and UploadPartCopy) requests must match the headers you used in the request to initiate the upload by using CreateMultipartUpload.

To perform a multipart upload with encryption using an AWS KMS CMK, the requester must have permission to the kms:Encrypt, kms:Decrypt, kms:ReEncrypt*, kms:GenerateDataKey*, and kms:DescribeKey actions on the key. These permissions are required because Amazon S3 must decrypt and read data from the encrypted file parts before it completes the multipart upload.

If your AWS Identity and Access Management (IAM) user or role is in the same AWS account as the AWS KMS CMK, then you must have these permissions on the key policy. If your IAM user or role belongs to a different account than the key, then you must have the permissions on both the key policy and your IAM user or role.

For more information, see Protecting Data Using Server-Side Encryption.

Access Permissions

When copying an object, you can optionally specify the accounts or groups that should be granted specific permissions on the new object. There are two ways to grant the permissions using the request headers:

  • Specify a canned ACL with the x-amz-acl request header. For more information, see Canned ACL.

  • Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, x-amz-grant-write-acp, and x-amz-grant-full-control headers. These parameters map to the set of permissions that Amazon S3 supports in an ACL. For more information, see Access Control List (ACL) Overview.

You can use either a canned ACL or specify access permissions explicitly. You cannot do both.

Server-Side- Encryption-Specific Request Headers

You can optionally tell Amazon S3 to encrypt data at rest using server-side encryption. Server-side encryption is for data encryption at rest. Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it when you access it. The option you use depends on whether you want to use AWS managed encryption keys or provide your own encryption key.

  • Use encryption keys managed by Amazon S3 or customer master keys (CMKs) stored in AWS Key Management Service (AWS KMS) – If you want AWS to manage the keys used to encrypt data, specify the following headers in the request.

    • x-amz-server-side​-encryption

    • x-amz-server-side-encryption-aws-kms-key-id

    • x-amz-server-side-encryption-context

    If you specify x-amz-server-side-encryption:aws:kms, but don't provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the AWS managed CMK in AWS KMS to protect the data.

    All GET and PUT requests for an object protected by AWS KMS fail if you don't make them with SSL or by using SigV4.

    For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see Protecting Data Using Server-Side Encryption with CMKs stored in AWS KMS.

  • Use customer-provided encryption keys – If you want to manage your own encryption keys, provide all the following headers in the request.

    • x-amz-server-side​-encryption​-customer-algorithm

    • x-amz-server-side​-encryption​-customer-key

    • x-amz-server-side​-encryption​-customer-key-MD5

    For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see Protecting Data Using Server-Side Encryption with CMKs stored in AWS KMS.

Access-Control-List (ACL)-Specific Request Headers

You also can use the following access control–related headers with this operation. By default, all objects are private. Only the owner has full access control. When adding a new object, you can grant permissions to individual AWS accounts or to predefined groups defined by Amazon S3. These permissions are then added to the access control list (ACL) on the object. For more information, see Using ACLs. With this operation, you can grant access permissions using one of the following two methods:

  • Specify a canned ACL (x-amz-acl) — Amazon S3 supports a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined set of grantees and permissions. For more information, see Canned ACL.

  • Specify access permissions explicitly — To explicitly grant access permissions to specific AWS accounts or groups, use the following headers. Each header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see Access Control List (ACL) Overview. In the header, you specify a list of grantees who get the specific permission. To grant permissions explicitly, use:

    • x-amz-grant-read

    • x-amz-grant-write

    • x-amz-grant-read-acp

    • x-amz-grant-write-acp

    • x-amz-grant-full-control

    You specify each grantee as a type=value pair, where the type is one of the following:

    • emailAddress – if the value specified is the email address of an AWS account

    • id – if the value specified is the canonical user ID of an AWS account

    • uri – if you are granting permissions to a predefined group

    For example, the following x-amz-grant-read header grants the AWS accounts identified by email addresses permissions to read object data and its metadata:

    x-amz-grant-read: emailAddress=\"xyz@amazon.com\", emailAddress=\"abc@amazon.com\"

The following operations are related to CreateMultipartUpload:

", "DeleteBucket": "

Deletes the bucket. All objects (including all object versions and delete markers) in the bucket must be deleted before the bucket itself can be deleted.

Related Resources

", "DeleteBucketAnalyticsConfiguration": "

Deletes an analytics configuration for the bucket (specified by the analytics configuration ID).

To use this operation, you must have permissions to perform the s3:PutAnalyticsConfiguration action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources.

For information about the Amazon S3 analytics feature, see Amazon S3 Analytics – Storage Class Analysis.

The following operations are related to DeleteBucketAnalyticsConfiguration:

", "DeleteBucketCors": "

Deletes the cors configuration information set for the bucket.

To use this operation, you must have permission to perform the s3:PutBucketCORS action. The bucket owner has this permission by default and can grant this permission to others.

For information about cors, see Enabling Cross-Origin Resource Sharing in the Amazon Simple Storage Service Developer Guide.

Related Resources:

", @@ -19,7 +19,7 @@ "DeleteBucketTagging": "

Deletes the tags from the bucket.

To use this operation, you must have permission to perform the s3:PutBucketTagging action. By default, the bucket owner has this permission and can grant this permission to others.

The following operations are related to DeleteBucketTagging:

", "DeleteBucketWebsite": "

This operation removes the website configuration for a bucket. Amazon S3 returns a 200 OK response upon successfully deleting a website configuration on the specified bucket. You will get a 200 OK response if the website configuration you are trying to delete does not exist on the bucket. Amazon S3 returns a 404 response if the bucket specified in the request does not exist.

This DELETE operation requires the S3:DeleteBucketWebsite permission. By default, only the bucket owner can delete the website configuration attached to a bucket. However, bucket owners can grant other users permission to delete the website configuration by writing a bucket policy granting them the S3:DeleteBucketWebsite permission.

For more information about hosting websites, see Hosting Websites on Amazon S3.

The following operations are related to DeleteBucketWebsite:

", "DeleteObject": "

Removes the null version (if there is one) of an object and inserts a delete marker, which becomes the latest version of the object. If there isn't a null version, Amazon S3 does not remove any objects.

To remove a specific version, you must be the bucket owner and you must use the version Id subresource. Using this subresource permanently deletes the version. If the object deleted is a delete marker, Amazon S3 sets the response header, x-amz-delete-marker, to true.

If the object you want to delete is in a bucket where the bucket versioning configuration is MFA Delete enabled, you must include the x-amz-mfa request header in the DELETE versionId request. Requests that include x-amz-mfa must use HTTPS.

For more information about MFA Delete, see Using MFA Delete. To see sample requests that use versioning, see Sample Request.

You can delete objects by explicitly calling the DELETE Object API or configure its lifecycle (PutBucketLifecycle) to enable Amazon S3 to remove them for you. If you want to block users or accounts from removing or deleting objects from your bucket, you must deny them the s3:DeleteObject, s3:DeleteObjectVersion, and s3:PutLifeCycleConfiguration actions.

The following operation is related to DeleteObject:

", - "DeleteObjectTagging": "

Removes the entire tag set from the specified object. For more information about managing object tags, see Object Tagging.

To use this operation, you must have permission to perform the s3:DeleteObjectTagging action.

To delete tags of a specific object version, add the versionId query parameter in the request. You will need permission for the s3:DeleteObjectVersionTagging action.

The following operations are related to DeleteBucketMetricsConfiguration:

", + "DeleteObjectTagging": "

Removes the entire tag set from the specified object. For more information about managing object tags, see Object Tagging.

To use this operation, you must have permission to perform the s3:DeleteObjectTagging action.

To delete tags of a specific object version, add the versionId query parameter in the request. You will need permission for the s3:DeleteObjectVersionTagging action.

The following operations are related to DeleteBucketMetricsConfiguration:

", "DeleteObjects": "

This operation enables you to delete multiple objects from a bucket using a single HTTP request. If you know the object keys that you want to delete, then this operation provides a suitable alternative to sending individual delete requests, reducing per-request overhead.

The request contains a list of up to 1000 keys that you want to delete. In the XML, you provide the object key names, and optionally, version IDs if you want to delete a specific version of the object from a versioning-enabled bucket. For each key, Amazon S3 performs a delete operation and returns the result of that delete, success, or failure, in the response. Note that if the object specified in the request is not found, Amazon S3 returns the result as deleted.

The operation supports two modes for the response: verbose and quiet. By default, the operation uses verbose mode in which the response includes the result of deletion of each key in your request. In quiet mode the response includes only keys where the delete operation encountered an error. For a successful deletion, the operation does not return any information about the delete in the response body.

When performing this operation on an MFA Delete enabled bucket, that attempts to delete any versioned objects, you must include an MFA token. If you do not provide one, the entire request will fail, even if there are non-versioned objects you are trying to delete. If you provide an invalid token, whether there are versioned keys in the request or not, the entire Multi-Object Delete request will fail. For information about MFA Delete, see MFA Delete.

Finally, the Content-MD5 header is required for all Multi-Object Delete requests. Amazon S3 uses the header value to ensure that your request body has not been altered in transit.

The following operations are related to DeleteObjects:

", "DeletePublicAccessBlock": "

Removes the PublicAccessBlock configuration for an Amazon S3 bucket. To use this operation, you must have the s3:PutBucketPublicAccessBlock permission. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources.

The following operations are related to DeleteBucketMetricsConfiguration:

", "GetBucketAccelerateConfiguration": "

This implementation of the GET operation uses the accelerate subresource to return the Transfer Acceleration state of a bucket, which is either Enabled or Suspended. Amazon S3 Transfer Acceleration is a bucket-level feature that enables you to perform faster data transfers to and from Amazon S3.

To use this operation, you must have permission to perform the s3:GetAccelerateConfiguration action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to your Amazon S3 Resources in the Amazon Simple Storage Service Developer Guide.

You set the Transfer Acceleration state of an existing bucket to Enabled or Suspended by using the PutBucketAccelerateConfiguration operation.

A GET accelerate request does not return a state value for a bucket that has no transfer acceleration state. A bucket has no Transfer Acceleration state if a state has never been set on the bucket.

For more information about transfer acceleration, see Transfer Acceleration in the Amazon Simple Storage Service Developer Guide.

Related Resources

", @@ -65,7 +65,7 @@ "PutBucketAcl": "

Sets the permissions on an existing bucket using access control lists (ACL). For more information, see Using ACLs. To set the ACL of a bucket, you must have WRITE_ACP permission.

You can use one of the following two ways to set a bucket's permissions:

You cannot specify access permission using both the body and the request headers.

Depending on your application needs, you may choose to set the ACL on a bucket using either the request body or the headers. For example, if you have an existing application that updates a bucket ACL using the request body, then you can continue to use that approach.

Access Permissions

You can set access permissions using one of the following methods:

You can use either a canned ACL or specify access permissions explicitly. You cannot do both.

Grantee Values

You can specify the person (grantee) to whom you're assigning access rights (using request elements) in the following ways:

Related Resources

", "PutBucketAnalyticsConfiguration": "

Sets an analytics configuration for the bucket (specified by the analytics configuration ID). You can have up to 1,000 analytics configurations per bucket.

You can choose to have storage class analysis export analysis reports sent to a comma-separated values (CSV) flat file. See the DataExport request element. Reports are updated daily and are based on the object filters that you configure. When selecting data export, you specify a destination bucket and an optional destination prefix where the file is written. You can export the data to a destination bucket in a different account. However, the destination bucket must be in the same Region as the bucket that you are making the PUT analytics configuration to. For more information, see Amazon S3 Analytics – Storage Class Analysis.

You must create a bucket policy on the destination bucket where the exported file is written to grant permissions to Amazon S3 to write objects to the bucket. For an example policy, see Granting Permissions for Amazon S3 Inventory and Storage Class Analysis.

To use this operation, you must have permissions to perform the s3:PutAnalyticsConfiguration action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources.

Special Errors

Related Resources

", "PutBucketCors": "

Sets the cors configuration for your bucket. If the configuration exists, Amazon S3 replaces it.

To use this operation, you must be allowed to perform the s3:PutBucketCORS action. By default, the bucket owner has this permission and can grant it to others.

You set this configuration on a bucket so that the bucket can service cross-origin requests. For example, you might want to enable a request whose origin is http://www.example.com to access your Amazon S3 bucket at my.example.bucket.com by using the browser's XMLHttpRequest capability.

To enable cross-origin resource sharing (CORS) on a bucket, you add the cors subresource to the bucket. The cors subresource is an XML document in which you configure rules that identify origins and the HTTP methods that can be executed on your bucket. The document is limited to 64 KB in size.

When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) against a bucket, it evaluates the cors configuration on the bucket and uses the first CORSRule rule that matches the incoming browser request to enable a cross-origin request. For a rule to match, the following conditions must be met:

For more information about CORS, go to Enabling Cross-Origin Resource Sharing in the Amazon Simple Storage Service Developer Guide.

Related Resources

", - "PutBucketEncryption": "

This implementation of the PUT operation uses the encryption subresource to set the default encryption state of an existing bucket.

This implementation of the PUT operation sets default encryption for a buckets using server-side encryption with Amazon S3-managed keys SSE-S3 or AWS KMS customer master keys (CMKs) (SSE-KMS) bucket.

This operation requires AWS Signature Version 4. For more information, see Authenticating Requests (AWS Signature Version 4).

To use this operation, you must have permissions to perform the s3:PutEncryptionConfiguration action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources in the Amazon Simple Storage Service Developer Guide.

Related Resources

", + "PutBucketEncryption": "

This implementation of the PUT operation uses the encryption subresource to set the default encryption state of an existing bucket.

This implementation of the PUT operation sets default encryption for a bucket using server-side encryption with Amazon S3-managed keys SSE-S3 or AWS KMS customer master keys (CMKs) (SSE-KMS).

This operation requires AWS Signature Version 4. For more information, see Authenticating Requests (AWS Signature Version 4).

To use this operation, you must have permissions to perform the s3:PutEncryptionConfiguration action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources in the Amazon Simple Storage Service Developer Guide.

Related Resources

", "PutBucketInventoryConfiguration": "

This implementation of the PUT operation adds an inventory configuration (identified by the inventory ID) to the bucket. You can have up to 1,000 inventory configurations per bucket.

Amazon S3 inventory generates inventories of the objects in the bucket on a daily or weekly basis, and the results are published to a flat file. The bucket that is inventoried is called the source bucket, and the bucket where the inventory flat file is stored is called the destination bucket. The destination bucket must be in the same AWS Region as the source bucket.

When you configure an inventory for a source bucket, you specify the destination bucket where you want the inventory to be stored, and whether to generate the inventory daily or weekly. You can also configure what object metadata to include and whether to inventory all object versions or only current versions. For more information, see Amazon S3 Inventory in the Amazon Simple Storage Service Developer Guide.

You must create a bucket policy on the destination bucket to grant permissions to Amazon S3 to write objects to the bucket in the defined location. For an example policy, see Granting Permissions for Amazon S3 Inventory and Storage Class Analysis.

To use this operation, you must have permissions to perform the s3:PutInventoryConfiguration action. The bucket owner has this permission by default and can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources in the Amazon Simple Storage Service Developer Guide.

Special Errors

Related Resources

", "PutBucketLifecycle": "

For an updated version of this API, see PutBucketLifecycleConfiguration. This version has been deprecated. Existing lifecycle configurations will work. For new lifecycle configurations, use the updated API.

Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle configuration. For information about lifecycle configuration, see Object Lifecycle Management in the Amazon Simple Storage Service Developer Guide.

By default, all Amazon S3 resources, including buckets, objects, and related subresources (for example, lifecycle configuration and website configuration) are private. Only the resource owner, the AWS account that created the resource, can access it. The resource owner can optionally grant access permissions to others by writing an access policy. For this operation, users must get the s3:PutLifecycleConfiguration permission.

You can also explicitly deny permissions. Explicit denial also supersedes any other permissions. If you want to prevent users or accounts from removing or deleting objects from your bucket, you must deny them permissions for the following actions:

For more information about permissions, see Managing Access Permissions to your Amazon S3 Resources in the Amazon Simple Storage Service Developer Guide.

For more examples of transitioning objects to storage classes such as STANDARD_IA or ONEZONE_IA, see Examples of Lifecycle Configuration.

Related Resources

", "PutBucketLifecycleConfiguration": "

Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle configuration. For information about lifecycle configuration, see Managing Access Permissions to Your Amazon S3 Resources.

Bucket lifecycle configuration now supports specifying a lifecycle rule using an object key name prefix, one or more object tags, or a combination of both. Accordingly, this section describes the latest API. The previous version of the API supported filtering based only on an object key name prefix, which is supported for backward compatibility. For the related API description, see PutBucketLifecycle.

Rules

You specify the lifecycle configuration in your request body. The lifecycle configuration is specified as XML consisting of one or more rules. Each rule consists of the following:

For more information, see Object Lifecycle Management and Lifecycle Configuration Elements.

Permissions

By default, all Amazon S3 resources are private, including buckets, objects, and related subresources (for example, lifecycle configuration and website configuration). Only the resource owner (that is, the AWS account that created it) can access the resource. The resource owner can optionally grant access permissions to others by writing an access policy. For this operation, a user must get the s3:PutLifecycleConfiguration permission.

You can also explicitly deny permissions. Explicit deny also supersedes any other permissions. If you want to block users or accounts from removing or deleting objects from your bucket, you must deny them permissions for the following actions:

For more information about permissions, see Managing Access Permissions to Your Amazon S3 Resources.

The following are related to PutBucketLifecycleConfiguration:

", @@ -79,7 +79,7 @@ "PutBucketTagging": "

Sets the tags for a bucket.

Use tags to organize your AWS bill to reflect your own cost structure. To do this, sign up to get your AWS account bill with tag key values included. Then, to see the cost of combined resources, organize your billing information according to resources with the same tag key values. For example, you can tag several resources with a specific application name, and then organize your billing information to see the total cost of that application across several services. For more information, see Cost Allocation and Tagging.

Within a bucket, if you add a tag that has the same key as an existing tag, the new value overwrites the old value. For more information, see Using Cost Allocation in Amazon S3 Bucket Tags.

To use this operation, you must have permissions to perform the s3:PutBucketTagging action. The bucket owner has this permission by default and can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources.

PutBucketTagging has the following special errors:

The following operations are related to PutBucketTagging:

", "PutBucketVersioning": "

Sets the versioning state of an existing bucket. To set the versioning state, you must be the bucket owner.

You can set the versioning state with one of the following values:

Enabled—Enables versioning for the objects in the bucket. All objects added to the bucket receive a unique version ID.

Suspended—Disables versioning for the objects in the bucket. All objects added to the bucket receive the version ID null.

If the versioning state has never been set on a bucket, it has no versioning state; a GetBucketVersioning request does not return a versioning state value.

If the bucket owner enables MFA Delete in the bucket versioning configuration, the bucket owner must include the x-amz-mfa request header and the Status and the MfaDelete request elements in a request to set the versioning state of the bucket.

If you have an object expiration lifecycle policy in your non-versioned bucket and you want to maintain the same permanent delete behavior when you enable versioning, you must add a noncurrent expiration policy. The noncurrent expiration lifecycle policy will manage the deletes of the noncurrent object versions in the version-enabled bucket. (A version-enabled bucket maintains one current and zero or more noncurrent object versions.) For more information, see Lifecycle and Versioning.

Related Resources

", "PutBucketWebsite": "

Sets the configuration of the website that is specified in the website subresource. To configure a bucket as a website, you can add this subresource on the bucket with website configuration information such as the file name of the index document and any redirect rules. For more information, see Hosting Websites on Amazon S3.

This PUT operation requires the S3:PutBucketWebsite permission. By default, only the bucket owner can configure the website attached to a bucket; however, bucket owners can allow other users to set the website configuration by writing a bucket policy that grants them the S3:PutBucketWebsite permission.

To redirect all website requests sent to the bucket's website endpoint, you add a website configuration with the following elements. Because all requests are sent to another website, you don't need to provide index document name for the bucket.

If you want granular control over redirects, you can use the following elements to add routing rules that describe conditions for redirecting requests and information about the redirect destination. In this case, the website configuration must provide an index document for the bucket, because some requests might not be redirected.

", - "PutObject": "

Adds an object to a bucket. You must have WRITE permissions on a bucket to add an object to it.

Amazon S3 never adds partial objects; if you receive a success response, Amazon S3 added the entire object to the bucket.

Amazon S3 is a distributed system. If it receives multiple write requests for the same object simultaneously, it overwrites all but the last object written. Amazon S3 does not provide object locking; if you need this, make sure to build it into your application layer or use versioning instead.

To ensure that data is not corrupted traversing the network, use the Content-MD5 header. When you use this header, Amazon S3 checks the object against the provided MD5 value and, if they do not match, returns an error. Additionally, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned ETag to the calculated MD5 value.

To configure your application to send the request headers before sending the request body, use the 100-continue HTTP status code. For PUT operations, this helps you avoid sending the message body if the message is rejected based on the headers (for example, because authentication fails or a redirect occurs). For more information on the 100-continue HTTP status code, see Section 8.2.3 of http://www.ietf.org/rfc/rfc2616.txt.

You can optionally request server-side encryption. With server-side encryption, Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts the data when you access it. You have the option to provide your own encryption key or use AWS managed encryption keys. For more information, see Using Server-Side Encryption.

Access Permissions

You can optionally specify the accounts or groups that should be granted specific permissions on the new object. There are two ways to grant the permissions using the request headers:

  • Specify a canned ACL with the x-amz-acl request header. For more information, see Canned ACL.

  • Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, x-amz-grant-write-acp, and x-amz-grant-full-control headers. These parameters map to the set of permissions that Amazon S3 supports in an ACL. For more information, see Access Control List (ACL) Overview.

You can use either a canned ACL or specify access permissions explicitly. You cannot do both.

Server-Side- Encryption-Specific Request Headers

You can optionally tell Amazon S3 to encrypt data at rest using server-side encryption. Server-side encryption is for data encryption at rest. Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it when you access it. The option you use depends on whether you want to use AWS managed encryption keys or provide your own encryption key.

  • Use encryption keys managed by Amazon S3 or customer master keys (CMKs) stored in AWS Key Management Service (AWS KMS) – If you want AWS to manage the keys used to encrypt data, specify the following headers in the request.

    • x-amz-server-side​-encryption

    • x-amz-server-side-encryption-aws-kms-key-id

    • x-amz-server-side-encryption-context

    If you specify x-amz-server-side-encryption:aws:kms, but don't provide x-amz-server-side- encryption-aws-kms-key-id, Amazon S3 uses the AWS managed CMK in AWS KMS to protect the data.

    All GET and PUT requests for an object protected by AWS KMS fail if you don't make them with SSL or by using SigV4.

    For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see Protecting Data Using Server-Side Encryption with CMKs stored in AWS.

  • Use customer-provided encryption keys – If you want to manage your own encryption keys, provide all the following headers in the request.

    • x-amz-server-side​-encryption​-customer-algorithm

    • x-amz-server-side​-encryption​-customer-key

    • x-amz-server-side​-encryption​-customer-key-MD5

    For more information about server-side encryption with CMKs stored in KMS (SSE-KMS), see Protecting Data Using Server-Side Encryption with CMKs stored in AWS KMS.

Access-Control-List (ACL)-Specific Request Headers

You also can use the following access control–related headers with this operation. By default, all objects are private. Only the owner has full access control. When adding a new object, you can grant permissions to individual AWS accounts or to predefined groups defined by Amazon S3. These permissions are then added to the Access Control List (ACL) on the object. For more information, see Using ACLs. With this operation, you can grant access permissions using one of the following two methods:

  • Specify a canned ACL (x-amz-acl) — Amazon S3 supports a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined set of grantees and permissions. For more information, see Canned ACL.

  • Specify access permissions explicitly — To explicitly grant access permissions to specific AWS accounts or groups, use the following headers. Each header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see Access Control List (ACL) Overview. In the header, you specify a list of grantees who get the specific permission. To grant permissions explicitly use:

    • x-amz-grant-read

    • x-amz-grant-write

    • x-amz-grant-read-acp

    • x-amz-grant-write-acp

    • x-amz-grant-full-control

    You specify each grantee as a type=value pair, where the type is one of the following:

    • emailAddress – if the value specified is the email address of an AWS account

      Using email addresses to specify a grantee is only supported in the following AWS Regions:

      • US East (N. Virginia)

      • US West (N. California)

      • US West (Oregon)

      • Asia Pacific (Singapore)

      • Asia Pacific (Sydney)

      • Asia Pacific (Tokyo)

      • EU (Ireland)

      • South America (São Paulo)

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the AWS General Reference

    • id – if the value specified is the canonical user ID of an AWS account

    • uri – if you are granting permissions to a predefined group

    For example, the following x-amz-grant-read header grants the AWS accounts identified by email addresses permissions to read object data and its metadata:

    x-amz-grant-read: emailAddress=\"xyz@amazon.com\", emailAddress=\"abc@amazon.com\"

Server-Side- Encryption-Specific Request Headers

You can optionally tell Amazon S3 to encrypt data at rest using server-side encryption. Server-side encryption is for data encryption at rest. Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it when you access it. The option you use depends on whether you want to use AWS-managed encryption keys or provide your own encryption key.

  • Use encryption keys managed by Amazon S3 or customer master keys (CMKs) stored in AWS Key Management Service (AWS KMS) – If you want AWS to manage the keys used to encrypt data, specify the following headers in the request.

    • x-amz-server-side​-encryption

    • x-amz-server-side-encryption-aws-kms-key-id

    • x-amz-server-side-encryption-context

    If you specify x-amz-server-side-encryption:aws:kms, but don't provide x-amz-server-side- encryption-aws-kms-key-id, Amazon S3 uses the default AWS KMS CMK to protect the data.

    All GET and PUT requests for an object protected by AWS KMS fail if you don't make them with SSL or by using SigV4.

    For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see Protecting Data Using Server-Side Encryption with CMKs stored in AWS KMS.

  • Use customer-provided encryption keys – If you want to manage your own encryption keys, provide all the following headers in the request.

    If you use this feature, the ETag value that Amazon S3 returns in the response is not the MD5 of the object.

    • x-amz-server-side​-encryption​-customer-algorithm

    • x-amz-server-side​-encryption​-customer-key

    • x-amz-server-side​-encryption​-customer-key-MD5

    For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see Protecting Data Using Server-Side Encryption with CMKs stored in AWS KMS.

Storage Class Options

By default, Amazon S3 uses the Standard storage class to store newly created objects. The Standard storage class provides high durability and high availability. You can specify other storage classes depending on the performance needs. For more information, see Storage Classes in the Amazon Simple Storage Service Developer Guide.

Versioning

If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID for the object being stored. Amazon S3 returns this ID in the response using the x-amz-version-id response header. If versioning is suspended, Amazon S3 always uses null as the version ID for the object stored. For more information about returning the versioning state of a bucket, see GetBucketVersioning. If you enable versioning for a bucket, when Amazon S3 receives multiple write requests for the same object simultaneously, it stores all of the objects.

Related Resources

", + "PutObject": "

Adds an object to a bucket. You must have WRITE permissions on a bucket to add an object to it.

Amazon S3 never adds partial objects; if you receive a success response, Amazon S3 added the entire object to the bucket.

Amazon S3 is a distributed system. If it receives multiple write requests for the same object simultaneously, it overwrites all but the last object written. Amazon S3 does not provide object locking; if you need this, make sure to build it into your application layer or use versioning instead.

To ensure that data is not corrupted traversing the network, use the Content-MD5 header. When you use this header, Amazon S3 checks the object against the provided MD5 value and, if they do not match, returns an error. Additionally, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned ETag to the calculated MD5 value.

To configure your application to send the request headers before sending the request body, use the 100-continue HTTP status code. For PUT operations, this helps you avoid sending the message body if the message is rejected based on the headers (for example, because authentication fails or a redirect occurs). For more information on the 100-continue HTTP status code, see Section 8.2.3 of http://www.ietf.org/rfc/rfc2616.txt.

You can optionally request server-side encryption. With server-side encryption, Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts the data when you access it. You have the option to provide your own encryption key or use AWS managed encryption keys. For more information, see Using Server-Side Encryption.

Access Permissions

You can optionally specify the accounts or groups that should be granted specific permissions on the new object. There are two ways to grant the permissions using the request headers:

  • Specify a canned ACL with the x-amz-acl request header. For more information, see Canned ACL.

  • Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, x-amz-grant-write-acp, and x-amz-grant-full-control headers. These parameters map to the set of permissions that Amazon S3 supports in an ACL. For more information, see Access Control List (ACL) Overview.

You can use either a canned ACL or specify access permissions explicitly. You cannot do both.

Server-Side- Encryption-Specific Request Headers

You can optionally tell Amazon S3 to encrypt data at rest using server-side encryption. Server-side encryption is for data encryption at rest. Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it when you access it. The option you use depends on whether you want to use AWS managed encryption keys or provide your own encryption key.

  • Use encryption keys managed by Amazon S3 or customer master keys (CMKs) stored in AWS Key Management Service (AWS KMS) – If you want AWS to manage the keys used to encrypt data, specify the following headers in the request.

    • x-amz-server-side​-encryption

    • x-amz-server-side-encryption-aws-kms-key-id

    • x-amz-server-side-encryption-context

    If you specify x-amz-server-side-encryption:aws:kms, but don't provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the AWS managed CMK in AWS KMS to protect the data. If you want to use a customer managed AWS KMS CMK, you must provide the x-amz-server-side-encryption-aws-kms-key-id of the symmetric customer managed CMK. Amazon S3 only supports symmetric CMKs and not asymmetric CMKs. For more information, see Using Symmetric and Asymmetric Keys in the AWS Key Management Service Developer Guide.

    All GET and PUT requests for an object protected by AWS KMS fail if you don't make them with SSL or by using SigV4.

    For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see Protecting Data Using Server-Side Encryption with CMKs stored in AWS.

  • Use customer-provided encryption keys – If you want to manage your own encryption keys, provide all the following headers in the request.

    • x-amz-server-side​-encryption​-customer-algorithm

    • x-amz-server-side​-encryption​-customer-key

    • x-amz-server-side​-encryption​-customer-key-MD5

    For more information about server-side encryption with CMKs stored in KMS (SSE-KMS), see Protecting Data Using Server-Side Encryption with CMKs stored in AWS.

Access-Control-List (ACL)-Specific Request Headers

You also can use the following access control–related headers with this operation. By default, all objects are private. Only the owner has full access control. When adding a new object, you can grant permissions to individual AWS accounts or to predefined groups defined by Amazon S3. These permissions are then added to the Access Control List (ACL) on the object. For more information, see Using ACLs. With this operation, you can grant access permissions using one of the following two methods:

  • Specify a canned ACL (x-amz-acl) — Amazon S3 supports a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined set of grantees and permissions. For more information, see Canned ACL.

  • Specify access permissions explicitly — To explicitly grant access permissions to specific AWS accounts or groups, use the following headers. Each header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see Access Control List (ACL) Overview. In the header, you specify a list of grantees who get the specific permission. To grant permissions explicitly use:

    • x-amz-grant-read

    • x-amz-grant-write

    • x-amz-grant-read-acp

    • x-amz-grant-write-acp

    • x-amz-grant-full-control

    You specify each grantee as a type=value pair, where the type is one of the following:

    • emailAddress – if the value specified is the email address of an AWS account

      Using email addresses to specify a grantee is only supported in the following AWS Regions:

      • US East (N. Virginia)

      • US West (N. California)

      • US West (Oregon)

      • Asia Pacific (Singapore)

      • Asia Pacific (Sydney)

      • Asia Pacific (Tokyo)

      • EU (Ireland)

      • South America (São Paulo)

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the AWS General Reference

    • id – if the value specified is the canonical user ID of an AWS account

    • uri – if you are granting permissions to a predefined group

    For example, the following x-amz-grant-read header grants the AWS accounts identified by email addresses permissions to read object data and its metadata:

    x-amz-grant-read: emailAddress=\"xyz@amazon.com\", emailAddress=\"abc@amazon.com\"

Server-Side- Encryption-Specific Request Headers

You can optionally tell Amazon S3 to encrypt data at rest using server-side encryption. Server-side encryption is for data encryption at rest. Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it when you access it. The option you use depends on whether you want to use AWS-managed encryption keys or provide your own encryption key.

  • Use encryption keys managed by Amazon S3 or customer master keys (CMKs) stored in AWS Key Management Service (AWS KMS) – If you want AWS to manage the keys used to encrypt data, specify the following headers in the request.

    • x-amz-server-side​-encryption

    • x-amz-server-side-encryption-aws-kms-key-id

    • x-amz-server-side-encryption-context

    If you specify x-amz-server-side-encryption:aws:kms, but don't provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the AWS managed CMK in AWS KMS to protect the data. If you want to use a customer managed AWS KMS CMK, you must provide the x-amz-server-side-encryption-aws-kms-key-id of the symmetric customer managed CMK. Amazon S3 only supports symmetric CMKs and not asymmetric CMKs. For more information, see Using Symmetric and Asymmetric Keys in the AWS Key Management Service Developer Guide.

    All GET and PUT requests for an object protected by AWS KMS fail if you don't make them with SSL or by using SigV4.

    For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see Protecting Data Using Server-Side Encryption with CMKs stored in AWS KMS.

  • Use customer-provided encryption keys – If you want to manage your own encryption keys, provide all the following headers in the request.

    If you use this feature, the ETag value that Amazon S3 returns in the response is not the MD5 of the object.

    • x-amz-server-side​-encryption​-customer-algorithm

    • x-amz-server-side​-encryption​-customer-key

    • x-amz-server-side​-encryption​-customer-key-MD5

    For more information about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see Protecting Data Using Server-Side Encryption with CMKs stored in AWS KMS.

Storage Class Options

By default, Amazon S3 uses the Standard storage class to store newly created objects. The Standard storage class provides high durability and high availability. You can specify other storage classes depending on the performance needs. For more information, see Storage Classes in the Amazon Simple Storage Service Developer Guide.

Versioning

If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID for the object being stored. Amazon S3 returns this ID in the response using the x-amz-version-id response header. If versioning is suspended, Amazon S3 always uses null as the version ID for the object stored. For more information about returning the versioning state of a bucket, see GetBucketVersioning. If you enable versioning for a bucket, when Amazon S3 receives multiple write requests for the same object simultaneously, it stores all of the objects.

Related Resources

", "PutObjectAcl": "

Uses the acl subresource to set the access control list (ACL) permissions for an object that already exists in a bucket. You must have WRITE_ACP permission to set the ACL of an object.

Depending on your application needs, you can choose to set the ACL on an object using either the request body or the headers. For example, if you have an existing application that updates a bucket ACL using the request body, you can continue to use that approach.

Access Permissions

You can set access permissions using one of the following methods:

You can use either a canned ACL or specify access permissions explicitly. You cannot do both.

Grantee Values

You can specify the person (grantee) to whom you're assigning access rights (using request elements) in the following ways:

Versioning

The ACL of an object is set at the object version level. By default, PUT sets the ACL of the current version of an object. To set the ACL of a different version, use the versionId subresource.

Related Resources

", "PutObjectLegalHold": "

Applies a Legal Hold configuration to the specified object.

Related Resources

", "PutObjectLockConfiguration": "

Places an Object Lock configuration on the specified bucket. The rule specified in the Object Lock configuration will be applied by default to every new object placed in the specified bucket.

DefaultRetention requires either Days or Years. You can't specify both at the same time.

Related Resources

", @@ -2944,7 +2944,7 @@ "ReplicaKmsKeyID": { "base": null, "refs": { - "EncryptionConfiguration$ReplicaKmsKeyID": "

Specifies the AWS KMS Key ID (Key ARN or Alias ARN) for the destination bucket. Amazon S3 uses this key to encrypt replica objects.

" + "EncryptionConfiguration$ReplicaKmsKeyID": "

Specifies the ID (Key ARN or Alias ARN) of the customer managed customer master key (CMK) stored in AWS Key Management Service (KMS) for the destination bucket. Amazon S3 uses this key to encrypt replica objects. Amazon S3 only supports symmetric customer managed CMKs. For more information, see Using Symmetric and Asymmetric Keys in the AWS Key Management Service Developer Guide.

" } }, "ReplicationConfiguration": { @@ -3035,7 +3035,7 @@ } }, "RequestPayer": { - "base": "

Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. For information about downloading objects from Requester Pays buckets, see Downloading Objects in Requestor Pays Buckets in the Amazon S3 Developer Guide.

", + "base": "

Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. For information about downloading objects from requester pays buckets, see Downloading Objects in Requestor Pays Buckets in the Amazon S3 Developer Guide.

", "refs": { "AbortMultipartUploadRequest$RequestPayer": null, "CompleteMultipartUploadRequest$RequestPayer": null, @@ -3262,20 +3262,20 @@ "SSEKMSKeyId": { "base": null, "refs": { - "CompleteMultipartUploadOutput$SSEKMSKeyId": "

If present, specifies the ID of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used for the object.

", - "CopyObjectOutput$SSEKMSKeyId": "

If present, specifies the ID of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used for the object.

", - "CopyObjectRequest$SSEKMSKeyId": "

Specifies the AWS KMS key ID to use for object encryption. All GET and PUT requests for an object protected by AWS KMS will fail if not made via SSL or using SigV4. For information about configuring using any of the officially supported AWS SDKs and AWS CLI, see Specifying the Signature Version in Request Authentication in the Amazon S3 Developer Guide.

", - "CreateMultipartUploadOutput$SSEKMSKeyId": "

If present, specifies the ID of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used for the object.

", - "CreateMultipartUploadRequest$SSEKMSKeyId": "

Specifies the AWS KMS key ID to use for object encryption. All GET and PUT requests for an object protected by AWS KMS will fail if not made via SSL or using SigV4. For information about configuring using any of the officially supported AWS SDKs and AWS CLI, see Specifying the Signature Version in Request Authentication in the Amazon S3 Developer Guide.

", - "Encryption$KMSKeyId": "

If the encryption type is aws:kms, this optional value specifies the AWS KMS key ID to use for encryption of job results.

", - "GetObjectOutput$SSEKMSKeyId": "

If present, specifies the ID of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used for the object.

", - "HeadObjectOutput$SSEKMSKeyId": "

If present, specifies the ID of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used for the object.

", - "PutObjectOutput$SSEKMSKeyId": "

If x-amz-server-side-encryption is present and has the value of aws:kms, this header specifies the ID of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used for the object.

", - "PutObjectRequest$SSEKMSKeyId": "

If x-amz-server-side-encryption is present and has the value of aws:kms, this header specifies the ID of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used for the object.

If the value of x-amz-server-side-encryption is aws:kms, this header specifies the ID of the AWS KMS CMK that will be used for the object. If you specify x-amz-server-side-encryption:aws:kms, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the AWS managed CMK in AWS to protect the data.

", - "SSEKMS$KeyId": "

Specifies the ID of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use for encrypting inventory reports.

", + "CompleteMultipartUploadOutput$SSEKMSKeyId": "

If present, specifies the ID of the AWS Key Management Service (AWS KMS) symmetric customer managed customer master key (CMK) that was used for the object.

", + "CopyObjectOutput$SSEKMSKeyId": "

If present, specifies the ID of the AWS Key Management Service (AWS KMS) symmetric customer managed customer master key (CMK) that was used for the object.

", + "CopyObjectRequest$SSEKMSKeyId": "

Specifies the AWS KMS key ID to use for object encryption. All GET and PUT requests for an object protected by AWS KMS will fail if not made via SSL or using SigV4. For information about configuring using any of the officially supported AWS SDKs and AWS CLI, see Specifying the Signature Version in Request Authentication in the Amazon S3 Developer Guide.

", + "CreateMultipartUploadOutput$SSEKMSKeyId": "

If present, specifies the ID of the AWS Key Management Service (AWS KMS) symmetric customer managed customer master key (CMK) that was used for the object.

", + "CreateMultipartUploadRequest$SSEKMSKeyId": "

Specifies the ID of the symmetric customer managed AWS KMS CMK to use for object encryption. All GET and PUT requests for an object protected by AWS KMS will fail if not made via SSL or using SigV4. For information about configuring using any of the officially supported AWS SDKs and AWS CLI, see Specifying the Signature Version in Request Authentication in the Amazon S3 Developer Guide.

", + "Encryption$KMSKeyId": "

If the encryption type is aws:kms, this optional value specifies the ID of the symmetric customer managed AWS KMS CMK to use for encryption of job results. Amazon S3 only supports symmetric CMKs. For more information, see Using Symmetric and Asymmetric Keys in the AWS Key Management Service Developer Guide.

", + "GetObjectOutput$SSEKMSKeyId": "

If present, specifies the ID of the AWS Key Management Service (AWS KMS) symmetric customer managed customer master key (CMK) that was used for the object.

", + "HeadObjectOutput$SSEKMSKeyId": "

If present, specifies the ID of the AWS Key Management Service (AWS KMS) symmetric customer managed customer master key (CMK) that was used for the object.

", + "PutObjectOutput$SSEKMSKeyId": "

If x-amz-server-side-encryption is present and has the value of aws:kms, this header specifies the ID of the AWS Key Management Service (AWS KMS) symmetric customer managed customer master key (CMK) that was used for the object.

", + "PutObjectRequest$SSEKMSKeyId": "

If x-amz-server-side-encryption is present and has the value of aws:kms, this header specifies the ID of the AWS Key Management Service (AWS KMS) symmetrical customer managed customer master key (CMK) that was used for the object.

If the value of x-amz-server-side-encryption is aws:kms, this header specifies the ID of the symmetric customer managed AWS KMS CMK that will be used for the object. If you specify x-amz-server-side-encryption:aws:kms, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the AWS managed CMK in AWS to protect the data.

", + "SSEKMS$KeyId": "

Specifies the ID of the AWS Key Management Service (AWS KMS) symmetric customer managed customer master key (CMK) to use for encrypting inventory reports.

", "ServerSideEncryptionByDefault$KMSMasterKeyID": "

KMS master key ID to use for the default encryption. This parameter is allowed if and only if SSEAlgorithm is set to aws:kms.

", - "UploadPartCopyOutput$SSEKMSKeyId": "

If present, specifies the ID of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used for the object.

", - "UploadPartOutput$SSEKMSKeyId": "

If present, specifies the ID of the AWS Key Management Service (AWS KMS) customer master key (CMK) was used for the object.

" + "UploadPartCopyOutput$SSEKMSKeyId": "

If present, specifies the ID of the AWS Key Management Service (AWS KMS) symmetric customer managed customer master key (CMK) that was used for the object.

", + "UploadPartOutput$SSEKMSKeyId": "

If present, specifies the ID of the AWS Key Management Service (AWS KMS) symmetric customer managed customer master key (CMK) was used for the object.

" } }, "SSES3": { diff --git a/models/apis/securityhub/2018-10-26/api-2.json b/models/apis/securityhub/2018-10-26/api-2.json index bba7fce4303..bea45e8ca13 100644 --- a/models/apis/securityhub/2018-10-26/api-2.json +++ b/models/apis/securityhub/2018-10-26/api-2.json @@ -663,6 +663,56 @@ "type":"list", "member":{"shape":"NonEmptyString"} }, + "AvailabilityZone":{ + "type":"structure", + "members":{ + "ZoneName":{"shape":"NonEmptyString"}, + "SubnetId":{"shape":"NonEmptyString"} + } + }, + "AvailabilityZones":{ + "type":"list", + "member":{"shape":"AvailabilityZone"} + }, + "AwsCloudFrontDistributionDetails":{ + "type":"structure", + "members":{ + "DomainName":{"shape":"NonEmptyString"}, + "ETag":{"shape":"NonEmptyString"}, + "LastModifiedTime":{"shape":"NonEmptyString"}, + "Logging":{"shape":"AwsCloudFrontDistributionLogging"}, + "Origins":{"shape":"AwsCloudFrontDistributionOrigins"}, + "Status":{"shape":"NonEmptyString"}, + "WebAclId":{"shape":"NonEmptyString"} + } + }, + "AwsCloudFrontDistributionLogging":{ + "type":"structure", + "members":{ + "Bucket":{"shape":"NonEmptyString"}, + "Enabled":{"shape":"Boolean"}, + "IncludeCookies":{"shape":"Boolean"}, + "Prefix":{"shape":"NonEmptyString"} + } + }, + "AwsCloudFrontDistributionOriginItem":{ + "type":"structure", + "members":{ + "DomainName":{"shape":"NonEmptyString"}, + "Id":{"shape":"NonEmptyString"}, + "OriginPath":{"shape":"NonEmptyString"} + } + }, + "AwsCloudFrontDistributionOriginItemList":{ + "type":"list", + "member":{"shape":"AwsCloudFrontDistributionOriginItem"} + }, + "AwsCloudFrontDistributionOrigins":{ + "type":"structure", + "members":{ + "Items":{"shape":"AwsCloudFrontDistributionOriginItemList"} + } + }, "AwsEc2InstanceDetails":{ "type":"structure", "members":{ @@ -677,12 +727,34 @@ "LaunchedAt":{"shape":"NonEmptyString"} } }, + "AwsElbv2LoadBalancerDetails":{ + "type":"structure", + "members":{ + "AvailabilityZones":{"shape":"AvailabilityZones"}, + "CanonicalHostedZoneId":{"shape":"NonEmptyString"}, + "CreatedTime":{"shape":"NonEmptyString"}, + "DNSName":{"shape":"NonEmptyString"}, + "IpAddressType":{"shape":"NonEmptyString"}, + "Scheme":{"shape":"NonEmptyString"}, + "SecurityGroups":{"shape":"SecurityGroups"}, + "State":{"shape":"LoadBalancerState"}, + "Type":{"shape":"NonEmptyString"}, + "VpcId":{"shape":"NonEmptyString"} + } + }, "AwsIamAccessKeyDetails":{ "type":"structure", "members":{ - "UserName":{"shape":"NonEmptyString"}, + "UserName":{ + "shape":"NonEmptyString", + "deprecated":true, + "deprecatedMessage":"This field is deprecated, use PrincipalName instead." + }, "Status":{"shape":"AwsIamAccessKeyStatus"}, - "CreatedAt":{"shape":"NonEmptyString"} + "CreatedAt":{"shape":"NonEmptyString"}, + "PrincipalId":{"shape":"NonEmptyString"}, + "PrincipalType":{"shape":"NonEmptyString"}, + "PrincipalName":{"shape":"NonEmptyString"} } }, "AwsIamAccessKeyStatus":{ @@ -692,6 +764,111 @@ "Inactive" ] }, + "AwsIamRoleAssumeRolePolicyDocument":{ + "type":"string", + "max":131072, + "min":1, + "pattern":"[\\u0009\\u000A\\u000D\\u0020-\\u007E\\u00A1-\\u00FF]+" + }, + "AwsIamRoleDetails":{ + "type":"structure", + "members":{ + "AssumeRolePolicyDocument":{"shape":"AwsIamRoleAssumeRolePolicyDocument"}, + "CreateDate":{"shape":"NonEmptyString"}, + "RoleId":{"shape":"NonEmptyString"}, + "RoleName":{"shape":"NonEmptyString"}, + "MaxSessionDuration":{"shape":"Integer"}, + "Path":{"shape":"NonEmptyString"} + } + }, + "AwsKmsKeyDetails":{ + "type":"structure", + "members":{ + "AWSAccountId":{"shape":"NonEmptyString"}, + "CreationDate":{"shape":"Double"}, + "KeyId":{"shape":"NonEmptyString"}, + "KeyManager":{"shape":"NonEmptyString"}, + "KeyState":{"shape":"NonEmptyString"}, + "Origin":{"shape":"NonEmptyString"} + } + }, + "AwsLambdaFunctionCode":{ + "type":"structure", + "members":{ + "S3Bucket":{"shape":"NonEmptyString"}, + "S3Key":{"shape":"NonEmptyString"}, + "S3ObjectVersion":{"shape":"NonEmptyString"}, + "ZipFile":{"shape":"NonEmptyString"} + } + }, + "AwsLambdaFunctionDeadLetterConfig":{ + "type":"structure", + "members":{ + "TargetArn":{"shape":"NonEmptyString"} + } + }, + "AwsLambdaFunctionDetails":{ + "type":"structure", + "members":{ + "Code":{"shape":"AwsLambdaFunctionCode"}, + "CodeSha256":{"shape":"NonEmptyString"}, + "DeadLetterConfig":{"shape":"AwsLambdaFunctionDeadLetterConfig"}, + "Environment":{"shape":"AwsLambdaFunctionEnvironment"}, + "FunctionName":{"shape":"NonEmptyString"}, + "Handler":{"shape":"NonEmptyString"}, + "KmsKeyArn":{"shape":"NonEmptyString"}, + "LastModified":{"shape":"NonEmptyString"}, + "Layers":{"shape":"AwsLambdaFunctionLayerList"}, + "MasterArn":{"shape":"NonEmptyString"}, + "MemorySize":{"shape":"Integer"}, + "RevisionId":{"shape":"NonEmptyString"}, + "Role":{"shape":"NonEmptyString"}, + "Runtime":{"shape":"NonEmptyString"}, + "Timeout":{"shape":"Integer"}, + "TracingConfig":{"shape":"AwsLambdaFunctionTracingConfig"}, + "VpcConfig":{"shape":"AwsLambdaFunctionVpcConfig"}, + "Version":{"shape":"NonEmptyString"} + } + }, + "AwsLambdaFunctionEnvironment":{ + "type":"structure", + "members":{ + "Variables":{"shape":"FieldMap"}, + "Error":{"shape":"AwsLambdaFunctionEnvironmentError"} + } + }, + "AwsLambdaFunctionEnvironmentError":{ + "type":"structure", + "members":{ + "ErrorCode":{"shape":"NonEmptyString"}, + "Message":{"shape":"NonEmptyString"} + } + }, + "AwsLambdaFunctionLayer":{ + "type":"structure", + "members":{ + "Arn":{"shape":"NonEmptyString"}, + "CodeSize":{"shape":"Integer"} + } + }, + "AwsLambdaFunctionLayerList":{ + "type":"list", + "member":{"shape":"AwsLambdaFunctionLayer"} + }, + "AwsLambdaFunctionTracingConfig":{ + "type":"structure", + "members":{ + "Mode":{"shape":"NonEmptyString"} + } + }, + "AwsLambdaFunctionVpcConfig":{ + "type":"structure", + "members":{ + "SecurityGroupIds":{"shape":"NonEmptyStringList"}, + "SubnetIds":{"shape":"NonEmptyStringList"}, + "VpcId":{"shape":"NonEmptyString"} + } + }, "AwsS3BucketDetails":{ "type":"structure", "members":{ @@ -840,6 +1017,35 @@ "type":"list", "member":{"shape":"AwsSecurityFinding"} }, + "AwsSnsTopicDetails":{ + "type":"structure", + "members":{ + "KmsMasterKeyId":{"shape":"NonEmptyString"}, + "Subscription":{"shape":"AwsSnsTopicSubscriptionList"}, + "TopicName":{"shape":"NonEmptyString"}, + "Owner":{"shape":"NonEmptyString"} + } + }, + "AwsSnsTopicSubscription":{ + "type":"structure", + "members":{ + "Endpoint":{"shape":"NonEmptyString"}, + "Protocol":{"shape":"NonEmptyString"} + } + }, + "AwsSnsTopicSubscriptionList":{ + "type":"list", + "member":{"shape":"AwsSnsTopicSubscription"} + }, + "AwsSqsQueueDetails":{ + "type":"structure", + "members":{ + "KmsDataKeyReusePeriodSeconds":{"shape":"Integer"}, + "KmsMasterKeyId":{"shape":"NonEmptyString"}, + "QueueName":{"shape":"NonEmptyString"}, + "DeadLetterTargetArn":{"shape":"NonEmptyString"} + } + }, "BatchDisableStandardsRequest":{ "type":"structure", "required":["StandardsSubscriptionArns"], @@ -1532,6 +1738,13 @@ "Tags":{"shape":"TagMap"} } }, + "LoadBalancerState":{ + "type":"structure", + "members":{ + "Code":{"shape":"NonEmptyString"}, + "Reason":{"shape":"NonEmptyString"} + } + }, "Malware":{ "type":"structure", "required":["Name"], @@ -1638,6 +1851,10 @@ "type":"string", "pattern":".*\\S.*" }, + "NonEmptyStringList":{ + "type":"list", + "member":{"shape":"NonEmptyString"} + }, "Note":{ "type":"structure", "required":[ @@ -1781,9 +1998,16 @@ "ResourceDetails":{ "type":"structure", "members":{ + "AwsCloudFrontDistribution":{"shape":"AwsCloudFrontDistributionDetails"}, "AwsEc2Instance":{"shape":"AwsEc2InstanceDetails"}, + "AwsElbv2LoadBalancer":{"shape":"AwsElbv2LoadBalancerDetails"}, "AwsS3Bucket":{"shape":"AwsS3BucketDetails"}, "AwsIamAccessKey":{"shape":"AwsIamAccessKeyDetails"}, + "AwsIamRole":{"shape":"AwsIamRoleDetails"}, + "AwsKmsKey":{"shape":"AwsKmsKeyDetails"}, + "AwsLambdaFunction":{"shape":"AwsLambdaFunctionDetails"}, + "AwsSnsTopic":{"shape":"AwsSnsTopicDetails"}, + "AwsSqsQueue":{"shape":"AwsSqsQueueDetails"}, "Container":{"shape":"ContainerDetails"}, "Other":{"shape":"FieldMap"} } @@ -1812,6 +2036,10 @@ "type":"list", "member":{"shape":"Result"} }, + "SecurityGroups":{ + "type":"list", + "member":{"shape":"NonEmptyString"} + }, "Severity":{ "type":"structure", "required":["Normalized"], diff --git a/models/apis/securityhub/2018-10-26/docs-2.json b/models/apis/securityhub/2018-10-26/docs-2.json index 5498505aafd..9c0d34a7528 100644 --- a/models/apis/securityhub/2018-10-26/docs-2.json +++ b/models/apis/securityhub/2018-10-26/docs-2.json @@ -1,6 +1,6 @@ { "version": "2.0", - "service": "

Security Hub provides you with a comprehensive view of the security state of your AWS environment and resources. It also provides you with the compliance status of your environment based on CIS AWS Foundations compliance checks. Security Hub collects security data from AWS accounts, services, and integrated third-party products and helps you analyze security trends in your environment to identify the highest priority security issues. For more information about Security Hub, see the AWS Security Hub User Guide .

When you use operations in the Security Hub API, the requests are executed only in the AWS Region that is currently active or in the specific AWS Region that you specify in your request. Any configuration or settings change that results from the operation is applied only to that Region. To make the same change in other Regions, execute the same command for each Region to apply the change to. For example, if your Region is set to us-west-2, when you use CreateMembers to add a member account to Security Hub, the association of the member account with the master account is created only in the us-west-2 Region. Security Hub must be enabled for the member account in the same Region that the invite was sent from.

", + "service": "

Security Hub provides you with a comprehensive view of the security state of your AWS environment and resources. It also provides you with the compliance status of your environment based on CIS AWS Foundations compliance checks. Security Hub collects security data from AWS accounts, services, and integrated third-party products and helps you analyze security trends in your environment to identify the highest priority security issues. For more information about Security Hub, see the AWS Security Hub User Guide .

When you use operations in the Security Hub API, the requests are executed only in the AWS Region that is currently active or in the specific AWS Region that you specify in your request. Any configuration or settings change that results from the operation is applied only to that Region. To make the same change in other Regions, execute the same command for each Region to apply the change to. For example, if your Region is set to us-west-2, when you use CreateMembers to add a member account to Security Hub, the association of the member account with the master account is created only in the us-west-2 Region. Security Hub must be enabled for the member account in the same Region that the invite was sent from.

The following throttling limits apply to using Security Hub API operations:

", "operations": { "AcceptInvitation": "

Accepts the invitation to be a member account and be monitored by the Security Hub master account that the invitation was sent from. When the member account accepts the invitation, permission is granted to the master account to view findings generated in the member account.

", "BatchDisableStandards": "

Disables the standards specified by the provided StandardsSubscriptionArns. For more information, see Standards Supported in AWS Security Hub.

", @@ -22,7 +22,7 @@ "DisassociateFromMasterAccount": "

Disassociates the current Security Hub member account from the associated master account.

", "DisassociateMembers": "

Disassociates the specified member accounts from the associated master account.

", "EnableImportFindingsForProduct": "

Enables the integration of a partner product with Security Hub. Integrated products send findings to Security Hub. When you enable a product integration, a permission policy that grants permission for the product to send findings to Security Hub is applied.

", - "EnableSecurityHub": "

Enables Security Hub for your account in the current Region or the Region you specify in the request. When you enable Security Hub, you grant to Security Hub the permissions necessary to gather findings from AWS Config, Amazon GuardDuty, Amazon Inspector, and Amazon Macie. To learn more, see Setting Up AWS Security Hub.

", + "EnableSecurityHub": "

Enables Security Hub for your account in the current Region or the Region you specify in the request. Enabling Security Hub also enables the CIS AWS Foundations standard. When you enable Security Hub, you grant to Security Hub the permissions necessary to gather findings from AWS Config, Amazon GuardDuty, Amazon Inspector, and Amazon Macie. To learn more, see Setting Up AWS Security Hub.

", "GetEnabledStandards": "

Returns a list of the standards that are currently enabled.

", "GetFindings": "

Returns a list of findings that match the specified criteria.

", "GetInsightResults": "

Lists the results of the Security Hub insight that the insight ARN specifies.

", @@ -108,12 +108,60 @@ "GetInsightsRequest$InsightArns": "

The ARNs of the insights that you want to describe.

" } }, + "AvailabilityZone": { + "base": "

Information about an Availability Zone.

", + "refs": { + "AvailabilityZones$member": null + } + }, + "AvailabilityZones": { + "base": null, + "refs": { + "AwsElbv2LoadBalancerDetails$AvailabilityZones": "

The Availability Zones for the load balancer.

" + } + }, + "AwsCloudFrontDistributionDetails": { + "base": "

A distribution configuration.

", + "refs": { + "ResourceDetails$AwsCloudFrontDistribution": "

Details about a CloudFront distribution.

" + } + }, + "AwsCloudFrontDistributionLogging": { + "base": "

A complex type that controls whether access logs are written for the distribution.

", + "refs": { + "AwsCloudFrontDistributionDetails$Logging": "

A complex type that controls whether access logs are written for the distribution.

" + } + }, + "AwsCloudFrontDistributionOriginItem": { + "base": "

A complex type that describes the Amazon S3 bucket, HTTP server (for example, a web server), Amazon MediaStore, or other server from which CloudFront gets your files.

", + "refs": { + "AwsCloudFrontDistributionOriginItemList$member": null + } + }, + "AwsCloudFrontDistributionOriginItemList": { + "base": null, + "refs": { + "AwsCloudFrontDistributionOrigins$Items": "

A complex type that contains origins or origin groups for this distribution.

" + } + }, + "AwsCloudFrontDistributionOrigins": { + "base": "

A complex type that contains information about origins and origin groups for this distribution.

", + "refs": { + "AwsCloudFrontDistributionDetails$Origins": "

A complex type that contains information about origins for this distribution.

" + } + }, "AwsEc2InstanceDetails": { "base": "

The details of an Amazon EC2 instance.

", "refs": { "ResourceDetails$AwsEc2Instance": "

Details about an Amazon EC2 instance related to a finding.

" } }, + "AwsElbv2LoadBalancerDetails": { + "base": "

Information about a load balancer.

", + "refs": { + "ResourceDetails$AwsElbv2LoadBalancer": "

Details about a load balancer.

" + } + }, "AwsIamAccessKeyDetails": { "base": "

IAM access key details related to a finding.

", "refs": { @@ -126,6 +174,78 @@ "AwsIamAccessKeyDetails$Status": "

The status of the IAM access key related to a finding.

" } }, + "AwsIamRoleAssumeRolePolicyDocument": { + "base": null, + "refs": { + "AwsIamRoleDetails$AssumeRolePolicyDocument": "

The trust policy that grants permission to assume the role.

" + } + }, + "AwsIamRoleDetails": { + "base": "

Contains information about an IAM role, including all of the role's policies.

", + "refs": { + "ResourceDetails$AwsIamRole": "

Details about an IAM role.

" + } + }, + "AwsKmsKeyDetails": { + "base": "

Contains metadata about a customer master key (CMK).

", + "refs": { + "ResourceDetails$AwsKmsKey": "

Details about a KMS key.

" + } + }, + "AwsLambdaFunctionCode": { + "base": "

The code for the Lambda function. You can specify either an object in Amazon S3, or upload a deployment package directly.

", + "refs": { + "AwsLambdaFunctionDetails$Code": "

An AwsLambdaFunctionCode object.

" + } + }, + "AwsLambdaFunctionDeadLetterConfig": { + "base": "

The dead-letter queue for failed asynchronous invocations.

", + "refs": { + "AwsLambdaFunctionDetails$DeadLetterConfig": "

The function's dead letter queue.

" + } + }, + "AwsLambdaFunctionDetails": { + "base": "

Details about a function's configuration.

", + "refs": { + "ResourceDetails$AwsLambdaFunction": "

Details about a Lambda function.

" + } + }, + "AwsLambdaFunctionEnvironment": { + "base": "

A function's environment variable settings.

", + "refs": { + "AwsLambdaFunctionDetails$Environment": "

The function's environment variables.

" + } + }, + "AwsLambdaFunctionEnvironmentError": { + "base": "

Error messages for environment variables that couldn't be applied.

", + "refs": { + "AwsLambdaFunctionEnvironment$Error": "

An AwsLambdaFunctionEnvironmentError object.

" + } + }, + "AwsLambdaFunctionLayer": { + "base": "

An AWS Lambda layer.

", + "refs": { + "AwsLambdaFunctionLayerList$member": null + } + }, + "AwsLambdaFunctionLayerList": { + "base": null, + "refs": { + "AwsLambdaFunctionDetails$Layers": "

The function's layers.

" + } + }, + "AwsLambdaFunctionTracingConfig": { + "base": "

The function's AWS X-Ray tracing configuration.

", + "refs": { + "AwsLambdaFunctionDetails$TracingConfig": "

The function's AWS X-Ray tracing configuration.

" + } + }, + "AwsLambdaFunctionVpcConfig": { + "base": "

The VPC security groups and subnets that are attached to a Lambda function. For more information, see VPC Settings.

", + "refs": { + "AwsLambdaFunctionDetails$VpcConfig": "

The function's networking configuration.

" + } + }, "AwsS3BucketDetails": { "base": "

The details of an Amazon S3 bucket.

", "refs": { @@ -151,10 +271,34 @@ "AwsSecurityFindingList": { "base": null, "refs": { - "BatchImportFindingsRequest$Findings": "

A list of findings to import. To successfully import a finding, it must follow the AWS Security Finding Format.

", + "BatchImportFindingsRequest$Findings": "

A list of findings to import. To successfully import a finding, it must follow the AWS Security Finding Format. Maximum of 100 findings per request.

", "GetFindingsResponse$Findings": "

The findings that matched the filters specified in the request.

" } }, + "AwsSnsTopicDetails": { + "base": "

A wrapper type for the topic's Amazon Resource Name (ARN).

", + "refs": { + "ResourceDetails$AwsSnsTopic": "

Details about an SNS topic.

" + } + }, + "AwsSnsTopicSubscription": { + "base": "

A wrapper type for the attributes of an Amazon SNS subscription.

", + "refs": { + "AwsSnsTopicSubscriptionList$member": null + } + }, + "AwsSnsTopicSubscriptionList": { + "base": null, + "refs": { + "AwsSnsTopicDetails$Subscription": "

Subscription is an embedded property that describes the subscription endpoints of an Amazon SNS topic.

" + } + }, + "AwsSqsQueueDetails": { + "base": "

Data about a queue.

", + "refs": { + "ResourceDetails$AwsSqsQueue": "

Details about an SQS queue.

" + } + }, "BatchDisableStandardsRequest": { "base": null, "refs": { @@ -188,6 +332,8 @@ "Boolean": { "base": null, "refs": { + "AwsCloudFrontDistributionLogging$Enabled": "

With this field, you can enable or disable the selected distribution.

", + "AwsCloudFrontDistributionLogging$IncludeCookies": "

Specifies whether you want CloudFront to include cookies in access logs.

", "ListMembersRequest$OnlyAssociated": "

Specifies which member accounts the response includes based on their relationship status with the master account. The default value is TRUE. If onlyAssociated is set to TRUE, the response includes member accounts whose relationship status with the master is set to ENABLED or DISABLED. If onlyAssociated is set to FALSE, the response includes all existing member accounts.

" } }, @@ -198,7 +344,7 @@ } }, "Compliance": { - "base": "

Exclusive to findings that are generated as the result of a check run against a specific rule in a supported standard (for example, CIS AWS Foundations). Contains compliance-related finding details.

", + "base": "

Exclusive to findings that are generated as the result of a check run against a specific rule in a supported standard (for example, CIS AWS Foundations). Contains compliance-related finding details.

Values include the following:

", "refs": { "AwsSecurityFinding$Compliance": "

This data type is exclusive to findings that are generated as the result of a check run against a specific rule in a supported standard (for example, CIS AWS Foundations). Contains compliance-related finding details.

" } @@ -402,6 +548,7 @@ "Double": { "base": null, "refs": { + "AwsKmsKeyDetails$CreationDate": "

The date and time when the CMK was created.

", "NumberFilter$Gte": "

The greater-than-equal condition to be applied to a single field when querying for findings.

", "NumberFilter$Lte": "

The less-than-equal condition to be applied to a single field when querying for findings.

", "NumberFilter$Eq": "

The equal-to condition to be applied to a single field when querying for findings.

", @@ -431,6 +578,7 @@ "FieldMap": { "base": null, "refs": { + "AwsLambdaFunctionEnvironment$Variables": "

Environment variable key-value pairs.

", "AwsSecurityFinding$ProductFields": "

A data type where security-findings providers can include additional solution-specific details that aren't part of the defined AwsSecurityFinding format.

", "AwsSecurityFinding$UserDefinedFields": "

A list of name/value string pairs associated with the finding. These are custom, user-defined fields added to a finding.

", "Resource$Tags": "

A list of AWS tags associated with a resource at the time the finding was processed.

", @@ -552,8 +700,13 @@ "Integer": { "base": null, "refs": { + "AwsIamRoleDetails$MaxSessionDuration": "

The maximum session duration (in seconds) that you want to set for the specified role.

", + "AwsLambdaFunctionDetails$MemorySize": "

The memory that's allocated to the function.

", + "AwsLambdaFunctionDetails$Timeout": "

The amount of time that Lambda allows a function to run before stopping it.

", + "AwsLambdaFunctionLayer$CodeSize": "

The size of the layer archive in bytes.

", "AwsSecurityFinding$Confidence": "

A finding's confidence. Confidence is defined as the likelihood that a finding accurately identifies the behavior or issue that it was intended to identify. Confidence is scored on a 0-100 basis using a ratio scale, where 0 means zero percent confidence and 100 means 100 percent confidence.

", "AwsSecurityFinding$Criticality": "

The level of importance assigned to the resources associated with the finding. A score of 0 means that the underlying resources have no criticality, and a score of 100 is reserved for the most critical resources.

", + "AwsSqsQueueDetails$KmsDataKeyReusePeriodSeconds": "

The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS KMS again.

", "BatchImportFindingsResponse$FailedCount": "

The number of findings that failed to import.

", "BatchImportFindingsResponse$SuccessCount": "

The number of findings that were successfully imported.

", "DateRange$Value": "

A date range value for the date filter.

", @@ -678,6 +831,12 @@ "refs": { } }, + "LoadBalancerState": { + "base": "

Information about the state of the load balancer.

", + "refs": { + "AwsElbv2LoadBalancerDetails$State": "

The state of the load balancer.

" + } + }, "Malware": { "base": "

A list of malware related to a finding.

", "refs": { @@ -793,6 +952,18 @@ "ActionTarget$Name": "

The name of the action target.

", "ActionTarget$Description": "

The description of the target action.

", "ArnList$member": null, + "AvailabilityZone$ZoneName": "

The name of the Availability Zone.

", + "AvailabilityZone$SubnetId": "

The ID of the subnet. You can specify one subnet per Availability Zone.

", + "AwsCloudFrontDistributionDetails$DomainName": "

The domain name corresponding to the distribution.

", + "AwsCloudFrontDistributionDetails$ETag": "

The entity tag is a hash of the object.

", + "AwsCloudFrontDistributionDetails$LastModifiedTime": "

The date and time that the distribution was last modified.

", + "AwsCloudFrontDistributionDetails$Status": "

Indicates the current status of the distribution.

", + "AwsCloudFrontDistributionDetails$WebAclId": "

A unique identifier that specifies the AWS WAF web ACL, if any, to associate with this distribution.

", + "AwsCloudFrontDistributionLogging$Bucket": "

The Amazon S3 bucket to store the access logs in.

", + "AwsCloudFrontDistributionLogging$Prefix": "

An optional string that you want CloudFront to prefix to the access log filenames for this distribution.

", + "AwsCloudFrontDistributionOriginItem$DomainName": "

Amazon S3 origins: The DNS name of the Amazon S3 bucket from which you want CloudFront to get objects for this origin.

", + "AwsCloudFrontDistributionOriginItem$Id": "

A unique identifier for the origin or origin group.

", + "AwsCloudFrontDistributionOriginItem$OriginPath": "

An optional element that causes CloudFront to request your content from a directory in your Amazon S3 bucket or your custom origin.

", "AwsEc2InstanceDetails$Type": "

The instance type of the instance.

", "AwsEc2InstanceDetails$ImageId": "

The Amazon Machine Image (AMI) ID of the instance.

", "AwsEc2InstanceDetails$KeyName": "

The key name associated with the instance.

", @@ -800,8 +971,47 @@ "AwsEc2InstanceDetails$VpcId": "

The identifier of the VPC that the instance was launched in.

", "AwsEc2InstanceDetails$SubnetId": "

The identifier of the subnet that the instance was launched in.

", "AwsEc2InstanceDetails$LaunchedAt": "

The date/time the instance was launched.

", - "AwsIamAccessKeyDetails$UserName": "

The user associated with the IAM access key related to a finding.

", + "AwsElbv2LoadBalancerDetails$CanonicalHostedZoneId": "

The ID of the Amazon Route 53 hosted zone associated with the load balancer.

", + "AwsElbv2LoadBalancerDetails$CreatedTime": "

The date and time the load balancer was created.

", + "AwsElbv2LoadBalancerDetails$DNSName": "

The public DNS name of the load balancer.

", + "AwsElbv2LoadBalancerDetails$IpAddressType": "

The type of IP addresses used by the subnets for your load balancer. The possible values are ipv4 (for IPv4 addresses) and dualstack (for IPv4 and IPv6 addresses).

", + "AwsElbv2LoadBalancerDetails$Scheme": "

The nodes of an Internet-facing load balancer have public IP addresses.

", + "AwsElbv2LoadBalancerDetails$Type": "

The type of load balancer.

", + "AwsElbv2LoadBalancerDetails$VpcId": "

The ID of the VPC for the load balancer.

", + "AwsIamAccessKeyDetails$UserName": "

The user associated with the IAM access key related to a finding.

The UserName parameter has been replaced with the PrincipalName parameter because access keys can also be assigned to principals that are not IAM users.

", "AwsIamAccessKeyDetails$CreatedAt": "

The creation date/time of the IAM access key related to a finding.

", + "AwsIamAccessKeyDetails$PrincipalId": "

The ID of the principal associated with an access key.

", + "AwsIamAccessKeyDetails$PrincipalType": "

The type of principal associated with an access key.

", + "AwsIamAccessKeyDetails$PrincipalName": "

The name of the principal.

", + "AwsIamRoleDetails$CreateDate": "

The date and time, in ISO 8601 date-time format, when the role was created.

", + "AwsIamRoleDetails$RoleId": "

The stable and unique string identifying the role.

", + "AwsIamRoleDetails$RoleName": "

The friendly name that identifies the role.

", + "AwsIamRoleDetails$Path": "

The path to the role.

", + "AwsKmsKeyDetails$AWSAccountId": "

The twelve-digit account ID of the AWS account that owns the CMK.

", + "AwsKmsKeyDetails$KeyId": "

The globally unique identifier for the CMK.

", + "AwsKmsKeyDetails$KeyManager": "

The manager of the CMK. CMKs in your AWS account are either customer managed or AWS managed.

", + "AwsKmsKeyDetails$KeyState": "

The state of the CMK.

", + "AwsKmsKeyDetails$Origin": "

The source of the CMK's key material. When this value is AWS_KMS, AWS KMS created the key material. When this value is EXTERNAL, the key material was imported from your existing key management infrastructure or the CMK lacks key material. When this value is AWS_CLOUDHSM, the key material was created in the AWS CloudHSM cluster associated with a custom key store.

", + "AwsLambdaFunctionCode$S3Bucket": "

An Amazon S3 bucket in the same AWS Region as your function. The bucket can be in a different AWS account.

", + "AwsLambdaFunctionCode$S3Key": "

The Amazon S3 key of the deployment package.

", + "AwsLambdaFunctionCode$S3ObjectVersion": "

For versioned objects, the version of the deployment package object to use.

", + "AwsLambdaFunctionCode$ZipFile": "

The base64-encoded contents of the deployment package. AWS SDK and AWS CLI clients handle the encoding for you.

", + "AwsLambdaFunctionDeadLetterConfig$TargetArn": "

The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.

", + "AwsLambdaFunctionDetails$CodeSha256": "

The SHA256 hash of the function's deployment package.

", + "AwsLambdaFunctionDetails$FunctionName": "

The name of the function.

", + "AwsLambdaFunctionDetails$Handler": "

The function that Lambda calls to begin executing your function.

", + "AwsLambdaFunctionDetails$KmsKeyArn": "

The KMS key that's used to encrypt the function's environment variables. This key is only returned if you've configured a customer managed CMK.

", + "AwsLambdaFunctionDetails$LastModified": "

The date and time that the function was last updated, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).

", + "AwsLambdaFunctionDetails$MasterArn": "

For Lambda@Edge functions, the ARN of the master function.

", + "AwsLambdaFunctionDetails$RevisionId": "

The latest updated revision of the function or alias.

", + "AwsLambdaFunctionDetails$Role": "

The function's execution role.

", + "AwsLambdaFunctionDetails$Runtime": "

The runtime environment for the Lambda function.

", + "AwsLambdaFunctionDetails$Version": "

The version of the Lambda function.

", + "AwsLambdaFunctionEnvironmentError$ErrorCode": "

The error code.

", + "AwsLambdaFunctionEnvironmentError$Message": "

The error message.

", + "AwsLambdaFunctionLayer$Arn": "

The Amazon Resource Name (ARN) of the function layer.

", + "AwsLambdaFunctionTracingConfig$Mode": "

The tracing mode.

", + "AwsLambdaFunctionVpcConfig$VpcId": "

The ID of the VPC.

", "AwsS3BucketDetails$OwnerId": "

The canonical user ID of the owner of the S3 bucket.

", "AwsS3BucketDetails$OwnerName": "

The display name of the owner of the S3 bucket.

", "AwsSecurityFinding$SchemaVersion": "

The schema version that a finding is formatted for.

", @@ -816,6 +1026,14 @@ "AwsSecurityFinding$Title": "

A finding's title.

In this release, Title is a required property.

", "AwsSecurityFinding$Description": "

A finding's description.

In this release, Description is a required property.

", "AwsSecurityFinding$SourceUrl": "

A URL that links to a page about the current finding in the security-findings provider's solution.

", + "AwsSnsTopicDetails$KmsMasterKeyId": "

The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK.

", + "AwsSnsTopicDetails$TopicName": "

The name of the topic.

", + "AwsSnsTopicDetails$Owner": "

The subscription's owner.

", + "AwsSnsTopicSubscription$Endpoint": "

The subscription's endpoint (format depends on the protocol).

", + "AwsSnsTopicSubscription$Protocol": "

The subscription's protocol.

", + "AwsSqsQueueDetails$KmsMasterKeyId": "

The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK.

", + "AwsSqsQueueDetails$QueueName": "

The name of the new queue.

", + "AwsSqsQueueDetails$DeadLetterTargetArn": "

The Amazon Resource Name (ARN) of the dead-letter queue to which Amazon SQS moves messages after the value of maxReceiveCount is exceeded.

", "CategoryList$member": null, "ContainerDetails$Name": "

The name of the container related to a finding.

", "ContainerDetails$ImageId": "

The identifier of the image related to a finding.

", @@ -866,6 +1084,8 @@ "LimitExceededException$Code": null, "ListInvitationsResponse$NextToken": "

The token that is required for pagination.

", "ListMembersResponse$NextToken": "

The token that is required for pagination.

", + "LoadBalancerState$Code": "

The state code. The initial state of the load balancer is provisioning. After the load balancer is fully set up and ready to route traffic, its state is active. If the load balancer could not be set up, its state is failed.

", + "LoadBalancerState$Reason": "

A description of the state.

", "Malware$Name": "

The name of the malware that was observed.

", "Malware$Path": "

The file system path of the malware that was observed.

", "MapFilter$Key": "

The key of the map filter.

", @@ -881,6 +1101,7 @@ "Network$DestinationIpV4": "

The destination IPv4 address of network-related information about a finding.

", "Network$DestinationIpV6": "

The destination IPv6 address of network-related information about a finding.

", "Network$DestinationDomain": "

The destination domain of network-related information about a finding.

", + "NonEmptyStringList$member": null, "Note$Text": "

The text of a note.

", "Note$UpdatedBy": "

The principal that created a note.

", "Note$UpdatedAt": "

The timestamp of when the note was updated.

", @@ -910,6 +1131,7 @@ "ResourceNotFoundException$Message": null, "ResourceNotFoundException$Code": null, "Result$ProcessingResult": "

The reason that the account wasn't be processed.

", + "SecurityGroups$member": null, "SortCriterion$Field": "

The finding attribute used to sort findings.

", "StandardsInputParameterMap$key": null, "StandardsInputParameterMap$value": null, @@ -932,6 +1154,13 @@ "UpdateInsightRequest$GroupByAttribute": "

The updated GroupBy attribute that defines this insight.

" } }, + "NonEmptyStringList": { + "base": null, + "refs": { + "AwsLambdaFunctionVpcConfig$SecurityGroupIds": "

A list of VPC security groups IDs.

", + "AwsLambdaFunctionVpcConfig$SubnetIds": "

A list of VPC subnet IDs.

" + } + }, "Note": { "base": "

A user-defined note added to a finding.

", "refs": { @@ -1077,6 +1306,12 @@ "InviteMembersResponse$UnprocessedAccounts": "

A list of account ID and email address pairs of the AWS accounts that couldn't be processed.

" } }, + "SecurityGroups": { + "base": null, + "refs": { + "AwsElbv2LoadBalancerDetails$SecurityGroups": "

The IDs of the security groups for the load balancer.

" + } + }, "Severity": { "base": "

The severity of the finding.

", "refs": { diff --git a/models/apis/ssm/2014-11-06/api-2.json b/models/apis/ssm/2014-11-06/api-2.json index ed9f665d79d..7cfc56e0ddf 100644 --- a/models/apis/ssm/2014-11-06/api-2.json +++ b/models/apis/ssm/2014-11-06/api-2.json @@ -2273,7 +2273,8 @@ "type":"string", "enum":[ "SourceUrl", - "S3FileUrl" + "S3FileUrl", + "AttachmentReference" ] }, "AttachmentsSourceList":{ @@ -2375,7 +2376,8 @@ "CurrentAction", "StartTimeBefore", "StartTimeAfter", - "AutomationType" + "AutomationType", + "TagKey" ] }, "AutomationExecutionFilterList":{ @@ -8461,7 +8463,8 @@ "TargetLocations":{ "shape":"TargetLocations", "box":true - } + }, + "Tags":{"shape":"TagList"} } }, "StartAutomationExecutionResult":{ diff --git a/models/apis/ssm/2014-11-06/docs-2.json b/models/apis/ssm/2014-11-06/docs-2.json index 1d21cb72d8c..b7a45d922ed 100644 --- a/models/apis/ssm/2014-11-06/docs-2.json +++ b/models/apis/ssm/2014-11-06/docs-2.json @@ -602,7 +602,7 @@ "AttachmentsSourceValues": { "base": null, "refs": { - "AttachmentsSource$Values": "

The value of a key-value pair that identifies the location of an attachment to a document. The format is the URL of the location of a document attachment, such as the URL of an Amazon S3 bucket.

" + "AttachmentsSource$Values": "

The value of a key-value pair that identifies the location of an attachment to a document. The format for Value depends on the type of key you specify.

" } }, "AttributeName": { @@ -6700,7 +6700,8 @@ "DocumentDescription$Tags": "

The tags, or metadata, that have been applied to the document.

", "DocumentIdentifier$Tags": "

The tags, or metadata, that have been applied to the document.

", "ListTagsForResourceResult$TagList": "

A list of tags.

", - "PutParameterRequest$Tags": "

Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a Systems Manager parameter to identify the type of resource to which it applies, the environment, or the type of configuration data referenced by the parameter. In this case, you could specify the following key name/value pairs:

To add tags to an existing Systems Manager parameter, use the AddTagsToResource action.

" + "PutParameterRequest$Tags": "

Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a Systems Manager parameter to identify the type of resource to which it applies, the environment, or the type of configuration data referenced by the parameter. In this case, you could specify the following key name/value pairs:

To add tags to an existing Systems Manager parameter, use the AddTagsToResource action.

", + "StartAutomationExecutionRequest$Tags": "

Optional metadata that you assign to a resource. You can specify a maximum of five tags for an automation. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag an automation to identify an environment or operating system. In this case, you could specify the following key name/value pairs:

To add tags to an existing patch baseline, use the AddTagsToResource action.

" } }, "TagValue": { diff --git a/models/apis/transcribe-streaming/2017-10-26/api-2.json b/models/apis/transcribe-streaming/2017-10-26/api-2.json new file mode 100755 index 00000000000..e9dc6a14092 --- /dev/null +++ b/models/apis/transcribe-streaming/2017-10-26/api-2.json @@ -0,0 +1,262 @@ +{ + "version":"2.0", + "metadata":{ + "apiVersion":"2017-10-26", + "endpointPrefix":"transcribestreaming", + "protocol":"rest-json", + "protocolSettings":{"h2":"eventstream"}, + "serviceFullName":"Amazon Transcribe Streaming Service", + "serviceId":"Transcribe Streaming", + "signatureVersion":"v4", + "signingName":"transcribe", + "uid":"transcribe-streaming-2017-10-26" + }, + "operations":{ + "StartStreamTranscription":{ + "name":"StartStreamTranscription", + "http":{ + "method":"POST", + "requestUri":"/stream-transcription" + }, + "input":{"shape":"StartStreamTranscriptionRequest"}, + "output":{"shape":"StartStreamTranscriptionResponse"}, + "errors":[ + {"shape":"BadRequestException"}, + {"shape":"LimitExceededException"}, + {"shape":"InternalFailureException"}, + {"shape":"ConflictException"} + ] + } + }, + "shapes":{ + "Alternative":{ + "type":"structure", + "members":{ + "Transcript":{"shape":"String"}, + "Items":{"shape":"ItemList"} + } + }, + "AlternativeList":{ + "type":"list", + "member":{"shape":"Alternative"} + }, + "AudioChunk":{"type":"blob"}, + "AudioEvent":{ + "type":"structure", + "members":{ + "AudioChunk":{ + "shape":"AudioChunk", + "eventpayload":true + } + }, + "event":true + }, + "AudioStream":{ + "type":"structure", + "members":{ + "AudioEvent":{"shape":"AudioEvent"} + }, + "eventstream":true + }, + "BadRequestException":{ + "type":"structure", + "members":{ + "Message":{"shape":"String"} + }, + "error":{"httpStatusCode":400}, + "exception":true + }, + "Boolean":{"type":"boolean"}, + "ConflictException":{ + "type":"structure", + "members":{ + "Message":{"shape":"String"} + }, + "error":{"httpStatusCode":409}, + "exception":true + }, + "Double":{"type":"double"}, + "InternalFailureException":{ + "type":"structure", + "members":{ + "Message":{"shape":"String"} + }, + "error":{"httpStatusCode":500}, + "exception":true, + "fault":true + }, + "Item":{ + "type":"structure", + "members":{ + "StartTime":{"shape":"Double"}, + "EndTime":{"shape":"Double"}, + "Type":{"shape":"ItemType"}, + "Content":{"shape":"String"} + } + }, + "ItemList":{ + "type":"list", + "member":{"shape":"Item"} + }, + "ItemType":{ + "type":"string", + "enum":[ + "pronunciation", + "punctuation" + ] + }, + "LanguageCode":{ + "type":"string", + "enum":[ + "en-US", + "en-GB", + "es-US", + "fr-CA", + "fr-FR", + "en-AU" + ] + }, + "LimitExceededException":{ + "type":"structure", + "members":{ + "Message":{"shape":"String"} + }, + "error":{"httpStatusCode":429}, + "exception":true + }, + "MediaEncoding":{ + "type":"string", + "enum":["pcm"] + }, + "MediaSampleRateHertz":{ + "type":"integer", + "max":48000, + "min":8000 + }, + "RequestId":{"type":"string"}, + "Result":{ + "type":"structure", + "members":{ + "ResultId":{"shape":"String"}, + "StartTime":{"shape":"Double"}, + "EndTime":{"shape":"Double"}, + "IsPartial":{"shape":"Boolean"}, + "Alternatives":{"shape":"AlternativeList"} + } + }, + "ResultList":{ + "type":"list", + "member":{"shape":"Result"} + }, + "SessionId":{ + "type":"string", + "pattern":"[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}" + }, + "StartStreamTranscriptionRequest":{ + "type":"structure", + "required":[ + "LanguageCode", + "MediaSampleRateHertz", + "MediaEncoding", + "AudioStream" + ], + "members":{ + "LanguageCode":{ + "shape":"LanguageCode", + "location":"header", + "locationName":"x-amzn-transcribe-language-code" + }, + "MediaSampleRateHertz":{ + "shape":"MediaSampleRateHertz", + "location":"header", + "locationName":"x-amzn-transcribe-sample-rate" + }, + "MediaEncoding":{ + "shape":"MediaEncoding", + "location":"header", + "locationName":"x-amzn-transcribe-media-encoding" + }, + "VocabularyName":{ + "shape":"VocabularyName", + "location":"header", + "locationName":"x-amzn-transcribe-vocabulary-name" + }, + "SessionId":{ + "shape":"SessionId", + "location":"header", + "locationName":"x-amzn-transcribe-session-id" + }, + "AudioStream":{"shape":"AudioStream"} + }, + "payload":"AudioStream" + }, + "StartStreamTranscriptionResponse":{ + "type":"structure", + "members":{ + "RequestId":{ + "shape":"RequestId", + "location":"header", + "locationName":"x-amzn-request-id" + }, + "LanguageCode":{ + "shape":"LanguageCode", + "location":"header", + "locationName":"x-amzn-transcribe-language-code" + }, + "MediaSampleRateHertz":{ + "shape":"MediaSampleRateHertz", + "location":"header", + "locationName":"x-amzn-transcribe-sample-rate" + }, + "MediaEncoding":{ + "shape":"MediaEncoding", + "location":"header", + "locationName":"x-amzn-transcribe-media-encoding" + }, + "VocabularyName":{ + "shape":"VocabularyName", + "location":"header", + "locationName":"x-amzn-transcribe-vocabulary-name" + }, + "SessionId":{ + "shape":"SessionId", + "location":"header", + "locationName":"x-amzn-transcribe-session-id" + }, + "TranscriptResultStream":{"shape":"TranscriptResultStream"} + }, + "payload":"TranscriptResultStream" + }, + "String":{"type":"string"}, + "Transcript":{ + "type":"structure", + "members":{ + "Results":{"shape":"ResultList"} + } + }, + "TranscriptEvent":{ + "type":"structure", + "members":{ + "Transcript":{"shape":"Transcript"} + }, + "event":true + }, + "TranscriptResultStream":{ + "type":"structure", + "members":{ + "TranscriptEvent":{"shape":"TranscriptEvent"}, + "BadRequestException":{"shape":"BadRequestException"}, + "LimitExceededException":{"shape":"LimitExceededException"}, + "InternalFailureException":{"shape":"InternalFailureException"}, + "ConflictException":{"shape":"ConflictException"} + }, + "eventstream":true + }, + "VocabularyName":{ + "type":"string", + "max":200, + "min":1, + "pattern":"^[0-9a-zA-Z._-]+" + } + } +} diff --git a/models/apis/transcribe-streaming/2017-10-26/docs-2.json b/models/apis/transcribe-streaming/2017-10-26/docs-2.json new file mode 100755 index 00000000000..7945a1be246 --- /dev/null +++ b/models/apis/transcribe-streaming/2017-10-26/docs-2.json @@ -0,0 +1,189 @@ +{ + "version": "2.0", + "service": "

Operations and objects for transcribing streaming speech to text.

", + "operations": { + "StartStreamTranscription": "

Starts a bidirectional HTTP2 stream where audio is streamed to Amazon Transcribe and the transcription results are streamed to your application.

The following are encoded as HTTP2 headers:

" + }, + "shapes": { + "Alternative": { + "base": "

A list of possible transcriptions for the audio.

", + "refs": { + "AlternativeList$member": null + } + }, + "AlternativeList": { + "base": null, + "refs": { + "Result$Alternatives": "

A list of possible transcriptions for the audio. Each alternative typically contains one item that contains the result of the transcription.

" + } + }, + "AudioChunk": { + "base": null, + "refs": { + "AudioEvent$AudioChunk": "

An audio blob that contains the next part of the audio that you want to transcribe.

" + } + }, + "AudioEvent": { + "base": "

Provides a wrapper for the audio chunks that you are sending.

", + "refs": { + "AudioStream$AudioEvent": "

A blob of audio from your application. You audio stream consists of one or more audio events.

" + } + }, + "AudioStream": { + "base": "

Represents the audio stream from your application to Amazon Transcribe.

", + "refs": { + "StartStreamTranscriptionRequest$AudioStream": "

PCM-encoded stream of audio blobs. The audio stream is encoded as an HTTP2 data frame.

" + } + }, + "BadRequestException": { + "base": "

One or more arguments to the StartStreamTranscription operation was invalid. For example, MediaEncoding was not set to pcm or LanguageCode was not set to a valid code. Check the parameters and try your request again.

", + "refs": { + "TranscriptResultStream$BadRequestException": "

A client error occurred when the stream was created. Check the parameters of the request and try your request again.

" + } + }, + "Boolean": { + "base": null, + "refs": { + "Result$IsPartial": "

Amazon Transcribe divides the incoming audio stream into segments at natural points in the audio. Transcription results are returned based on these segments.

The IsPartial field is true to indicate that Amazon Transcribe has additional transcription data to send, false to indicate that this is the last transcription result for the segment.

" + } + }, + "ConflictException": { + "base": "

A new stream started with the same session ID. The current stream has been terminated.

", + "refs": { + "TranscriptResultStream$ConflictException": "

A new stream started with the same session ID. The current stream has been terminated.

" + } + }, + "Double": { + "base": null, + "refs": { + "Item$StartTime": "

The offset from the beginning of the audio stream to the beginning of the audio that resulted in the item.

", + "Item$EndTime": "

The offset from the beginning of the audio stream to the end of the audio that resulted in the item.

", + "Result$StartTime": "

The offset in seconds from the beginning of the audio stream to the beginning of the result.

", + "Result$EndTime": "

The offset in seconds from the beginning of the audio stream to the end of the result.

" + } + }, + "InternalFailureException": { + "base": "

A problem occurred while processing the audio. Amazon Transcribe terminated processing. Try your request again.

", + "refs": { + "TranscriptResultStream$InternalFailureException": "

A problem occurred while processing the audio. Amazon Transcribe terminated processing.

" + } + }, + "Item": { + "base": "

A word or phrase transcribed from the input audio.

", + "refs": { + "ItemList$member": null + } + }, + "ItemList": { + "base": null, + "refs": { + "Alternative$Items": "

One or more alternative interpretations of the input audio.

" + } + }, + "ItemType": { + "base": null, + "refs": { + "Item$Type": "

The type of the item. PRONUNCIATION indicates that the item is a word that was recognized in the input audio. PUNCTUATION indicates that the item was interpreted as a pause in the input audio.

" + } + }, + "LanguageCode": { + "base": null, + "refs": { + "StartStreamTranscriptionRequest$LanguageCode": "

Indicates the source language used in the input audio stream.

", + "StartStreamTranscriptionResponse$LanguageCode": "

The language code for the input audio stream.

" + } + }, + "LimitExceededException": { + "base": "

You have exceeded the maximum number of concurrent transcription streams, are starting transcription streams too quickly, or the maximum audio length of 4 hours. Wait until a stream has finished processing, or break your audio stream into smaller chunks and try your request again.

", + "refs": { + "TranscriptResultStream$LimitExceededException": "

Your client has exceeded one of the Amazon Transcribe limits, typically the limit on audio length. Break your audio stream into smaller chunks and try your request again.

" + } + }, + "MediaEncoding": { + "base": null, + "refs": { + "StartStreamTranscriptionRequest$MediaEncoding": "

The encoding used for the input audio.

", + "StartStreamTranscriptionResponse$MediaEncoding": "

The encoding used for the input audio stream.

" + } + }, + "MediaSampleRateHertz": { + "base": null, + "refs": { + "StartStreamTranscriptionRequest$MediaSampleRateHertz": "

The sample rate, in Hertz, of the input audio. We suggest that you use 8000 Hz for low quality audio and 16000 Hz for high quality audio.

", + "StartStreamTranscriptionResponse$MediaSampleRateHertz": "

The sample rate for the input audio stream. Use 8000 Hz for low quality audio and 16000 Hz for high quality audio.

" + } + }, + "RequestId": { + "base": null, + "refs": { + "StartStreamTranscriptionResponse$RequestId": "

An identifier for the streaming transcription.

" + } + }, + "Result": { + "base": "

The result of transcribing a portion of the input audio stream.

", + "refs": { + "ResultList$member": null + } + }, + "ResultList": { + "base": null, + "refs": { + "Transcript$Results": "

Result objects that contain the results of transcribing a portion of the input audio stream. The array can be empty.

" + } + }, + "SessionId": { + "base": null, + "refs": { + "StartStreamTranscriptionRequest$SessionId": "

A identifier for the transcription session. Use this parameter when you want to retry a session. If you don't provide a session ID, Amazon Transcribe will generate one for you and return it in the response.

", + "StartStreamTranscriptionResponse$SessionId": "

An identifier for a specific transcription session.

" + } + }, + "StartStreamTranscriptionRequest": { + "base": null, + "refs": { + } + }, + "StartStreamTranscriptionResponse": { + "base": null, + "refs": { + } + }, + "String": { + "base": null, + "refs": { + "Alternative$Transcript": "

The text that was transcribed from the audio.

", + "BadRequestException$Message": null, + "ConflictException$Message": null, + "InternalFailureException$Message": null, + "Item$Content": "

The word or punctuation that was recognized in the input audio.

", + "LimitExceededException$Message": null, + "Result$ResultId": "

A unique identifier for the result.

" + } + }, + "Transcript": { + "base": "

The transcription in a TranscriptEvent.

", + "refs": { + "TranscriptEvent$Transcript": "

The transcription of the audio stream. The transcription is composed of all of the items in the results list.

" + } + }, + "TranscriptEvent": { + "base": "

Represents a set of transcription results from the server to the client. It contains one or more segments of the transcription.

", + "refs": { + "TranscriptResultStream$TranscriptEvent": "

A portion of the transcription of the audio stream. Events are sent periodically from Amazon Transcribe to your application. The event can be a partial transcription of a section of the audio stream, or it can be the entire transcription of that portion of the audio stream.

" + } + }, + "TranscriptResultStream": { + "base": "

Represents the transcription result stream from Amazon Transcribe to your application.

", + "refs": { + "StartStreamTranscriptionResponse$TranscriptResultStream": "

Represents the stream of transcription events from Amazon Transcribe to your application.

" + } + }, + "VocabularyName": { + "base": null, + "refs": { + "StartStreamTranscriptionRequest$VocabularyName": "

The name of the vocabulary to use when processing the transcription job.

", + "StartStreamTranscriptionResponse$VocabularyName": "

The name of the vocabulary used when processing the job.

" + } + } + } +} diff --git a/models/apis/transcribe-streaming/2017-10-26/examples-1.json b/models/apis/transcribe-streaming/2017-10-26/examples-1.json new file mode 100755 index 00000000000..0ea7e3b0bbe --- /dev/null +++ b/models/apis/transcribe-streaming/2017-10-26/examples-1.json @@ -0,0 +1,5 @@ +{ + "version": "1.0", + "examples": { + } +} diff --git a/models/apis/transcribe-streaming/2017-10-26/paginators-1.json b/models/apis/transcribe-streaming/2017-10-26/paginators-1.json new file mode 100755 index 00000000000..5677bd8e4a2 --- /dev/null +++ b/models/apis/transcribe-streaming/2017-10-26/paginators-1.json @@ -0,0 +1,4 @@ +{ + "pagination": { + } +} diff --git a/models/apis/transcribe/2017-10-26/api-2.json b/models/apis/transcribe/2017-10-26/api-2.json index 2f44a843da5..6e44f2d5f35 100644 --- a/models/apis/transcribe/2017-10-26/api-2.json +++ b/models/apis/transcribe/2017-10-26/api-2.json @@ -28,6 +28,21 @@ {"shape":"ConflictException"} ] }, + "CreateVocabularyFilter":{ + "name":"CreateVocabularyFilter", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"CreateVocabularyFilterRequest"}, + "output":{"shape":"CreateVocabularyFilterResponse"}, + "errors":[ + {"shape":"BadRequestException"}, + {"shape":"LimitExceededException"}, + {"shape":"InternalFailureException"}, + {"shape":"ConflictException"} + ] + }, "DeleteTranscriptionJob":{ "name":"DeleteTranscriptionJob", "http":{ @@ -55,6 +70,20 @@ {"shape":"InternalFailureException"} ] }, + "DeleteVocabularyFilter":{ + "name":"DeleteVocabularyFilter", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeleteVocabularyFilterRequest"}, + "errors":[ + {"shape":"NotFoundException"}, + {"shape":"LimitExceededException"}, + {"shape":"BadRequestException"}, + {"shape":"InternalFailureException"} + ] + }, "GetTranscriptionJob":{ "name":"GetTranscriptionJob", "http":{ @@ -85,6 +114,21 @@ {"shape":"BadRequestException"} ] }, + "GetVocabularyFilter":{ + "name":"GetVocabularyFilter", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"GetVocabularyFilterRequest"}, + "output":{"shape":"GetVocabularyFilterResponse"}, + "errors":[ + {"shape":"NotFoundException"}, + {"shape":"LimitExceededException"}, + {"shape":"InternalFailureException"}, + {"shape":"BadRequestException"} + ] + }, "ListTranscriptionJobs":{ "name":"ListTranscriptionJobs", "http":{ @@ -113,6 +157,20 @@ {"shape":"InternalFailureException"} ] }, + "ListVocabularyFilters":{ + "name":"ListVocabularyFilters", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListVocabularyFiltersRequest"}, + "output":{"shape":"ListVocabularyFiltersResponse"}, + "errors":[ + {"shape":"BadRequestException"}, + {"shape":"LimitExceededException"}, + {"shape":"InternalFailureException"} + ] + }, "StartTranscriptionJob":{ "name":"StartTranscriptionJob", "http":{ @@ -143,6 +201,21 @@ {"shape":"NotFoundException"}, {"shape":"ConflictException"} ] + }, + "UpdateVocabularyFilter":{ + "name":"UpdateVocabularyFilter", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"UpdateVocabularyFilterRequest"}, + "output":{"shape":"UpdateVocabularyFilterResponse"}, + "errors":[ + {"shape":"BadRequestException"}, + {"shape":"LimitExceededException"}, + {"shape":"InternalFailureException"}, + {"shape":"NotFoundException"} + ] } }, "shapes":{ @@ -161,6 +234,27 @@ }, "exception":true }, + "CreateVocabularyFilterRequest":{ + "type":"structure", + "required":[ + "VocabularyFilterName", + "LanguageCode" + ], + "members":{ + "VocabularyFilterName":{"shape":"VocabularyFilterName"}, + "LanguageCode":{"shape":"LanguageCode"}, + "Words":{"shape":"Words"}, + "VocabularyFilterFileUri":{"shape":"Uri"} + } + }, + "CreateVocabularyFilterResponse":{ + "type":"structure", + "members":{ + "VocabularyFilterName":{"shape":"VocabularyFilterName"}, + "LanguageCode":{"shape":"LanguageCode"}, + "LastModifiedTime":{"shape":"DateTime"} + } + }, "CreateVocabularyRequest":{ "type":"structure", "required":[ @@ -184,6 +278,10 @@ "FailureReason":{"shape":"FailureReason"} } }, + "DataAccessRoleArn":{ + "type":"string", + "pattern":"^arn:aws:iam::[0-9]{0,63}:role/[A-Za-z0-9:_/+=,@.-]{0,1023}$" + }, "DateTime":{"type":"timestamp"}, "DeleteTranscriptionJobRequest":{ "type":"structure", @@ -192,6 +290,13 @@ "TranscriptionJobName":{"shape":"TranscriptionJobName"} } }, + "DeleteVocabularyFilterRequest":{ + "type":"structure", + "required":["VocabularyFilterName"], + "members":{ + "VocabularyFilterName":{"shape":"VocabularyFilterName"} + } + }, "DeleteVocabularyRequest":{ "type":"structure", "required":["VocabularyName"], @@ -213,6 +318,22 @@ "TranscriptionJob":{"shape":"TranscriptionJob"} } }, + "GetVocabularyFilterRequest":{ + "type":"structure", + "required":["VocabularyFilterName"], + "members":{ + "VocabularyFilterName":{"shape":"VocabularyFilterName"} + } + }, + "GetVocabularyFilterResponse":{ + "type":"structure", + "members":{ + "VocabularyFilterName":{"shape":"VocabularyFilterName"}, + "LanguageCode":{"shape":"LanguageCode"}, + "LastModifiedTime":{"shape":"DateTime"}, + "DownloadUri":{"shape":"Uri"} + } + }, "GetVocabularyRequest":{ "type":"structure", "required":["VocabularyName"], @@ -239,6 +360,13 @@ "exception":true, "fault":true }, + "JobExecutionSettings":{ + "type":"structure", + "members":{ + "AllowDeferredExecution":{"shape":"Boolean"}, + "DataAccessRoleArn":{"shape":"DataAccessRoleArn"} + } + }, "KMSKeyId":{ "type":"string", "max":2048, @@ -322,6 +450,21 @@ "Vocabularies":{"shape":"Vocabularies"} } }, + "ListVocabularyFiltersRequest":{ + "type":"structure", + "members":{ + "NextToken":{"shape":"NextToken"}, + "MaxResults":{"shape":"MaxResults"}, + "NameContains":{"shape":"VocabularyFilterName"} + } + }, + "ListVocabularyFiltersResponse":{ + "type":"structure", + "members":{ + "NextToken":{"shape":"NextToken"}, + "VocabularyFilters":{"shape":"VocabularyFilters"} + } + }, "MaxAlternatives":{ "type":"integer", "max":10, @@ -399,7 +542,9 @@ "MaxSpeakerLabels":{"shape":"MaxSpeakers"}, "ChannelIdentification":{"shape":"Boolean"}, "ShowAlternatives":{"shape":"Boolean"}, - "MaxAlternatives":{"shape":"MaxAlternatives"} + "MaxAlternatives":{"shape":"MaxAlternatives"}, + "VocabularyFilterName":{"shape":"VocabularyFilterName"}, + "VocabularyFilterMethod":{"shape":"VocabularyFilterMethod"} } }, "StartTranscriptionJobRequest":{ @@ -417,7 +562,8 @@ "Media":{"shape":"Media"}, "OutputBucketName":{"shape":"OutputBucketName"}, "OutputEncryptionKMSKeyId":{"shape":"KMSKeyId"}, - "Settings":{"shape":"Settings"} + "Settings":{"shape":"Settings"}, + "JobExecutionSettings":{"shape":"JobExecutionSettings"} } }, "StartTranscriptionJobResponse":{ @@ -443,10 +589,12 @@ "MediaFormat":{"shape":"MediaFormat"}, "Media":{"shape":"Media"}, "Transcript":{"shape":"Transcript"}, + "StartTime":{"shape":"DateTime"}, "CreationTime":{"shape":"DateTime"}, "CompletionTime":{"shape":"DateTime"}, "FailureReason":{"shape":"FailureReason"}, - "Settings":{"shape":"Settings"} + "Settings":{"shape":"Settings"}, + "JobExecutionSettings":{"shape":"JobExecutionSettings"} } }, "TranscriptionJobName":{ @@ -458,6 +606,7 @@ "TranscriptionJobStatus":{ "type":"string", "enum":[ + "QUEUED", "IN_PROGRESS", "FAILED", "COMPLETED" @@ -472,6 +621,7 @@ "members":{ "TranscriptionJobName":{"shape":"TranscriptionJobName"}, "CreationTime":{"shape":"DateTime"}, + "StartTime":{"shape":"DateTime"}, "CompletionTime":{"shape":"DateTime"}, "LanguageCode":{"shape":"LanguageCode"}, "TranscriptionJobStatus":{"shape":"TranscriptionJobStatus"}, @@ -479,6 +629,23 @@ "OutputLocationType":{"shape":"OutputLocationType"} } }, + "UpdateVocabularyFilterRequest":{ + "type":"structure", + "required":["VocabularyFilterName"], + "members":{ + "VocabularyFilterName":{"shape":"VocabularyFilterName"}, + "Words":{"shape":"Words"}, + "VocabularyFilterFileUri":{"shape":"Uri"} + } + }, + "UpdateVocabularyFilterResponse":{ + "type":"structure", + "members":{ + "VocabularyFilterName":{"shape":"VocabularyFilterName"}, + "LanguageCode":{"shape":"LanguageCode"}, + "LastModifiedTime":{"shape":"DateTime"} + } + }, "UpdateVocabularyRequest":{ "type":"structure", "required":[ @@ -511,6 +678,31 @@ "type":"list", "member":{"shape":"VocabularyInfo"} }, + "VocabularyFilterInfo":{ + "type":"structure", + "members":{ + "VocabularyFilterName":{"shape":"VocabularyFilterName"}, + "LanguageCode":{"shape":"LanguageCode"}, + "LastModifiedTime":{"shape":"DateTime"} + } + }, + "VocabularyFilterMethod":{ + "type":"string", + "enum":[ + "remove", + "mask" + ] + }, + "VocabularyFilterName":{ + "type":"string", + "max":200, + "min":1, + "pattern":"^[0-9a-zA-Z._-]+" + }, + "VocabularyFilters":{ + "type":"list", + "member":{"shape":"VocabularyFilterInfo"} + }, "VocabularyInfo":{ "type":"structure", "members":{ @@ -533,6 +725,16 @@ "READY", "FAILED" ] + }, + "Word":{ + "type":"string", + "max":256, + "min":1 + }, + "Words":{ + "type":"list", + "member":{"shape":"Word"}, + "min":1 } } } diff --git a/models/apis/transcribe/2017-10-26/docs-2.json b/models/apis/transcribe/2017-10-26/docs-2.json index f060d062f8f..fd99764b5e8 100644 --- a/models/apis/transcribe/2017-10-26/docs-2.json +++ b/models/apis/transcribe/2017-10-26/docs-2.json @@ -3,14 +3,19 @@ "service": "

Operations and objects for transcribing speech to text.

", "operations": { "CreateVocabulary": "

Creates a new custom vocabulary that you can use to change the way Amazon Transcribe handles transcription of an audio file.

", + "CreateVocabularyFilter": "

Creates a new vocabulary filter that you can use to filter words, such as profane words, from the output of a transcription job.

", "DeleteTranscriptionJob": "

Deletes a previously submitted transcription job along with any other generated results such as the transcription, models, and so on.

", "DeleteVocabulary": "

Deletes a vocabulary from Amazon Transcribe.

", + "DeleteVocabularyFilter": "

Removes a vocabulary filter.

", "GetTranscriptionJob": "

Returns information about a transcription job. To see the status of the job, check the TranscriptionJobStatus field. If the status is COMPLETED, the job is finished and you can find the results at the location specified in the TranscriptionFileUri field.

", "GetVocabulary": "

Gets information about a vocabulary.

", + "GetVocabularyFilter": "

Returns information about a vocabulary filter.

", "ListTranscriptionJobs": "

Lists transcription jobs with the specified status.

", "ListVocabularies": "

Returns a list of vocabularies that match the specified criteria. If no criteria are specified, returns the entire list of vocabularies.

", + "ListVocabularyFilters": "

Gets information about vocabulary filters.

", "StartTranscriptionJob": "

Starts an asynchronous job to transcribe speech to text.

", - "UpdateVocabulary": "

Updates an existing vocabulary with new values. The UpdateVocabulary operation overwrites all of the existing information with the values that you provide in the request.

" + "UpdateVocabulary": "

Updates an existing vocabulary with new values. The UpdateVocabulary operation overwrites all of the existing information with the values that you provide in the request.

", + "UpdateVocabularyFilter": "

Updates a vocabulary filter with a new list of filtered words.

" }, "shapes": { "BadRequestException": { @@ -21,6 +26,7 @@ "Boolean": { "base": null, "refs": { + "JobExecutionSettings$AllowDeferredExecution": "

Indicates whether a job should be queued by Amazon Transcribe when the concurrent execution limit is exceeded. When the AllowDeferredExecution field is true, jobs are queued and will be executed when the number of executing jobs falls below the concurrent execution limit. If the field is false, Amazon Transcribe returns a LimitExceededException exception.

If you specify the AllowDeferredExecution field, you must specify the DataAccessRoleArn field.

", "Settings$ShowSpeakerLabels": "

Determines whether the transcription job uses speaker recognition to identify different speakers in the input audio. Speaker recognition labels individual speakers in the audio file. If you set the ShowSpeakerLabels field to true, you must also set the maximum number of speaker labels MaxSpeakerLabels field.

You can't set both ShowSpeakerLabels and ChannelIdentification in the same request. If you set both, your request returns a BadRequestException.

", "Settings$ChannelIdentification": "

Instructs Amazon Transcribe to process each audio channel separately and then merge the transcription output of each channel into a single transcription.

Amazon Transcribe also produces a transcription of each item detected on an audio channel, including the start time and end time of the item and alternative transcriptions of the item including the confidence that Amazon Transcribe has in the transcription.

You can't set both ShowSpeakerLabels and ChannelIdentification in the same request. If you set both, your request returns a BadRequestException.

", "Settings$ShowAlternatives": "

Determines whether the transcription contains alternative transcriptions. If you set the ShowAlternatives field to true, you must also set the maximum number of alternatives to return in the MaxAlternatives field.

" @@ -31,6 +37,16 @@ "refs": { } }, + "CreateVocabularyFilterRequest": { + "base": null, + "refs": { + } + }, + "CreateVocabularyFilterResponse": { + "base": null, + "refs": { + } + }, "CreateVocabularyRequest": { "base": null, "refs": { @@ -41,16 +57,28 @@ "refs": { } }, + "DataAccessRoleArn": { + "base": null, + "refs": { + "JobExecutionSettings$DataAccessRoleArn": "

The Amazon Resource Name (ARN) of a role that has access to the S3 bucket that contains the input files. Amazon Transcribe will assume this role to read queued media files. If you have specified an output S3 bucket for the transcription results, this role should have access to the output bucket as well.

If you specify the AllowDeferredExecution field, you must specify the DataAccessRoleArn field.

" + } + }, "DateTime": { "base": null, "refs": { + "CreateVocabularyFilterResponse$LastModifiedTime": "

The date and time that the vocabulary filter was modified.

", "CreateVocabularyResponse$LastModifiedTime": "

The date and time that the vocabulary was created.

", + "GetVocabularyFilterResponse$LastModifiedTime": "

The date and time that the contents of the vocabulary filter were updated.

", "GetVocabularyResponse$LastModifiedTime": "

The date and time that the vocabulary was last modified.

", + "TranscriptionJob$StartTime": "

A timestamp that shows with the job was started processing.

", "TranscriptionJob$CreationTime": "

A timestamp that shows when the job was created.

", "TranscriptionJob$CompletionTime": "

A timestamp that shows when the job was completed.

", "TranscriptionJobSummary$CreationTime": "

A timestamp that shows when the job was created.

", + "TranscriptionJobSummary$StartTime": "

A timestamp that shows when the job started processing.

", "TranscriptionJobSummary$CompletionTime": "

A timestamp that shows when the job was completed.

", + "UpdateVocabularyFilterResponse$LastModifiedTime": "

The date and time that the vocabulary filter was updated.

", "UpdateVocabularyResponse$LastModifiedTime": "

The date and time that the vocabulary was updated.

", + "VocabularyFilterInfo$LastModifiedTime": "

The date and time that the vocabulary was last updated.

", "VocabularyInfo$LastModifiedTime": "

The date and time that the vocabulary was last modified.

" } }, @@ -59,6 +87,11 @@ "refs": { } }, + "DeleteVocabularyFilterRequest": { + "base": null, + "refs": { + } + }, "DeleteVocabularyRequest": { "base": null, "refs": { @@ -84,6 +117,16 @@ "refs": { } }, + "GetVocabularyFilterRequest": { + "base": null, + "refs": { + } + }, + "GetVocabularyFilterResponse": { + "base": null, + "refs": { + } + }, "GetVocabularyRequest": { "base": null, "refs": { @@ -99,6 +142,13 @@ "refs": { } }, + "JobExecutionSettings": { + "base": "

Provides information about when a transcription job should be executed.

", + "refs": { + "StartTranscriptionJobRequest$JobExecutionSettings": "

Provides information about how a transcription job is executed. Use this field to indicate that the job can be queued for deferred execution if the concurrency limit is reached and there are no slots available to immediately run the job.

", + "TranscriptionJob$JobExecutionSettings": "

Provides information about how a transcription job is executed.

" + } + }, "KMSKeyId": { "base": null, "refs": { @@ -108,14 +158,19 @@ "LanguageCode": { "base": null, "refs": { + "CreateVocabularyFilterRequest$LanguageCode": "

The language code of the words in the vocabulary filter. All words in the filter must be in the same language. The vocabulary filter can only be used with transcription jobs in the specified language.

", + "CreateVocabularyFilterResponse$LanguageCode": "

The language code of the words in the collection.

", "CreateVocabularyRequest$LanguageCode": "

The language code of the vocabulary entries.

", "CreateVocabularyResponse$LanguageCode": "

The language code of the vocabulary entries.

", + "GetVocabularyFilterResponse$LanguageCode": "

The language code of the words in the vocabulary filter.

", "GetVocabularyResponse$LanguageCode": "

The language code of the vocabulary entries.

", "StartTranscriptionJobRequest$LanguageCode": "

The language code for the language used in the input media file.

", "TranscriptionJob$LanguageCode": "

The language code for the input speech.

", "TranscriptionJobSummary$LanguageCode": "

The language code for the input speech.

", + "UpdateVocabularyFilterResponse$LanguageCode": "

The language code of the words in the vocabulary filter.

", "UpdateVocabularyRequest$LanguageCode": "

The language code of the vocabulary entries.

", "UpdateVocabularyResponse$LanguageCode": "

The language code of the vocabulary entries.

", + "VocabularyFilterInfo$LanguageCode": "

The language code of the words in the vocabulary filter.

", "VocabularyInfo$LanguageCode": "

The language code of the vocabulary entries.

" } }, @@ -144,6 +199,16 @@ "refs": { } }, + "ListVocabularyFiltersRequest": { + "base": null, + "refs": { + } + }, + "ListVocabularyFiltersResponse": { + "base": null, + "refs": { + } + }, "MaxAlternatives": { "base": null, "refs": { @@ -154,7 +219,8 @@ "base": null, "refs": { "ListTranscriptionJobsRequest$MaxResults": "

The maximum number of jobs to return in the response. If there are fewer results in the list, this response contains only the actual results.

", - "ListVocabulariesRequest$MaxResults": "

The maximum number of vocabularies to return in the response. If there are fewer results in the list, this response contains only the actual results.

" + "ListVocabulariesRequest$MaxResults": "

The maximum number of vocabularies to return in the response. If there are fewer results in the list, this response contains only the actual results.

", + "ListVocabularyFiltersRequest$MaxResults": "

The maximum number of filters to return in the response. If there are fewer results in the list, this response contains only the actual results.

" } }, "MaxSpeakers": { @@ -190,7 +256,9 @@ "ListTranscriptionJobsRequest$NextToken": "

If the result of the previous request to ListTranscriptionJobs was truncated, include the NextToken to fetch the next set of jobs.

", "ListTranscriptionJobsResponse$NextToken": "

The ListTranscriptionJobs operation returns a page of jobs at a time. The maximum size of the page is set by the MaxResults parameter. If there are more jobs in the list than the page size, Amazon Transcribe returns the NextPage token. Include the token in the next request to the ListTranscriptionJobs operation to return in the next page of jobs.

", "ListVocabulariesRequest$NextToken": "

If the result of the previous request to ListVocabularies was truncated, include the NextToken to fetch the next set of jobs.

", - "ListVocabulariesResponse$NextToken": "

The ListVocabularies operation returns a page of vocabularies at a time. The maximum size of the page is set by the MaxResults parameter. If there are more jobs in the list than the page size, Amazon Transcribe returns the NextPage token. Include the token in the next request to the ListVocabularies operation to return in the next page of jobs.

" + "ListVocabulariesResponse$NextToken": "

The ListVocabularies operation returns a page of vocabularies at a time. The maximum size of the page is set by the MaxResults parameter. If there are more jobs in the list than the page size, Amazon Transcribe returns the NextPage token. Include the token in the next request to the ListVocabularies operation to return in the next page of jobs.

", + "ListVocabularyFiltersRequest$NextToken": "

If the result of the previous request to ListVocabularyFilters was truncated, include the NextToken to fetch the next set of collections.

", + "ListVocabularyFiltersResponse$NextToken": "

The ListVocabularyFilters operation returns a page of collections at a time. The maximum size of the page is set by the MaxResults parameter. If there are more jobs in the list than the page size, Amazon Transcribe returns the NextPage token. Include the token in the next request to the ListVocabularyFilters operation to return in the next page of jobs.

" } }, "NotFoundException": { @@ -295,6 +363,16 @@ "TranscriptionJobSummaries$member": null } }, + "UpdateVocabularyFilterRequest": { + "base": null, + "refs": { + } + }, + "UpdateVocabularyFilterResponse": { + "base": null, + "refs": { + } + }, "UpdateVocabularyRequest": { "base": null, "refs": { @@ -308,10 +386,13 @@ "Uri": { "base": null, "refs": { + "CreateVocabularyFilterRequest$VocabularyFilterFileUri": "

The Amazon S3 location of a text file used as input to create the vocabulary filter. Only use characters from the character set defined for custom vocabularies. For a list of character sets, see Character Sets for Custom Vocabularies.

The specified file must be less than 50 KB of UTF-8 characters.

If you provide the location of a list of words in the VocabularyFilterFileUri parameter, you can't use the Words parameter.

", "CreateVocabularyRequest$VocabularyFileUri": "

The S3 location of the text file that contains the definition of the custom vocabulary. The URI must be in the same region as the API endpoint that you are calling. The general form is

https://s3.<aws-region>.amazonaws.com/<bucket-name>/<keyprefix>/<objectkey>

For example:

https://s3.us-east-1.amazonaws.com/examplebucket/vocab.txt

For more information about S3 object names, see Object Keys in the Amazon S3 Developer Guide.

For more information about custom vocabularies, see Custom Vocabularies.

", + "GetVocabularyFilterResponse$DownloadUri": "

The URI of the list of words in the vocabulary filter. You can use this URI to get the list of words.

", "GetVocabularyResponse$DownloadUri": "

The S3 location where the vocabulary is stored. Use this URI to get the contents of the vocabulary. The URI is available for a limited time.

", "Media$MediaFileUri": "

The S3 location of the input media file. The URI must be in the same region as the API endpoint that you are calling. The general form is:

https://s3.<aws-region>.amazonaws.com/<bucket-name>/<keyprefix>/<objectkey>

For example:

https://s3.us-east-1.amazonaws.com/examplebucket/example.mp4

https://s3.us-east-1.amazonaws.com/examplebucket/mediadocs/example.mp4

For more information about S3 object names, see Object Keys in the Amazon S3 Developer Guide.

", "Transcript$TranscriptFileUri": "

The location where the transcription is stored.

Use this URI to access the transcription. If you specified an S3 bucket in the OutputBucketName field when you created the job, this is the URI of that bucket. If you chose to store the transcription in Amazon Transcribe, this is a shareable URL that provides secure access to that location.

", + "UpdateVocabularyFilterRequest$VocabularyFilterFileUri": "

The Amazon S3 location of a text file used as input to create the vocabulary filter. Only use characters from the character set defined for custom vocabularies. For a list of character sets, see Character Sets for Custom Vocabularies.

The specified file must be less than 50 KB of UTF-8 characters.

If you provide the location of a list of words in the VocabularyFilterFileUri parameter, you can't use the Words parameter.

", "UpdateVocabularyRequest$VocabularyFileUri": "

The S3 location of the text file that contains the definition of the custom vocabulary. The URI must be in the same region as the API endpoint that you are calling. The general form is

https://s3.<aws-region>.amazonaws.com/<bucket-name>/<keyprefix>/<objectkey>

For example:

https://s3.us-east-1.amazonaws.com/examplebucket/vocab.txt

For more information about S3 object names, see Object Keys in the Amazon S3 Developer Guide.

For more information about custom vocabularies, see Custom Vocabularies.

" } }, @@ -321,6 +402,39 @@ "ListVocabulariesResponse$Vocabularies": "

A list of objects that describe the vocabularies that match the search criteria in the request.

" } }, + "VocabularyFilterInfo": { + "base": "

Provides information about a vocabulary filter.

", + "refs": { + "VocabularyFilters$member": null + } + }, + "VocabularyFilterMethod": { + "base": null, + "refs": { + "Settings$VocabularyFilterMethod": "

Set to mask to remove filtered text from the transcript and replace it with three asterisks (\"***\") as placeholder text. Set to remove to remove filtered text from the transcript without using placeholder text.

" + } + }, + "VocabularyFilterName": { + "base": null, + "refs": { + "CreateVocabularyFilterRequest$VocabularyFilterName": "

The vocabulary filter name. The name must be unique within the account that contains it.

", + "CreateVocabularyFilterResponse$VocabularyFilterName": "

The name of the vocabulary filter.

", + "DeleteVocabularyFilterRequest$VocabularyFilterName": "

The name of the vocabulary filter to remove.

", + "GetVocabularyFilterRequest$VocabularyFilterName": "

The name of the vocabulary filter for which to return information.

", + "GetVocabularyFilterResponse$VocabularyFilterName": "

The name of the vocabulary filter.

", + "ListVocabularyFiltersRequest$NameContains": "

Filters the response so that it only contains vocabulary filters whose name contains the specified string.

", + "Settings$VocabularyFilterName": "

The name of the vocabulary filter to use when transcribing the audio. The filter that you specify must have the same language code as the transcription job.

", + "UpdateVocabularyFilterRequest$VocabularyFilterName": "

The name of the vocabulary filter to update.

", + "UpdateVocabularyFilterResponse$VocabularyFilterName": "

The name of the updated vocabulary filter.

", + "VocabularyFilterInfo$VocabularyFilterName": "

The name of the vocabulary filter. The name must be unique in the account that holds the filter.

" + } + }, + "VocabularyFilters": { + "base": null, + "refs": { + "ListVocabularyFiltersResponse$VocabularyFilters": "

The list of vocabulary filters. It will contain at most MaxResults number of filters. If there are more filters, call the ListVocabularyFilters operation again with the NextToken parameter in the request set to the value of the NextToken field in the response.

" + } + }, "VocabularyInfo": { "base": "

Provides information about a custom vocabulary.

", "refs": { @@ -351,6 +465,19 @@ "UpdateVocabularyResponse$VocabularyState": "

The processing state of the vocabulary. When the VocabularyState field contains READY the vocabulary is ready to be used in a StartTranscriptionJob request.

", "VocabularyInfo$VocabularyState": "

The processing state of the vocabulary. If the state is READY you can use the vocabulary in a StartTranscriptionJob request.

" } + }, + "Word": { + "base": null, + "refs": { + "Words$member": null + } + }, + "Words": { + "base": null, + "refs": { + "CreateVocabularyFilterRequest$Words": "

The words to use in the vocabulary filter. Only use characters from the character set defined for custom vocabularies. For a list of character sets, see Character Sets for Custom Vocabularies.

If you provide a list of words in the Words parameter, you can't use the VocabularyFilterFileUri parameter.

", + "UpdateVocabularyFilterRequest$Words": "

The words to use in the vocabulary filter. Only use characters from the character set defined for custom vocabularies. For a list of character sets, see Character Sets for Custom Vocabularies.

If you provide a list of words in the Words parameter, you can't use the VocabularyFilterFileUri parameter.

" + } } } } diff --git a/models/apis/transcribe/2017-10-26/paginators-1.json b/models/apis/transcribe/2017-10-26/paginators-1.json index cdf0f1f38bd..aded8e376ef 100644 --- a/models/apis/transcribe/2017-10-26/paginators-1.json +++ b/models/apis/transcribe/2017-10-26/paginators-1.json @@ -9,6 +9,11 @@ "input_token": "NextToken", "output_token": "NextToken", "limit_key": "MaxResults" + }, + "ListVocabularyFilters": { + "input_token": "NextToken", + "output_token": "NextToken", + "limit_key": "MaxResults" } } } diff --git a/models/endpoints/endpoints.json b/models/endpoints/endpoints.json index e751bd19429..92bf0f4b8b0 100644 --- a/models/endpoints/endpoints.json +++ b/models/endpoints/endpoints.json @@ -80,6 +80,12 @@ "ap-southeast-1" : { }, "ap-southeast-2" : { }, "ca-central-1" : { }, + "ca-central-1-fips" : { + "credentialScope" : { + "region" : "ca-central-1" + }, + "hostname" : "acm-fips.ca-central-1.amazonaws.com" + }, "eu-central-1" : { }, "eu-north-1" : { }, "eu-west-1" : { }, @@ -88,9 +94,33 @@ "me-south-1" : { }, "sa-east-1" : { }, "us-east-1" : { }, + "us-east-1-fips" : { + "credentialScope" : { + "region" : "us-east-1" + }, + "hostname" : "acm-fips.us-east-1.amazonaws.com" + }, "us-east-2" : { }, + "us-east-2-fips" : { + "credentialScope" : { + "region" : "us-east-2" + }, + "hostname" : "acm-fips.us-east-2.amazonaws.com" + }, "us-west-1" : { }, - "us-west-2" : { } + "us-west-1-fips" : { + "credentialScope" : { + "region" : "us-west-1" + }, + "hostname" : "acm-fips.us-west-1.amazonaws.com" + }, + "us-west-2" : { }, + "us-west-2-fips" : { + "credentialScope" : { + "region" : "us-west-2" + }, + "hostname" : "acm-fips.us-west-2.amazonaws.com" + } } }, "acm-pca" : { @@ -587,9 +617,15 @@ "cloud9" : { "endpoints" : { "ap-northeast-1" : { }, + "ap-northeast-2" : { }, + "ap-south-1" : { }, "ap-southeast-1" : { }, + "ap-southeast-2" : { }, + "ca-central-1" : { }, "eu-central-1" : { }, + "eu-north-1" : { }, "eu-west-1" : { }, + "eu-west-2" : { }, "us-east-1" : { }, "us-east-2" : { }, "us-west-2" : { } @@ -975,8 +1011,10 @@ "connect" : { "endpoints" : { "ap-northeast-1" : { }, + "ap-southeast-1" : { }, "ap-southeast-2" : { }, "eu-central-1" : { }, + "eu-west-2" : { }, "us-east-1" : { }, "us-west-2" : { } } @@ -1263,6 +1301,7 @@ "eu-north-1" : { }, "eu-west-1" : { }, "eu-west-2" : { }, + "eu-west-3" : { }, "sa-east-1" : { }, "us-east-1" : { }, "us-east-2" : { }, @@ -1754,6 +1793,8 @@ }, "groundstation" : { "endpoints" : { + "eu-north-1" : { }, + "me-south-1" : { }, "us-east-2" : { }, "us-west-2" : { } } @@ -2055,11 +2096,13 @@ "ap-south-1" : { }, "ap-southeast-1" : { }, "ap-southeast-2" : { }, + "ca-central-1" : { }, "eu-central-1" : { }, "eu-north-1" : { }, "eu-west-1" : { }, "eu-west-2" : { }, "eu-west-3" : { }, + "sa-east-1" : { }, "us-east-1" : { }, "us-east-2" : { }, "us-west-2" : { } @@ -2067,11 +2110,20 @@ }, "kinesisvideo" : { "endpoints" : { + "ap-east-1" : { }, "ap-northeast-1" : { }, + "ap-northeast-2" : { }, + "ap-south-1" : { }, + "ap-southeast-1" : { }, "ap-southeast-2" : { }, + "ca-central-1" : { }, "eu-central-1" : { }, "eu-west-1" : { }, + "eu-west-2" : { }, + "eu-west-3" : { }, + "sa-east-1" : { }, "us-east-1" : { }, + "us-east-2" : { }, "us-west-2" : { } } }, @@ -2378,6 +2430,7 @@ "ap-southeast-2" : { }, "ca-central-1" : { }, "eu-central-1" : { }, + "eu-north-1" : { }, "eu-west-1" : { }, "eu-west-2" : { }, "eu-west-3" : { }, @@ -2405,6 +2458,7 @@ }, "hostname" : "mq-fips.us-west-2.amazonaws.com" }, + "sa-east-1" : { }, "us-east-1" : { }, "us-east-2" : { }, "us-west-1" : { }, @@ -2610,6 +2664,19 @@ "isRegionalized" : false, "partitionEndpoint" : "aws-global" }, + "outposts" : { + "endpoints" : { + "ap-northeast-1" : { }, + "ap-northeast-2" : { }, + "ap-southeast-2" : { }, + "eu-central-1" : { }, + "eu-west-1" : { }, + "us-east-1" : { }, + "us-east-2" : { }, + "us-west-1" : { }, + "us-west-2" : { } + } + }, "pinpoint" : { "defaults" : { "credentialScope" : { @@ -2917,6 +2984,7 @@ "ap-southeast-2" : { }, "ca-central-1" : { }, "eu-central-1" : { }, + "eu-north-1" : { }, "eu-west-1" : { }, "eu-west-2" : { }, "eu-west-3" : { }, @@ -3006,6 +3074,13 @@ "hostname" : "s3.ap-southeast-2.amazonaws.com", "signatureVersions" : [ "s3", "s3v4" ] }, + "aws-global" : { + "credentialScope" : { + "region" : "us-east-1" + }, + "hostname" : "s3.amazonaws.com", + "signatureVersions" : [ "s3", "s3v4" ] + }, "ca-central-1" : { }, "eu-central-1" : { }, "eu-north-1" : { }, @@ -3028,7 +3103,7 @@ "signatureVersions" : [ "s3", "s3v4" ] }, "us-east-1" : { - "hostname" : "s3.amazonaws.com", + "hostname" : "s3.us-east-1.amazonaws.com", "signatureVersions" : [ "s3", "s3v4" ] }, "us-east-2" : { }, @@ -3042,7 +3117,7 @@ } }, "isRegionalized" : true, - "partitionEndpoint" : "us-east-1" + "partitionEndpoint" : "aws-global" }, "s3-control" : { "defaults" : { @@ -4238,6 +4313,12 @@ }, "isRegionalized" : true }, + "health" : { + "endpoints" : { + "cn-north-1" : { }, + "cn-northwest-1" : { } + } + }, "iam" : { "endpoints" : { "aws-cn-global" : { @@ -4476,6 +4557,12 @@ "endpoints" : { "cn-northwest-1" : { } } + }, + "xray" : { + "endpoints" : { + "cn-north-1" : { }, + "cn-northwest-1" : { } + } } } }, { @@ -5267,7 +5354,6 @@ }, "application-autoscaling" : { "defaults" : { - "hostname" : "autoscaling.us-iso-east-1.c2s.ic.gov", "protocols" : [ "http", "https" ] }, "endpoints" : { @@ -5537,7 +5623,6 @@ "services" : { "application-autoscaling" : { "defaults" : { - "hostname" : "autoscaling.us-isob-east-1.sc2s.sgov.gov", "protocols" : [ "http", "https" ] }, "endpoints" : { diff --git a/private/model/api/api.go b/private/model/api/api.go index f4773f5ba80..ac92b507bb4 100644 --- a/private/model/api/api.go +++ b/private/model/api/api.go @@ -600,6 +600,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, svc.Handlers.UnmarshalMeta.PushBackNamed({{ .ProtocolPackage }}.UnmarshalMetaHandler) svc.Handlers.UnmarshalError.PushBackNamed({{ .ProtocolPackage }}.UnmarshalErrorHandler) {{ if .HasEventStream }} + svc.Handlers.BuildStream.PushBackNamed({{ .ProtocolPackage }}.BuildHandler) svc.Handlers.UnmarshalStream.PushBackNamed({{ .ProtocolPackage }}.UnmarshalHandler) {{ end }} diff --git a/private/model/api/codegentest/service/restjsonservice/api.go b/private/model/api/codegentest/service/restjsonservice/api.go index 7cdc21a791d..a7fd8d1590a 100644 --- a/private/model/api/codegentest/service/restjsonservice/api.go +++ b/private/model/api/codegentest/service/restjsonservice/api.go @@ -7,7 +7,6 @@ import ( "fmt" "io" "sync" - "sync/atomic" "time" "github.com/aws/aws-sdk-go/aws" @@ -61,9 +60,14 @@ func (c *RESTJSONService) EmptyStreamRequest(input *EmptyStreamInput) (req *requ output = &EmptyStreamOutput{} req = c.newRequest(op, input, output) + + es := newEmptyStreamEventStream() + output.eventStream = es + req.Handlers.Send.Swap(client.LogHTTPResponseHandler.Name, client.LogHTTPResponseHeaderHandler) req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, rest.UnmarshalHandler) - req.Handlers.Unmarshal.PushBack(output.runEventStreamLoop) + req.Handlers.Unmarshal.PushBack(es.runOutputStream) + req.Handlers.Unmarshal.PushBack(es.runOnStreamPartClose) return } @@ -97,6 +101,124 @@ func (c *RESTJSONService) EmptyStreamWithContext(ctx aws.Context, input *EmptySt return out, req.Send() } +// EmptyStreamEventStream provides the event stream handling for the EmptyStream. +type EmptyStreamEventStream struct { + + // Reader is the EventStream reader for the EmptyEventStream + // events. This value is automatically set by the SDK when the API call is made + // Use this member when unit testing your code with the SDK to mock out the + // EventStream Reader. + // + // Must not be nil. + Reader EmptyEventStreamReader + + outputReader io.ReadCloser + + done chan struct{} + closeOnce sync.Once + err *eventstreamapi.OnceError +} + +func newEmptyStreamEventStream() *EmptyStreamEventStream { + return &EmptyStreamEventStream{ + done: make(chan struct{}), + err: eventstreamapi.NewOnceError(), + } +} + +func (es *EmptyStreamEventStream) runOnStreamPartClose(r *request.Request) { + if es.done == nil { + return + } + go es.waitStreamPartClose() + +} + +func (es *EmptyStreamEventStream) waitStreamPartClose() { + var outputErrCh <-chan struct{} + if v, ok := es.Reader.(interface{ ErrorSet() <-chan struct{} }); ok { + outputErrCh = v.ErrorSet() + } + var outputClosedCh <-chan struct{} + if v, ok := es.Reader.(interface{ Closed() <-chan struct{} }); ok { + outputClosedCh = v.Closed() + } + + select { + case <-es.done: + case <-outputErrCh: + es.err.SetError(es.Reader.Err()) + es.Close() + case <-outputClosedCh: + if err := es.Reader.Err(); err != nil { + es.err.SetError(es.Reader.Err()) + } + es.Close() + } +} + +// Events returns a channel to read events from. +// +// These events are: +// +func (es *EmptyStreamEventStream) Events() <-chan EmptyEventStreamEvent { + return es.Reader.Events() +} + +func (es *EmptyStreamEventStream) runOutputStream(r *request.Request) { + var opts []func(*eventstream.Decoder) + if r.Config.Logger != nil && r.Config.LogLevel.Matches(aws.LogDebugWithEventStreamBody) { + opts = append(opts, eventstream.DecodeWithLogger(r.Config.Logger)) + } + + decoder := eventstream.NewDecoder(r.HTTPResponse.Body, opts...) + eventReader := eventstreamapi.NewEventReader(decoder, + protocol.HandlerPayloadUnmarshal{ + Unmarshalers: r.Handlers.UnmarshalStream, + }, + unmarshalerForEmptyEventStreamEvent, + ) + + es.outputReader = r.HTTPResponse.Body + es.Reader = newReadEmptyEventStream(eventReader) +} + +// Close closes the stream. This will also cause the stream to be closed. +// Close must be called when done using the stream API. Not calling Close +// may result in resource leaks. +// +// You can use the closing of the Reader's Events channel to terminate your +// application's read from the API's stream. +// +func (es *EmptyStreamEventStream) Close() (err error) { + es.closeOnce.Do(es.safeClose) + return es.Err() +} + +func (es *EmptyStreamEventStream) safeClose() { + if es.done != nil { + close(es.done) + } + + es.Reader.Close() + if es.outputReader != nil { + es.outputReader.Close() + } +} + +// Err returns any error that occurred while reading or writing EventStream +// Events from the service API's response. Returns nil if there were no errors. +func (es *EmptyStreamEventStream) Err() error { + if err := es.err.Err(); err != nil { + return err + } + if err := es.Reader.Err(); err != nil { + return err + } + + return nil +} + const opGetEventStream = "GetEventStream" // GetEventStreamRequest generates a "aws/request.Request" representing the @@ -136,9 +258,14 @@ func (c *RESTJSONService) GetEventStreamRequest(input *GetEventStreamInput) (req output = &GetEventStreamOutput{} req = c.newRequest(op, input, output) + + es := newGetEventStreamEventStream() + output.eventStream = es + req.Handlers.Send.Swap(client.LogHTTPResponseHandler.Name, client.LogHTTPResponseHeaderHandler) req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, rest.UnmarshalHandler) - req.Handlers.Unmarshal.PushBack(output.runEventStreamLoop) + req.Handlers.Unmarshal.PushBack(es.runOutputStream) + req.Handlers.Unmarshal.PushBack(es.runOnStreamPartClose) return } @@ -172,6 +299,131 @@ func (c *RESTJSONService) GetEventStreamWithContext(ctx aws.Context, input *GetE return out, req.Send() } +// GetEventStreamEventStream provides the event stream handling for the GetEventStream. +type GetEventStreamEventStream struct { + + // Reader is the EventStream reader for the EventStream + // events. This value is automatically set by the SDK when the API call is made + // Use this member when unit testing your code with the SDK to mock out the + // EventStream Reader. + // + // Must not be nil. + Reader EventStreamReader + + outputReader io.ReadCloser + + done chan struct{} + closeOnce sync.Once + err *eventstreamapi.OnceError +} + +func newGetEventStreamEventStream() *GetEventStreamEventStream { + return &GetEventStreamEventStream{ + done: make(chan struct{}), + err: eventstreamapi.NewOnceError(), + } +} + +func (es *GetEventStreamEventStream) runOnStreamPartClose(r *request.Request) { + if es.done == nil { + return + } + go es.waitStreamPartClose() + +} + +func (es *GetEventStreamEventStream) waitStreamPartClose() { + var outputErrCh <-chan struct{} + if v, ok := es.Reader.(interface{ ErrorSet() <-chan struct{} }); ok { + outputErrCh = v.ErrorSet() + } + var outputClosedCh <-chan struct{} + if v, ok := es.Reader.(interface{ Closed() <-chan struct{} }); ok { + outputClosedCh = v.Closed() + } + + select { + case <-es.done: + case <-outputErrCh: + es.err.SetError(es.Reader.Err()) + es.Close() + case <-outputClosedCh: + if err := es.Reader.Err(); err != nil { + es.err.SetError(es.Reader.Err()) + } + es.Close() + } +} + +// Events returns a channel to read events from. +// +// These events are: +// +// * EmptyEvent +// * ExplicitPayloadEvent +// * HeaderOnlyEvent +// * ImplicitPayloadEvent +// * PayloadOnlyEvent +// * PayloadOnlyBlobEvent +// * PayloadOnlyStringEvent +func (es *GetEventStreamEventStream) Events() <-chan EventStreamEvent { + return es.Reader.Events() +} + +func (es *GetEventStreamEventStream) runOutputStream(r *request.Request) { + var opts []func(*eventstream.Decoder) + if r.Config.Logger != nil && r.Config.LogLevel.Matches(aws.LogDebugWithEventStreamBody) { + opts = append(opts, eventstream.DecodeWithLogger(r.Config.Logger)) + } + + decoder := eventstream.NewDecoder(r.HTTPResponse.Body, opts...) + eventReader := eventstreamapi.NewEventReader(decoder, + protocol.HandlerPayloadUnmarshal{ + Unmarshalers: r.Handlers.UnmarshalStream, + }, + unmarshalerForEventStreamEvent, + ) + + es.outputReader = r.HTTPResponse.Body + es.Reader = newReadEventStream(eventReader) +} + +// Close closes the stream. This will also cause the stream to be closed. +// Close must be called when done using the stream API. Not calling Close +// may result in resource leaks. +// +// You can use the closing of the Reader's Events channel to terminate your +// application's read from the API's stream. +// +func (es *GetEventStreamEventStream) Close() (err error) { + es.closeOnce.Do(es.safeClose) + return es.Err() +} + +func (es *GetEventStreamEventStream) safeClose() { + if es.done != nil { + close(es.done) + } + + es.Reader.Close() + if es.outputReader != nil { + es.outputReader.Close() + } +} + +// Err returns any error that occurred while reading or writing EventStream +// Events from the service API's response. Returns nil if there were no errors. +func (es *GetEventStreamEventStream) Err() error { + if err := es.err.Err(); err != nil { + return err + } + if err := es.Reader.Err(); err != nil { + return err + } + + return nil +} + const opOtherOperation = "OtherOperation" // OtherOperationRequest generates a "aws/request.Request" representing the @@ -275,153 +527,89 @@ func (s *EmptyEvent) UnmarshalEvent( return nil } -// EmptyStreamEventStream provides handling of EventStreams for -// the EmptyStream API. -// -// Use this type to receive EmptyEventStream events. The events -// can be read from the Events channel member. -// -// The events that can be received are: -// -type EmptyStreamEventStream struct { - // Reader is the EventStream reader for the EmptyEventStream - // events. This value is automatically set by the SDK when the API call is made - // Use this member when unit testing your code with the SDK to mock out the - // EventStream Reader. - // - // Must not be nil. - Reader EmptyStreamEventStreamReader - - // StreamCloser is the io.Closer for the EventStream connection. For HTTP - // EventStream this is the response Body. The stream will be closed when - // the Close method of the EventStream is called. - StreamCloser io.Closer -} - -// Close closes the EventStream. This will also cause the Events channel to be -// closed. You can use the closing of the Events channel to terminate your -// application's read from the API's EventStream. -// -// Will close the underlying EventStream reader. For EventStream over HTTP -// connection this will also close the HTTP connection. -// -// Close must be called when done using the EventStream API. Not calling Close -// may result in resource leaks. -func (es *EmptyStreamEventStream) Close() (err error) { - es.Reader.Close() - es.StreamCloser.Close() - - return es.Err() -} - -// Err returns any error that occurred while reading EventStream Events from -// the service API's response. Returns nil if there were no errors. -func (es *EmptyStreamEventStream) Err() error { - if err := es.Reader.Err(); err != nil { - return err - } - return nil -} - -// Events returns a channel to read EventStream Events from the -// EmptyStream API. -// -// These events are: -// -func (es *EmptyStreamEventStream) Events() <-chan EmptyEventStreamEvent { - return es.Reader.Events() +func (s *EmptyEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + return msg, err } // EmptyEventStreamEvent groups together all EventStream -// events read from the EmptyStream API. +// events writes for EmptyEventStream. // // These events are: // type EmptyEventStreamEvent interface { eventEmptyEventStream() + eventstreamapi.Marshaler + eventstreamapi.Unmarshaler } -// EmptyStreamEventStreamReader provides the interface for reading EventStream -// Events from the EmptyStream API. The -// default implementation for this interface will be EmptyStreamEventStream. +// EmptyEventStreamReader provides the interface for reading to the stream. The +// default implementation for this interface will be EmptyEventStream. // // The reader's Close method must allow multiple concurrent calls. // // These events are: // -type EmptyStreamEventStreamReader interface { +type EmptyEventStreamReader interface { // Returns a channel of events as they are read from the event stream. Events() <-chan EmptyEventStreamEvent - // Close will close the underlying event stream reader. For event stream over - // HTTP this will also close the HTTP connection. + // Close will stop the reader reading events from the stream. Close() error // Returns any error that has occurred while reading from the event stream. Err() error } -type readEmptyStreamEventStream struct { +type readEmptyEventStream struct { eventReader *eventstreamapi.EventReader stream chan EmptyEventStreamEvent - errVal atomic.Value + err *eventstreamapi.OnceError done chan struct{} closeOnce sync.Once } -func newReadEmptyStreamEventStream( - reader io.ReadCloser, - unmarshalers request.HandlerList, - logger aws.Logger, - logLevel aws.LogLevelType, -) *readEmptyStreamEventStream { - r := &readEmptyStreamEventStream{ - stream: make(chan EmptyEventStreamEvent), - done: make(chan struct{}), +func newReadEmptyEventStream(eventReader *eventstreamapi.EventReader) *readEmptyEventStream { + r := &readEmptyEventStream{ + eventReader: eventReader, + stream: make(chan EmptyEventStreamEvent), + done: make(chan struct{}), + err: eventstreamapi.NewOnceError(), } - - r.eventReader = eventstreamapi.NewEventReader( - reader, - protocol.HandlerPayloadUnmarshal{ - Unmarshalers: unmarshalers, - }, - r.unmarshalerForEventType, - ) - r.eventReader.UseLogger(logger, logLevel) + go r.readEventStream() return r } -// Close will close the underlying event stream reader. For EventStream over -// HTTP this will also close the HTTP connection. -func (r *readEmptyStreamEventStream) Close() error { +// Close will close the underlying event stream reader. +func (r *readEmptyEventStream) Close() error { r.closeOnce.Do(r.safeClose) - return r.Err() } -func (r *readEmptyStreamEventStream) safeClose() { - close(r.done) - err := r.eventReader.Close() - if err != nil { - r.errVal.Store(err) - } +func (r *readEmptyEventStream) ErrorSet() <-chan struct{} { + return r.err.ErrorSet() } -func (r *readEmptyStreamEventStream) Err() error { - if v := r.errVal.Load(); v != nil { - return v.(error) - } +func (r *readEmptyEventStream) Closed() <-chan struct{} { + return r.done +} - return nil +func (r *readEmptyEventStream) safeClose() { + close(r.done) } -func (r *readEmptyStreamEventStream) Events() <-chan EmptyEventStreamEvent { +func (r *readEmptyEventStream) Err() error { + return r.err.Err() +} + +func (r *readEmptyEventStream) Events() <-chan EmptyEventStreamEvent { return r.stream } -func (r *readEmptyStreamEventStream) readEventStream() { +func (r *readEmptyEventStream) readEventStream() { + defer r.Close() defer close(r.stream) for { @@ -436,7 +624,7 @@ func (r *readEmptyStreamEventStream) readEventStream() { return default: } - r.errVal.Store(err) + r.err.SetError(err) return } @@ -448,14 +636,12 @@ func (r *readEmptyStreamEventStream) readEventStream() { } } -func (r *readEmptyStreamEventStream) unmarshalerForEventType( - eventType string, -) (eventstreamapi.Unmarshaler, error) { +func unmarshalerForEmptyEventStreamEvent(eventType string) (eventstreamapi.Unmarshaler, error) { switch eventType { default: return nil, awserr.New( request.ErrCodeSerialization, - fmt.Sprintf("unknown event type name, %s, for EmptyStreamEventStream", eventType), + fmt.Sprintf("unknown event type name, %s, for EmptyEventStream", eventType), nil, ) } @@ -478,8 +664,7 @@ func (s EmptyStreamInput) GoString() string { type EmptyStreamOutput struct { _ struct{} `type:"structure"` - // Use EventStream to use the API's stream. - EventStream *EmptyStreamEventStream `type:"structure"` + eventStream *EmptyStreamEventStream } // String returns the string representation @@ -492,29 +677,156 @@ func (s EmptyStreamOutput) GoString() string { return s.String() } -// SetEventStream sets the EventStream field's value. -func (s *EmptyStreamOutput) SetEventStream(v *EmptyStreamEventStream) *EmptyStreamOutput { - s.EventStream = v - return s +// GetStream returns the type to interact with the event stream. +func (s *EmptyStreamOutput) GetStream() *EmptyStreamEventStream { + return s.eventStream } -func (s *EmptyStreamOutput) runEventStreamLoop(r *request.Request) { - if r.Error != nil { - return +// EventStreamEvent groups together all EventStream +// events writes for EventStream. +// +// These events are: +// +// * EmptyEvent +// * ExplicitPayloadEvent +// * HeaderOnlyEvent +// * ImplicitPayloadEvent +// * PayloadOnlyEvent +// * PayloadOnlyBlobEvent +// * PayloadOnlyStringEvent +type EventStreamEvent interface { + eventEventStream() + eventstreamapi.Marshaler + eventstreamapi.Unmarshaler +} + +// EventStreamReader provides the interface for reading to the stream. The +// default implementation for this interface will be EventStream. +// +// The reader's Close method must allow multiple concurrent calls. +// +// These events are: +// +// * EmptyEvent +// * ExplicitPayloadEvent +// * HeaderOnlyEvent +// * ImplicitPayloadEvent +// * PayloadOnlyEvent +// * PayloadOnlyBlobEvent +// * PayloadOnlyStringEvent +type EventStreamReader interface { + // Returns a channel of events as they are read from the event stream. + Events() <-chan EventStreamEvent + + // Close will stop the reader reading events from the stream. + Close() error + + // Returns any error that has occurred while reading from the event stream. + Err() error +} + +type readEventStream struct { + eventReader *eventstreamapi.EventReader + stream chan EventStreamEvent + err *eventstreamapi.OnceError + + done chan struct{} + closeOnce sync.Once +} + +func newReadEventStream(eventReader *eventstreamapi.EventReader) *readEventStream { + r := &readEventStream{ + eventReader: eventReader, + stream: make(chan EventStreamEvent), + done: make(chan struct{}), + err: eventstreamapi.NewOnceError(), } - reader := newReadEmptyStreamEventStream( - r.HTTPResponse.Body, - r.Handlers.UnmarshalStream, - r.Config.Logger, - r.Config.LogLevel.Value(), - ) - go reader.readEventStream() + go r.readEventStream() + + return r +} + +// Close will close the underlying event stream reader. +func (r *readEventStream) Close() error { + r.closeOnce.Do(r.safeClose) + return r.Err() +} + +func (r *readEventStream) ErrorSet() <-chan struct{} { + return r.err.ErrorSet() +} + +func (r *readEventStream) Closed() <-chan struct{} { + return r.done +} + +func (r *readEventStream) safeClose() { + close(r.done) +} + +func (r *readEventStream) Err() error { + return r.err.Err() +} - eventStream := &EmptyStreamEventStream{ - StreamCloser: r.HTTPResponse.Body, - Reader: reader, +func (r *readEventStream) Events() <-chan EventStreamEvent { + return r.stream +} + +func (r *readEventStream) readEventStream() { + defer r.Close() + defer close(r.stream) + + for { + event, err := r.eventReader.ReadEvent() + if err != nil { + if err == io.EOF { + return + } + select { + case <-r.done: + // If closed already ignore the error + return + default: + } + r.err.SetError(err) + return + } + + select { + case r.stream <- event.(EventStreamEvent): + case <-r.done: + return + } + } +} + +func unmarshalerForEventStreamEvent(eventType string) (eventstreamapi.Unmarshaler, error) { + switch eventType { + case "Empty": + return &EmptyEvent{}, nil + case "ExplicitPayload": + return &ExplicitPayloadEvent{}, nil + case "Headers": + return &HeaderOnlyEvent{}, nil + case "ImplicitPayload": + return &ImplicitPayloadEvent{}, nil + case "PayloadOnly": + return &PayloadOnlyEvent{}, nil + case "PayloadOnlyBlob": + return &PayloadOnlyBlobEvent{}, nil + case "PayloadOnlyString": + return &PayloadOnlyStringEvent{}, nil + case "Exception": + return &ExceptionEvent{}, nil + case "Exception2": + return &ExceptionEvent2{}, nil + default: + return nil, awserr.New( + request.ErrCodeSerialization, + fmt.Sprintf("unknown event type name, %s, for EventStream", eventType), + nil, + ) } - s.EventStream = eventStream } type ExceptionEvent struct { @@ -552,6 +864,16 @@ func (s *ExceptionEvent) UnmarshalEvent( return nil } +func (s *ExceptionEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + // Code returns the exception type name. func (s ExceptionEvent) Code() string { return "ExceptionEvent" @@ -597,6 +919,11 @@ func (s *ExceptionEvent2) UnmarshalEvent( return nil } +func (s *ExceptionEvent2) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType)) + return msg, err +} + // Code returns the exception type name. func (s ExceptionEvent2) Code() string { return "ExceptionEvent2" @@ -679,244 +1006,16 @@ func (s *ExplicitPayloadEvent) UnmarshalEvent( return nil } -// GetEventStreamEventStream provides handling of EventStreams for -// the GetEventStream API. -// -// Use this type to receive EventStream events. The events -// can be read from the Events channel member. -// -// The events that can be received are: -// -// * EmptyEvent -// * ExplicitPayloadEvent -// * HeaderOnlyEvent -// * ImplicitPayloadEvent -// * PayloadOnlyEvent -// * PayloadOnlyBlobEvent -// * PayloadOnlyStringEvent -type GetEventStreamEventStream struct { - // Reader is the EventStream reader for the EventStream - // events. This value is automatically set by the SDK when the API call is made - // Use this member when unit testing your code with the SDK to mock out the - // EventStream Reader. - // - // Must not be nil. - Reader GetEventStreamEventStreamReader - - // StreamCloser is the io.Closer for the EventStream connection. For HTTP - // EventStream this is the response Body. The stream will be closed when - // the Close method of the EventStream is called. - StreamCloser io.Closer -} - -// Close closes the EventStream. This will also cause the Events channel to be -// closed. You can use the closing of the Events channel to terminate your -// application's read from the API's EventStream. -// -// Will close the underlying EventStream reader. For EventStream over HTTP -// connection this will also close the HTTP connection. -// -// Close must be called when done using the EventStream API. Not calling Close -// may result in resource leaks. -func (es *GetEventStreamEventStream) Close() (err error) { - es.Reader.Close() - es.StreamCloser.Close() - - return es.Err() -} - -// Err returns any error that occurred while reading EventStream Events from -// the service API's response. Returns nil if there were no errors. -func (es *GetEventStreamEventStream) Err() error { - if err := es.Reader.Err(); err != nil { - return err - } - return nil -} - -// Events returns a channel to read EventStream Events from the -// GetEventStream API. -// -// These events are: -// -// * EmptyEvent -// * ExplicitPayloadEvent -// * HeaderOnlyEvent -// * ImplicitPayloadEvent -// * PayloadOnlyEvent -// * PayloadOnlyBlobEvent -// * PayloadOnlyStringEvent -func (es *GetEventStreamEventStream) Events() <-chan EventStreamEvent { - return es.Reader.Events() -} - -// EventStreamEvent groups together all EventStream -// events read from the GetEventStream API. -// -// These events are: -// -// * EmptyEvent -// * ExplicitPayloadEvent -// * HeaderOnlyEvent -// * ImplicitPayloadEvent -// * PayloadOnlyEvent -// * PayloadOnlyBlobEvent -// * PayloadOnlyStringEvent -type EventStreamEvent interface { - eventEventStream() -} - -// GetEventStreamEventStreamReader provides the interface for reading EventStream -// Events from the GetEventStream API. The -// default implementation for this interface will be GetEventStreamEventStream. -// -// The reader's Close method must allow multiple concurrent calls. -// -// These events are: -// -// * EmptyEvent -// * ExplicitPayloadEvent -// * HeaderOnlyEvent -// * ImplicitPayloadEvent -// * PayloadOnlyEvent -// * PayloadOnlyBlobEvent -// * PayloadOnlyStringEvent -type GetEventStreamEventStreamReader interface { - // Returns a channel of events as they are read from the event stream. - Events() <-chan EventStreamEvent - - // Close will close the underlying event stream reader. For event stream over - // HTTP this will also close the HTTP connection. - Close() error - - // Returns any error that has occurred while reading from the event stream. - Err() error -} - -type readGetEventStreamEventStream struct { - eventReader *eventstreamapi.EventReader - stream chan EventStreamEvent - errVal atomic.Value - - done chan struct{} - closeOnce sync.Once -} - -func newReadGetEventStreamEventStream( - reader io.ReadCloser, - unmarshalers request.HandlerList, - logger aws.Logger, - logLevel aws.LogLevelType, -) *readGetEventStreamEventStream { - r := &readGetEventStreamEventStream{ - stream: make(chan EventStreamEvent), - done: make(chan struct{}), - } - - r.eventReader = eventstreamapi.NewEventReader( - reader, - protocol.HandlerPayloadUnmarshal{ - Unmarshalers: unmarshalers, - }, - r.unmarshalerForEventType, - ) - r.eventReader.UseLogger(logger, logLevel) - - return r -} - -// Close will close the underlying event stream reader. For EventStream over -// HTTP this will also close the HTTP connection. -func (r *readGetEventStreamEventStream) Close() error { - r.closeOnce.Do(r.safeClose) - - return r.Err() -} - -func (r *readGetEventStreamEventStream) safeClose() { - close(r.done) - err := r.eventReader.Close() - if err != nil { - r.errVal.Store(err) - } -} - -func (r *readGetEventStreamEventStream) Err() error { - if v := r.errVal.Load(); v != nil { - return v.(error) - } - - return nil -} - -func (r *readGetEventStreamEventStream) Events() <-chan EventStreamEvent { - return r.stream -} - -func (r *readGetEventStreamEventStream) readEventStream() { - defer close(r.stream) - - for { - event, err := r.eventReader.ReadEvent() - if err != nil { - if err == io.EOF { - return - } - select { - case <-r.done: - // If closed already ignore the error - return - default: - } - r.errVal.Store(err) - return - } - - select { - case r.stream <- event.(EventStreamEvent): - case <-r.done: - return - } - } -} - -func (r *readGetEventStreamEventStream) unmarshalerForEventType( - eventType string, -) (eventstreamapi.Unmarshaler, error) { - switch eventType { - case "Empty": - return &EmptyEvent{}, nil - - case "ExplicitPayload": - return &ExplicitPayloadEvent{}, nil - - case "Headers": - return &HeaderOnlyEvent{}, nil - - case "ImplicitPayload": - return &ImplicitPayloadEvent{}, nil - - case "PayloadOnly": - return &PayloadOnlyEvent{}, nil - - case "PayloadOnlyBlob": - return &PayloadOnlyBlobEvent{}, nil - - case "PayloadOnlyString": - return &PayloadOnlyStringEvent{}, nil - - case "Exception": - return &ExceptionEvent{}, nil - - case "Exception2": - return &ExceptionEvent2{}, nil - default: - return nil, awserr.New( - request.ErrCodeSerialization, - fmt.Sprintf("unknown event type name, %s, for GetEventStreamEventStream", eventType), - nil, - ) +func (s *ExplicitPayloadEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + msg.Headers.Set("LongVal", eventstream.Int64Value(*s.LongVal)) + msg.Headers.Set("StringVal", eventstream.StringValue(*s.StringVal)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err } + msg.Payload = buf.Bytes() + return msg, err } type GetEventStreamInput struct { @@ -944,8 +1043,7 @@ func (s *GetEventStreamInput) SetInputVal(v string) *GetEventStreamInput { type GetEventStreamOutput struct { _ struct{} `type:"structure"` - // Use EventStream to use the API's stream. - EventStream *GetEventStreamEventStream `type:"structure"` + eventStream *GetEventStreamEventStream IntVal *int64 `type:"integer"` @@ -962,12 +1060,6 @@ func (s GetEventStreamOutput) GoString() string { return s.String() } -// SetEventStream sets the EventStream field's value. -func (s *GetEventStreamOutput) SetEventStream(v *GetEventStreamEventStream) *GetEventStreamOutput { - s.EventStream = v - return s -} - // SetIntVal sets the IntVal field's value. func (s *GetEventStreamOutput) SetIntVal(v int64) *GetEventStreamOutput { s.IntVal = &v @@ -980,23 +1072,9 @@ func (s *GetEventStreamOutput) SetStrVal(v string) *GetEventStreamOutput { return s } -func (s *GetEventStreamOutput) runEventStreamLoop(r *request.Request) { - if r.Error != nil { - return - } - reader := newReadGetEventStreamEventStream( - r.HTTPResponse.Body, - r.Handlers.UnmarshalStream, - r.Config.Logger, - r.Config.LogLevel.Value(), - ) - go reader.readEventStream() - - eventStream := &GetEventStreamEventStream{ - StreamCloser: r.HTTPResponse.Body, - Reader: reader, - } - s.EventStream = eventStream +// GetStream returns the type to interact with the event stream. +func (s *GetEventStreamOutput) GetStream() *GetEventStreamEventStream { + return s.eventStream } type HeaderOnlyEvent struct { @@ -1125,6 +1203,19 @@ func (s *HeaderOnlyEvent) UnmarshalEvent( return nil } +func (s *HeaderOnlyEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + msg.Headers.Set("BlobVal", eventstream.BytesValue(s.BlobVal)) + msg.Headers.Set("BoolVal", eventstream.BoolValue(*s.BoolVal)) + msg.Headers.Set("ByteVal", eventstream.Int8Value(int8(*s.ByteVal))) + msg.Headers.Set("IntegerVal", eventstream.Int32Value(int32(*s.IntegerVal))) + msg.Headers.Set("LongVal", eventstream.Int64Value(*s.LongVal)) + msg.Headers.Set("ShortVal", eventstream.Int16Value(int16(*s.ShortVal))) + msg.Headers.Set("StringVal", eventstream.StringValue(*s.StringVal)) + msg.Headers.Set("TimeVal", eventstream.TimestampValue(*s.TimeVal)) + return msg, err +} + type ImplicitPayloadEvent struct { _ struct{} `type:"structure"` @@ -1185,6 +1276,17 @@ func (s *ImplicitPayloadEvent) UnmarshalEvent( return nil } +func (s *ImplicitPayloadEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + msg.Headers.Set("ByteVal", eventstream.Int8Value(int8(*s.ByteVal))) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + type NestedShape struct { _ struct{} `type:"structure"` @@ -1280,6 +1382,13 @@ func (s *PayloadOnlyBlobEvent) UnmarshalEvent( return nil } +func (s *PayloadOnlyBlobEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + msg.Headers.Set(":content-type", eventstream.StringValue("application/octet-stream")) + msg.Payload = s.BlobPayload + return msg, err +} + type PayloadOnlyEvent struct { _ struct{} `type:"structure" payload:"NestedVal"` @@ -1319,6 +1428,16 @@ func (s *PayloadOnlyEvent) UnmarshalEvent( return nil } +func (s *PayloadOnlyEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + type PayloadOnlyStringEvent struct { _ struct{} `type:"structure" payload:"StringPayload"` @@ -1353,3 +1472,9 @@ func (s *PayloadOnlyStringEvent) UnmarshalEvent( s.StringPayload = aws.String(string(msg.Payload)) return nil } + +func (s *PayloadOnlyStringEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + msg.Payload = []byte(aws.StringValue(s.StringPayload)) + return msg, err +} diff --git a/private/model/api/codegentest/service/restjsonservice/eventstream_test.go b/private/model/api/codegentest/service/restjsonservice/eventstream_test.go index b9a2023862c..2b46fcd13e9 100644 --- a/private/model/api/codegentest/service/restjsonservice/eventstream_test.go +++ b/private/model/api/codegentest/service/restjsonservice/eventstream_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.6 +// +build go1.10 package restjsonservice @@ -46,10 +46,10 @@ func TestEmptyStream_Read(t *testing.T) { if err != nil { t.Fatalf("expect no error got, %v", err) } - defer resp.EventStream.Close() + defer resp.GetStream().Close() var i int - for event := range resp.EventStream.Events() { + for event := range resp.GetStream().Events() { if event == nil { t.Errorf("%d, expect event, got nil", i) } @@ -59,7 +59,7 @@ func TestEmptyStream_Read(t *testing.T) { i++ } - if err := resp.EventStream.Err(); err != nil { + if err := resp.GetStream().Err(); err != nil { t.Errorf("expect no error, %v", err) } } @@ -84,10 +84,10 @@ func TestEmptyStream_ReadClose(t *testing.T) { t.Fatalf("expect no error got, %v", err) } - resp.EventStream.Close() - <-resp.EventStream.Events() + resp.GetStream().Close() + <-resp.GetStream().Events() - if err := resp.EventStream.Err(); err != nil { + if err := resp.GetStream().Err(); err != nil { t.Errorf("expect no error, %v", err) } } @@ -125,16 +125,16 @@ func BenchmarkEmptyStream_Read(b *testing.B) { if err != nil { b.Fatalf("failed to create request, %v", err) } - defer resp.EventStream.Close() + defer resp.GetStream().Close() b.ResetTimer() for i := 0; i < b.N; i++ { - if err = resp.EventStream.Err(); err != nil { + if err = resp.GetStream().Err(); err != nil { b.Fatalf("expect no error, got %v", err) } - event := <-resp.EventStream.Events() + event := <-resp.GetStream().Events() if event == nil { - b.Fatalf("expect event, got nil, %v, %d", resp.EventStream.Err(), i) + b.Fatalf("expect event, got nil, %v, %d", resp.GetStream().Err(), i) } } } @@ -176,10 +176,10 @@ func TestGetEventStream_Read(t *testing.T) { if err != nil { t.Fatalf("expect no error got, %v", err) } - defer resp.EventStream.Close() + defer resp.GetStream().Close() var i int - for event := range resp.EventStream.Events() { + for event := range resp.GetStream().Events() { if event == nil { t.Errorf("%d, expect event, got nil", i) } @@ -189,7 +189,7 @@ func TestGetEventStream_Read(t *testing.T) { i++ } - if err := resp.EventStream.Err(); err != nil { + if err := resp.GetStream().Err(); err != nil { t.Errorf("expect no error, %v", err) } } @@ -215,19 +215,19 @@ func TestGetEventStream_ReadClose(t *testing.T) { } // Assert calling Err before close does not close the stream. - resp.EventStream.Err() + resp.GetStream().Err() select { - case _, ok := <-resp.EventStream.Events(): + case _, ok := <-resp.GetStream().Events(): if !ok { t.Fatalf("expect stream not to be closed, but was") } default: } - resp.EventStream.Close() - <-resp.EventStream.Events() + resp.GetStream().Close() + <-resp.GetStream().Events() - if err := resp.EventStream.Err(); err != nil { + if err := resp.GetStream().Err(); err != nil { t.Errorf("expect no error, %v", err) } } @@ -265,16 +265,16 @@ func BenchmarkGetEventStream_Read(b *testing.B) { if err != nil { b.Fatalf("failed to create request, %v", err) } - defer resp.EventStream.Close() + defer resp.GetStream().Close() b.ResetTimer() for i := 0; i < b.N; i++ { - if err = resp.EventStream.Err(); err != nil { + if err = resp.GetStream().Err(); err != nil { b.Fatalf("expect no error, got %v", err) } - event := <-resp.EventStream.Events() + event := <-resp.GetStream().Events() if event == nil { - b.Fatalf("expect event, got nil, %v, %d", resp.EventStream.Err(), i) + b.Fatalf("expect event, got nil, %v, %d", resp.GetStream().Err(), i) } } } @@ -491,11 +491,11 @@ func TestGetEventStream_ReadException(t *testing.T) { t.Fatalf("expect no error got, %v", err) } - defer resp.EventStream.Close() + defer resp.GetStream().Close() - <-resp.EventStream.Events() + <-resp.GetStream().Events() - err = resp.EventStream.Err() + err = resp.GetStream().Err() if err == nil { t.Fatalf("expect err, got none") } diff --git a/private/model/api/codegentest/service/restjsonservice/service.go b/private/model/api/codegentest/service/restjsonservice/service.go index e206f6f33b5..f6a6ae15ddb 100644 --- a/private/model/api/codegentest/service/restjsonservice/service.go +++ b/private/model/api/codegentest/service/restjsonservice/service.go @@ -76,6 +76,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) + svc.Handlers.BuildStream.PushBackNamed(restjson.BuildHandler) svc.Handlers.UnmarshalStream.PushBackNamed(restjson.UnmarshalHandler) // Run custom client initialization if present diff --git a/private/model/api/codegentest/service/restxmlservice/api.go b/private/model/api/codegentest/service/restxmlservice/api.go index b9b9b3ca01c..81c2a20aa6d 100644 --- a/private/model/api/codegentest/service/restxmlservice/api.go +++ b/private/model/api/codegentest/service/restxmlservice/api.go @@ -7,7 +7,6 @@ import ( "fmt" "io" "sync" - "sync/atomic" "time" "github.com/aws/aws-sdk-go/aws" @@ -61,9 +60,14 @@ func (c *RESTXMLService) EmptyStreamRequest(input *EmptyStreamInput) (req *reque output = &EmptyStreamOutput{} req = c.newRequest(op, input, output) + + es := newEmptyStreamEventStream() + output.eventStream = es + req.Handlers.Send.Swap(client.LogHTTPResponseHandler.Name, client.LogHTTPResponseHeaderHandler) req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, rest.UnmarshalHandler) - req.Handlers.Unmarshal.PushBack(output.runEventStreamLoop) + req.Handlers.Unmarshal.PushBack(es.runOutputStream) + req.Handlers.Unmarshal.PushBack(es.runOnStreamPartClose) return } @@ -97,6 +101,124 @@ func (c *RESTXMLService) EmptyStreamWithContext(ctx aws.Context, input *EmptyStr return out, req.Send() } +// EmptyStreamEventStream provides the event stream handling for the EmptyStream. +type EmptyStreamEventStream struct { + + // Reader is the EventStream reader for the EmptyEventStream + // events. This value is automatically set by the SDK when the API call is made + // Use this member when unit testing your code with the SDK to mock out the + // EventStream Reader. + // + // Must not be nil. + Reader EmptyEventStreamReader + + outputReader io.ReadCloser + + done chan struct{} + closeOnce sync.Once + err *eventstreamapi.OnceError +} + +func newEmptyStreamEventStream() *EmptyStreamEventStream { + return &EmptyStreamEventStream{ + done: make(chan struct{}), + err: eventstreamapi.NewOnceError(), + } +} + +func (es *EmptyStreamEventStream) runOnStreamPartClose(r *request.Request) { + if es.done == nil { + return + } + go es.waitStreamPartClose() + +} + +func (es *EmptyStreamEventStream) waitStreamPartClose() { + var outputErrCh <-chan struct{} + if v, ok := es.Reader.(interface{ ErrorSet() <-chan struct{} }); ok { + outputErrCh = v.ErrorSet() + } + var outputClosedCh <-chan struct{} + if v, ok := es.Reader.(interface{ Closed() <-chan struct{} }); ok { + outputClosedCh = v.Closed() + } + + select { + case <-es.done: + case <-outputErrCh: + es.err.SetError(es.Reader.Err()) + es.Close() + case <-outputClosedCh: + if err := es.Reader.Err(); err != nil { + es.err.SetError(es.Reader.Err()) + } + es.Close() + } +} + +// Events returns a channel to read events from. +// +// These events are: +// +func (es *EmptyStreamEventStream) Events() <-chan EmptyEventStreamEvent { + return es.Reader.Events() +} + +func (es *EmptyStreamEventStream) runOutputStream(r *request.Request) { + var opts []func(*eventstream.Decoder) + if r.Config.Logger != nil && r.Config.LogLevel.Matches(aws.LogDebugWithEventStreamBody) { + opts = append(opts, eventstream.DecodeWithLogger(r.Config.Logger)) + } + + decoder := eventstream.NewDecoder(r.HTTPResponse.Body, opts...) + eventReader := eventstreamapi.NewEventReader(decoder, + protocol.HandlerPayloadUnmarshal{ + Unmarshalers: r.Handlers.UnmarshalStream, + }, + unmarshalerForEmptyEventStreamEvent, + ) + + es.outputReader = r.HTTPResponse.Body + es.Reader = newReadEmptyEventStream(eventReader) +} + +// Close closes the stream. This will also cause the stream to be closed. +// Close must be called when done using the stream API. Not calling Close +// may result in resource leaks. +// +// You can use the closing of the Reader's Events channel to terminate your +// application's read from the API's stream. +// +func (es *EmptyStreamEventStream) Close() (err error) { + es.closeOnce.Do(es.safeClose) + return es.Err() +} + +func (es *EmptyStreamEventStream) safeClose() { + if es.done != nil { + close(es.done) + } + + es.Reader.Close() + if es.outputReader != nil { + es.outputReader.Close() + } +} + +// Err returns any error that occurred while reading or writing EventStream +// Events from the service API's response. Returns nil if there were no errors. +func (es *EmptyStreamEventStream) Err() error { + if err := es.err.Err(); err != nil { + return err + } + if err := es.Reader.Err(); err != nil { + return err + } + + return nil +} + const opGetEventStream = "GetEventStream" // GetEventStreamRequest generates a "aws/request.Request" representing the @@ -136,9 +258,14 @@ func (c *RESTXMLService) GetEventStreamRequest(input *GetEventStreamInput) (req output = &GetEventStreamOutput{} req = c.newRequest(op, input, output) + + es := newGetEventStreamEventStream() + output.eventStream = es + req.Handlers.Send.Swap(client.LogHTTPResponseHandler.Name, client.LogHTTPResponseHeaderHandler) req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, rest.UnmarshalHandler) - req.Handlers.Unmarshal.PushBack(output.runEventStreamLoop) + req.Handlers.Unmarshal.PushBack(es.runOutputStream) + req.Handlers.Unmarshal.PushBack(es.runOnStreamPartClose) return } @@ -172,6 +299,131 @@ func (c *RESTXMLService) GetEventStreamWithContext(ctx aws.Context, input *GetEv return out, req.Send() } +// GetEventStreamEventStream provides the event stream handling for the GetEventStream. +type GetEventStreamEventStream struct { + + // Reader is the EventStream reader for the EventStream + // events. This value is automatically set by the SDK when the API call is made + // Use this member when unit testing your code with the SDK to mock out the + // EventStream Reader. + // + // Must not be nil. + Reader EventStreamReader + + outputReader io.ReadCloser + + done chan struct{} + closeOnce sync.Once + err *eventstreamapi.OnceError +} + +func newGetEventStreamEventStream() *GetEventStreamEventStream { + return &GetEventStreamEventStream{ + done: make(chan struct{}), + err: eventstreamapi.NewOnceError(), + } +} + +func (es *GetEventStreamEventStream) runOnStreamPartClose(r *request.Request) { + if es.done == nil { + return + } + go es.waitStreamPartClose() + +} + +func (es *GetEventStreamEventStream) waitStreamPartClose() { + var outputErrCh <-chan struct{} + if v, ok := es.Reader.(interface{ ErrorSet() <-chan struct{} }); ok { + outputErrCh = v.ErrorSet() + } + var outputClosedCh <-chan struct{} + if v, ok := es.Reader.(interface{ Closed() <-chan struct{} }); ok { + outputClosedCh = v.Closed() + } + + select { + case <-es.done: + case <-outputErrCh: + es.err.SetError(es.Reader.Err()) + es.Close() + case <-outputClosedCh: + if err := es.Reader.Err(); err != nil { + es.err.SetError(es.Reader.Err()) + } + es.Close() + } +} + +// Events returns a channel to read events from. +// +// These events are: +// +// * EmptyEvent +// * ExplicitPayloadEvent +// * HeaderOnlyEvent +// * ImplicitPayloadEvent +// * PayloadOnlyEvent +// * PayloadOnlyBlobEvent +// * PayloadOnlyStringEvent +func (es *GetEventStreamEventStream) Events() <-chan EventStreamEvent { + return es.Reader.Events() +} + +func (es *GetEventStreamEventStream) runOutputStream(r *request.Request) { + var opts []func(*eventstream.Decoder) + if r.Config.Logger != nil && r.Config.LogLevel.Matches(aws.LogDebugWithEventStreamBody) { + opts = append(opts, eventstream.DecodeWithLogger(r.Config.Logger)) + } + + decoder := eventstream.NewDecoder(r.HTTPResponse.Body, opts...) + eventReader := eventstreamapi.NewEventReader(decoder, + protocol.HandlerPayloadUnmarshal{ + Unmarshalers: r.Handlers.UnmarshalStream, + }, + unmarshalerForEventStreamEvent, + ) + + es.outputReader = r.HTTPResponse.Body + es.Reader = newReadEventStream(eventReader) +} + +// Close closes the stream. This will also cause the stream to be closed. +// Close must be called when done using the stream API. Not calling Close +// may result in resource leaks. +// +// You can use the closing of the Reader's Events channel to terminate your +// application's read from the API's stream. +// +func (es *GetEventStreamEventStream) Close() (err error) { + es.closeOnce.Do(es.safeClose) + return es.Err() +} + +func (es *GetEventStreamEventStream) safeClose() { + if es.done != nil { + close(es.done) + } + + es.Reader.Close() + if es.outputReader != nil { + es.outputReader.Close() + } +} + +// Err returns any error that occurred while reading or writing EventStream +// Events from the service API's response. Returns nil if there were no errors. +func (es *GetEventStreamEventStream) Err() error { + if err := es.err.Err(); err != nil { + return err + } + if err := es.Reader.Err(); err != nil { + return err + } + + return nil +} + const opOtherOperation = "OtherOperation" // OtherOperationRequest generates a "aws/request.Request" representing the @@ -275,153 +527,89 @@ func (s *EmptyEvent) UnmarshalEvent( return nil } -// EmptyStreamEventStream provides handling of EventStreams for -// the EmptyStream API. -// -// Use this type to receive EmptyEventStream events. The events -// can be read from the Events channel member. -// -// The events that can be received are: -// -type EmptyStreamEventStream struct { - // Reader is the EventStream reader for the EmptyEventStream - // events. This value is automatically set by the SDK when the API call is made - // Use this member when unit testing your code with the SDK to mock out the - // EventStream Reader. - // - // Must not be nil. - Reader EmptyStreamEventStreamReader - - // StreamCloser is the io.Closer for the EventStream connection. For HTTP - // EventStream this is the response Body. The stream will be closed when - // the Close method of the EventStream is called. - StreamCloser io.Closer -} - -// Close closes the EventStream. This will also cause the Events channel to be -// closed. You can use the closing of the Events channel to terminate your -// application's read from the API's EventStream. -// -// Will close the underlying EventStream reader. For EventStream over HTTP -// connection this will also close the HTTP connection. -// -// Close must be called when done using the EventStream API. Not calling Close -// may result in resource leaks. -func (es *EmptyStreamEventStream) Close() (err error) { - es.Reader.Close() - es.StreamCloser.Close() - - return es.Err() -} - -// Err returns any error that occurred while reading EventStream Events from -// the service API's response. Returns nil if there were no errors. -func (es *EmptyStreamEventStream) Err() error { - if err := es.Reader.Err(); err != nil { - return err - } - return nil -} - -// Events returns a channel to read EventStream Events from the -// EmptyStream API. -// -// These events are: -// -func (es *EmptyStreamEventStream) Events() <-chan EmptyEventStreamEvent { - return es.Reader.Events() +func (s *EmptyEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + return msg, err } // EmptyEventStreamEvent groups together all EventStream -// events read from the EmptyStream API. +// events writes for EmptyEventStream. // // These events are: // type EmptyEventStreamEvent interface { eventEmptyEventStream() + eventstreamapi.Marshaler + eventstreamapi.Unmarshaler } -// EmptyStreamEventStreamReader provides the interface for reading EventStream -// Events from the EmptyStream API. The -// default implementation for this interface will be EmptyStreamEventStream. +// EmptyEventStreamReader provides the interface for reading to the stream. The +// default implementation for this interface will be EmptyEventStream. // // The reader's Close method must allow multiple concurrent calls. // // These events are: // -type EmptyStreamEventStreamReader interface { +type EmptyEventStreamReader interface { // Returns a channel of events as they are read from the event stream. Events() <-chan EmptyEventStreamEvent - // Close will close the underlying event stream reader. For event stream over - // HTTP this will also close the HTTP connection. + // Close will stop the reader reading events from the stream. Close() error // Returns any error that has occurred while reading from the event stream. Err() error } -type readEmptyStreamEventStream struct { +type readEmptyEventStream struct { eventReader *eventstreamapi.EventReader stream chan EmptyEventStreamEvent - errVal atomic.Value + err *eventstreamapi.OnceError done chan struct{} closeOnce sync.Once } -func newReadEmptyStreamEventStream( - reader io.ReadCloser, - unmarshalers request.HandlerList, - logger aws.Logger, - logLevel aws.LogLevelType, -) *readEmptyStreamEventStream { - r := &readEmptyStreamEventStream{ - stream: make(chan EmptyEventStreamEvent), - done: make(chan struct{}), +func newReadEmptyEventStream(eventReader *eventstreamapi.EventReader) *readEmptyEventStream { + r := &readEmptyEventStream{ + eventReader: eventReader, + stream: make(chan EmptyEventStreamEvent), + done: make(chan struct{}), + err: eventstreamapi.NewOnceError(), } - - r.eventReader = eventstreamapi.NewEventReader( - reader, - protocol.HandlerPayloadUnmarshal{ - Unmarshalers: unmarshalers, - }, - r.unmarshalerForEventType, - ) - r.eventReader.UseLogger(logger, logLevel) + go r.readEventStream() return r } -// Close will close the underlying event stream reader. For EventStream over -// HTTP this will also close the HTTP connection. -func (r *readEmptyStreamEventStream) Close() error { +// Close will close the underlying event stream reader. +func (r *readEmptyEventStream) Close() error { r.closeOnce.Do(r.safeClose) - return r.Err() } -func (r *readEmptyStreamEventStream) safeClose() { - close(r.done) - err := r.eventReader.Close() - if err != nil { - r.errVal.Store(err) - } +func (r *readEmptyEventStream) ErrorSet() <-chan struct{} { + return r.err.ErrorSet() } -func (r *readEmptyStreamEventStream) Err() error { - if v := r.errVal.Load(); v != nil { - return v.(error) - } +func (r *readEmptyEventStream) Closed() <-chan struct{} { + return r.done +} - return nil +func (r *readEmptyEventStream) safeClose() { + close(r.done) } -func (r *readEmptyStreamEventStream) Events() <-chan EmptyEventStreamEvent { +func (r *readEmptyEventStream) Err() error { + return r.err.Err() +} + +func (r *readEmptyEventStream) Events() <-chan EmptyEventStreamEvent { return r.stream } -func (r *readEmptyStreamEventStream) readEventStream() { +func (r *readEmptyEventStream) readEventStream() { + defer r.Close() defer close(r.stream) for { @@ -436,7 +624,7 @@ func (r *readEmptyStreamEventStream) readEventStream() { return default: } - r.errVal.Store(err) + r.err.SetError(err) return } @@ -448,14 +636,12 @@ func (r *readEmptyStreamEventStream) readEventStream() { } } -func (r *readEmptyStreamEventStream) unmarshalerForEventType( - eventType string, -) (eventstreamapi.Unmarshaler, error) { +func unmarshalerForEmptyEventStreamEvent(eventType string) (eventstreamapi.Unmarshaler, error) { switch eventType { default: return nil, awserr.New( request.ErrCodeSerialization, - fmt.Sprintf("unknown event type name, %s, for EmptyStreamEventStream", eventType), + fmt.Sprintf("unknown event type name, %s, for EmptyEventStream", eventType), nil, ) } @@ -478,8 +664,7 @@ func (s EmptyStreamInput) GoString() string { type EmptyStreamOutput struct { _ struct{} `type:"structure"` - // Use EventStream to use the API's stream. - EventStream *EmptyStreamEventStream `type:"structure"` + eventStream *EmptyStreamEventStream } // String returns the string representation @@ -492,29 +677,156 @@ func (s EmptyStreamOutput) GoString() string { return s.String() } -// SetEventStream sets the EventStream field's value. -func (s *EmptyStreamOutput) SetEventStream(v *EmptyStreamEventStream) *EmptyStreamOutput { - s.EventStream = v - return s +// GetStream returns the type to interact with the event stream. +func (s *EmptyStreamOutput) GetStream() *EmptyStreamEventStream { + return s.eventStream } -func (s *EmptyStreamOutput) runEventStreamLoop(r *request.Request) { - if r.Error != nil { - return +// EventStreamEvent groups together all EventStream +// events writes for EventStream. +// +// These events are: +// +// * EmptyEvent +// * ExplicitPayloadEvent +// * HeaderOnlyEvent +// * ImplicitPayloadEvent +// * PayloadOnlyEvent +// * PayloadOnlyBlobEvent +// * PayloadOnlyStringEvent +type EventStreamEvent interface { + eventEventStream() + eventstreamapi.Marshaler + eventstreamapi.Unmarshaler +} + +// EventStreamReader provides the interface for reading to the stream. The +// default implementation for this interface will be EventStream. +// +// The reader's Close method must allow multiple concurrent calls. +// +// These events are: +// +// * EmptyEvent +// * ExplicitPayloadEvent +// * HeaderOnlyEvent +// * ImplicitPayloadEvent +// * PayloadOnlyEvent +// * PayloadOnlyBlobEvent +// * PayloadOnlyStringEvent +type EventStreamReader interface { + // Returns a channel of events as they are read from the event stream. + Events() <-chan EventStreamEvent + + // Close will stop the reader reading events from the stream. + Close() error + + // Returns any error that has occurred while reading from the event stream. + Err() error +} + +type readEventStream struct { + eventReader *eventstreamapi.EventReader + stream chan EventStreamEvent + err *eventstreamapi.OnceError + + done chan struct{} + closeOnce sync.Once +} + +func newReadEventStream(eventReader *eventstreamapi.EventReader) *readEventStream { + r := &readEventStream{ + eventReader: eventReader, + stream: make(chan EventStreamEvent), + done: make(chan struct{}), + err: eventstreamapi.NewOnceError(), } - reader := newReadEmptyStreamEventStream( - r.HTTPResponse.Body, - r.Handlers.UnmarshalStream, - r.Config.Logger, - r.Config.LogLevel.Value(), - ) - go reader.readEventStream() + go r.readEventStream() + + return r +} + +// Close will close the underlying event stream reader. +func (r *readEventStream) Close() error { + r.closeOnce.Do(r.safeClose) + return r.Err() +} + +func (r *readEventStream) ErrorSet() <-chan struct{} { + return r.err.ErrorSet() +} + +func (r *readEventStream) Closed() <-chan struct{} { + return r.done +} + +func (r *readEventStream) safeClose() { + close(r.done) +} + +func (r *readEventStream) Err() error { + return r.err.Err() +} - eventStream := &EmptyStreamEventStream{ - StreamCloser: r.HTTPResponse.Body, - Reader: reader, +func (r *readEventStream) Events() <-chan EventStreamEvent { + return r.stream +} + +func (r *readEventStream) readEventStream() { + defer r.Close() + defer close(r.stream) + + for { + event, err := r.eventReader.ReadEvent() + if err != nil { + if err == io.EOF { + return + } + select { + case <-r.done: + // If closed already ignore the error + return + default: + } + r.err.SetError(err) + return + } + + select { + case r.stream <- event.(EventStreamEvent): + case <-r.done: + return + } + } +} + +func unmarshalerForEventStreamEvent(eventType string) (eventstreamapi.Unmarshaler, error) { + switch eventType { + case "Empty": + return &EmptyEvent{}, nil + case "ExplicitPayload": + return &ExplicitPayloadEvent{}, nil + case "Headers": + return &HeaderOnlyEvent{}, nil + case "ImplicitPayload": + return &ImplicitPayloadEvent{}, nil + case "PayloadOnly": + return &PayloadOnlyEvent{}, nil + case "PayloadOnlyBlob": + return &PayloadOnlyBlobEvent{}, nil + case "PayloadOnlyString": + return &PayloadOnlyStringEvent{}, nil + case "Exception": + return &ExceptionEvent{}, nil + case "Exception2": + return &ExceptionEvent2{}, nil + default: + return nil, awserr.New( + request.ErrCodeSerialization, + fmt.Sprintf("unknown event type name, %s, for EventStream", eventType), + nil, + ) } - s.EventStream = eventStream } type ExceptionEvent struct { @@ -552,6 +864,16 @@ func (s *ExceptionEvent) UnmarshalEvent( return nil } +func (s *ExceptionEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + // Code returns the exception type name. func (s ExceptionEvent) Code() string { return "ExceptionEvent" @@ -597,6 +919,11 @@ func (s *ExceptionEvent2) UnmarshalEvent( return nil } +func (s *ExceptionEvent2) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType)) + return msg, err +} + // Code returns the exception type name. func (s ExceptionEvent2) Code() string { return "ExceptionEvent2" @@ -679,244 +1006,16 @@ func (s *ExplicitPayloadEvent) UnmarshalEvent( return nil } -// GetEventStreamEventStream provides handling of EventStreams for -// the GetEventStream API. -// -// Use this type to receive EventStream events. The events -// can be read from the Events channel member. -// -// The events that can be received are: -// -// * EmptyEvent -// * ExplicitPayloadEvent -// * HeaderOnlyEvent -// * ImplicitPayloadEvent -// * PayloadOnlyEvent -// * PayloadOnlyBlobEvent -// * PayloadOnlyStringEvent -type GetEventStreamEventStream struct { - // Reader is the EventStream reader for the EventStream - // events. This value is automatically set by the SDK when the API call is made - // Use this member when unit testing your code with the SDK to mock out the - // EventStream Reader. - // - // Must not be nil. - Reader GetEventStreamEventStreamReader - - // StreamCloser is the io.Closer for the EventStream connection. For HTTP - // EventStream this is the response Body. The stream will be closed when - // the Close method of the EventStream is called. - StreamCloser io.Closer -} - -// Close closes the EventStream. This will also cause the Events channel to be -// closed. You can use the closing of the Events channel to terminate your -// application's read from the API's EventStream. -// -// Will close the underlying EventStream reader. For EventStream over HTTP -// connection this will also close the HTTP connection. -// -// Close must be called when done using the EventStream API. Not calling Close -// may result in resource leaks. -func (es *GetEventStreamEventStream) Close() (err error) { - es.Reader.Close() - es.StreamCloser.Close() - - return es.Err() -} - -// Err returns any error that occurred while reading EventStream Events from -// the service API's response. Returns nil if there were no errors. -func (es *GetEventStreamEventStream) Err() error { - if err := es.Reader.Err(); err != nil { - return err - } - return nil -} - -// Events returns a channel to read EventStream Events from the -// GetEventStream API. -// -// These events are: -// -// * EmptyEvent -// * ExplicitPayloadEvent -// * HeaderOnlyEvent -// * ImplicitPayloadEvent -// * PayloadOnlyEvent -// * PayloadOnlyBlobEvent -// * PayloadOnlyStringEvent -func (es *GetEventStreamEventStream) Events() <-chan EventStreamEvent { - return es.Reader.Events() -} - -// EventStreamEvent groups together all EventStream -// events read from the GetEventStream API. -// -// These events are: -// -// * EmptyEvent -// * ExplicitPayloadEvent -// * HeaderOnlyEvent -// * ImplicitPayloadEvent -// * PayloadOnlyEvent -// * PayloadOnlyBlobEvent -// * PayloadOnlyStringEvent -type EventStreamEvent interface { - eventEventStream() -} - -// GetEventStreamEventStreamReader provides the interface for reading EventStream -// Events from the GetEventStream API. The -// default implementation for this interface will be GetEventStreamEventStream. -// -// The reader's Close method must allow multiple concurrent calls. -// -// These events are: -// -// * EmptyEvent -// * ExplicitPayloadEvent -// * HeaderOnlyEvent -// * ImplicitPayloadEvent -// * PayloadOnlyEvent -// * PayloadOnlyBlobEvent -// * PayloadOnlyStringEvent -type GetEventStreamEventStreamReader interface { - // Returns a channel of events as they are read from the event stream. - Events() <-chan EventStreamEvent - - // Close will close the underlying event stream reader. For event stream over - // HTTP this will also close the HTTP connection. - Close() error - - // Returns any error that has occurred while reading from the event stream. - Err() error -} - -type readGetEventStreamEventStream struct { - eventReader *eventstreamapi.EventReader - stream chan EventStreamEvent - errVal atomic.Value - - done chan struct{} - closeOnce sync.Once -} - -func newReadGetEventStreamEventStream( - reader io.ReadCloser, - unmarshalers request.HandlerList, - logger aws.Logger, - logLevel aws.LogLevelType, -) *readGetEventStreamEventStream { - r := &readGetEventStreamEventStream{ - stream: make(chan EventStreamEvent), - done: make(chan struct{}), - } - - r.eventReader = eventstreamapi.NewEventReader( - reader, - protocol.HandlerPayloadUnmarshal{ - Unmarshalers: unmarshalers, - }, - r.unmarshalerForEventType, - ) - r.eventReader.UseLogger(logger, logLevel) - - return r -} - -// Close will close the underlying event stream reader. For EventStream over -// HTTP this will also close the HTTP connection. -func (r *readGetEventStreamEventStream) Close() error { - r.closeOnce.Do(r.safeClose) - - return r.Err() -} - -func (r *readGetEventStreamEventStream) safeClose() { - close(r.done) - err := r.eventReader.Close() - if err != nil { - r.errVal.Store(err) - } -} - -func (r *readGetEventStreamEventStream) Err() error { - if v := r.errVal.Load(); v != nil { - return v.(error) - } - - return nil -} - -func (r *readGetEventStreamEventStream) Events() <-chan EventStreamEvent { - return r.stream -} - -func (r *readGetEventStreamEventStream) readEventStream() { - defer close(r.stream) - - for { - event, err := r.eventReader.ReadEvent() - if err != nil { - if err == io.EOF { - return - } - select { - case <-r.done: - // If closed already ignore the error - return - default: - } - r.errVal.Store(err) - return - } - - select { - case r.stream <- event.(EventStreamEvent): - case <-r.done: - return - } - } -} - -func (r *readGetEventStreamEventStream) unmarshalerForEventType( - eventType string, -) (eventstreamapi.Unmarshaler, error) { - switch eventType { - case "Empty": - return &EmptyEvent{}, nil - - case "ExplicitPayload": - return &ExplicitPayloadEvent{}, nil - - case "Headers": - return &HeaderOnlyEvent{}, nil - - case "ImplicitPayload": - return &ImplicitPayloadEvent{}, nil - - case "PayloadOnly": - return &PayloadOnlyEvent{}, nil - - case "PayloadOnlyBlob": - return &PayloadOnlyBlobEvent{}, nil - - case "PayloadOnlyString": - return &PayloadOnlyStringEvent{}, nil - - case "Exception": - return &ExceptionEvent{}, nil - - case "Exception2": - return &ExceptionEvent2{}, nil - default: - return nil, awserr.New( - request.ErrCodeSerialization, - fmt.Sprintf("unknown event type name, %s, for GetEventStreamEventStream", eventType), - nil, - ) +func (s *ExplicitPayloadEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + msg.Headers.Set("LongVal", eventstream.Int64Value(*s.LongVal)) + msg.Headers.Set("StringVal", eventstream.StringValue(*s.StringVal)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err } + msg.Payload = buf.Bytes() + return msg, err } type GetEventStreamInput struct { @@ -944,8 +1043,7 @@ func (s *GetEventStreamInput) SetInputVal(v string) *GetEventStreamInput { type GetEventStreamOutput struct { _ struct{} `type:"structure"` - // Use EventStream to use the API's stream. - EventStream *GetEventStreamEventStream `type:"structure"` + eventStream *GetEventStreamEventStream IntVal *int64 `type:"integer"` @@ -962,12 +1060,6 @@ func (s GetEventStreamOutput) GoString() string { return s.String() } -// SetEventStream sets the EventStream field's value. -func (s *GetEventStreamOutput) SetEventStream(v *GetEventStreamEventStream) *GetEventStreamOutput { - s.EventStream = v - return s -} - // SetIntVal sets the IntVal field's value. func (s *GetEventStreamOutput) SetIntVal(v int64) *GetEventStreamOutput { s.IntVal = &v @@ -980,23 +1072,9 @@ func (s *GetEventStreamOutput) SetStrVal(v string) *GetEventStreamOutput { return s } -func (s *GetEventStreamOutput) runEventStreamLoop(r *request.Request) { - if r.Error != nil { - return - } - reader := newReadGetEventStreamEventStream( - r.HTTPResponse.Body, - r.Handlers.UnmarshalStream, - r.Config.Logger, - r.Config.LogLevel.Value(), - ) - go reader.readEventStream() - - eventStream := &GetEventStreamEventStream{ - StreamCloser: r.HTTPResponse.Body, - Reader: reader, - } - s.EventStream = eventStream +// GetStream returns the type to interact with the event stream. +func (s *GetEventStreamOutput) GetStream() *GetEventStreamEventStream { + return s.eventStream } type HeaderOnlyEvent struct { @@ -1125,6 +1203,19 @@ func (s *HeaderOnlyEvent) UnmarshalEvent( return nil } +func (s *HeaderOnlyEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + msg.Headers.Set("BlobVal", eventstream.BytesValue(s.BlobVal)) + msg.Headers.Set("BoolVal", eventstream.BoolValue(*s.BoolVal)) + msg.Headers.Set("ByteVal", eventstream.Int8Value(int8(*s.ByteVal))) + msg.Headers.Set("IntegerVal", eventstream.Int32Value(int32(*s.IntegerVal))) + msg.Headers.Set("LongVal", eventstream.Int64Value(*s.LongVal)) + msg.Headers.Set("ShortVal", eventstream.Int16Value(int16(*s.ShortVal))) + msg.Headers.Set("StringVal", eventstream.StringValue(*s.StringVal)) + msg.Headers.Set("TimeVal", eventstream.TimestampValue(*s.TimeVal)) + return msg, err +} + type ImplicitPayloadEvent struct { _ struct{} `locationName:"ImplicitPayloadEvent" type:"structure"` @@ -1185,6 +1276,17 @@ func (s *ImplicitPayloadEvent) UnmarshalEvent( return nil } +func (s *ImplicitPayloadEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + msg.Headers.Set("ByteVal", eventstream.Int8Value(int8(*s.ByteVal))) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + type NestedShape struct { _ struct{} `type:"structure"` @@ -1280,6 +1382,13 @@ func (s *PayloadOnlyBlobEvent) UnmarshalEvent( return nil } +func (s *PayloadOnlyBlobEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + msg.Headers.Set(":content-type", eventstream.StringValue("application/octet-stream")) + msg.Payload = s.BlobPayload + return msg, err +} + type PayloadOnlyEvent struct { _ struct{} `locationName:"PayloadOnlyEvent" type:"structure" payload:"NestedVal"` @@ -1319,6 +1428,16 @@ func (s *PayloadOnlyEvent) UnmarshalEvent( return nil } +func (s *PayloadOnlyEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + type PayloadOnlyStringEvent struct { _ struct{} `locationName:"PayloadOnlyStringEvent" type:"structure" payload:"StringPayload"` @@ -1353,3 +1472,9 @@ func (s *PayloadOnlyStringEvent) UnmarshalEvent( s.StringPayload = aws.String(string(msg.Payload)) return nil } + +func (s *PayloadOnlyStringEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + msg.Payload = []byte(aws.StringValue(s.StringPayload)) + return msg, err +} diff --git a/private/model/api/codegentest/service/restxmlservice/eventstream_test.go b/private/model/api/codegentest/service/restxmlservice/eventstream_test.go index 5d357b85d5b..e803e0aaa03 100644 --- a/private/model/api/codegentest/service/restxmlservice/eventstream_test.go +++ b/private/model/api/codegentest/service/restxmlservice/eventstream_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.6 +// +build go1.10 package restxmlservice @@ -46,10 +46,10 @@ func TestEmptyStream_Read(t *testing.T) { if err != nil { t.Fatalf("expect no error got, %v", err) } - defer resp.EventStream.Close() + defer resp.GetStream().Close() var i int - for event := range resp.EventStream.Events() { + for event := range resp.GetStream().Events() { if event == nil { t.Errorf("%d, expect event, got nil", i) } @@ -59,7 +59,7 @@ func TestEmptyStream_Read(t *testing.T) { i++ } - if err := resp.EventStream.Err(); err != nil { + if err := resp.GetStream().Err(); err != nil { t.Errorf("expect no error, %v", err) } } @@ -84,10 +84,10 @@ func TestEmptyStream_ReadClose(t *testing.T) { t.Fatalf("expect no error got, %v", err) } - resp.EventStream.Close() - <-resp.EventStream.Events() + resp.GetStream().Close() + <-resp.GetStream().Events() - if err := resp.EventStream.Err(); err != nil { + if err := resp.GetStream().Err(); err != nil { t.Errorf("expect no error, %v", err) } } @@ -125,16 +125,16 @@ func BenchmarkEmptyStream_Read(b *testing.B) { if err != nil { b.Fatalf("failed to create request, %v", err) } - defer resp.EventStream.Close() + defer resp.GetStream().Close() b.ResetTimer() for i := 0; i < b.N; i++ { - if err = resp.EventStream.Err(); err != nil { + if err = resp.GetStream().Err(); err != nil { b.Fatalf("expect no error, got %v", err) } - event := <-resp.EventStream.Events() + event := <-resp.GetStream().Events() if event == nil { - b.Fatalf("expect event, got nil, %v, %d", resp.EventStream.Err(), i) + b.Fatalf("expect event, got nil, %v, %d", resp.GetStream().Err(), i) } } } @@ -176,10 +176,10 @@ func TestGetEventStream_Read(t *testing.T) { if err != nil { t.Fatalf("expect no error got, %v", err) } - defer resp.EventStream.Close() + defer resp.GetStream().Close() var i int - for event := range resp.EventStream.Events() { + for event := range resp.GetStream().Events() { if event == nil { t.Errorf("%d, expect event, got nil", i) } @@ -189,7 +189,7 @@ func TestGetEventStream_Read(t *testing.T) { i++ } - if err := resp.EventStream.Err(); err != nil { + if err := resp.GetStream().Err(); err != nil { t.Errorf("expect no error, %v", err) } } @@ -215,19 +215,19 @@ func TestGetEventStream_ReadClose(t *testing.T) { } // Assert calling Err before close does not close the stream. - resp.EventStream.Err() + resp.GetStream().Err() select { - case _, ok := <-resp.EventStream.Events(): + case _, ok := <-resp.GetStream().Events(): if !ok { t.Fatalf("expect stream not to be closed, but was") } default: } - resp.EventStream.Close() - <-resp.EventStream.Events() + resp.GetStream().Close() + <-resp.GetStream().Events() - if err := resp.EventStream.Err(); err != nil { + if err := resp.GetStream().Err(); err != nil { t.Errorf("expect no error, %v", err) } } @@ -265,16 +265,16 @@ func BenchmarkGetEventStream_Read(b *testing.B) { if err != nil { b.Fatalf("failed to create request, %v", err) } - defer resp.EventStream.Close() + defer resp.GetStream().Close() b.ResetTimer() for i := 0; i < b.N; i++ { - if err = resp.EventStream.Err(); err != nil { + if err = resp.GetStream().Err(); err != nil { b.Fatalf("expect no error, got %v", err) } - event := <-resp.EventStream.Events() + event := <-resp.GetStream().Events() if event == nil { - b.Fatalf("expect event, got nil, %v, %d", resp.EventStream.Err(), i) + b.Fatalf("expect event, got nil, %v, %d", resp.GetStream().Err(), i) } } } @@ -491,11 +491,11 @@ func TestGetEventStream_ReadException(t *testing.T) { t.Fatalf("expect no error got, %v", err) } - defer resp.EventStream.Close() + defer resp.GetStream().Close() - <-resp.EventStream.Events() + <-resp.GetStream().Events() - err = resp.EventStream.Err() + err = resp.GetStream().Err() if err == nil { t.Fatalf("expect err, got none") } diff --git a/private/model/api/codegentest/service/restxmlservice/service.go b/private/model/api/codegentest/service/restxmlservice/service.go index bbda25ffcfa..2a76bfb8fa1 100644 --- a/private/model/api/codegentest/service/restxmlservice/service.go +++ b/private/model/api/codegentest/service/restxmlservice/service.go @@ -76,6 +76,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) + svc.Handlers.BuildStream.PushBackNamed(restxml.BuildHandler) svc.Handlers.UnmarshalStream.PushBackNamed(restxml.UnmarshalHandler) // Run custom client initialization if present diff --git a/private/model/api/codegentest/service/rpcservice/api.go b/private/model/api/codegentest/service/rpcservice/api.go index b8f39f30ee9..23ed705b736 100644 --- a/private/model/api/codegentest/service/rpcservice/api.go +++ b/private/model/api/codegentest/service/rpcservice/api.go @@ -7,7 +7,6 @@ import ( "fmt" "io" "sync" - "sync/atomic" "time" "github.com/aws/aws-sdk-go/aws" @@ -61,10 +60,16 @@ func (c *RPCService) EmptyStreamRequest(input *EmptyStreamInput) (req *request.R output = &EmptyStreamOutput{} req = c.newRequest(op, input, output) + + es := newEmptyStreamEventStream() + output.eventStream = es + req.Handlers.Send.Swap(client.LogHTTPResponseHandler.Name, client.LogHTTPResponseHeaderHandler) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, rest.UnmarshalHandler) - req.Handlers.Unmarshal.PushBack(output.runEventStreamLoop) - req.Handlers.Unmarshal.PushBack(output.unmarshalInitialResponse) + req.Handlers.Unmarshal.PushBack(es.runOutputStream) + es.output = output + req.Handlers.Unmarshal.PushBack(es.recvInitialEvent) + req.Handlers.Unmarshal.PushBack(es.runOnStreamPartClose) return } @@ -98,6 +103,156 @@ func (c *RPCService) EmptyStreamWithContext(ctx aws.Context, input *EmptyStreamI return out, req.Send() } +// EmptyStreamEventStream provides the event stream handling for the EmptyStream. +type EmptyStreamEventStream struct { + + // Reader is the EventStream reader for the EmptyEventStream + // events. This value is automatically set by the SDK when the API call is made + // Use this member when unit testing your code with the SDK to mock out the + // EventStream Reader. + // + // Must not be nil. + Reader EmptyEventStreamReader + + outputReader io.ReadCloser + output *EmptyStreamOutput + + done chan struct{} + closeOnce sync.Once + err *eventstreamapi.OnceError +} + +func newEmptyStreamEventStream() *EmptyStreamEventStream { + return &EmptyStreamEventStream{ + done: make(chan struct{}), + err: eventstreamapi.NewOnceError(), + } +} + +func (es *EmptyStreamEventStream) runOnStreamPartClose(r *request.Request) { + if es.done == nil { + return + } + go es.waitStreamPartClose() + +} + +func (es *EmptyStreamEventStream) waitStreamPartClose() { + var outputErrCh <-chan struct{} + if v, ok := es.Reader.(interface{ ErrorSet() <-chan struct{} }); ok { + outputErrCh = v.ErrorSet() + } + var outputClosedCh <-chan struct{} + if v, ok := es.Reader.(interface{ Closed() <-chan struct{} }); ok { + outputClosedCh = v.Closed() + } + + select { + case <-es.done: + case <-outputErrCh: + es.err.SetError(es.Reader.Err()) + es.Close() + case <-outputClosedCh: + if err := es.Reader.Err(); err != nil { + es.err.SetError(es.Reader.Err()) + } + es.Close() + } +} + +func (es *EmptyStreamEventStream) eventTypeForEmptyStreamEventStreamOutputEvent(eventType string) (eventstreamapi.Unmarshaler, error) { + if eventType == "initial-response" { + return es.output, nil + } + return unmarshalerForEmptyEventStreamEvent(eventType) +} + +// Events returns a channel to read events from. +// +// These events are: +// +func (es *EmptyStreamEventStream) Events() <-chan EmptyEventStreamEvent { + return es.Reader.Events() +} + +func (es *EmptyStreamEventStream) runOutputStream(r *request.Request) { + var opts []func(*eventstream.Decoder) + if r.Config.Logger != nil && r.Config.LogLevel.Matches(aws.LogDebugWithEventStreamBody) { + opts = append(opts, eventstream.DecodeWithLogger(r.Config.Logger)) + } + + decoder := eventstream.NewDecoder(r.HTTPResponse.Body, opts...) + eventReader := eventstreamapi.NewEventReader(decoder, + protocol.HandlerPayloadUnmarshal{ + Unmarshalers: r.Handlers.UnmarshalStream, + }, + es.eventTypeForEmptyStreamEventStreamOutputEvent, + ) + + es.outputReader = r.HTTPResponse.Body + es.Reader = newReadEmptyEventStream(eventReader) +} +func (es *EmptyStreamEventStream) recvInitialEvent(r *request.Request) { + // Wait for the initial response event, which must be the first + // event to be received from the API. + select { + case event, ok := <-es.Events(): + if !ok { + return + } + + v, ok := event.(*EmptyStreamOutput) + if !ok || v == nil { + r.Error = awserr.New( + request.ErrCodeSerialization, + fmt.Sprintf("invalid event, %T, expect %T, %v", + event, (*EmptyStreamOutput)(nil), v), + nil, + ) + return + } + + *es.output = *v + es.output.eventStream = es + } +} + +// Close closes the stream. This will also cause the stream to be closed. +// Close must be called when done using the stream API. Not calling Close +// may result in resource leaks. +// +// You can use the closing of the Reader's Events channel to terminate your +// application's read from the API's stream. +// +func (es *EmptyStreamEventStream) Close() (err error) { + es.closeOnce.Do(es.safeClose) + return es.Err() +} + +func (es *EmptyStreamEventStream) safeClose() { + if es.done != nil { + close(es.done) + } + + es.Reader.Close() + if es.outputReader != nil { + es.outputReader.Close() + } +} + +// Err returns any error that occurred while reading or writing EventStream +// Events from the service API's response. Returns nil if there were no errors. +func (es *EmptyStreamEventStream) Err() error { + if err := es.err.Err(); err != nil { + return err + } + if err := es.Reader.Err(); err != nil { + return err + } + + return nil +} + const opGetEventStream = "GetEventStream" // GetEventStreamRequest generates a "aws/request.Request" representing the @@ -137,10 +292,16 @@ func (c *RPCService) GetEventStreamRequest(input *GetEventStreamInput) (req *req output = &GetEventStreamOutput{} req = c.newRequest(op, input, output) + + es := newGetEventStreamEventStream() + output.eventStream = es + req.Handlers.Send.Swap(client.LogHTTPResponseHandler.Name, client.LogHTTPResponseHeaderHandler) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, rest.UnmarshalHandler) - req.Handlers.Unmarshal.PushBack(output.runEventStreamLoop) - req.Handlers.Unmarshal.PushBack(output.unmarshalInitialResponse) + req.Handlers.Unmarshal.PushBack(es.runOutputStream) + es.output = output + req.Handlers.Unmarshal.PushBack(es.recvInitialEvent) + req.Handlers.Unmarshal.PushBack(es.runOnStreamPartClose) return } @@ -174,6 +335,163 @@ func (c *RPCService) GetEventStreamWithContext(ctx aws.Context, input *GetEventS return out, req.Send() } +// GetEventStreamEventStream provides the event stream handling for the GetEventStream. +type GetEventStreamEventStream struct { + + // Reader is the EventStream reader for the EventStream + // events. This value is automatically set by the SDK when the API call is made + // Use this member when unit testing your code with the SDK to mock out the + // EventStream Reader. + // + // Must not be nil. + Reader EventStreamReader + + outputReader io.ReadCloser + output *GetEventStreamOutput + + done chan struct{} + closeOnce sync.Once + err *eventstreamapi.OnceError +} + +func newGetEventStreamEventStream() *GetEventStreamEventStream { + return &GetEventStreamEventStream{ + done: make(chan struct{}), + err: eventstreamapi.NewOnceError(), + } +} + +func (es *GetEventStreamEventStream) runOnStreamPartClose(r *request.Request) { + if es.done == nil { + return + } + go es.waitStreamPartClose() + +} + +func (es *GetEventStreamEventStream) waitStreamPartClose() { + var outputErrCh <-chan struct{} + if v, ok := es.Reader.(interface{ ErrorSet() <-chan struct{} }); ok { + outputErrCh = v.ErrorSet() + } + var outputClosedCh <-chan struct{} + if v, ok := es.Reader.(interface{ Closed() <-chan struct{} }); ok { + outputClosedCh = v.Closed() + } + + select { + case <-es.done: + case <-outputErrCh: + es.err.SetError(es.Reader.Err()) + es.Close() + case <-outputClosedCh: + if err := es.Reader.Err(); err != nil { + es.err.SetError(es.Reader.Err()) + } + es.Close() + } +} + +func (es *GetEventStreamEventStream) eventTypeForGetEventStreamEventStreamOutputEvent(eventType string) (eventstreamapi.Unmarshaler, error) { + if eventType == "initial-response" { + return es.output, nil + } + return unmarshalerForEventStreamEvent(eventType) +} + +// Events returns a channel to read events from. +// +// These events are: +// +// * EmptyEvent +// * ExplicitPayloadEvent +// * HeaderOnlyEvent +// * ImplicitPayloadEvent +// * PayloadOnlyEvent +// * PayloadOnlyBlobEvent +// * PayloadOnlyStringEvent +func (es *GetEventStreamEventStream) Events() <-chan EventStreamEvent { + return es.Reader.Events() +} + +func (es *GetEventStreamEventStream) runOutputStream(r *request.Request) { + var opts []func(*eventstream.Decoder) + if r.Config.Logger != nil && r.Config.LogLevel.Matches(aws.LogDebugWithEventStreamBody) { + opts = append(opts, eventstream.DecodeWithLogger(r.Config.Logger)) + } + + decoder := eventstream.NewDecoder(r.HTTPResponse.Body, opts...) + eventReader := eventstreamapi.NewEventReader(decoder, + protocol.HandlerPayloadUnmarshal{ + Unmarshalers: r.Handlers.UnmarshalStream, + }, + es.eventTypeForGetEventStreamEventStreamOutputEvent, + ) + + es.outputReader = r.HTTPResponse.Body + es.Reader = newReadEventStream(eventReader) +} +func (es *GetEventStreamEventStream) recvInitialEvent(r *request.Request) { + // Wait for the initial response event, which must be the first + // event to be received from the API. + select { + case event, ok := <-es.Events(): + if !ok { + return + } + + v, ok := event.(*GetEventStreamOutput) + if !ok || v == nil { + r.Error = awserr.New( + request.ErrCodeSerialization, + fmt.Sprintf("invalid event, %T, expect %T, %v", + event, (*GetEventStreamOutput)(nil), v), + nil, + ) + return + } + + *es.output = *v + es.output.eventStream = es + } +} + +// Close closes the stream. This will also cause the stream to be closed. +// Close must be called when done using the stream API. Not calling Close +// may result in resource leaks. +// +// You can use the closing of the Reader's Events channel to terminate your +// application's read from the API's stream. +// +func (es *GetEventStreamEventStream) Close() (err error) { + es.closeOnce.Do(es.safeClose) + return es.Err() +} + +func (es *GetEventStreamEventStream) safeClose() { + if es.done != nil { + close(es.done) + } + + es.Reader.Close() + if es.outputReader != nil { + es.outputReader.Close() + } +} + +// Err returns any error that occurred while reading or writing EventStream +// Events from the service API's response. Returns nil if there were no errors. +func (es *GetEventStreamEventStream) Err() error { + if err := es.err.Err(); err != nil { + return err + } + if err := es.Reader.Err(); err != nil { + return err + } + + return nil +} + const opOtherOperation = "OtherOperation" // OtherOperationRequest generates a "aws/request.Request" representing the @@ -277,157 +595,89 @@ func (s *EmptyEvent) UnmarshalEvent( return nil } -// EmptyStreamEventStream provides handling of EventStreams for -// the EmptyStream API. -// -// Use this type to receive EmptyEventStream events. The events -// can be read from the Events channel member. -// -// The events that can be received are: -// -type EmptyStreamEventStream struct { - // Reader is the EventStream reader for the EmptyEventStream - // events. This value is automatically set by the SDK when the API call is made - // Use this member when unit testing your code with the SDK to mock out the - // EventStream Reader. - // - // Must not be nil. - Reader EmptyStreamEventStreamReader - - // StreamCloser is the io.Closer for the EventStream connection. For HTTP - // EventStream this is the response Body. The stream will be closed when - // the Close method of the EventStream is called. - StreamCloser io.Closer -} - -// Close closes the EventStream. This will also cause the Events channel to be -// closed. You can use the closing of the Events channel to terminate your -// application's read from the API's EventStream. -// -// Will close the underlying EventStream reader. For EventStream over HTTP -// connection this will also close the HTTP connection. -// -// Close must be called when done using the EventStream API. Not calling Close -// may result in resource leaks. -func (es *EmptyStreamEventStream) Close() (err error) { - es.Reader.Close() - es.StreamCloser.Close() - - return es.Err() -} - -// Err returns any error that occurred while reading EventStream Events from -// the service API's response. Returns nil if there were no errors. -func (es *EmptyStreamEventStream) Err() error { - if err := es.Reader.Err(); err != nil { - return err - } - return nil -} - -// Events returns a channel to read EventStream Events from the -// EmptyStream API. -// -// These events are: -// -func (es *EmptyStreamEventStream) Events() <-chan EmptyEventStreamEvent { - return es.Reader.Events() +func (s *EmptyEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + return msg, err } // EmptyEventStreamEvent groups together all EventStream -// events read from the EmptyStream API. +// events writes for EmptyEventStream. // // These events are: // type EmptyEventStreamEvent interface { eventEmptyEventStream() + eventstreamapi.Marshaler + eventstreamapi.Unmarshaler } -// EmptyStreamEventStreamReader provides the interface for reading EventStream -// Events from the EmptyStream API. The -// default implementation for this interface will be EmptyStreamEventStream. +// EmptyEventStreamReader provides the interface for reading to the stream. The +// default implementation for this interface will be EmptyEventStream. // // The reader's Close method must allow multiple concurrent calls. // // These events are: // -type EmptyStreamEventStreamReader interface { +type EmptyEventStreamReader interface { // Returns a channel of events as they are read from the event stream. Events() <-chan EmptyEventStreamEvent - // Close will close the underlying event stream reader. For event stream over - // HTTP this will also close the HTTP connection. + // Close will stop the reader reading events from the stream. Close() error // Returns any error that has occurred while reading from the event stream. Err() error } -type readEmptyStreamEventStream struct { +type readEmptyEventStream struct { eventReader *eventstreamapi.EventReader stream chan EmptyEventStreamEvent - errVal atomic.Value + err *eventstreamapi.OnceError done chan struct{} closeOnce sync.Once - - initResp eventstreamapi.Unmarshaler } -func newReadEmptyStreamEventStream( - reader io.ReadCloser, - unmarshalers request.HandlerList, - logger aws.Logger, - logLevel aws.LogLevelType, - initResp eventstreamapi.Unmarshaler, -) *readEmptyStreamEventStream { - r := &readEmptyStreamEventStream{ - stream: make(chan EmptyEventStreamEvent), - done: make(chan struct{}), - initResp: initResp, +func newReadEmptyEventStream(eventReader *eventstreamapi.EventReader) *readEmptyEventStream { + r := &readEmptyEventStream{ + eventReader: eventReader, + stream: make(chan EmptyEventStreamEvent), + done: make(chan struct{}), + err: eventstreamapi.NewOnceError(), } - - r.eventReader = eventstreamapi.NewEventReader( - reader, - protocol.HandlerPayloadUnmarshal{ - Unmarshalers: unmarshalers, - }, - r.unmarshalerForEventType, - ) - r.eventReader.UseLogger(logger, logLevel) + go r.readEventStream() return r } -// Close will close the underlying event stream reader. For EventStream over -// HTTP this will also close the HTTP connection. -func (r *readEmptyStreamEventStream) Close() error { +// Close will close the underlying event stream reader. +func (r *readEmptyEventStream) Close() error { r.closeOnce.Do(r.safeClose) - return r.Err() } -func (r *readEmptyStreamEventStream) safeClose() { - close(r.done) - err := r.eventReader.Close() - if err != nil { - r.errVal.Store(err) - } +func (r *readEmptyEventStream) ErrorSet() <-chan struct{} { + return r.err.ErrorSet() } -func (r *readEmptyStreamEventStream) Err() error { - if v := r.errVal.Load(); v != nil { - return v.(error) - } +func (r *readEmptyEventStream) Closed() <-chan struct{} { + return r.done +} - return nil +func (r *readEmptyEventStream) safeClose() { + close(r.done) } -func (r *readEmptyStreamEventStream) Events() <-chan EmptyEventStreamEvent { +func (r *readEmptyEventStream) Err() error { + return r.err.Err() +} + +func (r *readEmptyEventStream) Events() <-chan EmptyEventStreamEvent { return r.stream } -func (r *readEmptyStreamEventStream) readEventStream() { +func (r *readEmptyEventStream) readEventStream() { + defer r.Close() defer close(r.stream) for { @@ -442,7 +692,7 @@ func (r *readEmptyStreamEventStream) readEventStream() { return default: } - r.errVal.Store(err) + r.err.SetError(err) return } @@ -454,16 +704,12 @@ func (r *readEmptyStreamEventStream) readEventStream() { } } -func (r *readEmptyStreamEventStream) unmarshalerForEventType( - eventType string, -) (eventstreamapi.Unmarshaler, error) { +func unmarshalerForEmptyEventStreamEvent(eventType string) (eventstreamapi.Unmarshaler, error) { switch eventType { - case "initial-response": - return r.initResp, nil default: return nil, awserr.New( request.ErrCodeSerialization, - fmt.Sprintf("unknown event type name, %s, for EmptyStreamEventStream", eventType), + fmt.Sprintf("unknown event type name, %s, for EmptyEventStream", eventType), nil, ) } @@ -486,8 +732,7 @@ func (s EmptyStreamInput) GoString() string { type EmptyStreamOutput struct { _ struct{} `type:"structure"` - // Use EventStream to use the API's stream. - EventStream *EmptyStreamEventStream `type:"structure"` + eventStream *EmptyStreamEventStream } // String returns the string representation @@ -500,70 +745,183 @@ func (s EmptyStreamOutput) GoString() string { return s.String() } -// SetEventStream sets the EventStream field's value. -func (s *EmptyStreamOutput) SetEventStream(v *EmptyStreamEventStream) *EmptyStreamOutput { - s.EventStream = v - return s +// GetStream returns the type to interact with the event stream. +func (s *EmptyStreamOutput) GetStream() *EmptyStreamEventStream { + return s.eventStream } -func (s *EmptyStreamOutput) runEventStreamLoop(r *request.Request) { - if r.Error != nil { - return +// The EmptyStreamOutput is and event in the EmptyEventStream group of events. +func (s *EmptyStreamOutput) eventEmptyEventStream() {} + +// UnmarshalEvent unmarshals the EventStream Message into the EmptyStreamOutput value. +// This method is only used internally within the SDK's EventStream handling. +func (s *EmptyStreamOutput) UnmarshalEvent( + payloadUnmarshaler protocol.PayloadUnmarshaler, + msg eventstream.Message, +) error { + if err := payloadUnmarshaler.UnmarshalPayload( + bytes.NewReader(msg.Payload), s, + ); err != nil { + return err } - reader := newReadEmptyStreamEventStream( - r.HTTPResponse.Body, - r.Handlers.UnmarshalStream, - r.Config.Logger, - r.Config.LogLevel.Value(), - s, - ) - go reader.readEventStream() + return nil +} - eventStream := &EmptyStreamEventStream{ - StreamCloser: r.HTTPResponse.Body, - Reader: reader, +func (s *EmptyStreamOutput) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err } - s.EventStream = eventStream + msg.Payload = buf.Bytes() + return msg, err } -func (s *EmptyStreamOutput) unmarshalInitialResponse(r *request.Request) { - // Wait for the initial response event, which must be the first event to be - // received from the API. - select { - case event, ok := <-s.EventStream.Events(): - if !ok { +// EventStreamEvent groups together all EventStream +// events writes for EventStream. +// +// These events are: +// +// * EmptyEvent +// * ExplicitPayloadEvent +// * HeaderOnlyEvent +// * ImplicitPayloadEvent +// * PayloadOnlyEvent +// * PayloadOnlyBlobEvent +// * PayloadOnlyStringEvent +type EventStreamEvent interface { + eventEventStream() + eventstreamapi.Marshaler + eventstreamapi.Unmarshaler +} + +// EventStreamReader provides the interface for reading to the stream. The +// default implementation for this interface will be EventStream. +// +// The reader's Close method must allow multiple concurrent calls. +// +// These events are: +// +// * EmptyEvent +// * ExplicitPayloadEvent +// * HeaderOnlyEvent +// * ImplicitPayloadEvent +// * PayloadOnlyEvent +// * PayloadOnlyBlobEvent +// * PayloadOnlyStringEvent +type EventStreamReader interface { + // Returns a channel of events as they are read from the event stream. + Events() <-chan EventStreamEvent + + // Close will stop the reader reading events from the stream. + Close() error + + // Returns any error that has occurred while reading from the event stream. + Err() error +} + +type readEventStream struct { + eventReader *eventstreamapi.EventReader + stream chan EventStreamEvent + err *eventstreamapi.OnceError + + done chan struct{} + closeOnce sync.Once +} + +func newReadEventStream(eventReader *eventstreamapi.EventReader) *readEventStream { + r := &readEventStream{ + eventReader: eventReader, + stream: make(chan EventStreamEvent), + done: make(chan struct{}), + err: eventstreamapi.NewOnceError(), + } + go r.readEventStream() + + return r +} + +// Close will close the underlying event stream reader. +func (r *readEventStream) Close() error { + r.closeOnce.Do(r.safeClose) + return r.Err() +} + +func (r *readEventStream) ErrorSet() <-chan struct{} { + return r.err.ErrorSet() +} + +func (r *readEventStream) Closed() <-chan struct{} { + return r.done +} + +func (r *readEventStream) safeClose() { + close(r.done) +} + +func (r *readEventStream) Err() error { + return r.err.Err() +} + +func (r *readEventStream) Events() <-chan EventStreamEvent { + return r.stream +} + +func (r *readEventStream) readEventStream() { + defer r.Close() + defer close(r.stream) + + for { + event, err := r.eventReader.ReadEvent() + if err != nil { + if err == io.EOF { + return + } + select { + case <-r.done: + // If closed already ignore the error + return + default: + } + r.err.SetError(err) return } - es := s.EventStream - v, ok := event.(*EmptyStreamOutput) - if !ok || v == nil { - r.Error = awserr.New( - request.ErrCodeSerialization, - fmt.Sprintf("invalid event, %T, expect *SubscribeToShardOutput, %v", event, v), - nil, - ) + + select { + case r.stream <- event.(EventStreamEvent): + case <-r.done: return } - *s = *v - s.EventStream = es } } -// The EmptyStreamOutput is and event in the EmptyEventStream group of events. -func (s *EmptyStreamOutput) eventEmptyEventStream() {} - -// UnmarshalEvent unmarshals the EventStream Message into the EmptyStreamOutput value. -// This method is only used internally within the SDK's EventStream handling. -func (s *EmptyStreamOutput) UnmarshalEvent( - payloadUnmarshaler protocol.PayloadUnmarshaler, - msg eventstream.Message, -) error { - if err := payloadUnmarshaler.UnmarshalPayload( - bytes.NewReader(msg.Payload), s, - ); err != nil { - return err +func unmarshalerForEventStreamEvent(eventType string) (eventstreamapi.Unmarshaler, error) { + switch eventType { + case "Empty": + return &EmptyEvent{}, nil + case "ExplicitPayload": + return &ExplicitPayloadEvent{}, nil + case "Headers": + return &HeaderOnlyEvent{}, nil + case "ImplicitPayload": + return &ImplicitPayloadEvent{}, nil + case "PayloadOnly": + return &PayloadOnlyEvent{}, nil + case "PayloadOnlyBlob": + return &PayloadOnlyBlobEvent{}, nil + case "PayloadOnlyString": + return &PayloadOnlyStringEvent{}, nil + case "Exception": + return &ExceptionEvent{}, nil + case "Exception2": + return &ExceptionEvent2{}, nil + default: + return nil, awserr.New( + request.ErrCodeSerialization, + fmt.Sprintf("unknown event type name, %s, for EventStream", eventType), + nil, + ) } - return nil } type ExceptionEvent struct { @@ -601,6 +959,16 @@ func (s *ExceptionEvent) UnmarshalEvent( return nil } +func (s *ExceptionEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + // Code returns the exception type name. func (s ExceptionEvent) Code() string { return "ExceptionEvent" @@ -646,6 +1014,11 @@ func (s *ExceptionEvent2) UnmarshalEvent( return nil } +func (s *ExceptionEvent2) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType)) + return msg, err +} + // Code returns the exception type name. func (s ExceptionEvent2) Code() string { return "ExceptionEvent2" @@ -728,251 +1101,16 @@ func (s *ExplicitPayloadEvent) UnmarshalEvent( return nil } -// GetEventStreamEventStream provides handling of EventStreams for -// the GetEventStream API. -// -// Use this type to receive EventStream events. The events -// can be read from the Events channel member. -// -// The events that can be received are: -// -// * EmptyEvent -// * ExplicitPayloadEvent -// * HeaderOnlyEvent -// * ImplicitPayloadEvent -// * PayloadOnlyEvent -// * PayloadOnlyBlobEvent -// * PayloadOnlyStringEvent -type GetEventStreamEventStream struct { - // Reader is the EventStream reader for the EventStream - // events. This value is automatically set by the SDK when the API call is made - // Use this member when unit testing your code with the SDK to mock out the - // EventStream Reader. - // - // Must not be nil. - Reader GetEventStreamEventStreamReader - - // StreamCloser is the io.Closer for the EventStream connection. For HTTP - // EventStream this is the response Body. The stream will be closed when - // the Close method of the EventStream is called. - StreamCloser io.Closer -} - -// Close closes the EventStream. This will also cause the Events channel to be -// closed. You can use the closing of the Events channel to terminate your -// application's read from the API's EventStream. -// -// Will close the underlying EventStream reader. For EventStream over HTTP -// connection this will also close the HTTP connection. -// -// Close must be called when done using the EventStream API. Not calling Close -// may result in resource leaks. -func (es *GetEventStreamEventStream) Close() (err error) { - es.Reader.Close() - es.StreamCloser.Close() - - return es.Err() -} - -// Err returns any error that occurred while reading EventStream Events from -// the service API's response. Returns nil if there were no errors. -func (es *GetEventStreamEventStream) Err() error { - if err := es.Reader.Err(); err != nil { - return err - } - return nil -} - -// Events returns a channel to read EventStream Events from the -// GetEventStream API. -// -// These events are: -// -// * EmptyEvent -// * ExplicitPayloadEvent -// * HeaderOnlyEvent -// * ImplicitPayloadEvent -// * PayloadOnlyEvent -// * PayloadOnlyBlobEvent -// * PayloadOnlyStringEvent -func (es *GetEventStreamEventStream) Events() <-chan EventStreamEvent { - return es.Reader.Events() -} - -// EventStreamEvent groups together all EventStream -// events read from the GetEventStream API. -// -// These events are: -// -// * EmptyEvent -// * ExplicitPayloadEvent -// * HeaderOnlyEvent -// * ImplicitPayloadEvent -// * PayloadOnlyEvent -// * PayloadOnlyBlobEvent -// * PayloadOnlyStringEvent -type EventStreamEvent interface { - eventEventStream() -} - -// GetEventStreamEventStreamReader provides the interface for reading EventStream -// Events from the GetEventStream API. The -// default implementation for this interface will be GetEventStreamEventStream. -// -// The reader's Close method must allow multiple concurrent calls. -// -// These events are: -// -// * EmptyEvent -// * ExplicitPayloadEvent -// * HeaderOnlyEvent -// * ImplicitPayloadEvent -// * PayloadOnlyEvent -// * PayloadOnlyBlobEvent -// * PayloadOnlyStringEvent -type GetEventStreamEventStreamReader interface { - // Returns a channel of events as they are read from the event stream. - Events() <-chan EventStreamEvent - - // Close will close the underlying event stream reader. For event stream over - // HTTP this will also close the HTTP connection. - Close() error - - // Returns any error that has occurred while reading from the event stream. - Err() error -} - -type readGetEventStreamEventStream struct { - eventReader *eventstreamapi.EventReader - stream chan EventStreamEvent - errVal atomic.Value - - done chan struct{} - closeOnce sync.Once - - initResp eventstreamapi.Unmarshaler -} - -func newReadGetEventStreamEventStream( - reader io.ReadCloser, - unmarshalers request.HandlerList, - logger aws.Logger, - logLevel aws.LogLevelType, - initResp eventstreamapi.Unmarshaler, -) *readGetEventStreamEventStream { - r := &readGetEventStreamEventStream{ - stream: make(chan EventStreamEvent), - done: make(chan struct{}), - initResp: initResp, - } - - r.eventReader = eventstreamapi.NewEventReader( - reader, - protocol.HandlerPayloadUnmarshal{ - Unmarshalers: unmarshalers, - }, - r.unmarshalerForEventType, - ) - r.eventReader.UseLogger(logger, logLevel) - - return r -} - -// Close will close the underlying event stream reader. For EventStream over -// HTTP this will also close the HTTP connection. -func (r *readGetEventStreamEventStream) Close() error { - r.closeOnce.Do(r.safeClose) - - return r.Err() -} - -func (r *readGetEventStreamEventStream) safeClose() { - close(r.done) - err := r.eventReader.Close() - if err != nil { - r.errVal.Store(err) - } -} - -func (r *readGetEventStreamEventStream) Err() error { - if v := r.errVal.Load(); v != nil { - return v.(error) - } - - return nil -} - -func (r *readGetEventStreamEventStream) Events() <-chan EventStreamEvent { - return r.stream -} - -func (r *readGetEventStreamEventStream) readEventStream() { - defer close(r.stream) - - for { - event, err := r.eventReader.ReadEvent() - if err != nil { - if err == io.EOF { - return - } - select { - case <-r.done: - // If closed already ignore the error - return - default: - } - r.errVal.Store(err) - return - } - - select { - case r.stream <- event.(EventStreamEvent): - case <-r.done: - return - } - } -} - -func (r *readGetEventStreamEventStream) unmarshalerForEventType( - eventType string, -) (eventstreamapi.Unmarshaler, error) { - switch eventType { - case "initial-response": - return r.initResp, nil - - case "Empty": - return &EmptyEvent{}, nil - - case "ExplicitPayload": - return &ExplicitPayloadEvent{}, nil - - case "Headers": - return &HeaderOnlyEvent{}, nil - - case "ImplicitPayload": - return &ImplicitPayloadEvent{}, nil - - case "PayloadOnly": - return &PayloadOnlyEvent{}, nil - - case "PayloadOnlyBlob": - return &PayloadOnlyBlobEvent{}, nil - - case "PayloadOnlyString": - return &PayloadOnlyStringEvent{}, nil - - case "Exception": - return &ExceptionEvent{}, nil - - case "Exception2": - return &ExceptionEvent2{}, nil - default: - return nil, awserr.New( - request.ErrCodeSerialization, - fmt.Sprintf("unknown event type name, %s, for GetEventStreamEventStream", eventType), - nil, - ) +func (s *ExplicitPayloadEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + msg.Headers.Set("LongVal", eventstream.Int64Value(*s.LongVal)) + msg.Headers.Set("StringVal", eventstream.StringValue(*s.StringVal)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err } + msg.Payload = buf.Bytes() + return msg, err } type GetEventStreamInput struct { @@ -1000,8 +1138,7 @@ func (s *GetEventStreamInput) SetInputVal(v string) *GetEventStreamInput { type GetEventStreamOutput struct { _ struct{} `type:"structure"` - // Use AEventStreamRef to use the API's stream. - AEventStreamRef *GetEventStreamEventStream `type:"structure"` + eventStream *GetEventStreamEventStream IntVal *int64 `type:"integer"` @@ -1018,12 +1155,6 @@ func (s GetEventStreamOutput) GoString() string { return s.String() } -// SetAEventStreamRef sets the AEventStreamRef field's value. -func (s *GetEventStreamOutput) SetAEventStreamRef(v *GetEventStreamEventStream) *GetEventStreamOutput { - s.AEventStreamRef = v - return s -} - // SetIntVal sets the IntVal field's value. func (s *GetEventStreamOutput) SetIntVal(v int64) *GetEventStreamOutput { s.IntVal = &v @@ -1036,47 +1167,9 @@ func (s *GetEventStreamOutput) SetStrVal(v string) *GetEventStreamOutput { return s } -func (s *GetEventStreamOutput) runEventStreamLoop(r *request.Request) { - if r.Error != nil { - return - } - reader := newReadGetEventStreamEventStream( - r.HTTPResponse.Body, - r.Handlers.UnmarshalStream, - r.Config.Logger, - r.Config.LogLevel.Value(), - s, - ) - go reader.readEventStream() - - eventStream := &GetEventStreamEventStream{ - StreamCloser: r.HTTPResponse.Body, - Reader: reader, - } - s.AEventStreamRef = eventStream -} - -func (s *GetEventStreamOutput) unmarshalInitialResponse(r *request.Request) { - // Wait for the initial response event, which must be the first event to be - // received from the API. - select { - case event, ok := <-s.AEventStreamRef.Events(): - if !ok { - return - } - es := s.AEventStreamRef - v, ok := event.(*GetEventStreamOutput) - if !ok || v == nil { - r.Error = awserr.New( - request.ErrCodeSerialization, - fmt.Sprintf("invalid event, %T, expect *SubscribeToShardOutput, %v", event, v), - nil, - ) - return - } - *s = *v - s.AEventStreamRef = es - } +// GetStream returns the type to interact with the event stream. +func (s *GetEventStreamOutput) GetStream() *GetEventStreamEventStream { + return s.eventStream } // The GetEventStreamOutput is and event in the EventStream group of events. @@ -1096,6 +1189,16 @@ func (s *GetEventStreamOutput) UnmarshalEvent( return nil } +func (s *GetEventStreamOutput) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + type HeaderOnlyEvent struct { _ struct{} `type:"structure"` @@ -1222,6 +1325,19 @@ func (s *HeaderOnlyEvent) UnmarshalEvent( return nil } +func (s *HeaderOnlyEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + msg.Headers.Set("BlobVal", eventstream.BytesValue(s.BlobVal)) + msg.Headers.Set("BoolVal", eventstream.BoolValue(*s.BoolVal)) + msg.Headers.Set("ByteVal", eventstream.Int8Value(int8(*s.ByteVal))) + msg.Headers.Set("IntegerVal", eventstream.Int32Value(int32(*s.IntegerVal))) + msg.Headers.Set("LongVal", eventstream.Int64Value(*s.LongVal)) + msg.Headers.Set("ShortVal", eventstream.Int16Value(int16(*s.ShortVal))) + msg.Headers.Set("StringVal", eventstream.StringValue(*s.StringVal)) + msg.Headers.Set("TimeVal", eventstream.TimestampValue(*s.TimeVal)) + return msg, err +} + type ImplicitPayloadEvent struct { _ struct{} `type:"structure"` @@ -1282,6 +1398,17 @@ func (s *ImplicitPayloadEvent) UnmarshalEvent( return nil } +func (s *ImplicitPayloadEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + msg.Headers.Set("ByteVal", eventstream.Int8Value(int8(*s.ByteVal))) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + type NestedShape struct { _ struct{} `type:"structure"` @@ -1377,6 +1504,13 @@ func (s *PayloadOnlyBlobEvent) UnmarshalEvent( return nil } +func (s *PayloadOnlyBlobEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + msg.Headers.Set(":content-type", eventstream.StringValue("application/octet-stream")) + msg.Payload = s.BlobPayload + return msg, err +} + type PayloadOnlyEvent struct { _ struct{} `type:"structure" payload:"NestedVal"` @@ -1416,6 +1550,16 @@ func (s *PayloadOnlyEvent) UnmarshalEvent( return nil } +func (s *PayloadOnlyEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + type PayloadOnlyStringEvent struct { _ struct{} `type:"structure" payload:"StringPayload"` @@ -1450,3 +1594,9 @@ func (s *PayloadOnlyStringEvent) UnmarshalEvent( s.StringPayload = aws.String(string(msg.Payload)) return nil } + +func (s *PayloadOnlyStringEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + msg.Payload = []byte(aws.StringValue(s.StringPayload)) + return msg, err +} diff --git a/private/model/api/codegentest/service/rpcservice/cust_eventstream_tests.go b/private/model/api/codegentest/service/rpcservice/cust_eventstream_tests.go deleted file mode 100644 index 3c934490ca8..00000000000 --- a/private/model/api/codegentest/service/rpcservice/cust_eventstream_tests.go +++ /dev/null @@ -1,6 +0,0 @@ -package rpcservice - -// Ensure that the event stream member is renamed. -var _ = GetEventStreamOutput{ - AEventStreamRef: nil, -} diff --git a/private/model/api/codegentest/service/rpcservice/eventstream_test.go b/private/model/api/codegentest/service/rpcservice/eventstream_test.go index f3169b45600..92045c81018 100644 --- a/private/model/api/codegentest/service/rpcservice/eventstream_test.go +++ b/private/model/api/codegentest/service/rpcservice/eventstream_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.6 +// +build go1.10 package rpcservice @@ -46,12 +46,12 @@ func TestEmptyStream_Read(t *testing.T) { if err != nil { t.Fatalf("expect no error got, %v", err) } - defer resp.EventStream.Close() + defer resp.GetStream().Close() // Trim off response output type pseudo event so only event messages remain. expectEvents = expectEvents[1:] var i int - for event := range resp.EventStream.Events() { + for event := range resp.GetStream().Events() { if event == nil { t.Errorf("%d, expect event, got nil", i) } @@ -61,7 +61,7 @@ func TestEmptyStream_Read(t *testing.T) { i++ } - if err := resp.EventStream.Err(); err != nil { + if err := resp.GetStream().Err(); err != nil { t.Errorf("expect no error, %v", err) } } @@ -86,10 +86,10 @@ func TestEmptyStream_ReadClose(t *testing.T) { t.Fatalf("expect no error got, %v", err) } - resp.EventStream.Close() - <-resp.EventStream.Events() + resp.GetStream().Close() + <-resp.GetStream().Events() - if err := resp.EventStream.Err(); err != nil { + if err := resp.GetStream().Err(); err != nil { t.Errorf("expect no error, %v", err) } } @@ -127,16 +127,16 @@ func BenchmarkEmptyStream_Read(b *testing.B) { if err != nil { b.Fatalf("failed to create request, %v", err) } - defer resp.EventStream.Close() + defer resp.GetStream().Close() b.ResetTimer() for i := 0; i < b.N; i++ { - if err = resp.EventStream.Err(); err != nil { + if err = resp.GetStream().Err(); err != nil { b.Fatalf("expect no error, got %v", err) } - event := <-resp.EventStream.Events() + event := <-resp.GetStream().Events() if event == nil { - b.Fatalf("expect event, got nil, %v, %d", resp.EventStream.Err(), i) + b.Fatalf("expect event, got nil, %v, %d", resp.GetStream().Err(), i) } } } @@ -191,7 +191,7 @@ func TestGetEventStream_Read(t *testing.T) { if err != nil { t.Fatalf("expect no error got, %v", err) } - defer resp.AEventStreamRef.Close() + defer resp.GetStream().Close() expectResp := expectEvents[0].(*GetEventStreamOutput) if e, a := expectResp.IntVal, resp.IntVal; !reflect.DeepEqual(e, a) { t.Errorf("expect %v, got %v", e, a) @@ -203,7 +203,7 @@ func TestGetEventStream_Read(t *testing.T) { expectEvents = expectEvents[1:] var i int - for event := range resp.AEventStreamRef.Events() { + for event := range resp.GetStream().Events() { if event == nil { t.Errorf("%d, expect event, got nil", i) } @@ -213,7 +213,7 @@ func TestGetEventStream_Read(t *testing.T) { i++ } - if err := resp.AEventStreamRef.Err(); err != nil { + if err := resp.GetStream().Err(); err != nil { t.Errorf("expect no error, %v", err) } } @@ -239,19 +239,19 @@ func TestGetEventStream_ReadClose(t *testing.T) { } // Assert calling Err before close does not close the stream. - resp.AEventStreamRef.Err() + resp.GetStream().Err() select { - case _, ok := <-resp.AEventStreamRef.Events(): + case _, ok := <-resp.GetStream().Events(): if !ok { t.Fatalf("expect stream not to be closed, but was") } default: } - resp.AEventStreamRef.Close() - <-resp.AEventStreamRef.Events() + resp.GetStream().Close() + <-resp.GetStream().Events() - if err := resp.AEventStreamRef.Err(); err != nil { + if err := resp.GetStream().Err(); err != nil { t.Errorf("expect no error, %v", err) } } @@ -289,16 +289,16 @@ func BenchmarkGetEventStream_Read(b *testing.B) { if err != nil { b.Fatalf("failed to create request, %v", err) } - defer resp.AEventStreamRef.Close() + defer resp.GetStream().Close() b.ResetTimer() for i := 0; i < b.N; i++ { - if err = resp.AEventStreamRef.Err(); err != nil { + if err = resp.GetStream().Err(); err != nil { b.Fatalf("expect no error, got %v", err) } - event := <-resp.AEventStreamRef.Events() + event := <-resp.GetStream().Events() if event == nil { - b.Fatalf("expect event, got nil, %v, %d", resp.AEventStreamRef.Err(), i) + b.Fatalf("expect event, got nil, %v, %d", resp.GetStream().Err(), i) } } } @@ -543,11 +543,11 @@ func TestGetEventStream_ReadException(t *testing.T) { t.Fatalf("expect no error got, %v", err) } - defer resp.AEventStreamRef.Close() + defer resp.GetStream().Close() - <-resp.AEventStreamRef.Events() + <-resp.GetStream().Events() - err = resp.AEventStreamRef.Err() + err = resp.GetStream().Err() if err == nil { t.Fatalf("expect err, got none") } diff --git a/private/model/api/codegentest/service/rpcservice/service.go b/private/model/api/codegentest/service/rpcservice/service.go index 35900d8c438..2fb9ef9262c 100644 --- a/private/model/api/codegentest/service/rpcservice/service.go +++ b/private/model/api/codegentest/service/rpcservice/service.go @@ -78,6 +78,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) + svc.Handlers.BuildStream.PushBackNamed(jsonrpc.BuildHandler) svc.Handlers.UnmarshalStream.PushBackNamed(jsonrpc.UnmarshalHandler) // Run custom client initialization if present diff --git a/private/model/api/customization_passes.go b/private/model/api/customization_passes.go index e307600352b..c85d9d98117 100644 --- a/private/model/api/customization_passes.go +++ b/private/model/api/customization_passes.go @@ -306,38 +306,3 @@ func backfillAuthType(typ AuthType, opNames ...string) func(*API) error { return nil } } - -func (a *API) renameS3EventStreamMember() { - if a.PackageName() != "s3" { - return - } - - // Rewrite the S3 SelectObjectContent EventStream response member ref name - // with "EventStream" for backwards compatibility. - customizeEventStreamOutputMember(a, "SelectObjectContent", "Payload") -} - -// Customize an operation's event stream output member to be "EventStream" for -// backwards compatible behavior with APIs that incorrectly renamed the member -// when event stream support was first added. -func customizeEventStreamOutputMember(a *API, opName, memberName string) error { - const replaceName = "EventStream" - - op, ok := a.Operations[opName] - - if !ok { - return fmt.Errorf("unable to customize %s, operation not found", opName) - } else if _, ok = op.OutputRef.Shape.MemberRefs[replaceName]; ok { - return fmt.Errorf("unable to customize %s operation, output shape has %s member", - opName, replaceName) - } else if _, ok = op.OutputRef.Shape.MemberRefs[memberName]; !ok { - return fmt.Errorf("unable to customize %s operation, %s member not found", - opName, memberName) - } - - ref := op.OutputRef.Shape.MemberRefs[memberName] - delete(op.OutputRef.Shape.MemberRefs, memberName) - op.OutputRef.Shape.MemberRefs[replaceName] = ref - - return nil -} diff --git a/private/model/api/eventstream.go b/private/model/api/eventstream.go index 34be423441a..22b3d5e395e 100644 --- a/private/model/api/eventstream.go +++ b/private/model/api/eventstream.go @@ -5,39 +5,79 @@ package api import ( "bytes" "fmt" - "io" - "os" - "strings" "text/template" ) // EventStreamAPI provides details about the event stream async API and // associated EventStream shapes. type EventStreamAPI struct { - API *API - Name string - Operation *Operation - Shape *Shape - Inbound *EventStream - Outbound *EventStream + API *API + Operation *Operation + Name string + InputStream *EventStream + OutputStream *EventStream + RequireHTTP2 bool + + // The eventstream generated code was generated with an older model that + // does not scale with bi-directional models. This drives the need to + // expose the output shape's event stream member as an exported member. + Legacy bool +} + +func (es *EventStreamAPI) StreamInputEventTypeGetterName() string { + return "eventTypeFor" + es.Name + "InputEvent" +} +func (es *EventStreamAPI) StreamOutputUnmarshalerForEventName() string { + return "eventTypeFor" + es.Name + "OutputEvent" } // EventStream represents a single eventstream group (input/output) and the // modeled events that are known for the stream. type EventStream struct { Name string - RefName string Shape *Shape Events []*Event Exceptions []*Event } +func (es *EventStream) EventGroupName() string { + return es.Name + "Event" +} + +func (es *EventStream) StreamWriterAPIName() string { + return es.Name + "Writer" +} + +func (es *EventStream) StreamWriterImplName() string { + return "write" + es.Name +} + +func (es *EventStream) StreamEventTypeGetterName() string { + return "eventTypeFor" + es.Name + "Event" +} + +func (es *EventStream) StreamReaderAPIName() string { + return es.Name + "Reader" +} + +func (es *EventStream) StreamReaderImplName() string { + return "read" + es.Name +} +func (es *EventStream) StreamReaderImplConstructorName() string { + return "newRead" + es.Name +} + +func (es *EventStream) StreamUnmarshalerForEventName() string { + return "unmarshalerFor" + es.Name + "Event" +} + // Event is a single EventStream event that can be sent or received in an // EventStream. type Event struct { - Name string - Shape *Shape - For *EventStream + Name string + Shape *Shape + For *EventStream + Private bool } // ShapeDoc returns the docstring for the EventStream API. @@ -45,25 +85,26 @@ func (esAPI *EventStreamAPI) ShapeDoc() string { tmpl := template.Must(template.New("eventStreamShapeDoc").Parse(` {{- $.Name }} provides handling of EventStreams for the {{ $.Operation.ExportedName }} API. -{{- if $.Inbound }} -Use this type to receive {{ $.Inbound.Name }} events. The events -can be read from the Events channel member. +{{- if $.OutputStream }} + +Use this type to receive {{ $.OutputStream.Name }} events. The events +can be read from the stream. The events that can be received are: -{{ range $_, $event := $.Inbound.Events }} +{{- range $_, $event := $.OutputStream.Events }} * {{ $event.Shape.ShapeName }} {{- end }} {{- end }} -{{- if $.Outbound }} +{{- if $.InputStream }} -Use this type to send {{ $.Outbound.Name }} events. The events -can be sent with the Send method. +Use this type to send {{ $.InputStream.Name }} events. The events +can be written to the stream. The events that can be sent are: -{{ range $_, $event := $.Outbound.Events -}} +{{ range $_, $event := $.InputStream.Events -}} * {{ $event.Shape.ShapeName }} {{- end }} @@ -71,7 +112,8 @@ The events that can be sent are: var w bytes.Buffer if err := tmpl.Execute(&w, esAPI); err != nil { - panic(fmt.Sprintf("failed to generate eventstream shape template for %v, %v", esAPI.Name, err)) + panic(fmt.Sprintf("failed to generate eventstream shape template for %v, %v", + esAPI.Operation.ExportedName, err)) } return commentify(w.String()) @@ -92,1125 +134,177 @@ func eventStreamAPIShapeRefDoc(refName string) string { } func (a *API) setupEventStreams() error { - const eventStreamMemberName = "EventStream" + streams := EventStreams{} for opName, op := range a.Operations { - outbound := setupEventStream(op.InputRef.Shape) - inbound := setupEventStream(op.OutputRef.Shape) + inputRef := getEventStreamMember(op.InputRef.Shape) + outputRef := getEventStreamMember(op.OutputRef.Shape) - if outbound == nil && inbound == nil { + if inputRef == nil && outputRef == nil { continue } - - if outbound != nil { - err := fmt.Errorf("Outbound stream support not implemented, %s, %s", - outbound.Name, outbound.Shape.ShapeName) - - if a.IgnoreUnsupportedAPIs { - fmt.Fprintf(os.Stderr, "removing operation, %s, %v\n", opName, err) - delete(a.Operations, opName) - continue - } - return UnsupportedAPIModelError{ - Err: err, - } + if inputRef != nil && outputRef == nil { + return fmt.Errorf("event stream input only stream not supported for protocol %s, %s, %v", + a.NiceName(), opName, a.Metadata.Protocol) } - switch a.Metadata.Protocol { case `rest-json`, `rest-xml`, `json`: default: return UnsupportedAPIModelError{ - Err: fmt.Errorf("EventStream not supported for protocol %v", - a.Metadata.Protocol), + Err: fmt.Errorf("EventStream not supported for protocol %s, %s, %v", + a.NiceName(), opName, a.Metadata.Protocol), } } - op.EventStreamAPI = &EventStreamAPI{ - API: a, - Name: op.ExportedName + eventStreamMemberName, - Operation: op, - Outbound: outbound, - Inbound: inbound, - } - - streamShape := &Shape{ - API: a, - ShapeName: op.EventStreamAPI.Name, - Documentation: op.EventStreamAPI.ShapeDoc(), - Type: "structure", - EventStreamAPI: op.EventStreamAPI, - IsEventStream: true, - MemberRefs: map[string]*ShapeRef{ - "Inbound": &ShapeRef{ - ShapeName: inbound.Shape.ShapeName, - Shape: inbound.Shape, - }, - }, + var inputStream *EventStream + if inputRef != nil { + inputStream = streams.GetStream(op.InputRef.Shape, inputRef.Shape) + inputStream.Shape.IsInputEventStream = true } - // persist reference to the original inbound shape so its event types - // can be walked during generation. - inbound.Shape.refs = append(inbound.Shape.refs, streamShape.MemberRefs["Inbound"]) - streamShapeRef := &ShapeRef{ - API: a, - ShapeName: streamShape.ShapeName, - Shape: streamShape, - Documentation: eventStreamAPIShapeRefDoc(inbound.RefName), + var outputStream *EventStream + if outputRef != nil { + outputStream = streams.GetStream(op.OutputRef.Shape, outputRef.Shape) + outputStream.Shape.IsOutputEventStream = true } - streamShape.refs = []*ShapeRef{streamShapeRef} - op.EventStreamAPI.Shape = streamShape - - op.OutputRef.Shape.MemberRefs[inbound.RefName] = streamShapeRef - op.OutputRef.Shape.EventStreamsMemberName = inbound.RefName - if s, ok := a.Shapes[streamShape.ShapeName]; ok { - s.Rename(streamShape.ShapeName + "Data") - } - a.Shapes[streamShape.ShapeName] = streamShape + requireHTTP2 := op.API.Metadata.ProtocolSettings.HTTP2 == "eventstream" && + inputStream != nil && outputStream != nil a.HasEventStream = true - } - - return nil -} - -func setupEventStream(topShape *Shape) *EventStream { - var eventStream *EventStream - for refName, ref := range topShape.MemberRefs { - if !ref.Shape.IsEventStream { - continue - } - if eventStream != nil { - // Only on event stream member within an Input/Output shape is valid. - panic(fmt.Sprintf("multiple shape ref eventstreams, %s, prev: %s", - refName, eventStream.Name)) - } - - eventStream = &EventStream{ - Name: ref.Shape.ShapeName, - RefName: refName, - Shape: ref.Shape, - } - - if topShape.API.Metadata.Protocol == "json" { - topShape.EventFor = append(topShape.EventFor, eventStream) - } - - for _, eventRefName := range ref.Shape.MemberNames() { - eventRef := ref.Shape.MemberRefs[eventRefName] - if !(eventRef.Shape.IsEvent || eventRef.Shape.Exception) { - panic(fmt.Sprintf("unexpected non-event member reference %s.%s", - ref.Shape.ShapeName, eventRefName)) - } - - updateEventPayloadRef(eventRef.Shape) - - eventRef.Shape.EventFor = append(eventRef.Shape.EventFor, eventStream) - - // Exceptions and events are two different lists to allow the SDK - // to easily generate code with the two handled differently. - event := &Event{ - Name: eventRefName, - Shape: eventRef.Shape, - For: eventStream, - } - if eventRef.Shape.Exception { - eventStream.Exceptions = append(eventStream.Exceptions, event) - } else { - eventStream.Events = append(eventStream.Events, event) + op.EventStreamAPI = &EventStreamAPI{ + API: a, + Operation: op, + Name: op.ExportedName + "EventStream", + InputStream: inputStream, + OutputStream: outputStream, + Legacy: isLegacyEventStream(op), + RequireHTTP2: requireHTTP2, + } + op.OutputRef.Shape.OutputEventStreamAPI = op.EventStreamAPI + + if s, ok := a.Shapes[op.EventStreamAPI.Name]; ok { + newName := op.EventStreamAPI.Name + "Data" + if _, ok := a.Shapes[newName]; ok { + panic(fmt.Sprintf( + "%s: attempting to rename %s to %s, but shape with that name already exists", + a.NiceName(), op.EventStreamAPI.Name, newName)) } + s.Rename(newName) } - - // Remove the event stream member and shape as they will be added - // elsewhere. - ref.Shape.removeRef(ref) - delete(topShape.MemberRefs, refName) - delete(topShape.API.Shapes, ref.Shape.ShapeName) - } - - return eventStream -} - -func updateEventPayloadRef(parent *Shape) { - refName := parent.PayloadRefName() - if len(refName) == 0 { - return - } - - payloadRef := parent.MemberRefs[refName] - - if payloadRef.Shape.Type == "blob" { - return - } - - if len(payloadRef.LocationName) != 0 { - return } - payloadRef.LocationName = refName -} - -func renderEventStreamAPIShape(w io.Writer, s *Shape) error { - // Imports needed by the EventStream APIs. - s.API.AddImport("fmt") - s.API.AddImport("bytes") - s.API.AddImport("io") - s.API.AddImport("sync") - s.API.AddImport("sync/atomic") - s.API.AddSDKImport("aws") - s.API.AddSDKImport("aws/awserr") - s.API.AddSDKImport("private/protocol/eventstream") - s.API.AddSDKImport("private/protocol/eventstream/eventstreamapi") - - return eventStreamAPIShapeTmpl.Execute(w, s) -} - -// Template for an EventStream API Shape that will provide read/writing events -// across the EventStream. This is a special shape that's only public members -// are the Events channel and a Close and Err method. -// -// Executed in the context of a Shape. -var eventStreamAPIShapeTmpl = func() *template.Template { - t := template.Must( - template.New("eventStreamAPIShapeTmpl"). - Funcs(template.FuncMap{}). - Parse(eventStreamAPITmplDef), - ) - - template.Must( - t.AddParseTree( - "eventStreamAPIReaderTmpl", eventStreamAPIReaderTmpl.Tree), - ) - - return t -}() - -const eventStreamAPITmplDef = ` -{{ $.Documentation }} -type {{ $.ShapeName }} struct { - {{- if $.EventStreamAPI.Inbound }} - // Reader is the EventStream reader for the {{ $.EventStreamAPI.Inbound.Name }} - // events. This value is automatically set by the SDK when the API call is made - // Use this member when unit testing your code with the SDK to mock out the - // EventStream Reader. - // - // Must not be nil. - Reader {{ $.ShapeName }}Reader - - {{ end -}} - - {{- if $.EventStreamAPI.Outbound }} - // Writer is the EventStream reader for the {{ $.EventStreamAPI.Inbound.Name }} - // events. This value is automatically set by the SDK when the API call is made - // Use this member when unit testing your code with the SDK to mock out the - // EventStream Writer. - // - // Must not be nil. - Writer *{{ $.ShapeName }}Writer - - {{ end -}} - - // StreamCloser is the io.Closer for the EventStream connection. For HTTP - // EventStream this is the response Body. The stream will be closed when - // the Close method of the EventStream is called. - StreamCloser io.Closer -} - -// Close closes the EventStream. This will also cause the Events channel to be -// closed. You can use the closing of the Events channel to terminate your -// application's read from the API's EventStream. -{{- if $.EventStreamAPI.Inbound }} -// -// Will close the underlying EventStream reader. For EventStream over HTTP -// connection this will also close the HTTP connection. -{{ end -}} -// -// Close must be called when done using the EventStream API. Not calling Close -// may result in resource leaks. -func (es *{{ $.ShapeName }}) Close() (err error) { - {{- if $.EventStreamAPI.Inbound }} - es.Reader.Close() - {{ end -}} - {{- if $.EventStreamAPI.Outbound }} - es.Writer.Close() - {{ end -}} - - es.StreamCloser.Close() - - return es.Err() -} - -// Err returns any error that occurred while reading EventStream Events from -// the service API's response. Returns nil if there were no errors. -func (es *{{ $.ShapeName }}) Err() error { - {{- if $.EventStreamAPI.Outbound }} - if err := es.Writer.Err(); err != nil { - return err - } - {{ end -}} - - {{- if $.EventStreamAPI.Inbound }} - if err := es.Reader.Err(); err != nil { - return err - } - {{ end -}} - return nil } -{{ if $.EventStreamAPI.Inbound }} - // Events returns a channel to read EventStream Events from the - // {{ $.EventStreamAPI.Operation.ExportedName }} API. - // - // These events are: - // {{ range $_, $event := $.EventStreamAPI.Inbound.Events }} - // * {{ $event.Shape.ShapeName }} - {{- end }} - func (es *{{ $.ShapeName }}) Events() <-chan {{ $.EventStreamAPI.Inbound.Name }}Event { - return es.Reader.Events() - } - - {{ template "eventStreamAPIReaderTmpl" $ }} -{{ end }} - -{{ if $.EventStreamAPI.Outbound }} - // TODO writer helper method. -{{ end }} - -` - -var eventStreamAPIReaderTmpl = template.Must(template.New("eventStreamAPIReaderTmpl"). - Funcs(template.FuncMap{}). - Parse(` -// {{ $.EventStreamAPI.Inbound.Name }}Event groups together all EventStream -// events read from the {{ $.EventStreamAPI.Operation.ExportedName }} API. -// -// These events are: -// {{ range $_, $event := $.EventStreamAPI.Inbound.Events }} -// * {{ $event.Shape.ShapeName }} -{{- end }} -type {{ $.EventStreamAPI.Inbound.Name }}Event interface { - event{{ $.EventStreamAPI.Inbound.Name }}() -} - -// {{ $.ShapeName }}Reader provides the interface for reading EventStream -// Events from the {{ $.EventStreamAPI.Operation.ExportedName }} API. The -// default implementation for this interface will be {{ $.ShapeName }}. -// -// The reader's Close method must allow multiple concurrent calls. -// -// These events are: -// {{ range $_, $event := $.EventStreamAPI.Inbound.Events }} -// * {{ $event.Shape.ShapeName }} -{{- end }} -type {{ $.ShapeName }}Reader interface { - // Returns a channel of events as they are read from the event stream. - Events() <-chan {{ $.EventStreamAPI.Inbound.Name }}Event - - // Close will close the underlying event stream reader. For event stream over - // HTTP this will also close the HTTP connection. - Close() error - - // Returns any error that has occurred while reading from the event stream. - Err() error -} - -type read{{ $.ShapeName }} struct { - eventReader *eventstreamapi.EventReader - stream chan {{ $.EventStreamAPI.Inbound.Name }}Event - errVal atomic.Value +// EventStreams is a map of streams for the API shared across all operations. +// Ensurs that no stream is duplicated. +type EventStreams map[*Shape]*EventStream - done chan struct{} - closeOnce sync.Once - - {{ if eq $.API.Metadata.Protocol "json" -}} - initResp eventstreamapi.Unmarshaler - {{ end -}} -} - -func newRead{{ $.ShapeName }}( - reader io.ReadCloser, - unmarshalers request.HandlerList, - logger aws.Logger, - logLevel aws.LogLevelType, - {{ if eq $.API.Metadata.Protocol "json" -}} - initResp eventstreamapi.Unmarshaler, - {{ end -}} -) *read{{ $.ShapeName }} { - r := &read{{ $.ShapeName }}{ - stream: make(chan {{ $.EventStreamAPI.Inbound.Name }}Event), - done: make(chan struct{}), - {{ if eq $.API.Metadata.Protocol "json" -}} - initResp: initResp, - {{ end -}} +// GetStream returns an EventStream for the operations top level shape, and +// member reference to the stream shape. +func (es *EventStreams) GetStream(topShape *Shape, streamShape *Shape) *EventStream { + var stream *EventStream + if v, ok := (*es)[streamShape]; ok { + stream = v + } else { + stream = setupEventStream(streamShape) + (*es)[streamShape] = stream } - r.eventReader = eventstreamapi.NewEventReader( - reader, - protocol.HandlerPayloadUnmarshal{ - Unmarshalers: unmarshalers, - }, - r.unmarshalerForEventType, - ) - r.eventReader.UseLogger(logger, logLevel) - - return r -} - -// Close will close the underlying event stream reader. For EventStream over -// HTTP this will also close the HTTP connection. -func (r *read{{ $.ShapeName }}) Close() error { - r.closeOnce.Do(r.safeClose) - - return r.Err() -} - -func (r *read{{ $.ShapeName }}) safeClose() { - close(r.done) - err := r.eventReader.Close() - if err != nil { - r.errVal.Store(err) - } -} - -func (r *read{{ $.ShapeName }}) Err() error { - if v := r.errVal.Load(); v != nil { - return v.(error) + if topShape.API.Metadata.Protocol == "json" { + topShape.EventFor = append(topShape.EventFor, stream) } - return nil + return stream } -func (r *read{{ $.ShapeName }}) Events() <-chan {{ $.EventStreamAPI.Inbound.Name }}Event { - return r.stream +var legacyEventStream = map[string]map[string]struct{}{ + "s3": { + "SelectObjectContent": struct{}{}, + }, + "kinesis": { + "SubscribeToShard": struct{}{}, + }, } -func (r *read{{ $.ShapeName }}) readEventStream() { - defer close(r.stream) - - for { - event, err := r.eventReader.ReadEvent() - if err != nil { - if err == io.EOF { - return - } - select { - case <-r.done: - // If closed already ignore the error - return - default: - } - r.errVal.Store(err) - return - } - - select { - case r.stream <- event.({{ $.EventStreamAPI.Inbound.Name }}Event): - case <-r.done: - return +func isLegacyEventStream(op *Operation) bool { + if s, ok := legacyEventStream[op.API.PackageName()]; ok { + if _, ok = s[op.ExportedName]; ok { + return true } } + return false } -func (r *read{{ $.ShapeName }}) unmarshalerForEventType( - eventType string, -) (eventstreamapi.Unmarshaler, error) { - switch eventType { - {{- if eq $.API.Metadata.Protocol "json" }} - case "initial-response": - return r.initResp, nil - {{ end -}} - {{- range $_, $event := $.EventStreamAPI.Inbound.Events }} - case {{ printf "%q" $event.Name }}: - return &{{ $event.Shape.ShapeName }}{}, nil - {{ end -}} - {{- range $_, $event := $.EventStreamAPI.Inbound.Exceptions }} - case {{ printf "%q" $event.Name }}: - return &{{ $event.Shape.ShapeName }}{}, nil - {{ end -}} - default: - return nil, awserr.New( - request.ErrCodeSerialization, - fmt.Sprintf("unknown event type name, %s, for {{ $.ShapeName }}", eventType), - nil, - ) - } -} -`)) - -// Template for the EventStream API Output shape that contains the EventStream -// member. -// -// Executed in the context of a Shape. -var eventStreamAPILoopMethodTmpl = template.Must( - template.New("eventStreamAPILoopMethodTmpl").Parse(` -func (s *{{ $.ShapeName }}) runEventStreamLoop(r *request.Request) { - if r.Error != nil { - return - } - - {{- $esMemberRef := index $.MemberRefs $.EventStreamsMemberName }} - {{- if $esMemberRef.Shape.EventStreamAPI.Inbound }} - reader := newRead{{ $esMemberRef.ShapeName }}( - r.HTTPResponse.Body, - r.Handlers.UnmarshalStream, - r.Config.Logger, - r.Config.LogLevel.Value(), - {{ if eq $.API.Metadata.Protocol "json" -}} - s, - {{ end -}} - ) - go reader.readEventStream() - - eventStream := &{{ $esMemberRef.ShapeName }} { - StreamCloser: r.HTTPResponse.Body, - Reader: reader, - } - {{ end -}} - - s.{{ $.EventStreamsMemberName }} = eventStream -} - -{{ if eq $.API.Metadata.Protocol "json" -}} - func (s *{{ $.ShapeName }}) unmarshalInitialResponse(r *request.Request) { - // Wait for the initial response event, which must be the first event to be - // received from the API. - select { - case event, ok := <-s.{{ $.EventStreamsMemberName }}.Events(): - if !ok { - return - } - es := s.{{ $.EventStreamsMemberName }} - v, ok := event.(*{{ $.ShapeName }}) - if !ok || v == nil { - r.Error = awserr.New( - request.ErrCodeSerialization, - fmt.Sprintf("invalid event, %T, expect *SubscribeToShardOutput, %v", event, v), - nil, - ) - return - } - *s = *v - s.{{ $.EventStreamsMemberName }} = es - } +func (e EventStreamAPI) OutputMemberName() string { + if e.Legacy { + return "EventStream" } -{{ end -}} -`)) -// EventStreamHeaderTypeMap provides the mapping of a EventStream Header's -// Value type to the shape reference's member type. -type EventStreamHeaderTypeMap struct { - Header string - Member string + return "eventStream" } -var eventStreamEventShapeTmplFuncs = template.FuncMap{ - "EventStreamHeaderTypeMap": func(ref *ShapeRef) EventStreamHeaderTypeMap { - switch ref.Shape.Type { - case "boolean": - return EventStreamHeaderTypeMap{Header: "bool", Member: "bool"} - case "byte": - return EventStreamHeaderTypeMap{Header: "int8", Member: "int64"} - case "short": - return EventStreamHeaderTypeMap{Header: "int16", Member: "int64"} - case "integer": - return EventStreamHeaderTypeMap{Header: "int32", Member: "int64"} - case "long": - return EventStreamHeaderTypeMap{Header: "int64", Member: "int64"} - case "timestamp": - return EventStreamHeaderTypeMap{Header: "time.Time", Member: "time.Time"} - case "blob": - return EventStreamHeaderTypeMap{Header: "[]byte", Member: "[]byte"} - case "string": - return EventStreamHeaderTypeMap{Header: "string", Member: "string"} - // TODO case "uuid" what is modeled type - default: - panic("unsupported EventStream header type, " + ref.Shape.Type) - } - }, - "HasNonBlobPayloadMembers": eventHasNonBlobPayloadMembers, -} - -// Returns if the event has any members which are not the event's blob payload, -// nor a header. -func eventHasNonBlobPayloadMembers(s *Shape) bool { - num := len(s.MemberRefs) - for _, ref := range s.MemberRefs { - if ref.IsEventHeader || (ref.IsEventPayload && (ref.Shape.Type == "blob" || ref.Shape.Type == "string")) { - num-- +func getEventStreamMember(topShape *Shape) *ShapeRef { + for _, ref := range topShape.MemberRefs { + if !ref.Shape.IsEventStream { + continue } + return ref } - return num > 0 -} - -// Template for an EventStream Event shape. This is a normal API shape that is -// decorated as an EventStream Event. -// -// Executed in the context of a Shape. -var eventStreamEventShapeTmpl = template.Must(template.New("eventStreamEventShapeTmpl"). - Funcs(eventStreamEventShapeTmplFuncs).Parse(` -{{ range $_, $eventstream := $.EventFor }} - // The {{ $.ShapeName }} is and event in the {{ $eventstream.Name }} group of events. - func (s *{{ $.ShapeName }}) event{{ $eventstream.Name }}() {} -{{ end }} -// UnmarshalEvent unmarshals the EventStream Message into the {{ $.ShapeName }} value. -// This method is only used internally within the SDK's EventStream handling. -func (s *{{ $.ShapeName }}) UnmarshalEvent( - payloadUnmarshaler protocol.PayloadUnmarshaler, - msg eventstream.Message, -) error { - {{- range $memName, $memRef := $.MemberRefs }} - {{- if $memRef.IsEventHeader }} - if hv := msg.Headers.Get("{{ $memName }}"); hv != nil { - {{ $types := EventStreamHeaderTypeMap $memRef -}} - v := hv.Get().({{ $types.Header }}) - {{- if ne $types.Header $types.Member }} - m := {{ $types.Member }}(v) - s.{{ $memName }} = {{ if $memRef.UseIndirection }}&{{ end }}m - {{- else }} - s.{{ $memName }} = {{ if $memRef.UseIndirection }}&{{ end }}v - {{- end }} - } - {{- else if (and ($memRef.IsEventPayload) (eq $memRef.Shape.Type "blob")) }} - s.{{ $memName }} = make([]byte, len(msg.Payload)) - copy(s.{{ $memName }}, msg.Payload) - {{- else if (and ($memRef.IsEventPayload) (eq $memRef.Shape.Type "string")) }} - s.{{ $memName }} = aws.String(string(msg.Payload)) - {{- end }} - {{- end }} - {{- if HasNonBlobPayloadMembers $ }} - if err := payloadUnmarshaler.UnmarshalPayload( - bytes.NewReader(msg.Payload), s, - ); err != nil { - return err - } - {{- end }} - return nil -} -`)) - -var eventStreamExceptionEventShapeTmpl = template.Must( - template.New("eventStreamExceptionEventShapeTmpl").Parse(` -// Code returns the exception type name. -func (s {{ $.ShapeName }}) Code() string { - {{- if $.ErrorInfo.Code }} - return "{{ $.ErrorInfo.Code }}" - {{- else }} - return "{{ $.ShapeName }}" - {{ end -}} -} - -// Message returns the exception's message. -func (s {{ $.ShapeName }}) Message() string { - {{- if index $.MemberRefs "Message_" }} - return *s.Message_ - {{- else }} - return "" - {{ end -}} -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s {{ $.ShapeName }}) OrigErr() error { return nil } -func (s {{ $.ShapeName }}) Error() string { - return fmt.Sprintf("%s: %s", s.Code(), s.Message()) -} -`)) - -// APIEventStreamTestGoCode generates Go code for EventStream operation tests. -func (a *API) APIEventStreamTestGoCode() string { - var buf bytes.Buffer - - a.resetImports() - a.AddImport("bytes") - a.AddImport("io/ioutil") - a.AddImport("net/http") - a.AddImport("reflect") - a.AddImport("testing") - a.AddImport("time") - a.AddSDKImport("aws") - a.AddSDKImport("aws/corehandlers") - a.AddSDKImport("aws/request") - a.AddSDKImport("aws/awserr") - a.AddSDKImport("awstesting/unit") - a.AddSDKImport("private/protocol") - a.AddSDKImport("private/protocol/", a.ProtocolPackage()) - a.AddSDKImport("private/protocol/eventstream") - a.AddSDKImport("private/protocol/eventstream/eventstreamapi") - a.AddSDKImport("private/protocol/eventstream/eventstreamtest") - - unused := ` - var _ time.Time - var _ awserr.Error - ` - - if err := eventStreamTestTmpl.Execute(&buf, a); err != nil { - panic(err) +func setupEventStream(s *Shape) *EventStream { + eventStream := &EventStream{ + Name: s.ShapeName, + Shape: s, } + s.EventStream = eventStream - return a.importsGoCode() + unused + strings.TrimSpace(buf.String()) -} - -func valueForType(s *Shape, visited []string) string { - for _, v := range visited { - if v == s.ShapeName { - return "nil" + for _, eventRefName := range s.MemberNames() { + eventRef := s.MemberRefs[eventRefName] + if !(eventRef.Shape.IsEvent || eventRef.Shape.Exception) { + panic(fmt.Sprintf("unexpected non-event member reference %s.%s", + s.ShapeName, eventRefName)) } - } - visited = append(visited, s.ShapeName) + updateEventPayloadRef(eventRef.Shape) - switch s.Type { - case "blob": - return `[]byte("blob value goes here")` - case "string": - return `aws.String("string value goes here")` - case "boolean": - return `aws.Bool(true)` - case "byte": - return `aws.Int64(1)` - case "short": - return `aws.Int64(12)` - case "integer": - return `aws.Int64(123)` - case "long": - return `aws.Int64(1234)` - case "float": - return `aws.Float64(123.4)` - case "double": - return `aws.Float64(123.45)` - case "timestamp": - return `aws.Time(time.Unix(1396594860, 0).UTC())` - case "structure": - w := bytes.NewBuffer(nil) - fmt.Fprintf(w, "&%s{\n", s.ShapeName) - for _, refName := range s.MemberNames() { - fmt.Fprintf(w, "%s: %s,\n", refName, valueForType(s.MemberRefs[refName].Shape, visited)) - } - fmt.Fprintf(w, "}") - return w.String() - case "list": - w := bytes.NewBuffer(nil) - fmt.Fprintf(w, "%s{\n", s.GoType()) - for i := 0; i < 3; i++ { - fmt.Fprintf(w, "%s,\n", valueForType(s.MemberRef.Shape, visited)) - } - fmt.Fprintf(w, "}") - return w.String() + eventRef.Shape.EventFor = append(eventRef.Shape.EventFor, eventStream) - case "map": - w := bytes.NewBuffer(nil) - fmt.Fprintf(w, "%s{\n", s.GoType()) - for _, k := range []string{"a", "b", "c"} { - fmt.Fprintf(w, "%q: %s,\n", k, valueForType(s.ValueRef.Shape, visited)) + // Exceptions and events are two different lists to allow the SDK + // to easily generate code with the two handled differently. + event := &Event{ + Name: eventRefName, + Shape: eventRef.Shape, + For: eventStream, } - fmt.Fprintf(w, "}") - return w.String() - - default: - panic(fmt.Sprintf("valueForType does not support %s, %s", s.ShapeName, s.Type)) - } -} - -func setEventHeaderValueForType(s *Shape, memVar string) string { - switch s.Type { - case "blob": - return fmt.Sprintf("eventstream.BytesValue(%s)", memVar) - case "string": - return fmt.Sprintf("eventstream.StringValue(*%s)", memVar) - case "boolean": - return fmt.Sprintf("eventstream.BoolValue(*%s)", memVar) - case "byte": - return fmt.Sprintf("eventstream.Int8Value(int8(*%s))", memVar) - case "short": - return fmt.Sprintf("eventstream.Int16Value(int16(*%s))", memVar) - case "integer": - return fmt.Sprintf("eventstream.Int32Value(int32(*%s))", memVar) - case "long": - return fmt.Sprintf("eventstream.Int64Value(*%s)", memVar) - case "float": - return fmt.Sprintf("eventstream.Float32Value(float32(*%s))", memVar) - case "double": - return fmt.Sprintf("eventstream.Float64Value(*%s)", memVar) - case "timestamp": - return fmt.Sprintf("eventstream.TimestampValue(*%s)", memVar) - default: - panic(fmt.Sprintf("value type %s not supported for event headers, %s", s.Type, s.ShapeName)) - } -} - -func templateMap(args ...interface{}) map[string]interface{} { - if len(args)%2 != 0 { - panic(fmt.Sprintf("invalid map call, non-even args %v", args)) - } - - m := map[string]interface{}{} - for i := 0; i < len(args); i += 2 { - k, ok := args[i].(string) - if !ok { - panic(fmt.Sprintf("invalid map call, arg is not string, %T, %v", args[i], args[i])) + if eventRef.Shape.Exception { + eventStream.Exceptions = append(eventStream.Exceptions, event) + } else { + eventStream.Events = append(eventStream.Events, event) } - m[k] = args[i+1] - } - - return m -} - -var eventStreamTestTmpl = template.Must( - template.New("eventStreamTestTmpl").Funcs(template.FuncMap{ - "ValueForType": valueForType, - "HasNonBlobPayloadMembers": eventHasNonBlobPayloadMembers, - "SetEventHeaderValueForType": setEventHeaderValueForType, - "Map": templateMap, - "OptionalAddInt": func(do bool, a, b int) int { - if !do { - return a - } - return a + b - }, - "HasNonEventStreamMember": func(s *Shape) bool { - for _, ref := range s.MemberRefs { - if !ref.Shape.IsEventStream { - return true - } - } - return false - }, - }).Parse(` -{{ range $opName, $op := $.Operations }} - {{ if $op.EventStreamAPI }} - {{ if $op.EventStreamAPI.Inbound }} - {{ template "event stream inbound tests" $op.EventStreamAPI }} - {{ end }} - {{ end }} -{{ end }} - -type loopReader struct { - source *bytes.Reader -} - -func (c *loopReader) Read(p []byte) (int, error) { - if c.source.Len() == 0 { - c.source.Seek(0, 0) } - return c.source.Read(p) + return eventStream } -{{ define "event stream inbound tests" }} - {{- $esMemberName := $.Operation.OutputRef.Shape.EventStreamsMemberName }} - func Test{{ $.Operation.ExportedName }}_Read(t *testing.T) { - expectEvents, eventMsgs := mock{{ $.Operation.ExportedName }}ReadEvents() - sess, cleanupFn, err := eventstreamtest.SetupEventStreamSession(t, - eventstreamtest.ServeEventStream{ - T: t, - Events: eventMsgs, - }, - true, - ) - if err != nil { - t.Fatalf("expect no error, %v", err) - } - defer cleanupFn() - - svc := New(sess) - resp, err := svc.{{ $.Operation.ExportedName }}(nil) - if err != nil { - t.Fatalf("expect no error got, %v", err) - } - defer resp.{{ $esMemberName }}.Close() - - {{- if eq $.Operation.API.Metadata.Protocol "json" }} - {{- if HasNonEventStreamMember $.Operation.OutputRef.Shape }} - expectResp := expectEvents[0].(*{{ $.Operation.OutputRef.Shape.ShapeName }}) - {{- range $name, $ref := $.Operation.OutputRef.Shape.MemberRefs }} - {{- if not $ref.Shape.IsEventStream }} - if e, a := expectResp.{{ $name }}, resp.{{ $name }}; !reflect.DeepEqual(e,a) { - t.Errorf("expect %v, got %v", e, a) - } - {{- end }} - {{- end }} - {{- end }} - // Trim off response output type pseudo event so only event messages remain. - expectEvents = expectEvents[1:] - {{ end }} - - var i int - for event := range resp.{{ $esMemberName }}.Events() { - if event == nil { - t.Errorf("%d, expect event, got nil", i) - } - if e, a := expectEvents[i], event; !reflect.DeepEqual(e, a) { - t.Errorf("%d, expect %T %v, got %T %v", i, e, e, a, a) - } - i++ - } - - if err := resp.{{ $esMemberName }}.Err(); err != nil { - t.Errorf("expect no error, %v", err) - } - } - - func Test{{ $.Operation.ExportedName }}_ReadClose(t *testing.T) { - _, eventMsgs := mock{{ $.Operation.ExportedName }}ReadEvents() - sess, cleanupFn, err := eventstreamtest.SetupEventStreamSession(t, - eventstreamtest.ServeEventStream{ - T: t, - Events: eventMsgs, - }, - true, - ) - if err != nil { - t.Fatalf("expect no error, %v", err) - } - defer cleanupFn() - - svc := New(sess) - resp, err := svc.{{ $.Operation.ExportedName }}(nil) - if err != nil { - t.Fatalf("expect no error got, %v", err) - } - - {{ if gt (len $.Inbound.Events) 0 -}} - // Assert calling Err before close does not close the stream. - resp.{{ $esMemberName }}.Err() - select { - case _, ok := <-resp.{{ $esMemberName }}.Events(): - if !ok { - t.Fatalf("expect stream not to be closed, but was") - } - default: - } - {{- end }} - - resp.{{ $esMemberName }}.Close() - <-resp.{{ $esMemberName }}.Events() - - if err := resp.{{ $esMemberName }}.Err(); err != nil { - t.Errorf("expect no error, %v", err) - } +func updateEventPayloadRef(parent *Shape) { + refName := parent.PayloadRefName() + if len(refName) == 0 { + return } - func Benchmark{{ $.Operation.ExportedName }}_Read(b *testing.B) { - _, eventMsgs := mock{{ $.Operation.ExportedName }}ReadEvents() - var buf bytes.Buffer - encoder := eventstream.NewEncoder(&buf) - for _, msg := range eventMsgs { - if err := encoder.Encode(msg); err != nil { - b.Fatalf("failed to encode message, %v", err) - } - } - stream := &loopReader{source: bytes.NewReader(buf.Bytes())} - - sess := unit.Session - svc := New(sess, &aws.Config{ - Endpoint: aws.String("https://example.com"), - DisableParamValidation: aws.Bool(true), - }) - svc.Handlers.Send.Swap(corehandlers.SendHandler.Name, - request.NamedHandler{Name: "mockSend", - Fn: func(r *request.Request) { - r.HTTPResponse = &http.Response{ - Status: "200 OK", - StatusCode: 200, - Header: http.Header{}, - Body: ioutil.NopCloser(stream), - } - }, - }, - ) - - resp, err := svc.{{ $.Operation.ExportedName }}(nil) - if err != nil { - b.Fatalf("failed to create request, %v", err) - } - defer resp.{{ $esMemberName }}.Close() - b.ResetTimer() - - for i := 0; i < b.N; i++ { - if err = resp.{{ $esMemberName }}.Err(); err != nil { - b.Fatalf("expect no error, got %v", err) - } - event := <-resp.{{ $esMemberName }}.Events() - if event == nil { - b.Fatalf("expect event, got nil, %v, %d", resp.{{ $esMemberName }}.Err(), i) - } - } + payloadRef := parent.MemberRefs[refName] + if payloadRef.Shape.Type == "blob" { + return } - func mock{{ $.Operation.ExportedName }}ReadEvents() ( - []{{ $.Inbound.Name }}Event, - []eventstream.Message, - ) { - expectEvents := []{{ $.Inbound.Name }}Event { - {{- if eq $.Operation.API.Metadata.Protocol "json" }} - {{- template "set event type" $.Operation.OutputRef.Shape }} - {{- end }} - {{- range $_, $event := $.Inbound.Events }} - {{- template "set event type" $event.Shape }} - {{- end }} - } - - var marshalers request.HandlerList - marshalers.PushBackNamed({{ $.API.ProtocolPackage }}.BuildHandler) - payloadMarshaler := protocol.HandlerPayloadMarshal{ - Marshalers: marshalers, - } - _ = payloadMarshaler - - eventMsgs := []eventstream.Message{ - {{- if eq $.Operation.API.Metadata.Protocol "json" }} - {{- template "set event message" Map "idx" 0 "parentShape" $.Operation.OutputRef.Shape "eventName" "initial-response" }} - {{- end }} - {{- range $idx, $event := $.Inbound.Events }} - {{- $offsetIdx := OptionalAddInt (eq $.Operation.API.Metadata.Protocol "json") $idx 1 }} - {{- template "set event message" Map "idx" $offsetIdx "parentShape" $event.Shape "eventName" $event.Name }} - {{- end }} - } - - return expectEvents, eventMsgs + if len(payloadRef.LocationName) != 0 { + return } - {{- if $.Inbound.Exceptions }} - func Test{{ $.Operation.ExportedName }}_ReadException(t *testing.T) { - expectEvents := []{{ $.Inbound.Name }}Event { - {{- if eq $.Operation.API.Metadata.Protocol "json" }} - {{- template "set event type" $.Operation.OutputRef.Shape }} - {{- end }} - - {{- $exception := index $.Inbound.Exceptions 0 }} - {{- template "set event type" $exception.Shape }} - } - - var marshalers request.HandlerList - marshalers.PushBackNamed({{ $.API.ProtocolPackage }}.BuildHandler) - payloadMarshaler := protocol.HandlerPayloadMarshal{ - Marshalers: marshalers, - } - - eventMsgs := []eventstream.Message{ - {{- if eq $.Operation.API.Metadata.Protocol "json" }} - {{- template "set event message" Map "idx" 0 "parentShape" $.Operation.OutputRef.Shape "eventName" "initial-response" }} - {{- end }} - - {{- $offsetIdx := OptionalAddInt (eq $.Operation.API.Metadata.Protocol "json") 0 1 }} - {{- $exception := index $.Inbound.Exceptions 0 }} - {{- template "set event message" Map "idx" $offsetIdx "parentShape" $exception.Shape "eventName" $exception.Name }} - } - - sess, cleanupFn, err := eventstreamtest.SetupEventStreamSession(t, - eventstreamtest.ServeEventStream{ - T: t, - Events: eventMsgs, - }, - true, - ) - if err != nil { - t.Fatalf("expect no error, %v", err) - } - defer cleanupFn() - - svc := New(sess) - resp, err := svc.{{ $.Operation.ExportedName }}(nil) - if err != nil { - t.Fatalf("expect no error got, %v", err) - } - - defer resp.{{ $esMemberName }}.Close() - - <-resp.{{ $esMemberName }}.Events() - - err = resp.{{ $esMemberName }}.Err() - if err == nil { - t.Fatalf("expect err, got none") - } - - expectErr := {{ ValueForType $exception.Shape nil }} - aerr, ok := err.(awserr.Error) - if !ok { - t.Errorf("expect exception, got %T, %#v", err, err) - } - if e, a := expectErr.Code(), aerr.Code(); e != a { - t.Errorf("expect %v, got %v", e, a) - } - if e, a := expectErr.Message(), aerr.Message(); e != a { - t.Errorf("expect %v, got %v", e, a) - } - - if e, a := expectErr, aerr; !reflect.DeepEqual(e, a) { - t.Errorf("expect %#v, got %#v", e, a) - } - } - - {{- range $_, $exception := $.Inbound.Exceptions }} - var _ awserr.Error = (*{{ $exception.Shape.ShapeName }})(nil) - {{- end }} - - {{ end }} -{{ end }} - -{{/* Params: *Shape */}} -{{ define "set event type" }} - &{{ $.ShapeName }}{ - {{- range $memName, $memRef := $.MemberRefs }} - {{- if not $memRef.Shape.IsEventStream }} - {{ $memName }}: {{ ValueForType $memRef.Shape nil }}, - {{- end }} - {{- end }} - }, -{{- end }} - -{{/* Params: idx:int, parentShape:*Shape, eventName:string */}} -{{ define "set event message" }} - { - Headers: eventstream.Headers{ - {{- if $.parentShape.Exception }} - eventstreamtest.EventExceptionTypeHeader, - { - Name: eventstreamapi.ExceptionTypeHeader, - Value: eventstream.StringValue("{{ $.eventName }}"), - }, - {{- else }} - eventstreamtest.EventMessageTypeHeader, - { - Name: eventstreamapi.EventTypeHeader, - Value: eventstream.StringValue("{{ $.eventName }}"), - }, - {{- end }} - {{- range $memName, $memRef := $.parentShape.MemberRefs }} - {{- template "set event message header" Map "idx" $.idx "parentShape" $.parentShape "memName" $memName "memRef" $memRef }} - {{- end }} - }, - {{- template "set event message payload" Map "idx" $.idx "parentShape" $.parentShape }} - }, -{{- end }} - -{{/* Params: idx:int, parentShape:*Shape, memName:string, memRef:*ShapeRef */}} -{{ define "set event message header" }} - {{- if $.memRef.IsEventHeader }} - { - Name: "{{ $.memName }}", - {{- $shapeValueVar := printf "expectEvents[%d].(%s).%s" $.idx $.parentShape.GoType $.memName }} - Value: {{ SetEventHeaderValueForType $.memRef.Shape $shapeValueVar }}, - }, - {{- end }} -{{- end }} - -{{/* Params: idx:int, parentShape:*Shape, memName:string, memRef:*ShapeRef */}} -{{ define "set event message payload" }} - {{- $payloadMemName := $.parentShape.PayloadRefName }} - {{- if HasNonBlobPayloadMembers $.parentShape }} - Payload: eventstreamtest.MarshalEventPayload(payloadMarshaler, expectEvents[{{ $.idx }}]), - {{- else if $payloadMemName }} - {{- $shapeType := (index $.parentShape.MemberRefs $payloadMemName).Shape.Type }} - {{- if eq $shapeType "blob" }} - Payload: expectEvents[{{ $.idx }}].({{ $.parentShape.GoType }}).{{ $payloadMemName }}, - {{- else if eq $shapeType "string" }} - Payload: []byte(*expectEvents[{{ $.idx }}].({{ $.parentShape.GoType }}).{{ $payloadMemName }}), - {{- end }} - {{- end }} -{{- end }} -`)) + payloadRef.LocationName = refName +} diff --git a/private/model/api/eventstream_tmpl.go b/private/model/api/eventstream_tmpl.go new file mode 100644 index 00000000000..63c7a188fd7 --- /dev/null +++ b/private/model/api/eventstream_tmpl.go @@ -0,0 +1,629 @@ +// +build codegen + +package api + +import ( + "fmt" + "io" + "strings" + "text/template" +) + +func renderEventStreamAPI(w io.Writer, op *Operation) error { + // Imports needed by the EventStream APIs. + op.API.AddImport("fmt") + op.API.AddImport("bytes") + op.API.AddImport("io") + op.API.AddImport("time") + op.API.AddSDKImport("aws") + op.API.AddSDKImport("aws/awserr") + op.API.AddSDKImport("aws/request") + op.API.AddSDKImport("private/protocol/eventstream") + op.API.AddSDKImport("private/protocol/eventstream/eventstreamapi") + + return eventStreamAPITmpl.Execute(w, op) +} + +// Template for an EventStream API Shape that will provide read/writing events +// across the EventStream. This is a special shape that's only public members +// are the Events channel and a Close and Err method. +// +// Executed in the context of a Shape. +var eventStreamAPITmpl = template.Must( + template.New("eventStreamAPITmplDef"). + Funcs(template.FuncMap{ + "unexported": func(v string) string { + return strings.ToLower(string(v[0])) + v[1:] + }, + }). + Parse(eventStreamAPITmplDef), +) + +const eventStreamAPITmplDef = ` +{{- $esapi := $.EventStreamAPI }} +{{- $outputStream := $esapi.OutputStream }} +{{- $inputStream := $esapi.InputStream }} + +// {{ $esapi.Name }} provides the event stream handling for the {{ $.ExportedName }}. +type {{ $esapi.Name }} struct { + {{- if $inputStream }} + + // Writer is the EventStream writer for the {{ $inputStream.Name }} + // events. This value is automatically set by the SDK when the API call is made + // Use this member when unit testing your code with the SDK to mock out the + // EventStream Writer. + // + // Must not be nil. + Writer {{ $inputStream.StreamWriterAPIName }} + + inputWriter io.WriteCloser + {{- if eq .API.Metadata.Protocol "json" }} + input {{ $.InputRef.GoType }} + {{- end }} + {{- end }} + + {{- if $outputStream }} + + // Reader is the EventStream reader for the {{ $outputStream.Name }} + // events. This value is automatically set by the SDK when the API call is made + // Use this member when unit testing your code with the SDK to mock out the + // EventStream Reader. + // + // Must not be nil. + Reader {{ $outputStream.StreamReaderAPIName }} + + outputReader io.ReadCloser + {{- if eq .API.Metadata.Protocol "json" }} + output {{ $.OutputRef.GoType }} + {{- end }} + {{- end }} + + {{- if $esapi.Legacy }} + + // StreamCloser is the io.Closer for the EventStream connection. For HTTP + // EventStream this is the response Body. The stream will be closed when + // the Close method of the EventStream is called. + StreamCloser io.Closer + {{- end }} + + done chan struct{} + closeOnce sync.Once + err *eventstreamapi.OnceError +} + +func new{{ $esapi.Name }}() *{{ $esapi.Name }} { + return &{{ $esapi.Name }} { + done: make(chan struct{}), + err: eventstreamapi.NewOnceError(), + } +} + +{{- if $esapi.Legacy }} + + func (es *{{ $esapi.Name }}) setStreamCloser(r *request.Request) { + es.StreamCloser = r.HTTPResponse.Body + } +{{- end }} + +func (es *{{ $esapi.Name }}) runOnStreamPartClose(r *request.Request) { + if es.done == nil { + return + } + go es.waitStreamPartClose() + +} + +func (es *{{ $esapi.Name }}) waitStreamPartClose() { + {{- if $inputStream }} + var inputErrCh <-chan struct{} + if v, ok := es.Writer.(interface{ErrorSet() <-chan struct{}}); ok { + inputErrCh = v.ErrorSet() + } + {{- end }} + {{- if $outputStream }} + var outputErrCh <-chan struct{} + if v, ok := es.Reader.(interface{ErrorSet() <-chan struct{}}); ok { + outputErrCh = v.ErrorSet() + } + var outputClosedCh <- chan struct{} + if v, ok := es.Reader.(interface{Closed() <-chan struct{}}); ok { + outputClosedCh = v.Closed() + } + {{- end }} + + select { + case <-es.done: + + {{- if $inputStream }} + case <-inputErrCh: + es.err.SetError(es.Writer.Err()) + es.Close() + {{- end }} + + {{- if $outputStream }} + case <-outputErrCh: + es.err.SetError(es.Reader.Err()) + es.Close() + case <-outputClosedCh: + if err := es.Reader.Err(); err != nil { + es.err.SetError(es.Reader.Err()) + } + es.Close() + {{- end }} + } +} + +{{- if $inputStream }} + + {{- if eq .API.Metadata.Protocol "json" }} + + func {{ $esapi.StreamInputEventTypeGetterName }}(event {{ $inputStream.EventGroupName }}) (string, error) { + if _, ok := event.({{ $.InputRef.GoType }}); ok { + return "initial-request", nil + } + return {{ $inputStream.StreamEventTypeGetterName }}(event) + } + {{- end }} + + func (es *{{ $esapi.Name }}) setupInputPipe(r *request.Request) { + inputReader, inputWriter := io.Pipe() + r.SetStreamingBody(inputReader) + es.inputWriter = inputWriter + } + + // Send writes the event to the stream blocking until the event is written. + // Returns an error if the event was not written. + // + // These events are: + // {{ range $_, $event := $inputStream.Events }} + // * {{ $event.Shape.ShapeName }} + {{- end }} + func (es *{{ $esapi.Name }}) Send(ctx aws.Context, event {{ $inputStream.EventGroupName }}) error { + return es.Writer.Send(ctx, event) + } + + func (es *{{ $esapi.Name }}) runInputStream(r *request.Request) { + var opts []func(*eventstream.Encoder) + if r.Config.Logger != nil && r.Config.LogLevel.Matches(aws.LogDebugWithEventStreamBody) { + opts = append(opts, eventstream.EncodeWithLogger(r.Config.Logger)) + } + var encoder eventstreamapi.Encoder = eventstream.NewEncoder(es.inputWriter, opts...) + + var closer aws.MultiCloser + {{- if $.ShouldSignRequestBody }} + {{- $_ := $.API.AddSDKImport "aws/signer/v4" }} + sigSeed, err := v4.GetSignedRequestSignature(r.HTTPRequest) + if err != nil { + r.Error = awserr.New(request.ErrCodeSerialization, + "unable to get initial request's signature", err) + return + } + signer := eventstreamapi.NewSignEncoder( + v4.NewStreamSigner(r.ClientInfo.SigningRegion, r.ClientInfo.SigningName, + sigSeed, r.Config.Credentials), + encoder, + ) + encoder = signer + closer = append(closer, signer) + {{- end }} + closer = append(closer, es.inputWriter) + + eventWriter := eventstreamapi.NewEventWriter(encoder, + protocol.HandlerPayloadMarshal{ + Marshalers: r.Handlers.BuildStream, + }, + {{- if eq .API.Metadata.Protocol "json" }} + {{ $esapi.StreamInputEventTypeGetterName }}, + {{- else }} + {{ $inputStream.StreamEventTypeGetterName }}, + {{- end }} + ) + + es.Writer = &{{ $inputStream.StreamWriterImplName }}{ + StreamWriter: eventstreamapi.NewStreamWriter(eventWriter, closer), + } + } + + {{- if eq .API.Metadata.Protocol "json" }} + func (es *{{ $esapi.Name }}) sendInitialEvent(r *request.Request) { + if err := es.Send(es.input); err != nil { + r.Error = err + } + } + {{- end }} +{{- end }} + +{{- if $outputStream }} + + {{- if eq .API.Metadata.Protocol "json" }} + + func (es *{{ $esapi.Name}}) {{ $esapi.StreamOutputUnmarshalerForEventName }}(eventType string) (eventstreamapi.Unmarshaler, error) { + if eventType == "initial-response" { + return es.output, nil + } + return {{ $outputStream.StreamUnmarshalerForEventName }}(eventType) + } + {{- end }} + + // Events returns a channel to read events from. + // + // These events are: + // {{ range $_, $event := $outputStream.Events }} + // * {{ $event.Shape.ShapeName }} + {{- end }} + func (es *{{ $esapi.Name }}) Events() <-chan {{ $outputStream.EventGroupName }} { + return es.Reader.Events() + } + + func (es *{{ $esapi.Name }}) runOutputStream(r *request.Request) { + var opts []func(*eventstream.Decoder) + if r.Config.Logger != nil && r.Config.LogLevel.Matches(aws.LogDebugWithEventStreamBody) { + opts = append(opts, eventstream.DecodeWithLogger(r.Config.Logger)) + } + + decoder := eventstream.NewDecoder(r.HTTPResponse.Body, opts...) + eventReader := eventstreamapi.NewEventReader(decoder, + protocol.HandlerPayloadUnmarshal{ + Unmarshalers: r.Handlers.UnmarshalStream, + }, + {{- if eq .API.Metadata.Protocol "json" }} + es.{{ $esapi.StreamOutputUnmarshalerForEventName }}, + {{- else }} + {{ $outputStream.StreamUnmarshalerForEventName }}, + {{- end }} + ) + + es.outputReader = r.HTTPResponse.Body + es.Reader = {{ $outputStream.StreamReaderImplConstructorName }}(eventReader) + } + + {{- if eq .API.Metadata.Protocol "json" }} + func (es *{{ $esapi.Name }}) recvInitialEvent(r *request.Request) { + // Wait for the initial response event, which must be the first + // event to be received from the API. + select { + case event, ok := <- es.Events(): + if !ok { + return + } + + v, ok := event.({{ $.OutputRef.GoType }}) + if !ok || v == nil { + r.Error = awserr.New( + request.ErrCodeSerialization, + fmt.Sprintf("invalid event, %T, expect %T, %v", + event, ({{ $.OutputRef.GoType }})(nil), v), + nil, + ) + return + } + + *es.output = *v + es.output.{{ $.EventStreamAPI.OutputMemberName }} = es + } + } + {{- end }} +{{- end }} + +// Close closes the stream. This will also cause the stream to be closed. +// Close must be called when done using the stream API. Not calling Close +// may result in resource leaks. +{{- if $inputStream }} +// +// Will close the underlying EventStream writer, and no more events can be +// sent. +{{- end }} +{{- if $outputStream }} +// +// You can use the closing of the Reader's Events channel to terminate your +// application's read from the API's stream. +{{- end }} +// +func (es *{{ $esapi.Name }}) Close() (err error) { + es.closeOnce.Do(es.safeClose) + return es.Err() +} + +func (es *{{ $esapi.Name }}) safeClose() { + if es.done != nil { + close(es.done) + } + + {{- if $inputStream }} + + t := time.NewTicker(time.Second) + defer t.Stop() + writeCloseDone := make(chan error) + go func() { + if err := es.Writer.Close(); err != nil { + es.err.SetError(err) + } + close(writeCloseDone) + }() + select { + case <-t.C: + case <-writeCloseDone: + } + if es.inputWriter != nil { + es.inputWriter.Close() + } + {{- end }} + + {{- if $outputStream }} + + es.Reader.Close() + if es.outputReader != nil { + es.outputReader.Close() + } + {{- end }} + + {{- if $esapi.Legacy }} + + es.StreamCloser.Close() + {{- end }} +} + +// Err returns any error that occurred while reading or writing EventStream +// Events from the service API's response. Returns nil if there were no errors. +func (es *{{ $esapi.Name }}) Err() error { + if err := es.err.Err(); err != nil { + return err + } + + {{- if $inputStream }} + if err := es.Writer.Err(); err != nil { + return err + } + {{- end }} + + {{- if $outputStream }} + if err := es.Reader.Err(); err != nil { + return err + } + {{- end }} + + return nil +} +` + +func renderEventStreamShape(w io.Writer, s *Shape) error { + // Imports needed by the EventStream APIs. + s.API.AddImport("fmt") + s.API.AddImport("bytes") + s.API.AddImport("io") + s.API.AddImport("sync") + s.API.AddSDKImport("aws") + s.API.AddSDKImport("aws/awserr") + s.API.AddSDKImport("private/protocol/eventstream") + s.API.AddSDKImport("private/protocol/eventstream/eventstreamapi") + + return eventStreamShapeTmpl.Execute(w, s) +} + +var eventStreamShapeTmpl = func() *template.Template { + t := template.Must( + template.New("eventStreamShapeTmplDef"). + Parse(eventStreamShapeTmplDef), + ) + template.Must( + t.AddParseTree( + "eventStreamShapeWriterTmpl", eventStreamShapeWriterTmpl.Tree), + ) + template.Must( + t.AddParseTree( + "eventStreamShapeReaderTmpl", eventStreamShapeReaderTmpl.Tree), + ) + + return t +}() + +const eventStreamShapeTmplDef = ` +{{- $eventStream := $.EventStream }} +{{- $eventStreamEventGroup := printf "%sEvent" $eventStream.Name }} + +// {{ $eventStreamEventGroup }} groups together all EventStream +// events writes for {{ $eventStream.Name }}. +// +// These events are: +// {{ range $_, $event := $eventStream.Events }} +// * {{ $event.Shape.ShapeName }} +{{- end }} +type {{ $eventStreamEventGroup }} interface { + event{{ $eventStream.Name }}() + eventstreamapi.Marshaler + eventstreamapi.Unmarshaler +} + +{{- if $.IsInputEventStream }} + {{- template "eventStreamShapeWriterTmpl" $ }} +{{- end }} + +{{- if $.IsOutputEventStream }} + {{- template "eventStreamShapeReaderTmpl" $ }} +{{- end }} +` + +// EventStreamHeaderTypeMap provides the mapping of a EventStream Header's +// Value type to the shape reference's member type. +type EventStreamHeaderTypeMap struct { + Header string + Member string +} + +// Returns if the event has any members which are not the event's blob payload, +// nor a header. +func eventHasNonBlobPayloadMembers(s *Shape) bool { + num := len(s.MemberRefs) + for _, ref := range s.MemberRefs { + if ref.IsEventHeader || (ref.IsEventPayload && (ref.Shape.Type == "blob" || ref.Shape.Type == "string")) { + num-- + } + } + return num > 0 +} + +func setEventHeaderValueForType(s *Shape, memVar string) string { + switch s.Type { + case "blob": + return fmt.Sprintf("eventstream.BytesValue(%s)", memVar) + case "string": + return fmt.Sprintf("eventstream.StringValue(*%s)", memVar) + case "boolean": + return fmt.Sprintf("eventstream.BoolValue(*%s)", memVar) + case "byte": + return fmt.Sprintf("eventstream.Int8Value(int8(*%s))", memVar) + case "short": + return fmt.Sprintf("eventstream.Int16Value(int16(*%s))", memVar) + case "integer": + return fmt.Sprintf("eventstream.Int32Value(int32(*%s))", memVar) + case "long": + return fmt.Sprintf("eventstream.Int64Value(*%s)", memVar) + case "float": + return fmt.Sprintf("eventstream.Float32Value(float32(*%s))", memVar) + case "double": + return fmt.Sprintf("eventstream.Float64Value(*%s)", memVar) + case "timestamp": + return fmt.Sprintf("eventstream.TimestampValue(*%s)", memVar) + default: + panic(fmt.Sprintf("value type %s not supported for event headers, %s", s.Type, s.ShapeName)) + } +} + +func shapeMessageType(s *Shape) string { + if s.Exception { + return "eventstreamapi.ExceptionMessageType" + } + return "eventstreamapi.EventMessageType" +} + +var eventStreamEventShapeTmplFuncs = template.FuncMap{ + "EventStreamHeaderTypeMap": func(ref *ShapeRef) EventStreamHeaderTypeMap { + switch ref.Shape.Type { + case "boolean": + return EventStreamHeaderTypeMap{Header: "bool", Member: "bool"} + case "byte": + return EventStreamHeaderTypeMap{Header: "int8", Member: "int64"} + case "short": + return EventStreamHeaderTypeMap{Header: "int16", Member: "int64"} + case "integer": + return EventStreamHeaderTypeMap{Header: "int32", Member: "int64"} + case "long": + return EventStreamHeaderTypeMap{Header: "int64", Member: "int64"} + case "timestamp": + return EventStreamHeaderTypeMap{Header: "time.Time", Member: "time.Time"} + case "blob": + return EventStreamHeaderTypeMap{Header: "[]byte", Member: "[]byte"} + case "string": + return EventStreamHeaderTypeMap{Header: "string", Member: "string"} + case "uuid": + return EventStreamHeaderTypeMap{Header: "[]byte", Member: "[]byte"} + default: + panic("unsupported EventStream header type, " + ref.Shape.Type) + } + }, + "EventHeaderValueForType": setEventHeaderValueForType, + "ShapeMessageType": shapeMessageType, + "HasNonBlobPayloadMembers": eventHasNonBlobPayloadMembers, +} + +// Template for an EventStream Event shape. This is a normal API shape that is +// decorated as an EventStream Event. +// +// Executed in the context of a Shape. +var eventStreamEventShapeTmpl = template.Must(template.New("eventStreamEventShapeTmpl"). + Funcs(eventStreamEventShapeTmplFuncs).Parse(` +{{ range $_, $eventStream := $.EventFor }} + // The {{ $.ShapeName }} is and event in the {{ $eventStream.Name }} group of events. + func (s *{{ $.ShapeName }}) event{{ $eventStream.Name }}() {} +{{ end }} + +// UnmarshalEvent unmarshals the EventStream Message into the {{ $.ShapeName }} value. +// This method is only used internally within the SDK's EventStream handling. +func (s *{{ $.ShapeName }}) UnmarshalEvent( + payloadUnmarshaler protocol.PayloadUnmarshaler, + msg eventstream.Message, +) error { + {{- range $memName, $memRef := $.MemberRefs }} + {{- if $memRef.IsEventHeader }} + if hv := msg.Headers.Get("{{ $memName }}"); hv != nil { + {{ $types := EventStreamHeaderTypeMap $memRef -}} + v := hv.Get().({{ $types.Header }}) + {{- if ne $types.Header $types.Member }} + m := {{ $types.Member }}(v) + s.{{ $memName }} = {{ if $memRef.UseIndirection }}&{{ end }}m + {{- else }} + s.{{ $memName }} = {{ if $memRef.UseIndirection }}&{{ end }}v + {{- end }} + } + {{- else if (and ($memRef.IsEventPayload) (eq $memRef.Shape.Type "blob")) }} + s.{{ $memName }} = make([]byte, len(msg.Payload)) + copy(s.{{ $memName }}, msg.Payload) + {{- else if (and ($memRef.IsEventPayload) (eq $memRef.Shape.Type "string")) }} + s.{{ $memName }} = aws.String(string(msg.Payload)) + {{- end }} + {{- end }} + {{- if HasNonBlobPayloadMembers $ }} + if err := payloadUnmarshaler.UnmarshalPayload( + bytes.NewReader(msg.Payload), s, + ); err != nil { + return err + } + {{- end }} + return nil +} + +func (s *{{ $.ShapeName}}) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue({{ ShapeMessageType $ }})) + + {{- range $memName, $memRef := $.MemberRefs }} + {{- if $memRef.IsEventHeader }} + {{ $memVar := printf "s.%s" $memName -}} + {{ $typedMem := EventHeaderValueForType $memRef.Shape $memVar -}} + msg.Headers.Set("{{ $memName }}", {{ $typedMem }}) + {{- else if (and ($memRef.IsEventPayload) (eq $memRef.Shape.Type "blob")) }} + msg.Headers.Set(":content-type", eventstream.StringValue("application/octet-stream")) + msg.Payload = s.{{ $memName }} + {{- else if (and ($memRef.IsEventPayload) (eq $memRef.Shape.Type "string")) }} + msg.Payload = []byte(aws.StringValue(s.{{ $memName }})) + {{- end }} + {{- end }} + {{- if HasNonBlobPayloadMembers $ }} + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + {{- end }} + return msg, err +} +`)) + +var eventStreamExceptionEventShapeTmpl = template.Must( + template.New("eventStreamExceptionEventShapeTmpl").Parse(` +// Code returns the exception type name. +func (s {{ $.ShapeName }}) Code() string { + {{- if $.ErrorInfo.Code }} + return "{{ $.ErrorInfo.Code }}" + {{- else }} + return "{{ $.ShapeName }}" + {{ end -}} +} + +// Message returns the exception's message. +func (s {{ $.ShapeName }}) Message() string { + {{- if index $.MemberRefs "Message_" }} + return *s.Message_ + {{- else }} + return "" + {{ end -}} +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s {{ $.ShapeName }}) OrigErr() error { + return nil +} + +func (s {{ $.ShapeName }}) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} +`)) diff --git a/private/model/api/eventstream_tmpl_reader.go b/private/model/api/eventstream_tmpl_reader.go new file mode 100644 index 00000000000..c520b427a85 --- /dev/null +++ b/private/model/api/eventstream_tmpl_reader.go @@ -0,0 +1,125 @@ +// +build codegen + +package api + +import "text/template" + +var eventStreamShapeReaderTmpl = template.Must(template.New("eventStreamShapeReaderTmpl"). + Funcs(template.FuncMap{}). + Parse(` +{{- $es := $.EventStream }} + +// {{ $es.StreamReaderAPIName }} provides the interface for reading to the stream. The +// default implementation for this interface will be {{ $.ShapeName }}. +// +// The reader's Close method must allow multiple concurrent calls. +// +// These events are: +// {{ range $_, $event := $es.Events }} +// * {{ $event.Shape.ShapeName }} +{{- end }} +type {{ $es.StreamReaderAPIName }} interface { + // Returns a channel of events as they are read from the event stream. + Events() <-chan {{ $es.EventGroupName }} + + // Close will stop the reader reading events from the stream. + Close() error + + // Returns any error that has occurred while reading from the event stream. + Err() error +} + +type {{ $es.StreamReaderImplName }} struct { + eventReader *eventstreamapi.EventReader + stream chan {{ $es.EventGroupName }} + err *eventstreamapi.OnceError + + done chan struct{} + closeOnce sync.Once +} + +func {{ $es.StreamReaderImplConstructorName }}(eventReader *eventstreamapi.EventReader) *{{ $es.StreamReaderImplName }} { + r := &{{ $es.StreamReaderImplName }}{ + eventReader: eventReader, + stream: make(chan {{ $es.EventGroupName }}), + done: make(chan struct{}), + err: eventstreamapi.NewOnceError(), + } + go r.readEventStream() + + return r +} + +// Close will close the underlying event stream reader. +func (r *{{ $es.StreamReaderImplName }}) Close() error { + r.closeOnce.Do(r.safeClose) + return r.Err() +} + +func (r *{{ $es.StreamReaderImplName }}) ErrorSet() <-chan struct{} { + return r.err.ErrorSet() +} + +func (r *{{ $es.StreamReaderImplName }}) Closed() <-chan struct{} { + return r.done +} + +func (r *{{ $es.StreamReaderImplName }}) safeClose() { + close(r.done) +} + +func (r *{{ $es.StreamReaderImplName }}) Err() error { + return r.err.Err() +} + +func (r *{{ $es.StreamReaderImplName }}) Events() <-chan {{ $es.EventGroupName }} { + return r.stream +} + +func (r *{{ $es.StreamReaderImplName }}) readEventStream() { + defer r.Close() + defer close(r.stream) + + for { + event, err := r.eventReader.ReadEvent() + if err != nil { + if err == io.EOF { + return + } + select { + case <-r.done: + // If closed already ignore the error + return + default: + } + r.err.SetError(err) + return + } + + select { + case r.stream <- event.({{ $es.EventGroupName }}): + case <-r.done: + return + } + } +} + +func {{ $es.StreamUnmarshalerForEventName }}(eventType string) (eventstreamapi.Unmarshaler, error) { + switch eventType { + {{- range $_, $event := $es.Events }} + case {{ printf "%q" $event.Name }}: + return &{{ $event.Shape.ShapeName }}{}, nil + {{- end }} + {{- range $_, $event := $es.Exceptions }} + case {{ printf "%q" $event.Name }}: + return &{{ $event.Shape.ShapeName }}{}, nil + {{- end }} + default: + return nil, awserr.New( + request.ErrCodeSerialization, + fmt.Sprintf("unknown event type name, %s, for {{ $es.Name }}", eventType), + nil, + ) + } +} +`)) diff --git a/private/model/api/eventstream_tmpl_readertests.go b/private/model/api/eventstream_tmpl_readertests.go new file mode 100644 index 00000000000..8c7a53087cb --- /dev/null +++ b/private/model/api/eventstream_tmpl_readertests.go @@ -0,0 +1,477 @@ +// +build codegen + +package api + +import ( + "bytes" + "fmt" + "strings" + "text/template" +) + +// APIEventStreamTestGoCode generates Go code for EventStream operation tests. +func (a *API) APIEventStreamTestGoCode() string { + var buf bytes.Buffer + + a.resetImports() + a.AddImport("bytes") + a.AddImport("io/ioutil") + a.AddImport("net/http") + a.AddImport("reflect") + a.AddImport("testing") + a.AddImport("time") + a.AddSDKImport("aws") + a.AddSDKImport("aws/corehandlers") + a.AddSDKImport("aws/request") + a.AddSDKImport("aws/awserr") + a.AddSDKImport("awstesting/unit") + a.AddSDKImport("private/protocol") + a.AddSDKImport("private/protocol/", a.ProtocolPackage()) + a.AddSDKImport("private/protocol/eventstream") + a.AddSDKImport("private/protocol/eventstream/eventstreamapi") + a.AddSDKImport("private/protocol/eventstream/eventstreamtest") + + unused := ` + var _ time.Time + var _ awserr.Error + ` + + if err := eventStreamTestTmpl.Execute(&buf, a); err != nil { + panic(err) + } + + return a.importsGoCode() + unused + strings.TrimSpace(buf.String()) +} + +func templateMap(args ...interface{}) map[string]interface{} { + if len(args)%2 != 0 { + panic(fmt.Sprintf("invalid map call, non-even args %v", args)) + } + + m := map[string]interface{}{} + for i := 0; i < len(args); i += 2 { + k, ok := args[i].(string) + if !ok { + panic(fmt.Sprintf("invalid map call, arg is not string, %T, %v", args[i], args[i])) + } + m[k] = args[i+1] + } + + return m +} + +func valueForType(s *Shape, visited []string) string { + for _, v := range visited { + if v == s.ShapeName { + return "nil" + } + } + + visited = append(visited, s.ShapeName) + + switch s.Type { + case "blob": + return `[]byte("blob value goes here")` + case "string": + return `aws.String("string value goes here")` + case "boolean": + return `aws.Bool(true)` + case "byte": + return `aws.Int64(1)` + case "short": + return `aws.Int64(12)` + case "integer": + return `aws.Int64(123)` + case "long": + return `aws.Int64(1234)` + case "float": + return `aws.Float64(123.4)` + case "double": + return `aws.Float64(123.45)` + case "timestamp": + return `aws.Time(time.Unix(1396594860, 0).UTC())` + case "structure": + w := bytes.NewBuffer(nil) + fmt.Fprintf(w, "&%s{\n", s.ShapeName) + for _, refName := range s.MemberNames() { + fmt.Fprintf(w, "%s: %s,\n", refName, valueForType(s.MemberRefs[refName].Shape, visited)) + } + fmt.Fprintf(w, "}") + return w.String() + case "list": + w := bytes.NewBuffer(nil) + fmt.Fprintf(w, "%s{\n", s.GoType()) + for i := 0; i < 3; i++ { + fmt.Fprintf(w, "%s,\n", valueForType(s.MemberRef.Shape, visited)) + } + fmt.Fprintf(w, "}") + return w.String() + + case "map": + w := bytes.NewBuffer(nil) + fmt.Fprintf(w, "%s{\n", s.GoType()) + for _, k := range []string{"a", "b", "c"} { + fmt.Fprintf(w, "%q: %s,\n", k, valueForType(s.ValueRef.Shape, visited)) + } + fmt.Fprintf(w, "}") + return w.String() + + default: + panic(fmt.Sprintf("valueForType does not support %s, %s", s.ShapeName, s.Type)) + } +} + +var eventStreamTestTmpl = template.Must( + template.New("eventStreamTestTmpl").Funcs(template.FuncMap{ + "ValueForType": valueForType, + "HasNonBlobPayloadMembers": eventHasNonBlobPayloadMembers, + "EventHeaderValueForType": setEventHeaderValueForType, + "Map": templateMap, + "OptionalAddInt": func(do bool, a, b int) int { + if !do { + return a + } + return a + b + }, + "HasNonEventStreamMember": func(s *Shape) bool { + for _, ref := range s.MemberRefs { + if !ref.Shape.IsEventStream { + return true + } + } + return false + }, + }).Parse(` +{{ range $opName, $op := $.Operations }} + {{ if $op.EventStreamAPI }} + {{ if $op.EventStreamAPI.OutputStream }} + {{ template "event stream outputStream tests" $op.EventStreamAPI }} + {{ end }} + {{ end }} +{{ end }} + +type loopReader struct { + source *bytes.Reader +} + +func (c *loopReader) Read(p []byte) (int, error) { + if c.source.Len() == 0 { + c.source.Seek(0, 0) + } + + return c.source.Read(p) +} + +{{ define "event stream outputStream tests" }} + func Test{{ $.Operation.ExportedName }}_Read(t *testing.T) { + expectEvents, eventMsgs := mock{{ $.Operation.ExportedName }}ReadEvents() + sess, cleanupFn, err := eventstreamtest.SetupEventStreamSession(t, + eventstreamtest.ServeEventStream{ + T: t, + Events: eventMsgs, + }, + true, + ) + if err != nil { + t.Fatalf("expect no error, %v", err) + } + defer cleanupFn() + + svc := New(sess) + resp, err := svc.{{ $.Operation.ExportedName }}(nil) + if err != nil { + t.Fatalf("expect no error got, %v", err) + } + defer resp.GetStream().Close() + + {{- if eq $.Operation.API.Metadata.Protocol "json" }} + {{- if HasNonEventStreamMember $.Operation.OutputRef.Shape }} + expectResp := expectEvents[0].(*{{ $.Operation.OutputRef.Shape.ShapeName }}) + {{- range $name, $ref := $.Operation.OutputRef.Shape.MemberRefs }} + {{- if not $ref.Shape.IsEventStream }} + if e, a := expectResp.{{ $name }}, resp.{{ $name }}; !reflect.DeepEqual(e,a) { + t.Errorf("expect %v, got %v", e, a) + } + {{- end }} + {{- end }} + {{- end }} + // Trim off response output type pseudo event so only event messages remain. + expectEvents = expectEvents[1:] + {{ end }} + + var i int + for event := range resp.GetStream().Events() { + if event == nil { + t.Errorf("%d, expect event, got nil", i) + } + if e, a := expectEvents[i], event; !reflect.DeepEqual(e, a) { + t.Errorf("%d, expect %T %v, got %T %v", i, e, e, a, a) + } + i++ + } + + if err := resp.GetStream().Err(); err != nil { + t.Errorf("expect no error, %v", err) + } + } + + func Test{{ $.Operation.ExportedName }}_ReadClose(t *testing.T) { + _, eventMsgs := mock{{ $.Operation.ExportedName }}ReadEvents() + sess, cleanupFn, err := eventstreamtest.SetupEventStreamSession(t, + eventstreamtest.ServeEventStream{ + T: t, + Events: eventMsgs, + }, + true, + ) + if err != nil { + t.Fatalf("expect no error, %v", err) + } + defer cleanupFn() + + svc := New(sess) + resp, err := svc.{{ $.Operation.ExportedName }}(nil) + if err != nil { + t.Fatalf("expect no error got, %v", err) + } + + {{ if gt (len $.OutputStream.Events) 0 -}} + // Assert calling Err before close does not close the stream. + resp.GetStream().Err() + select { + case _, ok := <-resp.GetStream().Events(): + if !ok { + t.Fatalf("expect stream not to be closed, but was") + } + default: + } + {{- end }} + + resp.GetStream().Close() + <-resp.GetStream().Events() + + if err := resp.GetStream().Err(); err != nil { + t.Errorf("expect no error, %v", err) + } + } + + func Benchmark{{ $.Operation.ExportedName }}_Read(b *testing.B) { + _, eventMsgs := mock{{ $.Operation.ExportedName }}ReadEvents() + var buf bytes.Buffer + encoder := eventstream.NewEncoder(&buf) + for _, msg := range eventMsgs { + if err := encoder.Encode(msg); err != nil { + b.Fatalf("failed to encode message, %v", err) + } + } + stream := &loopReader{source: bytes.NewReader(buf.Bytes())} + + sess := unit.Session + svc := New(sess, &aws.Config{ + Endpoint: aws.String("https://example.com"), + DisableParamValidation: aws.Bool(true), + }) + svc.Handlers.Send.Swap(corehandlers.SendHandler.Name, + request.NamedHandler{Name: "mockSend", + Fn: func(r *request.Request) { + r.HTTPResponse = &http.Response{ + Status: "200 OK", + StatusCode: 200, + Header: http.Header{}, + Body: ioutil.NopCloser(stream), + } + }, + }, + ) + + resp, err := svc.{{ $.Operation.ExportedName }}(nil) + if err != nil { + b.Fatalf("failed to create request, %v", err) + } + defer resp.GetStream().Close() + b.ResetTimer() + + for i := 0; i < b.N; i++ { + if err = resp.GetStream().Err(); err != nil { + b.Fatalf("expect no error, got %v", err) + } + event := <-resp.GetStream().Events() + if event == nil { + b.Fatalf("expect event, got nil, %v, %d", resp.GetStream().Err(), i) + } + } + } + + func mock{{ $.Operation.ExportedName }}ReadEvents() ( + []{{ $.OutputStream.Name }}Event, + []eventstream.Message, + ) { + expectEvents := []{{ $.OutputStream.Name }}Event { + {{- if eq $.Operation.API.Metadata.Protocol "json" }} + {{- template "set event type" $.Operation.OutputRef.Shape }} + {{- end }} + {{- range $_, $event := $.OutputStream.Events }} + {{- template "set event type" $event.Shape }} + {{- end }} + } + + var marshalers request.HandlerList + marshalers.PushBackNamed({{ $.API.ProtocolPackage }}.BuildHandler) + payloadMarshaler := protocol.HandlerPayloadMarshal{ + Marshalers: marshalers, + } + _ = payloadMarshaler + + eventMsgs := []eventstream.Message{ + {{- if eq $.Operation.API.Metadata.Protocol "json" }} + {{- template "set event message" Map "idx" 0 "parentShape" $.Operation.OutputRef.Shape "eventName" "initial-response" }} + {{- end }} + {{- range $idx, $event := $.OutputStream.Events }} + {{- $offsetIdx := OptionalAddInt (eq $.Operation.API.Metadata.Protocol "json") $idx 1 }} + {{- template "set event message" Map "idx" $offsetIdx "parentShape" $event.Shape "eventName" $event.Name }} + {{- end }} + } + + return expectEvents, eventMsgs + } + + {{- if $.OutputStream.Exceptions }} + func Test{{ $.Operation.ExportedName }}_ReadException(t *testing.T) { + expectEvents := []{{ $.OutputStream.Name }}Event { + {{- if eq $.Operation.API.Metadata.Protocol "json" }} + {{- template "set event type" $.Operation.OutputRef.Shape }} + {{- end }} + + {{- $exception := index $.OutputStream.Exceptions 0 }} + {{- template "set event type" $exception.Shape }} + } + + var marshalers request.HandlerList + marshalers.PushBackNamed({{ $.API.ProtocolPackage }}.BuildHandler) + payloadMarshaler := protocol.HandlerPayloadMarshal{ + Marshalers: marshalers, + } + + eventMsgs := []eventstream.Message{ + {{- if eq $.Operation.API.Metadata.Protocol "json" }} + {{- template "set event message" Map "idx" 0 "parentShape" $.Operation.OutputRef.Shape "eventName" "initial-response" }} + {{- end }} + + {{- $offsetIdx := OptionalAddInt (eq $.Operation.API.Metadata.Protocol "json") 0 1 }} + {{- $exception := index $.OutputStream.Exceptions 0 }} + {{- template "set event message" Map "idx" $offsetIdx "parentShape" $exception.Shape "eventName" $exception.Name }} + } + + sess, cleanupFn, err := eventstreamtest.SetupEventStreamSession(t, + eventstreamtest.ServeEventStream{ + T: t, + Events: eventMsgs, + }, + true, + ) + if err != nil { + t.Fatalf("expect no error, %v", err) + } + defer cleanupFn() + + svc := New(sess) + resp, err := svc.{{ $.Operation.ExportedName }}(nil) + if err != nil { + t.Fatalf("expect no error got, %v", err) + } + + defer resp.GetStream().Close() + + <-resp.GetStream().Events() + + err = resp.GetStream().Err() + if err == nil { + t.Fatalf("expect err, got none") + } + + expectErr := {{ ValueForType $exception.Shape nil }} + aerr, ok := err.(awserr.Error) + if !ok { + t.Errorf("expect exception, got %T, %#v", err, err) + } + if e, a := expectErr.Code(), aerr.Code(); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := expectErr.Message(), aerr.Message(); e != a { + t.Errorf("expect %v, got %v", e, a) + } + + if e, a := expectErr, aerr; !reflect.DeepEqual(e, a) { + t.Errorf("expect %#v, got %#v", e, a) + } + } + + {{- range $_, $exception := $.OutputStream.Exceptions }} + var _ awserr.Error = (*{{ $exception.Shape.ShapeName }})(nil) + {{- end }} + + {{ end }} +{{ end }} + +{{/* Params: *Shape */}} +{{ define "set event type" }} + &{{ $.ShapeName }}{ + {{- range $memName, $memRef := $.MemberRefs }} + {{- if not $memRef.Shape.IsEventStream }} + {{ $memName }}: {{ ValueForType $memRef.Shape nil }}, + {{- end }} + {{- end }} + }, +{{- end }} + +{{/* Params: idx:int, parentShape:*Shape, eventName:string */}} +{{ define "set event message" }} + { + Headers: eventstream.Headers{ + {{- if $.parentShape.Exception }} + eventstreamtest.EventExceptionTypeHeader, + { + Name: eventstreamapi.ExceptionTypeHeader, + Value: eventstream.StringValue("{{ $.eventName }}"), + }, + {{- else }} + eventstreamtest.EventMessageTypeHeader, + { + Name: eventstreamapi.EventTypeHeader, + Value: eventstream.StringValue("{{ $.eventName }}"), + }, + {{- end }} + {{- range $memName, $memRef := $.parentShape.MemberRefs }} + {{- template "set event message header" Map "idx" $.idx "parentShape" $.parentShape "memName" $memName "memRef" $memRef }} + {{- end }} + }, + {{- template "set event message payload" Map "idx" $.idx "parentShape" $.parentShape }} + }, +{{- end }} + +{{/* Params: idx:int, parentShape:*Shape, memName:string, memRef:*ShapeRef */}} +{{ define "set event message header" }} + {{- if $.memRef.IsEventHeader }} + { + Name: "{{ $.memName }}", + {{- $shapeValueVar := printf "expectEvents[%d].(%s).%s" $.idx $.parentShape.GoType $.memName }} + Value: {{ EventHeaderValueForType $.memRef.Shape $shapeValueVar }}, + }, + {{- end }} +{{- end }} + +{{/* Params: idx:int, parentShape:*Shape, memName:string, memRef:*ShapeRef */}} +{{ define "set event message payload" }} + {{- $payloadMemName := $.parentShape.PayloadRefName }} + {{- if HasNonBlobPayloadMembers $.parentShape }} + Payload: eventstreamtest.MarshalEventPayload(payloadMarshaler, expectEvents[{{ $.idx }}]), + {{- else if $payloadMemName }} + {{- $shapeType := (index $.parentShape.MemberRefs $payloadMemName).Shape.Type }} + {{- if eq $shapeType "blob" }} + Payload: expectEvents[{{ $.idx }}].({{ $.parentShape.GoType }}).{{ $payloadMemName }}, + {{- else if eq $shapeType "string" }} + Payload: []byte(*expectEvents[{{ $.idx }}].({{ $.parentShape.GoType }}).{{ $payloadMemName }}), + {{- end }} + {{- end }} +{{- end }} +`)) diff --git a/private/model/api/eventstream_tmpl_writer.go b/private/model/api/eventstream_tmpl_writer.go new file mode 100644 index 00000000000..bb043cbf207 --- /dev/null +++ b/private/model/api/eventstream_tmpl_writer.go @@ -0,0 +1,59 @@ +// +build codegen + +package api + +import "text/template" + +var eventStreamShapeWriterTmpl = template.Must(template.New("eventStreamShapeWriterTmpl"). + Funcs(template.FuncMap{}). + Parse(` +{{- $es := $.EventStream }} + +// {{ $es.StreamWriterAPIName }} provides the interface for writing events to the stream. +// The default implementation for this interface will be {{ $.ShapeName }}. +// +// The writer's Close method must allow multiple concurrent calls. +// +// These events are: +// {{ range $_, $event := $es.Events }} +// * {{ $event.Shape.ShapeName }} +{{- end }} +type {{ $es.StreamWriterAPIName }} interface { + // Sends writes events to the stream blocking until the event has been + // written. An error is returned if the write fails. + Send(aws.Context, {{ $es.EventGroupName }}) error + + // Close will stop the writer writing to the event stream. + Close() error + + // Returns any error that has occurred while writing to the event stream. + Err() error +} + +type {{ $es.StreamWriterImplName }} struct { + *eventstreamapi.StreamWriter +} + +func (w *{{ $es.StreamWriterImplName }}) Send(ctx aws.Context, event {{ $es.EventGroupName }}) error { + return w.StreamWriter.Send(ctx, event) +} + +func {{ $es.StreamEventTypeGetterName }}(event eventstreamapi.Marshaler) (string, error) { + switch event.(type) { + {{- range $_, $event := $es.Events }} + case *{{ $event.Shape.ShapeName }}: + return {{ printf "%q" $event.Name }}, nil + {{- end }} + {{- range $_, $event := $es.Exceptions }} + case *{{ $event.Shape.ShapeName }}: + return {{ printf "%q" $event.Name }}, nil + {{- end }} + default: + return "", awserr.New( + request.ErrCodeSerialization, + fmt.Sprintf("unknown event type, %T, for {{ $es.Name }}", event), + nil, + ) + } +} +`)) diff --git a/private/model/api/load.go b/private/model/api/load.go index 14d38f8c52a..d4baa0221be 100644 --- a/private/model/api/load.go +++ b/private/model/api/load.go @@ -215,7 +215,6 @@ func (a *API) Setup() error { a.renameAPIPayloadShapes() a.renameCollidingFields() a.updateTopLevelShapeReferences() - a.renameS3EventStreamMember() if err := a.setupEventStreams(); err != nil { return err } diff --git a/private/model/api/operation.go b/private/model/api/operation.go index 6cccedb13b1..fbf1f55ebf7 100644 --- a/private/model/api/operation.go +++ b/private/model/api/operation.go @@ -36,7 +36,7 @@ type Operation struct { Endpoint *EndpointTrait `json:"endpoint"` } -// EndpointTrait provides the structure of the modeled enpdoint trait, and its +// EndpointTrait provides the structure of the modeled endpoint trait, and its // properties. type EndpointTrait struct { // Specifies the hostPrefix template to prepend to the operation's request @@ -92,7 +92,7 @@ func (o *Operation) Methods() []string { return methods } -// HasInput returns if the Operation accepts an input paramater +// HasInput returns if the Operation accepts an input parameter func (o *Operation) HasInput() bool { return o.InputRef.ShapeName != "" } @@ -111,6 +111,17 @@ const ( V4UnsignedBodyAuthType AuthType = "v4-unsigned-body" ) +// ShouldSignRequestBody returns if the operation request body should be signed +// or not. +func (o *Operation) ShouldSignRequestBody() bool { + switch o.AuthType { + case NoneAuthType, V4UnsignedBodyAuthType: + return false + default: + return true + } +} + // GetSigner returns the signer that should be used for a API request. func (o *Operation) GetSigner() string { buf := bytes.NewBuffer(nil) @@ -128,7 +139,6 @@ func (o *Operation) GetSigner() string { buf.WriteString("req.Handlers.Sign.PushFrontNamed(handler)") } - buf.WriteString("\n") return buf.String() } @@ -193,38 +203,86 @@ func (c *{{ .API.StructName }}) {{ .ExportedName }}Request(` + output = &{{ .OutputRef.GoTypeElem }}{} req = c.newRequest(op, input, output) - {{ if ne .AuthType "" }}{{ .GetSigner }}{{ end }} + {{- if ne .AuthType "" }} + {{ .GetSigner }} + {{- end }} + {{- if .ShouldDiscardResponse -}} - {{- $_ := .API.AddSDKImport "private/protocol" -}} - {{- $_ := .API.AddSDKImport "private/protocol" .API.ProtocolPackage -}} + {{- $_ := .API.AddSDKImport "private/protocol" }} + {{- $_ := .API.AddSDKImport "private/protocol" .API.ProtocolPackage }} req.Handlers.Unmarshal.Swap({{ .API.ProtocolPackage }}.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - {{ else if .OutputRef.Shape.EventStreamsMemberName -}} - {{- $_ := .API.AddSDKImport "private/protocol" .API.ProtocolPackage -}} - {{- $_ := .API.AddSDKImport "private/protocol/rest" -}} - req.Handlers.Send.Swap(client.LogHTTPResponseHandler.Name, client.LogHTTPResponseHeaderHandler) - req.Handlers.Unmarshal.Swap({{ .API.ProtocolPackage }}.UnmarshalHandler.Name, rest.UnmarshalHandler) - req.Handlers.Unmarshal.PushBack(output.runEventStreamLoop) - {{ if eq .API.Metadata.Protocol "json" -}} - req.Handlers.Unmarshal.PushBack(output.unmarshalInitialResponse) - {{ end -}} - {{ end -}} - {{ if .EndpointDiscovery -}} - {{if not .EndpointDiscovery.Required -}} + {{- else }} + {{- if $.EventStreamAPI }} + {{- $esapi := $.EventStreamAPI }} + + {{- if $esapi.RequireHTTP2 }} + req.Handlers.UnmarshalMeta.PushBack( + protocol.RequireHTTPMinProtocol{Major:2}.Handler, + ) + {{- end }} + + es := new{{ $esapi.Name }}() + {{- if $esapi.Legacy }} + req.Handlers.Unmarshal.PushBack(es.setStreamCloser) + {{- end }} + output.{{ $esapi.OutputMemberName }} = es + + {{- $inputStream := $esapi.InputStream }} + {{- $outputStream := $esapi.OutputStream }} + + {{- $_ := .API.AddSDKImport "private/protocol" .API.ProtocolPackage }} + {{- $_ := .API.AddSDKImport "private/protocol/rest" }} + + {{- if $inputStream }} + + req.Handlers.Sign.PushFront(es.setupInputPipe) + req.Handlers.Build.PushBack(request.WithSetRequestHeaders(map[string]string{ + "Content-Type": "application/vnd.amazon.eventstream", + "X-Amz-Content-Sha256": "STREAMING-AWS4-HMAC-SHA256-EVENTS", + })) + req.Handlers.Build.Swap({{ .API.ProtocolPackage }}.BuildHandler.Name, rest.BuildHandler) + req.Handlers.Send.Swap(client.LogHTTPRequestHandler.Name, client.LogHTTPRequestHeaderHandler) + req.Handlers.Unmarshal.PushBack(es.runInputStream) + + {{- if eq .API.Metadata.Protocol "json" }} + es.input = input + req.Handlers.Unmarshal.PushBack(es.sendInitialEvent) + {{- end }} + {{- end }} + + {{- if $outputStream }} + + req.Handlers.Send.Swap(client.LogHTTPResponseHandler.Name, client.LogHTTPResponseHeaderHandler) + req.Handlers.Unmarshal.Swap({{ .API.ProtocolPackage }}.UnmarshalHandler.Name, rest.UnmarshalHandler) + req.Handlers.Unmarshal.PushBack(es.runOutputStream) + + {{- if eq .API.Metadata.Protocol "json" }} + es.output = output + req.Handlers.Unmarshal.PushBack(es.recvInitialEvent) + {{- end }} + {{- end }} + req.Handlers.Unmarshal.PushBack(es.runOnStreamPartClose) + + {{- end }} + {{- end }} + + {{- if .EndpointDiscovery }} + {{- if not .EndpointDiscovery.Required }} if aws.BoolValue(req.Config.EnableEndpointDiscovery) { - {{end -}} + {{- end }} de := discoverer{{ .API.EndpointDiscoveryOp.Name }}{ Required: {{ .EndpointDiscovery.Required }}, EndpointCache: c.endpointCache, Params: map[string]*string{ "op": aws.String(req.Operation.Name), - {{ range $key, $ref := .InputRef.Shape.MemberRefs -}} - {{ if $ref.EndpointDiscoveryID -}} - {{ if ne (len $ref.LocationName) 0 -}} - "{{ $ref.LocationName }}": input.{{ $key }}, - {{ else -}} - "{{ $key }}": input.{{ $key }}, - {{ end -}} - {{ end -}} + {{- range $key, $ref := .InputRef.Shape.MemberRefs -}} + {{- if $ref.EndpointDiscoveryID -}} + {{- if ne (len $ref.LocationName) 0 -}} + "{{ $ref.LocationName }}": input.{{ $key }}, + {{- else }} + "{{ $key }}": input.{{ $key }}, + {{- end }} + {{- end }} {{- end }} }, Client: c, @@ -240,13 +298,14 @@ func (c *{{ .API.StructName }}) {{ .ExportedName }}Request(` + Name: "crr.endpointdiscovery", Fn: de.Handler, }) - {{if not .EndpointDiscovery.Required -}} + {{- if not .EndpointDiscovery.Required }} } - {{ end -}} - {{ end -}} - {{- range $_, $handler := $.CustomBuildHandlers -}} + {{- end }} + {{- end }} + + {{- range $_, $handler := $.CustomBuildHandlers }} req.Handlers.Build.PushBackNamed({{ $handler }}) - {{ end -}} + {{- end }} return } @@ -374,8 +433,7 @@ func (c *{{ .API.StructName }}) {{ .ExportedName }}PagesWithContext(` + } {{ end }} -{{ if .IsEndpointDiscoveryOp -}} - +{{- if .IsEndpointDiscoveryOp }} type discoverer{{ .ExportedName }} struct { Client *{{ .API.StructName }} Required bool @@ -441,21 +499,13 @@ func (d *discoverer{{ .ExportedName }}) Handler(r *request.Request) { r.HTTPRequest.URL = endpoint.URL } } -{{ end -}} - +{{- end }} `)) // GoCode returns a string of rendered GoCode for this Operation func (o *Operation) GoCode() string { var buf bytes.Buffer - if len(o.OutputRef.Shape.EventStreamsMemberName) != 0 { - o.API.AddSDKImport("aws/client") - o.API.AddSDKImport("private/protocol") - o.API.AddSDKImport("private/protocol/rest") - o.API.AddSDKImport("private/protocol", o.API.ProtocolPackage()) - } - if o.API.EndpointDiscoveryOp != nil { o.API.AddSDKImport("aws/crr") o.API.AddImport("time") @@ -466,9 +516,18 @@ func (o *Operation) GoCode() string { setupEndpointHostPrefix(o) } - err := operationTmpl.Execute(&buf, o) - if err != nil { - panic(err) + if err := operationTmpl.Execute(&buf, o); err != nil { + panic(fmt.Sprintf("failed to render operation, %v, %v", o.ExportedName, err)) + } + + if o.EventStreamAPI != nil { + o.API.AddSDKImport("aws/client") + o.API.AddSDKImport("private/protocol") + o.API.AddSDKImport("private/protocol/rest") + o.API.AddSDKImport("private/protocol", o.API.ProtocolPackage()) + if err := renderEventStreamAPI(&buf, o); err != nil { + panic(fmt.Sprintf("failed to render EventStreamAPI for %v, %v", o.ExportedName, err)) + } } return strings.TrimSpace(buf.String()) diff --git a/private/model/api/shape.go b/private/model/api/shape.go index fde47c28937..5ea31f13848 100644 --- a/private/model/api/shape.go +++ b/private/model/api/shape.go @@ -89,9 +89,12 @@ type Shape struct { XMLNamespace XMLInfo Min float64 // optional Minimum length (string, list) or value (number) - EventStreamsMemberName string `json:"-"` - EventStreamAPI *EventStreamAPI `json:"-"` - EventFor []*EventStream `json:"-"` + OutputEventStreamAPI *EventStreamAPI + EventStream *EventStream + EventFor []*EventStream `json:"-"` + + IsInputEventStream bool `json:"-"` + IsOutputEventStream bool `json:"-"` IsEventStream bool `json:"eventstream"` IsEvent bool `json:"event"` @@ -463,7 +466,7 @@ func (ref *ShapeRef) GoTags(toplevel bool, isRequired bool) string { tags = append(tags, ShapeTag{"locationName", ref.Shape.LocationName}) } else if len(ref.Shape.EventFor) != 0 && ref.API.Metadata.Protocol == "rest-xml" { // RPC JSON events need to have location name modeled for round trip testing. - tags = append(tags, ShapeTag{"locationName", ref.Shape.ShapeName}) + tags = append(tags, ShapeTag{"locationName", ref.Shape.OrigShapeName}) } if ref.QueryName != "" { @@ -566,11 +569,11 @@ func (ref *ShapeRef) IndentedDocstring() string { var goCodeStringerTmpl = template.Must(template.New("goCodeStringerTmpl").Parse(` // String returns the string representation -func (s {{ .ShapeName }}) String() string { +func (s {{ $.ShapeName }}) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s {{ .ShapeName }}) GoString() string { +func (s {{ $.ShapeName }}) GoString() string { return s.String() } `)) @@ -635,15 +638,20 @@ var structShapeTmpl = func() *template.Template { template.New("structShapeTmpl"). Funcs(template.FuncMap{ "GetDeprecatedMsg": getDeprecatedMessage, + "TrimExportedMembers": func(s *Shape) map[string]*ShapeRef { + members := map[string]*ShapeRef{} + for name, ref := range s.MemberRefs { + if ref.Shape.IsEventStream { + continue + } + members[name] = ref + } + return members + }, }). Parse(structShapeTmplDef), ) - template.Must( - shapeTmpl.AddParseTree( - "eventStreamAPILoopMethodTmpl", eventStreamAPILoopMethodTmpl.Tree), - ) - template.Must( shapeTmpl.AddParseTree( "eventStreamEventShapeTmpl", eventStreamEventShapeTmpl.Tree), @@ -671,21 +679,25 @@ var structShapeTmpl = func() *template.Template { }() const structShapeTmplDef = ` -{{ .Docstring }} -{{ if .Deprecated -}} -{{ if .Docstring -}} +{{ $.Docstring }} +{{ if $.Deprecated -}} +{{ if $.Docstring -}} // {{ end -}} -// Deprecated: {{ GetDeprecatedMsg .DeprecatedMsg .ShapeName }} +// Deprecated: {{ GetDeprecatedMsg $.DeprecatedMsg $.ShapeName }} {{ end -}} -{{ $context := . -}} -type {{ .ShapeName }} struct { - _ struct{} {{ .GoTags true false }} - - {{ range $_, $name := $context.MemberNames -}} - {{ $elem := index $context.MemberRefs $name -}} - {{ $isBlob := $context.WillRefBeBase64Encoded $name -}} - {{ $isRequired := $context.IsRequired $name -}} +type {{ $.ShapeName }} struct { + _ struct{} {{ $.GoTags true false }} + + {{- if $.OutputEventStreamAPI }} + + {{ $.OutputEventStreamAPI.OutputMemberName }} *{{ $.OutputEventStreamAPI.Name }} + {{- end }} + + {{- range $name, $elem := (TrimExportedMembers $) }} + + {{ $isBlob := $.WillRefBeBase64Encoded $name -}} + {{ $isRequired := $.IsRequired $name -}} {{ $doc := $elem.Docstring -}} {{ if $doc -}} @@ -707,52 +719,65 @@ type {{ .ShapeName }} struct { {{ end -}} // {{ $name }} is a required field {{ end -}} - {{ $name }} {{ $context.GoStructType $name $elem }} {{ $elem.GoTags false $isRequired }} - - {{ end }} + {{ $name }} {{ $.GoStructType $name $elem }} {{ $elem.GoTags false $isRequired }} + {{- end }} } -{{ if not .API.NoStringerMethods }} - {{ .GoCodeStringers }} +{{ if not $.API.NoStringerMethods }} + {{ $.GoCodeStringers }} {{ end }} -{{ if not (or .API.NoValidataShapeMethods .Exception) }} - {{ if .Validations -}} - {{ .Validations.GoCode . }} +{{ if not (or $.API.NoValidataShapeMethods $.Exception) }} + {{ if $.Validations -}} + {{ $.Validations.GoCode $ }} {{ end }} {{ end }} -{{ if not (or .API.NoGenStructFieldAccessors .Exception) }} - {{ $builderShapeName := print .ShapeName -}} - {{ range $_, $name := $context.MemberNames -}} - {{ $elem := index $context.MemberRefs $name -}} +{{- if not (or $.API.NoGenStructFieldAccessors $.Exception) }} + {{- $builderShapeName := print $.ShapeName }} + {{- range $name, $elem := (TrimExportedMembers $) }} // Set{{ $name }} sets the {{ $name }} field's value. - func (s *{{ $builderShapeName }}) Set{{ $name }}(v {{ $context.GoStructValueType $name $elem }}) *{{ $builderShapeName }} { - {{ if $elem.UseIndirection -}} + func (s *{{ $builderShapeName }}) Set{{ $name }}(v {{ $.GoStructValueType $name $elem }}) *{{ $builderShapeName }} { + {{- if $elem.UseIndirection }} s.{{ $name }} = &v - {{ else -}} + {{- else }} s.{{ $name }} = v - {{ end -}} + {{- end }} return s } - {{ if $elem.GenerateGetter -}} - func (s *{{ $builderShapeName }}) get{{ $name }}() (v {{ $context.GoStructValueType $name $elem }}) { - {{ if $elem.UseIndirection -}} + {{- if $elem.GenerateGetter }} + + func (s *{{ $builderShapeName }}) get{{ $name }}() (v {{ $.GoStructValueType $name $elem }}) { + {{- if $elem.UseIndirection }} if s.{{ $name }} == nil { return v } return *s.{{ $name }} - {{ else -}} + {{- else }} return s.{{ $name }} - {{ end -}} + {{- end }} } {{- end }} - {{ end }} -{{ end }} + {{- end }} +{{- end }} + +{{- if $.OutputEventStreamAPI }} + {{- $esMemberName := $.OutputEventStreamAPI.OutputMemberName }} + {{- if $.OutputEventStreamAPI.Legacy }} + func (s *{{ $.ShapeName }}) Set{{ $esMemberName }}(v *{{ $.OutputEventStreamAPI.Name }}) *{{ $.ShapeName }} { + s.{{ $esMemberName }} = v + return s + } + func (s *{{ $.ShapeName }}) Get{{ $esMemberName }}() *{{ $.OutputEventStreamAPI.Name }} { + return s.{{ $esMemberName }} + } + {{- end }} -{{ if $.EventStreamsMemberName }} - {{ template "eventStreamAPILoopMethodTmpl" $ }} -{{ end }} + // GetStream returns the type to interact with the event stream. + func (s *{{ $.ShapeName }}) GetStream() *{{ $.OutputEventStreamAPI.Name }} { + return s.{{ $esMemberName }} + } +{{- end }} {{ if $.EventFor }} {{ template "eventStreamEventShapeTmpl" $ }} @@ -772,12 +797,11 @@ type {{ .ShapeName }} struct { ` var enumShapeTmpl = template.Must(template.New("EnumShape").Parse(` -{{ .Docstring }} +{{ $.Docstring }} const ( - {{ $context := . -}} - {{ range $index, $elem := .Enum -}} - {{ $name := index $context.EnumConsts $index -}} - // {{ $name }} is a {{ $context.ShapeName }} enum value + {{ range $index, $elem := $.Enum -}} + {{ $name := index $.EnumConsts $index -}} + // {{ $name }} is a {{ $.ShapeName }} enum value {{ $name }} = "{{ $elem }}" {{ end }} @@ -789,8 +813,8 @@ func (s *Shape) GoCode() string { w := &bytes.Buffer{} switch { - case s.EventStreamAPI != nil: - if err := renderEventStreamAPIShape(w, s); err != nil { + case s.IsEventStream: + if err := renderEventStreamShape(w, s); err != nil { panic( fmt.Sprintf( "failed to generate eventstream API shape, %s, %v", @@ -843,6 +867,9 @@ func (s *Shape) IsRequired(member string) bool { } for _, n := range s.Required { if n == member { + if ref.Shape.IsEventStream { + return false + } return true } } diff --git a/private/model/cli/gen-api/main.go b/private/model/cli/gen-api/main.go index 0d5d2c6a73c..03f48b05b7f 100644 --- a/private/model/cli/gen-api/main.go +++ b/private/model/cli/gen-api/main.go @@ -293,7 +293,7 @@ func writeAPIErrorsFile(g *generateInfo) error { func writeAPIEventStreamTestFile(g *generateInfo) error { return writeGoFile(filepath.Join(g.PackageDir, "eventstream_test.go"), codeLayout, - "// +build go1.6\n", + "// +build go1.10\n", g.API.PackageName(), g.API.APIEventStreamTestGoCode(), ) diff --git a/private/protocol/eventstream/debug.go b/private/protocol/eventstream/debug.go index ecc7bf82fa2..151054971a5 100644 --- a/private/protocol/eventstream/debug.go +++ b/private/protocol/eventstream/debug.go @@ -101,7 +101,7 @@ func (hs *decodedHeaders) UnmarshalJSON(b []byte) error { } headers.Set(h.Name, value) } - (*hs) = decodedHeaders(headers) + *hs = decodedHeaders(headers) return nil } diff --git a/private/protocol/eventstream/decode.go b/private/protocol/eventstream/decode.go index 4b972b2d666..47433939189 100644 --- a/private/protocol/eventstream/decode.go +++ b/private/protocol/eventstream/decode.go @@ -21,10 +21,24 @@ type Decoder struct { // NewDecoder initializes and returns a Decoder for decoding event // stream messages from the reader provided. -func NewDecoder(r io.Reader) *Decoder { - return &Decoder{ +func NewDecoder(r io.Reader, opts ...func(*Decoder)) *Decoder { + d := &Decoder{ r: r, } + + for _, opt := range opts { + opt(d) + } + + return d +} + +// DecodeWithLogger adds a logger to be used by the decoder when decoding +// stream events. +func DecodeWithLogger(logger aws.Logger) func(*Decoder) { + return func(d *Decoder) { + d.logger = logger + } } // Decode attempts to decode a single message from the event stream reader. @@ -40,6 +54,15 @@ func (d *Decoder) Decode(payloadBuf []byte) (m Message, err error) { }() } + m, err = Decode(reader, payloadBuf) + + return m, err +} + +// Decode attempts to decode a single message from the event stream reader. +// Will return the event stream message, or error if Decode fails to read +// the message from the reader. +func Decode(reader io.Reader, payloadBuf []byte) (m Message, err error) { crc := crc32.New(crc32IEEETable) hashReader := io.TeeReader(reader, crc) @@ -72,12 +95,6 @@ func (d *Decoder) Decode(payloadBuf []byte) (m Message, err error) { return m, nil } -// UseLogger specifies the Logger that that the decoder should use to log the -// message decode to. -func (d *Decoder) UseLogger(logger aws.Logger) { - d.logger = logger -} - func logMessageDecode(logger aws.Logger, msgBuf *bytes.Buffer, msg Message, decodeErr error) { w := bytes.NewBuffer(nil) defer func() { logger.Log(w.String()) }() diff --git a/private/protocol/eventstream/encode.go b/private/protocol/eventstream/encode.go index 150a60981d8..ffade3bc0c8 100644 --- a/private/protocol/eventstream/encode.go +++ b/private/protocol/eventstream/encode.go @@ -3,61 +3,107 @@ package eventstream import ( "bytes" "encoding/binary" + "encoding/hex" + "encoding/json" + "fmt" "hash" "hash/crc32" "io" + + "github.com/aws/aws-sdk-go/aws" ) // Encoder provides EventStream message encoding. type Encoder struct { - w io.Writer + w io.Writer + logger aws.Logger headersBuf *bytes.Buffer } // NewEncoder initializes and returns an Encoder to encode Event Stream // messages to an io.Writer. -func NewEncoder(w io.Writer) *Encoder { - return &Encoder{ +func NewEncoder(w io.Writer, opts ...func(*Encoder)) *Encoder { + e := &Encoder{ w: w, headersBuf: bytes.NewBuffer(nil), } + + for _, opt := range opts { + opt(e) + } + + return e +} + +// EncodeWithLogger adds a logger to be used by the encode when decoding +// stream events. +func EncodeWithLogger(logger aws.Logger) func(*Encoder) { + return func(d *Encoder) { + d.logger = logger + } } // Encode encodes a single EventStream message to the io.Writer the Encoder // was created with. An error is returned if writing the message fails. -func (e *Encoder) Encode(msg Message) error { +func (e *Encoder) Encode(msg Message) (err error) { e.headersBuf.Reset() - err := encodeHeaders(e.headersBuf, msg.Headers) - if err != nil { + writer := e.w + if e.logger != nil { + encodeMsgBuf := bytes.NewBuffer(nil) + writer = io.MultiWriter(writer, encodeMsgBuf) + defer func() { + logMessageEncode(e.logger, encodeMsgBuf, msg, err) + }() + } + + if err = EncodeHeaders(e.headersBuf, msg.Headers); err != nil { return err } crc := crc32.New(crc32IEEETable) - hashWriter := io.MultiWriter(e.w, crc) + hashWriter := io.MultiWriter(writer, crc) headersLen := uint32(e.headersBuf.Len()) payloadLen := uint32(len(msg.Payload)) - if err := encodePrelude(hashWriter, crc, headersLen, payloadLen); err != nil { + if err = encodePrelude(hashWriter, crc, headersLen, payloadLen); err != nil { return err } if headersLen > 0 { - if _, err := io.Copy(hashWriter, e.headersBuf); err != nil { + if _, err = io.Copy(hashWriter, e.headersBuf); err != nil { return err } } if payloadLen > 0 { - if _, err := hashWriter.Write(msg.Payload); err != nil { + if _, err = hashWriter.Write(msg.Payload); err != nil { return err } } msgCRC := crc.Sum32() - return binary.Write(e.w, binary.BigEndian, msgCRC) + return binary.Write(writer, binary.BigEndian, msgCRC) +} + +func logMessageEncode(logger aws.Logger, msgBuf *bytes.Buffer, msg Message, encodeErr error) { + w := bytes.NewBuffer(nil) + defer func() { logger.Log(w.String()) }() + + fmt.Fprintf(w, "Message to encode:\n") + encoder := json.NewEncoder(w) + if err := encoder.Encode(msg); err != nil { + fmt.Fprintf(w, "Failed to get encoded message, %v\n", err) + } + + if encodeErr != nil { + fmt.Fprintf(w, "Encode error: %v\n", encodeErr) + return + } + + fmt.Fprintf(w, "Raw message:\n%s\n", hex.Dump(msgBuf.Bytes())) } func encodePrelude(w io.Writer, crc hash.Hash32, headersLen, payloadLen uint32) error { @@ -86,7 +132,9 @@ func encodePrelude(w io.Writer, crc hash.Hash32, headersLen, payloadLen uint32) return nil } -func encodeHeaders(w io.Writer, headers Headers) error { +// EncodeHeaders writes the header values to the writer encoded in the event +// stream format. Returns an error if a header fails to encode. +func EncodeHeaders(w io.Writer, headers Headers) error { for _, h := range headers { hn := headerName{ Len: uint8(len(h.Name)), diff --git a/private/protocol/eventstream/eventstreamapi/error.go b/private/protocol/eventstream/eventstreamapi/error.go index 5ea5a988b63..34c2e89d539 100644 --- a/private/protocol/eventstream/eventstreamapi/error.go +++ b/private/protocol/eventstream/eventstreamapi/error.go @@ -1,6 +1,9 @@ package eventstreamapi -import "fmt" +import ( + "fmt" + "sync" +) type messageError struct { code string @@ -22,3 +25,53 @@ func (e messageError) Error() string { func (e messageError) OrigErr() error { return nil } + +// OnceError wraps the behavior of recording an error +// once and signal on a channel when this has occurred. +// Signaling is done by closing of the channel. +// +// Type is safe for concurrent usage. +type OnceError struct { + mu sync.RWMutex + err error + ch chan struct{} +} + +// NewOnceError return a new OnceError +func NewOnceError() *OnceError { + return &OnceError{ + ch: make(chan struct{}, 1), + } +} + +// Err acquires a read-lock and returns an +// error if one has been set. +func (e *OnceError) Err() error { + e.mu.RLock() + err := e.err + e.mu.RUnlock() + + return err +} + +// SetError acquires a write-lock and will set +// the underlying error value if one has not been set. +func (e *OnceError) SetError(err error) { + if err == nil { + return + } + + e.mu.Lock() + if e.err == nil { + e.err = err + close(e.ch) + } + e.mu.Unlock() +} + +// ErrorSet returns a channel that will be used to signal +// that an error has been set. This channel will be closed +// when the error value has been set for OnceError. +func (e *OnceError) ErrorSet() <-chan struct{} { + return e.ch +} diff --git a/private/protocol/eventstream/eventstreamapi/api.go b/private/protocol/eventstream/eventstreamapi/reader.go similarity index 77% rename from private/protocol/eventstream/eventstreamapi/api.go rename to private/protocol/eventstream/eventstreamapi/reader.go index 97937c8e598..bb8ea5da165 100644 --- a/private/protocol/eventstream/eventstreamapi/api.go +++ b/private/protocol/eventstream/eventstreamapi/reader.go @@ -2,9 +2,7 @@ package eventstreamapi import ( "fmt" - "io" - "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/private/protocol" "github.com/aws/aws-sdk-go/private/protocol/eventstream" ) @@ -15,27 +13,8 @@ type Unmarshaler interface { UnmarshalEvent(protocol.PayloadUnmarshaler, eventstream.Message) error } -// EventStream headers with specific meaning to async API functionality. -const ( - MessageTypeHeader = `:message-type` // Identifies type of message. - EventMessageType = `event` - ErrorMessageType = `error` - ExceptionMessageType = `exception` - - // Message Events - EventTypeHeader = `:event-type` // Identifies message event type e.g. "Stats". - - // Message Error - ErrorCodeHeader = `:error-code` - ErrorMessageHeader = `:error-message` - - // Message Exception - ExceptionTypeHeader = `:exception-type` -) - // EventReader provides reading from the EventStream of an reader. type EventReader struct { - reader io.ReadCloser decoder *eventstream.Decoder unmarshalerForEventType func(string) (Unmarshaler, error) @@ -47,27 +26,18 @@ type EventReader struct { // NewEventReader returns a EventReader built from the reader and unmarshaler // provided. Use ReadStream method to start reading from the EventStream. func NewEventReader( - reader io.ReadCloser, + decoder *eventstream.Decoder, payloadUnmarshaler protocol.PayloadUnmarshaler, unmarshalerForEventType func(string) (Unmarshaler, error), ) *EventReader { return &EventReader{ - reader: reader, - decoder: eventstream.NewDecoder(reader), + decoder: decoder, payloadUnmarshaler: payloadUnmarshaler, unmarshalerForEventType: unmarshalerForEventType, payloadBuf: make([]byte, 10*1024), } } -// UseLogger instructs the EventReader to use the logger and log level -// specified. -func (r *EventReader) UseLogger(logger aws.Logger, logLevel aws.LogLevelType) { - if logger != nil && logLevel.Matches(aws.LogDebugWithEventStreamBody) { - r.decoder.UseLogger(logger) - } -} - // ReadEvent attempts to read a message from the EventStream and return the // unmarshaled event value that the message is for. // @@ -95,8 +65,7 @@ func (r *EventReader) ReadEvent() (event interface{}, err error) { case EventMessageType: return r.unmarshalEventMessage(msg) case ExceptionMessageType: - err = r.unmarshalEventException(msg) - return nil, err + return nil, r.unmarshalEventException(msg) case ErrorMessageType: return nil, r.unmarshalErrorMessage(msg) default: @@ -174,11 +143,6 @@ func (r *EventReader) unmarshalErrorMessage(msg eventstream.Message) (err error) return msgErr } -// Close closes the EventReader's EventStream reader. -func (r *EventReader) Close() error { - return r.reader.Close() -} - // GetHeaderString returns the value of the header as a string. If the header // is not set or the value is not a string an error will be returned. func GetHeaderString(msg eventstream.Message, headerName string) (string, error) { diff --git a/private/protocol/eventstream/eventstreamapi/api_test.go b/private/protocol/eventstream/eventstreamapi/reader_test.go similarity index 89% rename from private/protocol/eventstream/eventstreamapi/api_test.go rename to private/protocol/eventstream/eventstreamapi/reader_test.go index ed8bfecdf72..b58ec72c867 100644 --- a/private/protocol/eventstream/eventstreamapi/api_test.go +++ b/private/protocol/eventstream/eventstreamapi/reader_test.go @@ -4,7 +4,6 @@ import ( "bytes" "fmt" "io" - "io/ioutil" "testing" "github.com/aws/aws-sdk-go/aws/request" @@ -43,7 +42,8 @@ func TestEventReader(t *testing.T) { var unmarshalers request.HandlerList unmarshalers.PushBackNamed(restjson.UnmarshalHandler) - eventReader := NewEventReader(stream, + decoder := eventstream.NewDecoder(stream) + eventReader := NewEventReader(decoder, protocol.HandlerPayloadUnmarshal{ Unmarshalers: unmarshalers, }, @@ -92,7 +92,8 @@ func TestEventReader_Error(t *testing.T) { var unmarshalers request.HandlerList unmarshalers.PushBackNamed(restjson.UnmarshalHandler) - eventReader := NewEventReader(stream, + decoder := eventstream.NewDecoder(stream) + eventReader := NewEventReader(decoder, protocol.HandlerPayloadUnmarshal{ Unmarshalers: unmarshalers, }, @@ -134,7 +135,8 @@ func TestEventReader_Exception(t *testing.T) { var unmarshalers request.HandlerList unmarshalers.PushBackNamed(restjson.UnmarshalHandler) - eventReader := NewEventReader(stream, + decoder := eventstream.NewDecoder(stream) + eventReader := NewEventReader(decoder, protocol.HandlerPayloadUnmarshal{ Unmarshalers: unmarshalers, }, @@ -164,9 +166,10 @@ func BenchmarkEventReader(b *testing.B) { eventMessageTypeHeader, eventstream.Header{ Name: EventTypeHeader, - Value: eventstream.StringValue("eventABC"), + Value: eventstream.StringValue("eventStructured"), }, }, + Payload: []byte(`{"String":"stringfield","Number":123,"Nested":{"String":"fieldstring","Number":321}}`), } if err := encoder.Encode(msg); err != nil { b.Fatalf("failed to encode message, %v", err) @@ -176,14 +179,15 @@ func BenchmarkEventReader(b *testing.B) { var unmarshalers request.HandlerList unmarshalers.PushBackNamed(restjson.UnmarshalHandler) - eventReader := NewEventReader(ioutil.NopCloser(stream), + decoder := eventstream.NewDecoder(stream) + eventReader := NewEventReader(decoder, protocol.HandlerPayloadUnmarshal{ Unmarshalers: unmarshalers, }, unmarshalerForEventType, ) - b.ResetTimer() + b.ResetTimer() for i := 0; i < b.N; i++ { stream.Seek(0, 0) @@ -201,6 +205,8 @@ func unmarshalerForEventType(eventType string) (Unmarshaler, error) { switch eventType { case "eventABC": return &eventABC{}, nil + case "eventStructured": + return &eventStructured{}, nil case "exception": return &exceptionType{}, nil default: @@ -222,7 +228,7 @@ func (e *eventABC) UnmarshalEvent( return nil } -func createStream(msgs ...eventstream.Message) io.ReadCloser { +func createStream(msgs ...eventstream.Message) io.Reader { w := bytes.NewBuffer(nil) encoder := eventstream.NewEncoder(w) @@ -233,7 +239,7 @@ func createStream(msgs ...eventstream.Message) io.ReadCloser { } } - return ioutil.NopCloser(w) + return w } type exceptionType struct { diff --git a/private/protocol/eventstream/eventstreamapi/shared.go b/private/protocol/eventstream/eventstreamapi/shared.go new file mode 100644 index 00000000000..e46b8acc200 --- /dev/null +++ b/private/protocol/eventstream/eventstreamapi/shared.go @@ -0,0 +1,23 @@ +package eventstreamapi + +// EventStream headers with specific meaning to async API functionality. +const ( + ChunkSignatureHeader = `:chunk-signature` // chunk signature for message + DateHeader = `:date` // Date header for signature + + // Message header and values + MessageTypeHeader = `:message-type` // Identifies type of message. + EventMessageType = `event` + ErrorMessageType = `error` + ExceptionMessageType = `exception` + + // Message Events + EventTypeHeader = `:event-type` // Identifies message event type e.g. "Stats". + + // Message Error + ErrorCodeHeader = `:error-code` + ErrorMessageHeader = `:error-message` + + // Message Exception + ExceptionTypeHeader = `:exception-type` +) diff --git a/private/protocol/eventstream/eventstreamapi/shared_test.go b/private/protocol/eventstream/eventstreamapi/shared_test.go new file mode 100644 index 00000000000..183b3328475 --- /dev/null +++ b/private/protocol/eventstream/eventstreamapi/shared_test.go @@ -0,0 +1,64 @@ +package eventstreamapi + +import ( + "bytes" + "encoding/hex" + "time" + + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/eventstream" +) + +type mockChunkSigner struct { + signature string + err error +} + +func (m mockChunkSigner) GetSignature(_, _ []byte, _ time.Time) ([]byte, error) { + return mustDecodeBytes(hex.DecodeString(m.signature)), m.err +} + +type eventStructured struct { + _ struct{} `type:"structure"` + + String *string `type:"string"` + Number *int64 `type:"long"` + Nested *eventStructured `type:"structure"` +} + +func (e *eventStructured) MarshalEvent(pm protocol.PayloadMarshaler) (eventstream.Message, error) { + var msg eventstream.Message + msg.Headers.Set(MessageTypeHeader, eventstream.StringValue(EventMessageType)) + + var buf bytes.Buffer + if err := pm.MarshalPayload(&buf, e); err != nil { + return eventstream.Message{}, err + } + + msg.Payload = buf.Bytes() + + return msg, nil +} + +func (e *eventStructured) UnmarshalEvent(pm protocol.PayloadUnmarshaler, msg eventstream.Message) error { + return pm.UnmarshalPayload(bytes.NewReader(msg.Payload), e) +} + +func mustDecodeBytes(b []byte, err error) []byte { + if err != nil { + panic(err) + } + + return b +} + +func swapTimeNow(f func() time.Time) func() { + if f == nil { + return func() {} + } + + timeNow = f + return func() { + timeNow = time.Now + } +} diff --git a/private/protocol/eventstream/eventstreamapi/signer.go b/private/protocol/eventstream/eventstreamapi/signer.go new file mode 100644 index 00000000000..3a7ba5cd57a --- /dev/null +++ b/private/protocol/eventstream/eventstreamapi/signer.go @@ -0,0 +1,123 @@ +package eventstreamapi + +import ( + "bytes" + "strings" + "time" + + "github.com/aws/aws-sdk-go/private/protocol/eventstream" +) + +var timeNow = time.Now + +// StreamSigner defines an interface for the implementation of signing of event stream payloads +type StreamSigner interface { + GetSignature(headers, payload []byte, date time.Time) ([]byte, error) +} + +// SignEncoder envelopes event stream messages +// into an event stream message payload with included +// signature headers using the provided signer and encoder. +type SignEncoder struct { + signer StreamSigner + encoder Encoder + bufEncoder *BufferEncoder + + closeErr error + closed bool +} + +// NewSignEncoder returns a new SignEncoder using the provided stream signer and +// event stream encoder. +func NewSignEncoder(signer StreamSigner, encoder Encoder) *SignEncoder { + // TODO: Need to pass down logging + + return &SignEncoder{ + signer: signer, + encoder: encoder, + bufEncoder: NewBufferEncoder(), + } +} + +// Close encodes a final event stream signing envelope with an empty event stream +// payload. This final end-frame is used to mark the conclusion of the stream. +func (s *SignEncoder) Close() error { + if s.closed { + return s.closeErr + } + + if err := s.encode([]byte{}); err != nil { + if strings.Contains(err.Error(), "on closed pipe") { + return nil + } + + s.closeErr = err + s.closed = true + return s.closeErr + } + + return nil +} + +// Encode takes the provided message and add envelopes the message +// with the required signature. +func (s *SignEncoder) Encode(msg eventstream.Message) error { + payload, err := s.bufEncoder.Encode(msg) + if err != nil { + return err + } + + return s.encode(payload) +} + +func (s SignEncoder) encode(payload []byte) error { + date := timeNow() + + var msg eventstream.Message + msg.Headers.Set(DateHeader, eventstream.TimestampValue(date)) + msg.Payload = payload + + var headers bytes.Buffer + if err := eventstream.EncodeHeaders(&headers, msg.Headers); err != nil { + return err + } + + sig, err := s.signer.GetSignature(headers.Bytes(), msg.Payload, date) + if err != nil { + return err + } + + msg.Headers.Set(ChunkSignatureHeader, eventstream.BytesValue(sig)) + + return s.encoder.Encode(msg) +} + +// BufferEncoder is a utility that provides a buffered +// event stream encoder +type BufferEncoder struct { + encoder Encoder + buffer *bytes.Buffer +} + +// NewBufferEncoder returns a new BufferEncoder initialized +// with a 1024 byte buffer. +func NewBufferEncoder() *BufferEncoder { + buf := bytes.NewBuffer(make([]byte, 1024)) + return &BufferEncoder{ + encoder: eventstream.NewEncoder(buf), + buffer: buf, + } +} + +// Encode returns the encoded message as a byte slice. +// The returned byte slice will be modified on the next encode call +// and should not be held onto. +func (e *BufferEncoder) Encode(msg eventstream.Message) ([]byte, error) { + e.buffer.Reset() + + if err := e.encoder.Encode(msg); err != nil { + return nil, err + } + + return e.buffer.Bytes(), nil +} diff --git a/private/protocol/eventstream/eventstreamapi/signer_test.go b/private/protocol/eventstream/eventstreamapi/signer_test.go new file mode 100644 index 00000000000..e4ae113a8cc --- /dev/null +++ b/private/protocol/eventstream/eventstreamapi/signer_test.go @@ -0,0 +1,128 @@ +// +build go1.7 + +package eventstreamapi + +import ( + "bytes" + "encoding/base64" + "encoding/hex" + "fmt" + "strings" + "testing" + "time" + + "github.com/aws/aws-sdk-go/private/protocol/eventstream" + "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamtest" +) + +func TestSignEncoder(t *testing.T) { + currentTime := time.Date(2019, 1, 27, 22, 37, 54, 0, time.UTC) + + cases := map[string]struct { + Signer StreamSigner + Input eventstream.Message + Expect eventstream.Message + NestedExpect *eventstream.Message + Err string + }{ + "sign message": { + Signer: mockChunkSigner{ + signature: "524f1d03d1d81e94a099042736d40bd9681b867321443ff58a4568e274dbd83bff", + }, + Input: eventstream.Message{ + Headers: eventstream.Headers{ + { + Name: "header_name", + Value: eventstream.StringValue("header value"), + }, + }, + Payload: []byte("payload"), + }, + Expect: eventstream.Message{ + Headers: eventstream.Headers{ + { + Name: ":date", + Value: eventstream.TimestampValue(currentTime), + }, + { + Name: ":chunk-signature", + Value: eventstream.BytesValue(mustDecodeBytes( + hex.DecodeString("524f1d03d1d81e94a099042736d40bd9681b867321443ff58a4568e274dbd83bff"), + )), + }, + }, + Payload: mustDecodeBytes( + base64.StdEncoding.DecodeString( + `AAAAMgAAABs0pv1jC2hlYWRlcl9uYW1lBwAMaGVhZGVyIHZhbHVlcGF5bG9hZH4tKFg=`, + ), + ), + }, + NestedExpect: &eventstream.Message{ + Headers: eventstream.Headers{ + { + Name: "header_name", + Value: eventstream.StringValue("header value"), + }, + }, + Payload: []byte(`payload`), + }, + }, + "signing error": { + Signer: mockChunkSigner{err: fmt.Errorf("signing error")}, + Input: eventstream.Message{ + Headers: []eventstream.Header{ + { + Name: "header_name", + Value: eventstream.StringValue("header value"), + }, + }, + Payload: []byte("payload"), + }, + Err: "signing error", + }, + } + + origNowFn := timeNow + timeNow = func() time.Time { return currentTime } + defer func() { timeNow = origNowFn }() + + decodeBuf := make([]byte, 1024) + for name, c := range cases { + t.Run(name, func(t *testing.T) { + encoder := &mockEncoder{} + signer := NewSignEncoder(c.Signer, encoder) + + err := signer.Encode(c.Input) + if err == nil && len(c.Err) > 0 { + t.Fatalf("expected error, but got nil") + } else if err != nil && len(c.Err) == 0 { + t.Fatalf("expected no error, but got %v", err) + } else if err != nil && len(c.Err) > 0 && !strings.Contains(err.Error(), c.Err) { + t.Fatalf("expected %v, but got %v", c.Err, err) + } else if len(c.Err) > 0 { + return + } + + eventstreamtest.AssertMessageEqual(t, c.Expect, encoder.msgs[0], "envelope msg") + + if c.NestedExpect != nil { + nested := eventstream.NewDecoder(bytes.NewReader(encoder.msgs[0].Payload)) + nestedMsg, err := nested.Decode(decodeBuf) + if err != nil { + t.Fatalf("expect no decode error got, %v", err) + } + + eventstreamtest.AssertMessageEqual(t, *c.NestedExpect, nestedMsg, "nested msg") + } + }) + } +} + +type mockEncoder struct { + msgs []eventstream.Message +} + +func (m *mockEncoder) Encode(msg eventstream.Message) error { + m.msgs = append(m.msgs, msg) + return nil +} diff --git a/private/protocol/eventstream/eventstreamapi/stream_writer.go b/private/protocol/eventstream/eventstreamapi/stream_writer.go new file mode 100644 index 00000000000..433bb1630a7 --- /dev/null +++ b/private/protocol/eventstream/eventstreamapi/stream_writer.go @@ -0,0 +1,129 @@ +package eventstreamapi + +import ( + "fmt" + "io" + "sync" + + "github.com/aws/aws-sdk-go/aws" +) + +// StreamWriter provides concurrent safe writing to an event stream. +type StreamWriter struct { + eventWriter *EventWriter + stream chan eventWriteAsyncReport + + done chan struct{} + closeOnce sync.Once + err *OnceError + + streamCloser io.Closer +} + +// NewStreamWriter returns a StreamWriter for the event writer, and stream +// closer provided. +func NewStreamWriter(eventWriter *EventWriter, streamCloser io.Closer) *StreamWriter { + w := &StreamWriter{ + eventWriter: eventWriter, + streamCloser: streamCloser, + stream: make(chan eventWriteAsyncReport), + done: make(chan struct{}), + err: NewOnceError(), + } + go w.writeStream() + + return w +} + +// Close terminates the writers ability to write new events to the stream. Any +// future call to Send will fail with an error. +func (w *StreamWriter) Close() error { + w.closeOnce.Do(w.safeClose) + return w.Err() +} + +func (w *StreamWriter) safeClose() { + close(w.done) +} + +// ErrorSet returns a channel which will be closed +// if an error occurs. +func (w *StreamWriter) ErrorSet() <-chan struct{} { + return w.err.ErrorSet() +} + +// Err returns any error that occurred while attempting to write an event to the +// stream. +func (w *StreamWriter) Err() error { + return w.err.Err() +} + +// Send writes a single event to the stream returning an error if the write +// failed. +// +// Send may be called concurrently. Events will be written to the stream +// safely. +func (w *StreamWriter) Send(ctx aws.Context, event Marshaler) error { + if err := w.Err(); err != nil { + return err + } + + resultCh := make(chan error) + wrapped := eventWriteAsyncReport{ + Event: event, + Result: resultCh, + } + + select { + case w.stream <- wrapped: + case <-ctx.Done(): + return ctx.Err() + case <-w.done: + return fmt.Errorf("stream closed, unable to send event") + } + + select { + case err := <-resultCh: + return err + case <-ctx.Done(): + return ctx.Err() + case <-w.done: + return fmt.Errorf("stream closed, unable to send event") + } +} + +func (w *StreamWriter) writeStream() { + defer w.Close() + + for { + select { + case wrapper := <-w.stream: + err := w.eventWriter.WriteEvent(wrapper.Event) + wrapper.ReportResult(w.done, err) + if err != nil { + w.err.SetError(err) + return + } + + case <-w.done: + if err := w.streamCloser.Close(); err != nil { + w.err.SetError(err) + } + return + } + } +} + +type eventWriteAsyncReport struct { + Event Marshaler + Result chan<- error +} + +func (e eventWriteAsyncReport) ReportResult(cancel <-chan struct{}, err error) bool { + select { + case e.Result <- err: + return true + case <-cancel: + return false + } +} diff --git a/private/protocol/eventstream/eventstreamapi/writer.go b/private/protocol/eventstream/eventstreamapi/writer.go new file mode 100644 index 00000000000..10a3823dfa6 --- /dev/null +++ b/private/protocol/eventstream/eventstreamapi/writer.go @@ -0,0 +1,109 @@ +package eventstreamapi + +import ( + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/eventstream" +) + +// Marshaler provides a marshaling interface for event types to event stream +// messages. +type Marshaler interface { + MarshalEvent(protocol.PayloadMarshaler) (eventstream.Message, error) +} + +// Encoder is an stream encoder that will encode an event stream message for +// the transport. +type Encoder interface { + Encode(eventstream.Message) error +} + +// EventWriter provides a wrapper around the underlying event stream encoder +// for an io.WriteCloser. +type EventWriter struct { + encoder Encoder + payloadMarshaler protocol.PayloadMarshaler + eventTypeFor func(Marshaler) (string, error) +} + +// NewEventWriter returns a new event stream writer, that will write to the +// writer provided. Use the WriteEvent method to write an event to the stream. +func NewEventWriter(encoder Encoder, pm protocol.PayloadMarshaler, eventTypeFor func(Marshaler) (string, error), +) *EventWriter { + return &EventWriter{ + encoder: encoder, + payloadMarshaler: pm, + eventTypeFor: eventTypeFor, + } +} + +// WriteEvent writes an event to the stream. Returns an error if the event +// fails to marshal into a message, or writing to the underlying writer fails. +func (w *EventWriter) WriteEvent(event Marshaler) error { + msg, err := w.marshal(event) + if err != nil { + return err + } + + return w.encoder.Encode(msg) +} + +func (w *EventWriter) marshal(event Marshaler) (eventstream.Message, error) { + eventType, err := w.eventTypeFor(event) + if err != nil { + return eventstream.Message{}, err + } + + msg, err := event.MarshalEvent(w.payloadMarshaler) + if err != nil { + return eventstream.Message{}, err + } + + msg.Headers.Set(EventTypeHeader, eventstream.StringValue(eventType)) + return msg, nil +} + +//type EventEncoder struct { +// encoder Encoder +// ppayloadMarshaler protocol.PayloadMarshaler +// eventTypeFor func(Marshaler) (string, error) +//} +// +//func (e EventEncoder) Encode(event Marshaler) error { +// msg, err := e.marshal(event) +// if err != nil { +// return err +// } +// +// return w.encoder.Encode(msg) +//} +// +//func (e EventEncoder) marshal(event Marshaler) (eventstream.Message, error) { +// eventType, err := w.eventTypeFor(event) +// if err != nil { +// return eventstream.Message{}, err +// } +// +// msg, err := event.MarshalEvent(w.payloadMarshaler) +// if err != nil { +// return eventstream.Message{}, err +// } +// +// msg.Headers.Set(EventTypeHeader, eventstream.StringValue(eventType)) +// return msg, nil +//} +// +//func (w *EventWriter) marshal(event Marshaler) (eventstream.Message, error) { +// eventType, err := w.eventTypeFor(event) +// if err != nil { +// return eventstream.Message{}, err +// } +// +// msg, err := event.MarshalEvent(w.payloadMarshaler) +// if err != nil { +// return eventstream.Message{}, err +// } +// +// msg.Headers.Set(EventTypeHeader, eventstream.StringValue(eventType)) +// return msg, nil +//} +// diff --git a/private/protocol/eventstream/eventstreamapi/writer_test.go b/private/protocol/eventstream/eventstreamapi/writer_test.go new file mode 100644 index 00000000000..39343334a0a --- /dev/null +++ b/private/protocol/eventstream/eventstreamapi/writer_test.go @@ -0,0 +1,161 @@ +// +build go1.7 + +package eventstreamapi + +import ( + "bytes" + "encoding/base64" + "encoding/hex" + "testing" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/eventstream" + "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamtest" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +func TestEventWriter(t *testing.T) { + cases := map[string]struct { + Event Marshaler + EncodeWrapper func(e Encoder) Encoder + TimeFunc func() time.Time + Expect eventstream.Message + NestedExpect *eventstream.Message + }{ + "structured event": { + Event: &eventStructured{ + String: aws.String("stringfield"), + Number: aws.Int64(123), + Nested: &eventStructured{ + String: aws.String("fieldstring"), + Number: aws.Int64(321), + }, + }, + Expect: eventstream.Message{ + Headers: eventstream.Headers{ + eventMessageTypeHeader, + eventstream.Header{ + Name: EventTypeHeader, + Value: eventstream.StringValue("eventStructured"), + }, + }, + Payload: []byte(`{"String":"stringfield","Number":123,"Nested":{"String":"fieldstring","Number":321}}`), + }, + }, + "signed event": { + Event: &eventStructured{ + String: aws.String("stringfield"), + Number: aws.Int64(123), + Nested: &eventStructured{ + String: aws.String("fieldstring"), + Number: aws.Int64(321), + }, + }, + EncodeWrapper: func(e Encoder) Encoder { + return NewSignEncoder( + &mockChunkSigner{ + signature: "524f1d03d1d81e94a099042736d40bd9681b867321443ff58a4568e274dbd83bff", + }, + e, + ) + }, + TimeFunc: func() time.Time { + return time.Date(2019, 1, 27, 22, 37, 54, 0, time.UTC) + }, + Expect: eventstream.Message{ + Headers: eventstream.Headers{ + { + Name: DateHeader, + Value: eventstream.TimestampValue(time.Date(2019, 1, 27, 22, 37, 54, 0, time.UTC)), + }, + { + Name: ChunkSignatureHeader, + Value: eventstream.BytesValue(mustDecodeBytes( + hex.DecodeString("524f1d03d1d81e94a099042736d40bd9681b867321443ff58a4568e274dbd83bff"), + )), + }, + }, + Payload: mustDecodeBytes(base64.StdEncoding.DecodeString( + `AAAAmAAAADSl4EcNDTptZXNzYWdlLXR5cGUHAAVldmVudAs6ZXZlbnQtdHlwZQcAD2V2ZW50U3RydWN0dXJlZHsiU3RyaW5nIjoic3RyaW5nZmllbGQiLCJOdW1iZXIiOjEyMywiTmVzdGVkIjp7IlN0cmluZyI6ImZpZWxkc3RyaW5nIiwiTnVtYmVyIjozMjF9fdVW3Ow=`, + )), + }, + }, + } + + var marshalers request.HandlerList + marshalers.PushBackNamed(restjson.BuildHandler) + + var stream bytes.Buffer + + decodeBuf := make([]byte, 1024) + for name, c := range cases { + t.Run(name, func(t *testing.T) { + defer swapTimeNow(c.TimeFunc)() + + stream.Reset() + + var encoder Encoder + encoder = eventstream.NewEncoder(&stream, eventstream.EncodeWithLogger(t)) + if c.EncodeWrapper != nil { + encoder = c.EncodeWrapper(encoder) + } + + eventWriter := NewEventWriter(encoder, + protocol.HandlerPayloadMarshal{ + Marshalers: marshalers, + }, + func(event Marshaler) (string, error) { + return "eventStructured", nil + }, + ) + + decoder := eventstream.NewDecoder(&stream) + + if err := eventWriter.WriteEvent(c.Event); err != nil { + t.Fatalf("expect no write error, got %v", err) + } + + msg, err := decoder.Decode(decodeBuf) + if err != nil { + t.Fatalf("expect no decode error got, %v", err) + } + + eventstreamtest.AssertMessageEqual(t, c.Expect, msg) + }) + } +} + +func BenchmarkEventWriter(b *testing.B) { + var marshalers request.HandlerList + marshalers.PushBackNamed(restjson.BuildHandler) + + var stream bytes.Buffer + encoder := eventstream.NewEncoder(&stream) + eventWriter := NewEventWriter(encoder, + protocol.HandlerPayloadMarshal{ + Marshalers: marshalers, + }, + func(event Marshaler) (string, error) { + return "eventStructured", nil + }, + ) + + event := &eventStructured{ + String: aws.String("stringfield"), + Number: aws.Int64(123), + Nested: &eventStructured{ + String: aws.String("fieldstring"), + Number: aws.Int64(321), + }, + } + + b.ResetTimer() + for i := 0; i < b.N; i++ { + if err := eventWriter.WriteEvent(event); err != nil { + b.Fatalf("expect no write error, got %v", err) + } + } +} diff --git a/private/protocol/eventstream/eventstreamtest/stub_go1.9.go b/private/protocol/eventstream/eventstreamtest/stub_go1.9.go new file mode 100644 index 00000000000..3bc539f87ea --- /dev/null +++ b/private/protocol/eventstream/eventstreamtest/stub_go1.9.go @@ -0,0 +1,9 @@ +// +build go1.9 + +package eventstreamtest + +import "testing" + +var getHelper = func(t testing.TB) func() { + return t.Helper +} diff --git a/private/protocol/eventstream/eventstreamtest/stub_old.go b/private/protocol/eventstream/eventstreamtest/stub_old.go new file mode 100644 index 00000000000..1a5b83e1fe9 --- /dev/null +++ b/private/protocol/eventstream/eventstreamtest/stub_old.go @@ -0,0 +1,11 @@ +// +build !go1.9 + +package eventstreamtest + +import "testing" + +var getHelper = func(t testing.TB) func() { + return nopHelper +} + +func nopHelper() {} diff --git a/private/protocol/eventstream/eventstreamtest/testing.go b/private/protocol/eventstream/eventstreamtest/testing.go index d8254aa4aab..b3abd59f14f 100644 --- a/private/protocol/eventstream/eventstreamtest/testing.go +++ b/private/protocol/eventstream/eventstreamtest/testing.go @@ -1,30 +1,59 @@ +// +build go1.10 + package eventstreamtest import ( "bytes" + "context" "fmt" "io" "net/http" "net/http/httptest" + "reflect" + "strings" + "sync" "testing" + "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/awstesting/unit" "github.com/aws/aws-sdk-go/private/protocol" "github.com/aws/aws-sdk-go/private/protocol/eventstream" - "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi" + "golang.org/x/net/http2" +) + +const ( + errClientDisconnected = "client disconnected" + errStreamClosed = "http2: stream closed" ) // ServeEventStream provides serving EventStream messages from a HTTP server to // the client. The events are sent sequentially to the client without delay. type ServeEventStream struct { - T *testing.T - Events []eventstream.Message + T *testing.T + BiDirectional bool + + Events []eventstream.Message + ClientEvents []eventstream.Message + + ForceCloseAfter time.Duration + + requestsIdx int } func (s ServeEventStream) ServeHTTP(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) + w.(http.Flusher).Flush() + + if s.BiDirectional { + s.serveBiDirectionalStream(w, r) + } else { + s.serveReadOnlyStream(w, r) + } +} + +func (s *ServeEventStream) serveReadOnlyStream(w http.ResponseWriter, r *http.Request) { encoder := eventstream.NewEncoder(flushWriter{w}) for _, event := range s.Events { @@ -32,6 +61,136 @@ func (s ServeEventStream) ServeHTTP(w http.ResponseWriter, r *http.Request) { } } +func (s *ServeEventStream) serveBiDirectionalStream(w http.ResponseWriter, r *http.Request) { + var wg sync.WaitGroup + + ctx := context.Background() + if s.ForceCloseAfter > 0 { + var cancelFunc func() + ctx, cancelFunc = context.WithTimeout(context.Background(), s.ForceCloseAfter) + defer cancelFunc() + } + + var ( + err error + m sync.Mutex + ) + + wg.Add(1) + go func() { + defer wg.Done() + readErr := s.readEvents(ctx, r) + if readErr != nil { + m.Lock() + if err == nil { + err = readErr + } + m.Unlock() + } + }() + + writeErr := s.writeEvents(ctx, w) + if writeErr != nil { + m.Lock() + if err != nil { + err = writeErr + } + m.Unlock() + } + wg.Wait() + + if err != nil && isError(err) { + s.T.Error(err.Error()) + } +} + +func isError(err error) bool { + switch err.(type) { + case http2.StreamError: + return false + } + + for _, s := range []string{errClientDisconnected, errStreamClosed} { + if strings.Contains(err.Error(), s) { + return false + } + } + + return true +} + +func (s ServeEventStream) readEvents(ctx context.Context, r *http.Request) error { + signBuffer := make([]byte, 1024) + messageBuffer := make([]byte, 1024) + decoder := eventstream.NewDecoder(r.Body) + + for { + select { + case <-ctx.Done(): + return nil + default: + } + // unwrap signing envelope + signedMessage, err := decoder.Decode(signBuffer) + if err != nil { + if err == io.EOF { + break + } + return err + } + + // get service event message from payload + msg, err := eventstream.Decode(bytes.NewReader(signedMessage.Payload), messageBuffer) + if err != nil { + if err == io.EOF { + break + } + return err + } + + // empty payload is expected for the last signing message + if len(msg.Payload) == 0 { + break + } + + if len(s.ClientEvents) > 0 { + i := s.requestsIdx + s.requestsIdx++ + + if e, a := s.ClientEvents[i], msg; !reflect.DeepEqual(e, a) { + return fmt.Errorf("expected %v, got %v", e, a) + } + } + } + + return nil +} + +func (s *ServeEventStream) writeEvents(ctx context.Context, w http.ResponseWriter) error { + encoder := eventstream.NewEncoder(flushWriter{w}) + + var event eventstream.Message + pendingEvents := s.Events + + for len(pendingEvents) > 0 { + event, pendingEvents = pendingEvents[0], pendingEvents[1:] + select { + case <-ctx.Done(): + return nil + default: + err := encoder.Encode(event) + if err != nil { + if err == io.EOF { + return nil + } + return fmt.Errorf("expected no error encoding event, got %v", err) + } + } + } + + return nil +} + // SetupEventStreamSession creates a HTTP server SDK session for communicating // with that server to be used for EventStream APIs. If HTTP/2 is enabled the // server/client will only attempt to use HTTP/2. @@ -86,16 +245,23 @@ func MarshalEventPayload( return w.Bytes() } +// Prevent circular dependencies on eventstreamapi redefine these here. +const ( + messageTypeHeader = `:message-type` // Identifies type of message. + eventMessageType = `event` + exceptionMessageType = `exception` +) + // EventMessageTypeHeader is an event message type header for specifying an // event is an message type. var EventMessageTypeHeader = eventstream.Header{ - Name: eventstreamapi.MessageTypeHeader, - Value: eventstream.StringValue(eventstreamapi.EventMessageType), + Name: messageTypeHeader, + Value: eventstream.StringValue(eventMessageType), } // EventExceptionTypeHeader is an event exception type header for specifying an -// event is an exeption type. +// event is an exception type. var EventExceptionTypeHeader = eventstream.Header{ - Name: eventstreamapi.MessageTypeHeader, - Value: eventstream.StringValue(eventstreamapi.ExceptionMessageType), + Name: messageTypeHeader, + Value: eventstream.StringValue(exceptionMessageType), } diff --git a/private/protocol/eventstream/eventstreamtest/testing_1_7.go b/private/protocol/eventstream/eventstreamtest/testing_1_7.go new file mode 100644 index 00000000000..8fda2f19b61 --- /dev/null +++ b/private/protocol/eventstream/eventstreamtest/testing_1_7.go @@ -0,0 +1,63 @@ +// +build go1.7 + +package eventstreamtest + +import ( + "bytes" + "encoding/base64" + "encoding/json" + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/private/protocol/eventstream" +) + +// AssertMessageEqual compares to event stream messages, and determines if they +// are equal. Will trigger an testing Error if components of the message are +// not equal. +func AssertMessageEqual(t testing.TB, a, b eventstream.Message, msg ...interface{}) { + getHelper(t)() + + ah, err := bytesEncodeHeader(a.Headers) + if err != nil { + t.Fatalf("unable to encode a's headers, %v", err) + } + + bh, err := bytesEncodeHeader(b.Headers) + if err != nil { + t.Fatalf("unable to encode b's headers, %v", err) + } + + if !bytes.Equal(ah, bh) { + aj, err := json.Marshal(ah) + if err != nil { + t.Fatalf("unable to json encode a's headers, %v", err) + } + bj, err := json.Marshal(bh) + if err != nil { + t.Fatalf("unable to json encode b's headers, %v", err) + } + t.Errorf("%s\nexpect headers: %v\n\t%v\nactual headers: %v\n\t%v\n", + fmt.Sprint(msg...), + base64.StdEncoding.EncodeToString(ah), aj, + base64.StdEncoding.EncodeToString(bh), bj, + ) + } + + if !bytes.Equal(a.Payload, b.Payload) { + t.Errorf("%s\nexpect payload: %v\nactual payload: %v\n", + fmt.Sprint(msg...), + base64.StdEncoding.EncodeToString(a.Payload), + base64.StdEncoding.EncodeToString(b.Payload), + ) + } +} + +func bytesEncodeHeader(v eventstream.Headers) ([]byte, error) { + var buf bytes.Buffer + if err := eventstream.EncodeHeaders(&buf, v); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} diff --git a/private/protocol/eventstream/header_value.go b/private/protocol/eventstream/header_value.go index e3fc0766a9e..9f509d8f6dc 100644 --- a/private/protocol/eventstream/header_value.go +++ b/private/protocol/eventstream/header_value.go @@ -461,6 +461,11 @@ func (v *TimestampValue) decode(r io.Reader) error { return nil } +// MarshalJSON implements the json.Marshaler interface +func (v TimestampValue) MarshalJSON() ([]byte, error) { + return []byte(v.String()), nil +} + func timeFromEpochMilli(t int64) time.Time { secs := t / 1e3 msec := t % 1e3 diff --git a/private/protocol/eventstream/message.go b/private/protocol/eventstream/message.go index 2dc012a66e2..25c9783cde6 100644 --- a/private/protocol/eventstream/message.go +++ b/private/protocol/eventstream/message.go @@ -27,7 +27,7 @@ func (m *Message) rawMessage() (rawMessage, error) { if len(m.Headers) > 0 { var headers bytes.Buffer - if err := encodeHeaders(&headers, m.Headers); err != nil { + if err := EncodeHeaders(&headers, m.Headers); err != nil { return rawMessage{}, err } raw.Headers = headers.Bytes() diff --git a/private/protocol/payload.go b/private/protocol/payload.go index e21614a1250..0ea0647a57d 100644 --- a/private/protocol/payload.go +++ b/private/protocol/payload.go @@ -64,7 +64,7 @@ func (h HandlerPayloadMarshal) MarshalPayload(w io.Writer, v interface{}) error metadata.ClientInfo{}, request.Handlers{}, nil, - &request.Operation{HTTPMethod: "GET"}, + &request.Operation{HTTPMethod: "PUT"}, v, nil, ) diff --git a/private/protocol/protocol.go b/private/protocol/protocol.go new file mode 100644 index 00000000000..9d521dcb950 --- /dev/null +++ b/private/protocol/protocol.go @@ -0,0 +1,49 @@ +package protocol + +import ( + "fmt" + "strings" + + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/request" +) + +// RequireHTTPMinProtocol request handler is used to enforce that +// the target endpoint supports the given major and minor HTTP protocol version. +type RequireHTTPMinProtocol struct { + Major, Minor int +} + +// Handler will mark the request.Request with an error if the +// target endpoint did not connect with the required HTTP protocol +// major and minor version. +func (p RequireHTTPMinProtocol) Handler(r *request.Request) { + if r.Error != nil || r.HTTPResponse == nil { + return + } + + if !strings.HasPrefix(r.HTTPResponse.Proto, "HTTP") { + r.Error = newMinHTTPProtoError(p.Major, p.Minor, r) + } + + if r.HTTPResponse.ProtoMajor < p.Major || r.HTTPResponse.ProtoMinor < p.Minor { + r.Error = newMinHTTPProtoError(p.Major, p.Minor, r) + } +} + +// ErrCodeMinimumHTTPProtocolError error code is returned when the target endpoint +// did not match the required HTTP major and minor protocol version. +const ErrCodeMinimumHTTPProtocolError = "MinimumHTTPProtocolError" + +func newMinHTTPProtoError(major, minor int, r *request.Request) error { + return awserr.NewRequestFailure( + awserr.New("MinimumHTTPProtocolError", + fmt.Sprintf( + "operation requires minimum HTTP protocol of HTTP/%d.%d, but was %s", + major, minor, r.HTTPResponse.Proto, + ), + nil, + ), + r.HTTPResponse.StatusCode, r.RequestID, + ) +} diff --git a/private/protocol/protocol_go1.7_test.go b/private/protocol/protocol_go1.7_test.go new file mode 100644 index 00000000000..1f87846f036 --- /dev/null +++ b/private/protocol/protocol_go1.7_test.go @@ -0,0 +1,72 @@ +// +build go1.7 + +package protocol + +import ( + "net/http" + "strings" + "testing" + + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/request" +) + +func TestRequireHTTPMinProtocol(t *testing.T) { + cases := map[string]struct { + Major, Minor int + Response *http.Response + Err string + }{ + "HTTP/2.0": { + Major: 2, + Response: &http.Response{ + StatusCode: 200, + Proto: "HTTP/2.0", + ProtoMajor: 2, ProtoMinor: 0, + }, + }, + "HTTP/1.1": { + Major: 2, + Response: &http.Response{ + StatusCode: 200, + Proto: "HTTP/1.1", + ProtoMajor: 1, ProtoMinor: 1, + }, + Err: "operation requires minimum HTTP protocol", + }, + } + + for name, c := range cases { + t.Run(name, func(t *testing.T) { + req := &request.Request{ + HTTPResponse: c.Response, + } + RequireHTTPMinProtocol{Major: c.Major, Minor: c.Minor}.Handler(req) + + if len(c.Err) != 0 { + if req.Error == nil { + t.Fatalf("expect error") + } + if e, a := c.Err, req.Error.Error(); !strings.Contains(a, e) { + t.Errorf("expect %q error, got %q", e, a) + } + aerr, ok := req.Error.(awserr.RequestFailure) + if !ok { + t.Fatalf("expect RequestFailure, got %T", req.Error) + } + + if e, a := ErrCodeMinimumHTTPProtocolError, aerr.Code(); e != a { + t.Errorf("expect %v code, got %v", e, a) + } + if e, a := c.Response.StatusCode, aerr.StatusCode(); e != a { + t.Errorf("expect %v status code, got %v", e, a) + } + + } else { + if err := req.Error; err != nil { + t.Fatalf("expect no failure, got %v", err) + } + } + }) + } +} diff --git a/service/cloudfront/api.go b/service/cloudfront/api.go index 427393e37ce..078d10fb8d7 100644 --- a/service/cloudfront/api.go +++ b/service/cloudfront/api.go @@ -290,7 +290,11 @@ func (c *CloudFront) CreateDistributionRequest(input *CreateDistributionInput) ( // TTL order specified in the response body is not valid. // // * ErrCodeInvalidWebACLId "InvalidWebACLId" -// A web ACL id specified in the response body is not valid. +// A web ACL ID specified in the response body is not valid. To specify a web +// ACL created using the latest version of AWS WAF, use the ACL ARN, for example +// arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a. +// To specify a web ACL created using AWS WAF Classic, use the ACL ID, for example +// 473e64fd-f30b-4765-81a0-62ad96dd167a. // // * ErrCodeTooManyOriginCustomHeaders "TooManyOriginCustomHeaders" // Your request contains too many origin custom headers. @@ -515,7 +519,11 @@ func (c *CloudFront) CreateDistributionWithTagsRequest(input *CreateDistribution // TTL order specified in the response body is not valid. // // * ErrCodeInvalidWebACLId "InvalidWebACLId" -// A web ACL id specified in the response body is not valid. +// A web ACL ID specified in the response body is not valid. To specify a web +// ACL created using the latest version of AWS WAF, use the ACL ARN, for example +// arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a. +// To specify a web ACL created using AWS WAF Classic, use the ACL ID, for example +// 473e64fd-f30b-4765-81a0-62ad96dd167a. // // * ErrCodeTooManyOriginCustomHeaders "TooManyOriginCustomHeaders" // Your request contains too many origin custom headers. @@ -3229,7 +3237,11 @@ func (c *CloudFront) ListDistributionsByWebACLIdRequest(input *ListDistributions // The argument is invalid. // // * ErrCodeInvalidWebACLId "InvalidWebACLId" -// A web ACL id specified in the response body is not valid. +// A web ACL ID specified in the response body is not valid. To specify a web +// ACL created using the latest version of AWS WAF, use the ACL ARN, for example +// arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a. +// To specify a web ACL created using AWS WAF Classic, use the ACL ID, for example +// 473e64fd-f30b-4765-81a0-62ad96dd167a. // // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2019-03-26/ListDistributionsByWebACLId func (c *CloudFront) ListDistributionsByWebACLId(input *ListDistributionsByWebACLIdInput) (*ListDistributionsByWebACLIdOutput, error) { @@ -4364,7 +4376,11 @@ func (c *CloudFront) UpdateDistributionRequest(input *UpdateDistributionInput) ( // TTL order specified in the response body is not valid. // // * ErrCodeInvalidWebACLId "InvalidWebACLId" -// A web ACL id specified in the response body is not valid. +// A web ACL ID specified in the response body is not valid. To specify a web +// ACL created using the latest version of AWS WAF, use the ACL ARN, for example +// arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a. +// To specify a web ACL created using AWS WAF Classic, use the ACL ID, for example +// 473e64fd-f30b-4765-81a0-62ad96dd167a. // // * ErrCodeTooManyOriginCustomHeaders "TooManyOriginCustomHeaders" // Your request contains too many origin custom headers. @@ -4958,8 +4974,11 @@ type AliasICPRecordal struct { // * SUSPENDED indicates that the associated CNAME does not have a valid // ICP recordal number. // - // * PENDING indicates that at least one CNAME associated with the distribution - // does not have a valid ICP recordal number. + // * PENDING indicates that CloudFront can't determine the ICP recordal status + // of the CNAME associated with the distribution because there was an error + // in trying to determine the status. You can try again to see if the error + // is resolved in which case CloudFront returns an APPROVED or SUSPENDED + // status. ICPRecordalStatus *string `type:"string" enum:"ICPRecordalStatus"` } @@ -5195,7 +5214,8 @@ type CacheBehavior struct { // or for the default cache behavior in your distribution. FieldLevelEncryptionId *string `type:"string"` - // A complex type that specifies how CloudFront handles query strings and cookies. + // A complex type that specifies how CloudFront handles query strings, cookies, + // and HTTP headers. // // ForwardedValues is a required field ForwardedValues *ForwardedValues `type:"structure" required:"true"` @@ -6681,9 +6701,6 @@ type CustomErrorResponse struct { // CloudFront queries your origin to see whether the problem that caused the // error has been resolved and the requested object is now available. // - // If you don't want to specify a value, include an empty element, , - // in the XML document. - // // For more information, see Customizing Error Responses (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html) // in the Amazon CloudFront Developer Guide. ErrorCachingMinTTL *int64 `type:"long"` @@ -6712,8 +6729,7 @@ type CustomErrorResponse struct { // your customers don't know that your website is down. // // If you specify a value for ResponseCode, you must also specify a value for - // ResponsePagePath. If you don't want to specify a value, include an empty - // element, , in the XML document. + // ResponsePagePath. ResponseCode *string `type:"string"` // The path to the custom error page that you want CloudFront to return to a @@ -6732,8 +6748,7 @@ type CustomErrorResponse struct { // the origin that contains your custom error pages. // // If you specify a value for ResponsePagePath, you must also specify a value - // for ResponseCode. If you don't want to specify a value, include an empty - // element, , in the XML document. + // for ResponseCode. // // We recommend that you store custom error pages in an Amazon S3 bucket. If // you store custom error pages on an HTTP server and the server starts to return @@ -7074,7 +7089,8 @@ type DefaultCacheBehavior struct { // or for the default cache behavior in your distribution. FieldLevelEncryptionId *string `type:"string"` - // A complex type that specifies how CloudFront handles query strings and cookies. + // A complex type that specifies how CloudFront handles query strings, cookies, + // and HTTP headers. // // ForwardedValues is a required field ForwardedValues *ForwardedValues `type:"structure" required:"true"` @@ -8028,7 +8044,10 @@ type DistributionConfig struct { ViewerCertificate *ViewerCertificate `type:"structure"` // A unique identifier that specifies the AWS WAF web ACL, if any, to associate - // with this distribution. + // with this distribution. To specify a web ACL created using the latest version + // of AWS WAF, use the ACL ARN, for example arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a. + // To specify a web ACL created using AWS WAF Classic, use the ACL ID, for example + // 473e64fd-f30b-4765-81a0-62ad96dd167a. // // AWS WAF is a web application firewall that lets you monitor the HTTP and // HTTPS requests that are forwarded to CloudFront, and lets you control access @@ -8037,7 +8056,7 @@ type DistributionConfig struct { // to requests either with the requested content or with an HTTP 403 status // code (Forbidden). You can also configure CloudFront to return a custom error // page when a request is blocked. For more information about AWS WAF, see the - // AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/what-is-aws-waf.html). + // AWS WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/what-is-aws-waf.html). WebACLId *string `type:"string"` } @@ -9321,7 +9340,8 @@ func (s *FieldPatterns) SetQuantity(v int64) *FieldPatterns { return s } -// A complex type that specifies how CloudFront handles query strings and cookies. +// A complex type that specifies how CloudFront handles query strings, cookies, +// and HTTP headers. type ForwardedValues struct { _ struct{} `type:"structure"` @@ -15079,7 +15099,7 @@ func (s *UpdateStreamingDistributionOutput) SetStreamingDistribution(v *Streamin // * Whether you want viewers to use HTTP or HTTPS to request your objects. // // * If you want viewers to use HTTPS, whether you're using an alternate -// domain name such as example.com or the CloudFront domain name for your +// domain name, such as example.com, or the CloudFront domain name for your // distribution, such as d111111abcdef8.cloudfront.net. // // * If you're using an alternate domain name, whether AWS Certificate Manager @@ -15102,13 +15122,13 @@ type ViewerCertificate struct { // If you want viewers to use HTTPS to request your objects and you're using // an alternate domain name, you must choose the type of certificate that you - // want to use. Specify the following value if ACM provided your certificate: - // - // * ARN for ACM SSL/TLS certificate - // where ARN for ACM SSL/TLS certificate is the ARN for the ACM SSL/TLS certificate - // that you want to use for this distribution. + // want to use. If ACM provided your certificate, specify the Amazon Resource + // Name (ARN) for the ACM certificate that you want to use for this distribution. + // CloudFront only supports ACM certificates in the US East (N. Virginia) Region + // (us-east-1). // - // If you specify ACMCertificateArn, you must also specify a value for SSLSupportMethod. + // If you specify an ACM certificate ARN, you must also specify an SSL support + // method (sni-only or vip). ACMCertificateArn *string `type:"string"` // This field is no longer used. Use one of the following fields instead: @@ -15134,48 +15154,44 @@ type ViewerCertificate struct { CertificateSource *string `deprecated:"true" type:"string" enum:"CertificateSource"` // If you're using the CloudFront domain name for your distribution, such as - // d111111abcdef8.cloudfront.net, specify the following value: - // - // * true + // d111111abcdef8.cloudfront.net, specify this value as true. CloudFrontDefaultCertificate *bool `type:"boolean"` // If you want viewers to use HTTPS to request your objects and you're using // an alternate domain name, you must choose the type of certificate that you - // want to use. Specify the following value if you purchased your certificate - // from a third-party certificate authority: - // - // * IAM certificate ID where IAM certificate - // ID is the ID that IAM returned when you added the certificate to the IAM - // certificate store. + // want to use. If you purchased your certificate from a third-party certificate + // authority and uploaded it to the IAM certificate store, specify the certificate + // ID that you want to use for this distribution. // - // If you specify IAMCertificateId, you must also specify a value for SSLSupportMethod. + // If you specify a certificate ID, you must also specify an SSL support method + // (sni-only or vip). IAMCertificateId *string `type:"string"` // Specify the security policy that you want CloudFront to use for HTTPS connections. // A security policy determines two settings: // // * The minimum SSL/TLS protocol that CloudFront uses to communicate with - // viewers + // viewers. // // * The cipher that CloudFront uses to encrypt the content that it returns - // to viewers + // to viewers. // - // On the CloudFront console, this setting is called Security policy. + // On the CloudFront console, this setting is called Security Policy. // - // We recommend that you specify TLSv1.1_2016 unless your users are using browsers - // or devices that do not support TLSv1.1 or later. + // We recommend that you specify TLSv1.1_2016 unless your viewers are using + // browsers or devices that do not support TLSv1.1 or later. // // When both of the following are true, you must specify TLSv1 or later for // the security policy: // - // * You're using a custom certificate: you specified a value for ACMCertificateArn - // or for IAMCertificateId + // * You're using a custom certificate; that is, you specified a value for + // ACMCertificateArn or for IAMCertificateId. // - // * You're using SNI: you specified sni-only for SSLSupportMethod + // * You're using SNI; that is, you specified sni-only for SSLSupportMethod. // // If you specify true for CloudFrontDefaultCertificate, CloudFront automatically // sets the security policy to TLSv1 regardless of the value that you specify - // for MinimumProtocolVersion. + // here. // // For information about the relationship between the security policy that you // choose and the protocols and ciphers that CloudFront uses to communicate @@ -15187,14 +15203,14 @@ type ViewerCertificate struct { // If you specify a value for ACMCertificateArn (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_ViewerCertificate.html#cloudfront-Type-ViewerCertificate-ACMCertificateArn) // or for IAMCertificateId (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_ViewerCertificate.html#cloudfront-Type-ViewerCertificate-IAMCertificateId), // you must also specify how you want CloudFront to serve HTTPS requests: using - // a method that works for browsers and clients released after 2010 or one that - // works for all clients. + // a method that works for browsers and clients released after 2010, or one + // that works for all clients. // // * sni-only: CloudFront can respond to HTTPS requests from viewers that // support Server Name Indication (SNI). All modern browsers support SNI, // but there are a few that don't. For a current list of the browsers that // support SNI, see the Wikipedia entry Server Name Indication (http://en.wikipedia.org/wiki/Server_Name_Indication). - // To learn about options to explore if you have users with browsers that + // To learn about options to explore if you have viewers with browsers that // don't include SNI support, see Choosing How CloudFront Serves HTTPS Requests // (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cnames-https-dedicated-ip-or-sni.html) // in the Amazon CloudFront Developer Guide. @@ -15205,7 +15221,8 @@ type ViewerCertificate struct { // see Custom SSL options for Amazon CloudFront (http://aws.amazon.com/cloudfront/custom-ssl-domains/) // on the AWS marketing site. // - // Don't specify a value for SSLSupportMethod if you specified true. + // Don't specify a value here if you specified CloudFrontDefaultCertificate + // as true. // // For more information, see Choosing How CloudFront Serves HTTPS Requests (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cnames-https-dedicated-ip-or-sni.html) // in the Amazon CloudFront Developer Guide. diff --git a/service/cloudfront/errors.go b/service/cloudfront/errors.go index db6258af0bf..48a178e1e70 100644 --- a/service/cloudfront/errors.go +++ b/service/cloudfront/errors.go @@ -234,7 +234,11 @@ const ( // ErrCodeInvalidWebACLId for service response error code // "InvalidWebACLId". // - // A web ACL id specified in the response body is not valid. + // A web ACL ID specified in the response body is not valid. To specify a web + // ACL created using the latest version of AWS WAF, use the ACL ARN, for example + // arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a. + // To specify a web ACL created using AWS WAF Classic, use the ACL ID, for example + // 473e64fd-f30b-4765-81a0-62ad96dd167a. ErrCodeInvalidWebACLId = "InvalidWebACLId" // ErrCodeMissingBody for service response error code diff --git a/service/codestarconnections/api.go b/service/codestarconnections/api.go new file mode 100644 index 00000000000..3eb89c0a627 --- /dev/null +++ b/service/codestarconnections/api.go @@ -0,0 +1,765 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package codestarconnections + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +const opCreateConnection = "CreateConnection" + +// CreateConnectionRequest generates a "aws/request.Request" representing the +// client's request for the CreateConnection operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateConnection for more information on using the CreateConnection +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateConnectionRequest method. +// req, resp := client.CreateConnectionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-connections-2019-12-01/CreateConnection +func (c *CodeStarConnections) CreateConnectionRequest(input *CreateConnectionInput) (req *request.Request, output *CreateConnectionOutput) { + op := &request.Operation{ + Name: opCreateConnection, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateConnectionInput{} + } + + output = &CreateConnectionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateConnection API operation for AWS CodeStar connections. +// +// Creates a connection that can then be given to other AWS services like CodePipeline +// so that it can access third-party code repositories. The connection is in +// pending status until the third-party connection handshake is completed from +// the console. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CodeStar connections's +// API operation CreateConnection for usage and error information. +// +// Returned Error Codes: +// * ErrCodeLimitExceededException "LimitExceededException" +// Exceeded the maximum limit for connections. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-connections-2019-12-01/CreateConnection +func (c *CodeStarConnections) CreateConnection(input *CreateConnectionInput) (*CreateConnectionOutput, error) { + req, out := c.CreateConnectionRequest(input) + return out, req.Send() +} + +// CreateConnectionWithContext is the same as CreateConnection with the addition of +// the ability to pass a context and additional request options. +// +// See CreateConnection for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CodeStarConnections) CreateConnectionWithContext(ctx aws.Context, input *CreateConnectionInput, opts ...request.Option) (*CreateConnectionOutput, error) { + req, out := c.CreateConnectionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteConnection = "DeleteConnection" + +// DeleteConnectionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteConnection operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteConnection for more information on using the DeleteConnection +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteConnectionRequest method. +// req, resp := client.DeleteConnectionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-connections-2019-12-01/DeleteConnection +func (c *CodeStarConnections) DeleteConnectionRequest(input *DeleteConnectionInput) (req *request.Request, output *DeleteConnectionOutput) { + op := &request.Operation{ + Name: opDeleteConnection, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteConnectionInput{} + } + + output = &DeleteConnectionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteConnection API operation for AWS CodeStar connections. +// +// The connection to be deleted. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CodeStar connections's +// API operation DeleteConnection for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// Resource not found. Verify the connection resource ARN and try again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-connections-2019-12-01/DeleteConnection +func (c *CodeStarConnections) DeleteConnection(input *DeleteConnectionInput) (*DeleteConnectionOutput, error) { + req, out := c.DeleteConnectionRequest(input) + return out, req.Send() +} + +// DeleteConnectionWithContext is the same as DeleteConnection with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteConnection for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CodeStarConnections) DeleteConnectionWithContext(ctx aws.Context, input *DeleteConnectionInput, opts ...request.Option) (*DeleteConnectionOutput, error) { + req, out := c.DeleteConnectionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetConnection = "GetConnection" + +// GetConnectionRequest generates a "aws/request.Request" representing the +// client's request for the GetConnection operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetConnection for more information on using the GetConnection +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetConnectionRequest method. +// req, resp := client.GetConnectionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-connections-2019-12-01/GetConnection +func (c *CodeStarConnections) GetConnectionRequest(input *GetConnectionInput) (req *request.Request, output *GetConnectionOutput) { + op := &request.Operation{ + Name: opGetConnection, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetConnectionInput{} + } + + output = &GetConnectionOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetConnection API operation for AWS CodeStar connections. +// +// Returns the connection ARN and details such as status, owner, and provider +// type. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CodeStar connections's +// API operation GetConnection for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// Resource not found. Verify the connection resource ARN and try again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-connections-2019-12-01/GetConnection +func (c *CodeStarConnections) GetConnection(input *GetConnectionInput) (*GetConnectionOutput, error) { + req, out := c.GetConnectionRequest(input) + return out, req.Send() +} + +// GetConnectionWithContext is the same as GetConnection with the addition of +// the ability to pass a context and additional request options. +// +// See GetConnection for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CodeStarConnections) GetConnectionWithContext(ctx aws.Context, input *GetConnectionInput, opts ...request.Option) (*GetConnectionOutput, error) { + req, out := c.GetConnectionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListConnections = "ListConnections" + +// ListConnectionsRequest generates a "aws/request.Request" representing the +// client's request for the ListConnections operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListConnections for more information on using the ListConnections +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListConnectionsRequest method. +// req, resp := client.ListConnectionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-connections-2019-12-01/ListConnections +func (c *CodeStarConnections) ListConnectionsRequest(input *ListConnectionsInput) (req *request.Request, output *ListConnectionsOutput) { + op := &request.Operation{ + Name: opListConnections, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListConnectionsInput{} + } + + output = &ListConnectionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListConnections API operation for AWS CodeStar connections. +// +// Lists the connections associated with your account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CodeStar connections's +// API operation ListConnections for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/codestar-connections-2019-12-01/ListConnections +func (c *CodeStarConnections) ListConnections(input *ListConnectionsInput) (*ListConnectionsOutput, error) { + req, out := c.ListConnectionsRequest(input) + return out, req.Send() +} + +// ListConnectionsWithContext is the same as ListConnections with the addition of +// the ability to pass a context and additional request options. +// +// See ListConnections for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CodeStarConnections) ListConnectionsWithContext(ctx aws.Context, input *ListConnectionsInput, opts ...request.Option) (*ListConnectionsOutput, error) { + req, out := c.ListConnectionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListConnectionsPages iterates over the pages of a ListConnections operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListConnections method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListConnections operation. +// pageNum := 0 +// err := client.ListConnectionsPages(params, +// func(page *codestarconnections.ListConnectionsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *CodeStarConnections) ListConnectionsPages(input *ListConnectionsInput, fn func(*ListConnectionsOutput, bool) bool) error { + return c.ListConnectionsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListConnectionsPagesWithContext same as ListConnectionsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CodeStarConnections) ListConnectionsPagesWithContext(ctx aws.Context, input *ListConnectionsInput, fn func(*ListConnectionsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListConnectionsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListConnectionsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListConnectionsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +// The configuration that allows a service such as CodePipeline to connect to +// a third-party code repository. +type Connection struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the connection. The ARN is used as the + // connection reference when the connection is shared between AWS services. + // + // The ARN is never reused if the connection is deleted. + ConnectionArn *string `type:"string"` + + // The name of the connection. Connection names must be unique in an AWS user + // account. + ConnectionName *string `min:"1" type:"string"` + + // The current status of the connection. + ConnectionStatus *string `type:"string" enum:"ConnectionStatus"` + + // The name of the external provider where your third-party code repository + // is configured. For Bitbucket, this is the account ID of the owner of the + // Bitbucket repository. + OwnerAccountId *string `min:"12" type:"string"` + + // The name of the external provider where your third-party code repository + // is configured. Currently, the valid provider type is Bitbucket. + ProviderType *string `type:"string" enum:"ProviderType"` +} + +// String returns the string representation +func (s Connection) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Connection) GoString() string { + return s.String() +} + +// SetConnectionArn sets the ConnectionArn field's value. +func (s *Connection) SetConnectionArn(v string) *Connection { + s.ConnectionArn = &v + return s +} + +// SetConnectionName sets the ConnectionName field's value. +func (s *Connection) SetConnectionName(v string) *Connection { + s.ConnectionName = &v + return s +} + +// SetConnectionStatus sets the ConnectionStatus field's value. +func (s *Connection) SetConnectionStatus(v string) *Connection { + s.ConnectionStatus = &v + return s +} + +// SetOwnerAccountId sets the OwnerAccountId field's value. +func (s *Connection) SetOwnerAccountId(v string) *Connection { + s.OwnerAccountId = &v + return s +} + +// SetProviderType sets the ProviderType field's value. +func (s *Connection) SetProviderType(v string) *Connection { + s.ProviderType = &v + return s +} + +type CreateConnectionInput struct { + _ struct{} `type:"structure"` + + // The name of the connection to be created. The name must be unique in the + // calling AWS account. + // + // ConnectionName is a required field + ConnectionName *string `min:"1" type:"string" required:"true"` + + // The name of the external provider where your third-party code repository + // is configured. Currently, the valid provider type is Bitbucket. + // + // ProviderType is a required field + ProviderType *string `type:"string" required:"true" enum:"ProviderType"` +} + +// String returns the string representation +func (s CreateConnectionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateConnectionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateConnectionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateConnectionInput"} + if s.ConnectionName == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectionName")) + } + if s.ConnectionName != nil && len(*s.ConnectionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConnectionName", 1)) + } + if s.ProviderType == nil { + invalidParams.Add(request.NewErrParamRequired("ProviderType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConnectionName sets the ConnectionName field's value. +func (s *CreateConnectionInput) SetConnectionName(v string) *CreateConnectionInput { + s.ConnectionName = &v + return s +} + +// SetProviderType sets the ProviderType field's value. +func (s *CreateConnectionInput) SetProviderType(v string) *CreateConnectionInput { + s.ProviderType = &v + return s +} + +type CreateConnectionOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the connection to be created. The ARN is + // used as the connection reference when the connection is shared between AWS + // services. + // + // The ARN is never reused if the connection is deleted. + // + // ConnectionArn is a required field + ConnectionArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateConnectionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateConnectionOutput) GoString() string { + return s.String() +} + +// SetConnectionArn sets the ConnectionArn field's value. +func (s *CreateConnectionOutput) SetConnectionArn(v string) *CreateConnectionOutput { + s.ConnectionArn = &v + return s +} + +type DeleteConnectionInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the connection to be deleted. + // + // The ARN is never reused if the connection is deleted. + // + // ConnectionArn is a required field + ConnectionArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteConnectionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteConnectionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteConnectionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteConnectionInput"} + if s.ConnectionArn == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectionArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConnectionArn sets the ConnectionArn field's value. +func (s *DeleteConnectionInput) SetConnectionArn(v string) *DeleteConnectionInput { + s.ConnectionArn = &v + return s +} + +type DeleteConnectionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteConnectionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteConnectionOutput) GoString() string { + return s.String() +} + +type GetConnectionInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of a connection. + // + // ConnectionArn is a required field + ConnectionArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s GetConnectionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetConnectionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetConnectionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetConnectionInput"} + if s.ConnectionArn == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectionArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConnectionArn sets the ConnectionArn field's value. +func (s *GetConnectionInput) SetConnectionArn(v string) *GetConnectionInput { + s.ConnectionArn = &v + return s +} + +type GetConnectionOutput struct { + _ struct{} `type:"structure"` + + // The connection details, such as status, owner, and provider type. + Connection *Connection `type:"structure"` +} + +// String returns the string representation +func (s GetConnectionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetConnectionOutput) GoString() string { + return s.String() +} + +// SetConnection sets the Connection field's value. +func (s *GetConnectionOutput) SetConnection(v *Connection) *GetConnectionOutput { + s.Connection = v + return s +} + +type ListConnectionsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to return in a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int64 `min:"1" type:"integer"` + + // The token that was returned from the previous ListConnections call, which + // can be used to return the next set of connections in the list. + NextToken *string `min:"1" type:"string"` + + // Filters the list of connections to those associated with a specified provider, + // such as Bitbucket. + ProviderTypeFilter *string `type:"string" enum:"ProviderType"` +} + +// String returns the string representation +func (s ListConnectionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListConnectionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListConnectionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListConnectionsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListConnectionsInput) SetMaxResults(v int64) *ListConnectionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListConnectionsInput) SetNextToken(v string) *ListConnectionsInput { + s.NextToken = &v + return s +} + +// SetProviderTypeFilter sets the ProviderTypeFilter field's value. +func (s *ListConnectionsInput) SetProviderTypeFilter(v string) *ListConnectionsInput { + s.ProviderTypeFilter = &v + return s +} + +type ListConnectionsOutput struct { + _ struct{} `type:"structure"` + + // A list of connections and the details for each connection, such as status, + // owner, and provider type. + Connections []*Connection `type:"list"` + + // A token that can be used in the next ListConnections call. To view all items + // in the list, continue to call this operation with each subsequent token until + // no more nextToken values are returned. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListConnectionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListConnectionsOutput) GoString() string { + return s.String() +} + +// SetConnections sets the Connections field's value. +func (s *ListConnectionsOutput) SetConnections(v []*Connection) *ListConnectionsOutput { + s.Connections = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListConnectionsOutput) SetNextToken(v string) *ListConnectionsOutput { + s.NextToken = &v + return s +} + +const ( + // ConnectionStatusPending is a ConnectionStatus enum value + ConnectionStatusPending = "PENDING" + + // ConnectionStatusAvailable is a ConnectionStatus enum value + ConnectionStatusAvailable = "AVAILABLE" + + // ConnectionStatusError is a ConnectionStatus enum value + ConnectionStatusError = "ERROR" +) + +const ( + // ProviderTypeBitbucket is a ProviderType enum value + ProviderTypeBitbucket = "Bitbucket" +) diff --git a/service/codestarconnections/codestarconnectionsiface/interface.go b/service/codestarconnections/codestarconnectionsiface/interface.go new file mode 100644 index 00000000000..30b463e303b --- /dev/null +++ b/service/codestarconnections/codestarconnectionsiface/interface.go @@ -0,0 +1,83 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package codestarconnectionsiface provides an interface to enable mocking the AWS CodeStar connections service client +// for testing your code. +// +// It is important to note that this interface will have breaking changes +// when the service model is updated and adds new API operations, paginators, +// and waiters. +package codestarconnectionsiface + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/service/codestarconnections" +) + +// CodeStarConnectionsAPI provides an interface to enable mocking the +// codestarconnections.CodeStarConnections service client's API operation, +// paginators, and waiters. This make unit testing your code that calls out +// to the SDK's service client's calls easier. +// +// The best way to use this interface is so the SDK's service client's calls +// can be stubbed out for unit testing your code with the SDK without needing +// to inject custom request handlers into the SDK's request pipeline. +// +// // myFunc uses an SDK service client to make a request to +// // AWS CodeStar connections. +// func myFunc(svc codestarconnectionsiface.CodeStarConnectionsAPI) bool { +// // Make svc.CreateConnection request +// } +// +// func main() { +// sess := session.New() +// svc := codestarconnections.New(sess) +// +// myFunc(svc) +// } +// +// In your _test.go file: +// +// // Define a mock struct to be used in your unit tests of myFunc. +// type mockCodeStarConnectionsClient struct { +// codestarconnectionsiface.CodeStarConnectionsAPI +// } +// func (m *mockCodeStarConnectionsClient) CreateConnection(input *codestarconnections.CreateConnectionInput) (*codestarconnections.CreateConnectionOutput, error) { +// // mock response/functionality +// } +// +// func TestMyFunc(t *testing.T) { +// // Setup Test +// mockSvc := &mockCodeStarConnectionsClient{} +// +// myfunc(mockSvc) +// +// // Verify myFunc's functionality +// } +// +// It is important to note that this interface will have breaking changes +// when the service model is updated and adds new API operations, paginators, +// and waiters. Its suggested to use the pattern above for testing, or using +// tooling to generate mocks to satisfy the interfaces. +type CodeStarConnectionsAPI interface { + CreateConnection(*codestarconnections.CreateConnectionInput) (*codestarconnections.CreateConnectionOutput, error) + CreateConnectionWithContext(aws.Context, *codestarconnections.CreateConnectionInput, ...request.Option) (*codestarconnections.CreateConnectionOutput, error) + CreateConnectionRequest(*codestarconnections.CreateConnectionInput) (*request.Request, *codestarconnections.CreateConnectionOutput) + + DeleteConnection(*codestarconnections.DeleteConnectionInput) (*codestarconnections.DeleteConnectionOutput, error) + DeleteConnectionWithContext(aws.Context, *codestarconnections.DeleteConnectionInput, ...request.Option) (*codestarconnections.DeleteConnectionOutput, error) + DeleteConnectionRequest(*codestarconnections.DeleteConnectionInput) (*request.Request, *codestarconnections.DeleteConnectionOutput) + + GetConnection(*codestarconnections.GetConnectionInput) (*codestarconnections.GetConnectionOutput, error) + GetConnectionWithContext(aws.Context, *codestarconnections.GetConnectionInput, ...request.Option) (*codestarconnections.GetConnectionOutput, error) + GetConnectionRequest(*codestarconnections.GetConnectionInput) (*request.Request, *codestarconnections.GetConnectionOutput) + + ListConnections(*codestarconnections.ListConnectionsInput) (*codestarconnections.ListConnectionsOutput, error) + ListConnectionsWithContext(aws.Context, *codestarconnections.ListConnectionsInput, ...request.Option) (*codestarconnections.ListConnectionsOutput, error) + ListConnectionsRequest(*codestarconnections.ListConnectionsInput) (*request.Request, *codestarconnections.ListConnectionsOutput) + + ListConnectionsPages(*codestarconnections.ListConnectionsInput, func(*codestarconnections.ListConnectionsOutput, bool) bool) error + ListConnectionsPagesWithContext(aws.Context, *codestarconnections.ListConnectionsInput, func(*codestarconnections.ListConnectionsOutput, bool) bool, ...request.Option) error +} + +var _ CodeStarConnectionsAPI = (*codestarconnections.CodeStarConnections)(nil) diff --git a/service/codestarconnections/doc.go b/service/codestarconnections/doc.go new file mode 100644 index 00000000000..1320108cdca --- /dev/null +++ b/service/codestarconnections/doc.go @@ -0,0 +1,59 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package codestarconnections provides the client and types for making API +// requests to AWS CodeStar connections. +// +// This AWS CodeStar Connections API Reference provides descriptions and usage +// examples of the operations and data types for the AWS CodeStar Connections +// API. You can use the Connections API to work with connections and installations. +// +// Connections are configurations that you use to connect AWS resources to external +// code repositories. Each connection is a resource that can be given to services +// such as CodePipeline to connect to a third-party repository such as Bitbucket. +// For example, you can add the connection in CodePipeline so that it triggers +// your pipeline when a code change is made to your third-party code repository. +// Each connection is named and associated with a unique ARN that is used to +// reference the connection. +// +// When you create a connection, the console initiates a third-party connection +// handshake. Installations are the apps that are used to conduct this handshake. +// For example, the installation for the Bitbucket provider type is the Bitbucket +// Cloud app. When you create a connection, you can choose an existing installation +// or create one. +// +// You can work with connections by calling: +// +// * CreateConnection, which creates a uniquely named connection that can +// be referenced by services such as CodePipeline. +// +// * DeleteConnection, which deletes the specified connection. +// +// * GetConnection, which returns information about the connection, including +// the connection status. +// +// * ListConnections, which lists the connections associated with your account. +// +// For information about how to use AWS CodeStar Connections, see the AWS CodePipeline +// User Guide (https://docs.aws.amazon.com/codepipeline/latest/userguide/welcome.html). +// +// See https://docs.aws.amazon.com/goto/WebAPI/codestar-connections-2019-12-01 for more information on this service. +// +// See codestarconnections package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/codestarconnections/ +// +// Using the Client +// +// To contact AWS CodeStar connections with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS CodeStar connections client CodeStarConnections for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/codestarconnections/#New +package codestarconnections diff --git a/service/codestarconnections/errors.go b/service/codestarconnections/errors.go new file mode 100644 index 00000000000..4e588f68c8d --- /dev/null +++ b/service/codestarconnections/errors.go @@ -0,0 +1,18 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package codestarconnections + +const ( + + // ErrCodeLimitExceededException for service response error code + // "LimitExceededException". + // + // Exceeded the maximum limit for connections. + ErrCodeLimitExceededException = "LimitExceededException" + + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // Resource not found. Verify the connection resource ARN and try again. + ErrCodeResourceNotFoundException = "ResourceNotFoundException" +) diff --git a/service/codestarconnections/service.go b/service/codestarconnections/service.go new file mode 100644 index 00000000000..f2913d79770 --- /dev/null +++ b/service/codestarconnections/service.go @@ -0,0 +1,103 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package codestarconnections + +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" +) + +// CodeStarConnections provides the API operation methods for making requests to +// AWS CodeStar connections. See this package's package overview docs +// for details on the service. +// +// CodeStarConnections methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type CodeStarConnections 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 = "CodeStar connections" // Name of service. + EndpointsID = "codestar-connections" // ID to lookup a service endpoint with. + ServiceID = "CodeStar connections" // ServiceID is a unique identifier of a specific service. +) + +// New creates a new instance of the CodeStarConnections 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: +// mySession := session.Must(session.NewSession()) +// +// // Create a CodeStarConnections client from just a session. +// svc := codestarconnections.New(mySession) +// +// // Create a CodeStarConnections client with additional configuration +// svc := codestarconnections.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *CodeStarConnections { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "codestar-connections" + } + return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *CodeStarConnections { + svc := &CodeStarConnections{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + PartitionID: partitionID, + Endpoint: endpoint, + APIVersion: "2019-12-01", + JSONVersion: "1.0", + TargetPrefix: "com.amazonaws.codestar.connections.CodeStar_connections_20191201", + }, + 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 CodeStarConnections operation and runs any +// custom request initialization. +func (c *CodeStarConnections) 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 +} diff --git a/service/costexplorer/api.go b/service/costexplorer/api.go index f0ee95b2cf9..c6077adcd40 100644 --- a/service/costexplorer/api.go +++ b/service/costexplorer/api.go @@ -4667,8 +4667,6 @@ type GetReservationUtilizationInput struct { // // * CACHE_ENGINE // - // * DATABASE_ENGINE - // // * DEPLOYMENT_OPTION // // * INSTANCE_TYPE diff --git a/service/detective/api.go b/service/detective/api.go index 4ab0f236f18..48a8b1df913 100644 --- a/service/detective/api.go +++ b/service/detective/api.go @@ -455,7 +455,7 @@ func (c *Detective) DeleteMembersRequest(input *DeleteMembersInput) (req *reques // // Deletes one or more member accounts from the master account behavior graph. // This operation can only be called by a Detective master account. That account -// cannot use DeleteMembers to delete their own account from the Morocco graph. +// cannot use DeleteMembers to delete their own account from the behavior graph. // To disable a behavior graph, the master account uses the DeleteGraph API // method. // diff --git a/service/devicefarm/api.go b/service/devicefarm/api.go index 2f7c56f935d..ddba35cc07d 100644 --- a/service/devicefarm/api.go +++ b/service/devicefarm/api.go @@ -322,7 +322,7 @@ func (c *DeviceFarm) CreateProjectRequest(input *CreateProjectInput) (req *reque // CreateProject API operation for AWS Device Farm. // -// Creates a new project. +// Creates a project. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -457,6 +457,174 @@ func (c *DeviceFarm) CreateRemoteAccessSessionWithContext(ctx aws.Context, input return out, req.Send() } +const opCreateTestGridProject = "CreateTestGridProject" + +// CreateTestGridProjectRequest generates a "aws/request.Request" representing the +// client's request for the CreateTestGridProject operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateTestGridProject for more information on using the CreateTestGridProject +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateTestGridProjectRequest method. +// req, resp := client.CreateTestGridProjectRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateTestGridProject +func (c *DeviceFarm) CreateTestGridProjectRequest(input *CreateTestGridProjectInput) (req *request.Request, output *CreateTestGridProjectOutput) { + op := &request.Operation{ + Name: opCreateTestGridProject, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateTestGridProjectInput{} + } + + output = &CreateTestGridProjectOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateTestGridProject API operation for AWS Device Farm. +// +// Creates a Selenium testing project. Projects are used to track TestGridSession +// instances. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation CreateTestGridProject for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServiceException "InternalServiceException" +// An internal exception was raised in the service. Contact aws-devicefarm-support@amazon.com +// (mailto:aws-devicefarm-support@amazon.com) if you see this error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateTestGridProject +func (c *DeviceFarm) CreateTestGridProject(input *CreateTestGridProjectInput) (*CreateTestGridProjectOutput, error) { + req, out := c.CreateTestGridProjectRequest(input) + return out, req.Send() +} + +// CreateTestGridProjectWithContext is the same as CreateTestGridProject with the addition of +// the ability to pass a context and additional request options. +// +// See CreateTestGridProject for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) CreateTestGridProjectWithContext(ctx aws.Context, input *CreateTestGridProjectInput, opts ...request.Option) (*CreateTestGridProjectOutput, error) { + req, out := c.CreateTestGridProjectRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateTestGridUrl = "CreateTestGridUrl" + +// CreateTestGridUrlRequest generates a "aws/request.Request" representing the +// client's request for the CreateTestGridUrl operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateTestGridUrl for more information on using the CreateTestGridUrl +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateTestGridUrlRequest method. +// req, resp := client.CreateTestGridUrlRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateTestGridUrl +func (c *DeviceFarm) CreateTestGridUrlRequest(input *CreateTestGridUrlInput) (req *request.Request, output *CreateTestGridUrlOutput) { + op := &request.Operation{ + Name: opCreateTestGridUrl, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateTestGridUrlInput{} + } + + output = &CreateTestGridUrlOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateTestGridUrl API operation for AWS Device Farm. +// +// Creates a signed, short-term URL that can be passed to a Selenium RemoteWebDriver +// constructor. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation CreateTestGridUrl for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeInternalServiceException "InternalServiceException" +// An internal exception was raised in the service. Contact aws-devicefarm-support@amazon.com +// (mailto:aws-devicefarm-support@amazon.com) if you see this error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateTestGridUrl +func (c *DeviceFarm) CreateTestGridUrl(input *CreateTestGridUrlInput) (*CreateTestGridUrlOutput, error) { + req, out := c.CreateTestGridUrlRequest(input) + return out, req.Send() +} + +// CreateTestGridUrlWithContext is the same as CreateTestGridUrl with the addition of +// the ability to pass a context and additional request options. +// +// See CreateTestGridUrl for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) CreateTestGridUrlWithContext(ctx aws.Context, input *CreateTestGridUrlInput, opts ...request.Option) (*CreateTestGridUrlOutput, error) { + req, out := c.CreateTestGridUrlRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateUpload = "CreateUpload" // CreateUploadRequest generates a "aws/request.Request" representing the @@ -946,7 +1114,7 @@ func (c *DeviceFarm) DeleteProjectRequest(input *DeleteProjectInput) (req *reque // // Deletes an AWS Device Farm project, given the project ARN. // -// Note Deleting this resource does not stop an in-progress run. +// Deleting this resource does not stop an in-progress run. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1126,7 +1294,7 @@ func (c *DeviceFarm) DeleteRunRequest(input *DeleteRunInput) (req *request.Reque // // Deletes the run, given the run ARN. // -// Note Deleting this resource does not stop an in-progress run. +// Deleting this resource does not stop an in-progress run. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1170,6 +1338,100 @@ func (c *DeviceFarm) DeleteRunWithContext(ctx aws.Context, input *DeleteRunInput return out, req.Send() } +const opDeleteTestGridProject = "DeleteTestGridProject" + +// DeleteTestGridProjectRequest generates a "aws/request.Request" representing the +// client's request for the DeleteTestGridProject operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteTestGridProject for more information on using the DeleteTestGridProject +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteTestGridProjectRequest method. +// req, resp := client.DeleteTestGridProjectRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteTestGridProject +func (c *DeviceFarm) DeleteTestGridProjectRequest(input *DeleteTestGridProjectInput) (req *request.Request, output *DeleteTestGridProjectOutput) { + op := &request.Operation{ + Name: opDeleteTestGridProject, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteTestGridProjectInput{} + } + + output = &DeleteTestGridProjectOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteTestGridProject API operation for AWS Device Farm. +// +// Deletes a Selenium testing project and all content generated under it. +// +// You cannot undo this operation. +// +// You cannot delete a project if it has active sessions. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation DeleteTestGridProject for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeCannotDeleteException "CannotDeleteException" +// The requested object could not be deleted. +// +// * ErrCodeInternalServiceException "InternalServiceException" +// An internal exception was raised in the service. Contact aws-devicefarm-support@amazon.com +// (mailto:aws-devicefarm-support@amazon.com) if you see this error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteTestGridProject +func (c *DeviceFarm) DeleteTestGridProject(input *DeleteTestGridProjectInput) (*DeleteTestGridProjectOutput, error) { + req, out := c.DeleteTestGridProjectRequest(input) + return out, req.Send() +} + +// DeleteTestGridProjectWithContext is the same as DeleteTestGridProject with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteTestGridProject for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) DeleteTestGridProjectWithContext(ctx aws.Context, input *DeleteTestGridProjectInput, opts ...request.Option) (*DeleteTestGridProjectOutput, error) { + req, out := c.DeleteTestGridProjectRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteUpload = "DeleteUpload" // DeleteUploadRequest generates a "aws/request.Request" representing the @@ -1393,8 +1655,8 @@ func (c *DeviceFarm) GetAccountSettingsRequest(input *GetAccountSettingsInput) ( // GetAccountSettings API operation for AWS Device Farm. // -// Returns the number of unmetered iOS and/or unmetered Android devices that -// have been purchased by the account. +// Returns the number of unmetered iOS or unmetered Android devices that have +// been purchased by the account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1570,7 +1832,7 @@ func (c *DeviceFarm) GetDeviceInstanceRequest(input *GetDeviceInstanceInput) (re // GetDeviceInstance API operation for AWS Device Farm. // -// Returns information about a device instance belonging to a private device +// Returns information about a device instance that belongs to a private device // fleet. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2109,8 +2371,8 @@ func (c *DeviceFarm) GetOfferingStatusRequest(input *GetOfferingStatusInput) (re // AWS account. The response indicates how many offerings are currently available // and the offerings that will be available in the next period. The API returns // a NotEligible error if the user is not permitted to invoke the operation. -// Please contact aws-devicefarm-support@amazon.com (mailto:aws-devicefarm-support@amazon.com) -// if you believe that you should be able to invoke this operation. +// If you must be able to invoke this operation, contact aws-devicefarm-support@amazon.com +// (mailto:aws-devicefarm-support@amazon.com). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2650,198 +2912,377 @@ func (c *DeviceFarm) GetTestWithContext(ctx aws.Context, input *GetTestInput, op return out, req.Send() } -const opGetUpload = "GetUpload" +const opGetTestGridProject = "GetTestGridProject" -// GetUploadRequest generates a "aws/request.Request" representing the -// client's request for the GetUpload operation. The "output" return +// GetTestGridProjectRequest generates a "aws/request.Request" representing the +// client's request for the GetTestGridProject operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetUpload for more information on using the GetUpload +// See GetTestGridProject for more information on using the GetTestGridProject // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the GetUploadRequest method. -// req, resp := client.GetUploadRequest(params) +// // Example sending a request using the GetTestGridProjectRequest method. +// req, resp := client.GetTestGridProjectRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetUpload -func (c *DeviceFarm) GetUploadRequest(input *GetUploadInput) (req *request.Request, output *GetUploadOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetTestGridProject +func (c *DeviceFarm) GetTestGridProjectRequest(input *GetTestGridProjectInput) (req *request.Request, output *GetTestGridProjectOutput) { op := &request.Operation{ - Name: opGetUpload, + Name: opGetTestGridProject, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetUploadInput{} + input = &GetTestGridProjectInput{} } - output = &GetUploadOutput{} + output = &GetTestGridProjectOutput{} req = c.newRequest(op, input, output) return } -// GetUpload API operation for AWS Device Farm. +// GetTestGridProject API operation for AWS Device Farm. // -// Gets information about an upload. +// Retrieves information about a Selenium testing project. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Device Farm's -// API operation GetUpload for usage and error information. +// API operation GetTestGridProject for usage and error information. // // Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// // * ErrCodeNotFoundException "NotFoundException" // The specified entity was not found. // -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. // -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. +// * ErrCodeInternalServiceException "InternalServiceException" +// An internal exception was raised in the service. Contact aws-devicefarm-support@amazon.com +// (mailto:aws-devicefarm-support@amazon.com) if you see this error. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetUpload -func (c *DeviceFarm) GetUpload(input *GetUploadInput) (*GetUploadOutput, error) { - req, out := c.GetUploadRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetTestGridProject +func (c *DeviceFarm) GetTestGridProject(input *GetTestGridProjectInput) (*GetTestGridProjectOutput, error) { + req, out := c.GetTestGridProjectRequest(input) return out, req.Send() } -// GetUploadWithContext is the same as GetUpload with the addition of +// GetTestGridProjectWithContext is the same as GetTestGridProject with the addition of // the ability to pass a context and additional request options. // -// See GetUpload for details on how to use this API operation. +// See GetTestGridProject for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) GetUploadWithContext(ctx aws.Context, input *GetUploadInput, opts ...request.Option) (*GetUploadOutput, error) { - req, out := c.GetUploadRequest(input) +func (c *DeviceFarm) GetTestGridProjectWithContext(ctx aws.Context, input *GetTestGridProjectInput, opts ...request.Option) (*GetTestGridProjectOutput, error) { + req, out := c.GetTestGridProjectRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetVPCEConfiguration = "GetVPCEConfiguration" +const opGetTestGridSession = "GetTestGridSession" -// GetVPCEConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the GetVPCEConfiguration operation. The "output" return +// GetTestGridSessionRequest generates a "aws/request.Request" representing the +// client's request for the GetTestGridSession operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetVPCEConfiguration for more information on using the GetVPCEConfiguration +// See GetTestGridSession for more information on using the GetTestGridSession // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the GetVPCEConfigurationRequest method. -// req, resp := client.GetVPCEConfigurationRequest(params) +// // Example sending a request using the GetTestGridSessionRequest method. +// req, resp := client.GetTestGridSessionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetVPCEConfiguration -func (c *DeviceFarm) GetVPCEConfigurationRequest(input *GetVPCEConfigurationInput) (req *request.Request, output *GetVPCEConfigurationOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetTestGridSession +func (c *DeviceFarm) GetTestGridSessionRequest(input *GetTestGridSessionInput) (req *request.Request, output *GetTestGridSessionOutput) { op := &request.Operation{ - Name: opGetVPCEConfiguration, + Name: opGetTestGridSession, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetVPCEConfigurationInput{} + input = &GetTestGridSessionInput{} } - output = &GetVPCEConfigurationOutput{} + output = &GetTestGridSessionOutput{} req = c.newRequest(op, input, output) return } -// GetVPCEConfiguration API operation for AWS Device Farm. +// GetTestGridSession API operation for AWS Device Farm. // -// Returns information about the configuration settings for your Amazon Virtual -// Private Cloud (VPC) endpoint. +// A session is an instance of a browser created through a RemoteWebDriver with +// the URL from CreateTestGridUrlResult$url. You can use the following to look +// up sessions: +// +// * The session ARN (GetTestGridSessionRequest$sessionArn). +// +// * The project ARN and a session ID (GetTestGridSessionRequest$projectArn +// and GetTestGridSessionRequest$sessionId). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Device Farm's -// API operation GetVPCEConfiguration for usage and error information. +// API operation GetTestGridSession for usage and error information. // // Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// // * ErrCodeNotFoundException "NotFoundException" // The specified entity was not found. // -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetVPCEConfiguration -func (c *DeviceFarm) GetVPCEConfiguration(input *GetVPCEConfigurationInput) (*GetVPCEConfigurationOutput, error) { - req, out := c.GetVPCEConfigurationRequest(input) +// * ErrCodeInternalServiceException "InternalServiceException" +// An internal exception was raised in the service. Contact aws-devicefarm-support@amazon.com +// (mailto:aws-devicefarm-support@amazon.com) if you see this error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetTestGridSession +func (c *DeviceFarm) GetTestGridSession(input *GetTestGridSessionInput) (*GetTestGridSessionOutput, error) { + req, out := c.GetTestGridSessionRequest(input) return out, req.Send() } -// GetVPCEConfigurationWithContext is the same as GetVPCEConfiguration with the addition of +// GetTestGridSessionWithContext is the same as GetTestGridSession with the addition of // the ability to pass a context and additional request options. // -// See GetVPCEConfiguration for details on how to use this API operation. +// See GetTestGridSession for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) GetVPCEConfigurationWithContext(ctx aws.Context, input *GetVPCEConfigurationInput, opts ...request.Option) (*GetVPCEConfigurationOutput, error) { - req, out := c.GetVPCEConfigurationRequest(input) +func (c *DeviceFarm) GetTestGridSessionWithContext(ctx aws.Context, input *GetTestGridSessionInput, opts ...request.Option) (*GetTestGridSessionOutput, error) { + req, out := c.GetTestGridSessionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opInstallToRemoteAccessSession = "InstallToRemoteAccessSession" +const opGetUpload = "GetUpload" -// InstallToRemoteAccessSessionRequest generates a "aws/request.Request" representing the -// client's request for the InstallToRemoteAccessSession operation. The "output" return +// GetUploadRequest generates a "aws/request.Request" representing the +// client's request for the GetUpload operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See InstallToRemoteAccessSession for more information on using the InstallToRemoteAccessSession +// See GetUpload for more information on using the GetUpload // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the InstallToRemoteAccessSessionRequest method. +// // Example sending a request using the GetUploadRequest method. +// req, resp := client.GetUploadRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetUpload +func (c *DeviceFarm) GetUploadRequest(input *GetUploadInput) (req *request.Request, output *GetUploadOutput) { + op := &request.Operation{ + Name: opGetUpload, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetUploadInput{} + } + + output = &GetUploadOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetUpload API operation for AWS Device Farm. +// +// Gets information about an upload. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation GetUpload for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetUpload +func (c *DeviceFarm) GetUpload(input *GetUploadInput) (*GetUploadOutput, error) { + req, out := c.GetUploadRequest(input) + return out, req.Send() +} + +// GetUploadWithContext is the same as GetUpload with the addition of +// the ability to pass a context and additional request options. +// +// See GetUpload for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) GetUploadWithContext(ctx aws.Context, input *GetUploadInput, opts ...request.Option) (*GetUploadOutput, error) { + req, out := c.GetUploadRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetVPCEConfiguration = "GetVPCEConfiguration" + +// GetVPCEConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the GetVPCEConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetVPCEConfiguration for more information on using the GetVPCEConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetVPCEConfigurationRequest method. +// req, resp := client.GetVPCEConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetVPCEConfiguration +func (c *DeviceFarm) GetVPCEConfigurationRequest(input *GetVPCEConfigurationInput) (req *request.Request, output *GetVPCEConfigurationOutput) { + op := &request.Operation{ + Name: opGetVPCEConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetVPCEConfigurationInput{} + } + + output = &GetVPCEConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetVPCEConfiguration API operation for AWS Device Farm. +// +// Returns information about the configuration settings for your Amazon Virtual +// Private Cloud (VPC) endpoint. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation GetVPCEConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetVPCEConfiguration +func (c *DeviceFarm) GetVPCEConfiguration(input *GetVPCEConfigurationInput) (*GetVPCEConfigurationOutput, error) { + req, out := c.GetVPCEConfigurationRequest(input) + return out, req.Send() +} + +// GetVPCEConfigurationWithContext is the same as GetVPCEConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See GetVPCEConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) GetVPCEConfigurationWithContext(ctx aws.Context, input *GetVPCEConfigurationInput, opts ...request.Option) (*GetVPCEConfigurationOutput, error) { + req, out := c.GetVPCEConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opInstallToRemoteAccessSession = "InstallToRemoteAccessSession" + +// InstallToRemoteAccessSessionRequest generates a "aws/request.Request" representing the +// client's request for the InstallToRemoteAccessSession operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See InstallToRemoteAccessSession for more information on using the InstallToRemoteAccessSession +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the InstallToRemoteAccessSessionRequest method. // req, resp := client.InstallToRemoteAccessSessionRequest(params) // // err := req.Send() @@ -3810,8 +4251,8 @@ func (c *DeviceFarm) ListOfferingPromotionsRequest(input *ListOfferingPromotions // Returns a list of offering promotions. Each offering promotion record contains // the ID and description of the promotion. The API returns a NotEligible error // if the caller is not permitted to invoke the operation. Contact aws-devicefarm-support@amazon.com -// (mailto:aws-devicefarm-support@amazon.com) if you believe that you should -// be able to invoke this operation. +// (mailto:aws-devicefarm-support@amazon.com) if you must be able to invoke +// this operation. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3912,9 +4353,9 @@ func (c *DeviceFarm) ListOfferingTransactionsRequest(input *ListOfferingTransact // Returns a list of all historical purchases, renewals, and system renewal // transactions for an AWS account. The list is paginated and ordered by a descending // timestamp (most recent transactions are first). The API returns a NotEligible -// error if the user is not permitted to invoke the operation. Please contact -// aws-devicefarm-support@amazon.com (mailto:aws-devicefarm-support@amazon.com) -// if you believe that you should be able to invoke this operation. +// error if the user is not permitted to invoke the operation. If you must be +// able to invoke this operation, contact aws-devicefarm-support@amazon.com +// (mailto:aws-devicefarm-support@amazon.com). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4067,9 +4508,8 @@ func (c *DeviceFarm) ListOfferingsRequest(input *ListOfferingsInput) (req *reque // Returns a list of products or offerings that the user can manage through // the API. Each offering record indicates the recurring price per unit and // the frequency for that offering. The API returns a NotEligible error if the -// user is not permitted to invoke the operation. Please contact aws-devicefarm-support@amazon.com -// (mailto:aws-devicefarm-support@amazon.com) if you believe that you should -// be able to invoke this operation. +// user is not permitted to invoke the operation. If you must be able to invoke +// this operation, contact aws-devicefarm-support@amazon.com (mailto:aws-devicefarm-support@amazon.com). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4895,6 +5335,9 @@ func (c *DeviceFarm) ListTagsForResourceRequest(input *ListTagsForResourceInput) // API operation ListTagsForResource for usage and error information. // // Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// // * ErrCodeNotFoundException "NotFoundException" // The specified entity was not found. // @@ -4923,137 +5366,132 @@ func (c *DeviceFarm) ListTagsForResourceWithContext(ctx aws.Context, input *List return out, req.Send() } -const opListTests = "ListTests" +const opListTestGridProjects = "ListTestGridProjects" -// ListTestsRequest generates a "aws/request.Request" representing the -// client's request for the ListTests operation. The "output" return +// ListTestGridProjectsRequest generates a "aws/request.Request" representing the +// client's request for the ListTestGridProjects operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ListTests for more information on using the ListTests +// See ListTestGridProjects for more information on using the ListTestGridProjects // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ListTestsRequest method. -// req, resp := client.ListTestsRequest(params) +// // Example sending a request using the ListTestGridProjectsRequest method. +// req, resp := client.ListTestGridProjectsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListTests -func (c *DeviceFarm) ListTestsRequest(input *ListTestsInput) (req *request.Request, output *ListTestsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListTestGridProjects +func (c *DeviceFarm) ListTestGridProjectsRequest(input *ListTestGridProjectsInput) (req *request.Request, output *ListTestGridProjectsOutput) { op := &request.Operation{ - Name: opListTests, + Name: opListTestGridProjects, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"nextToken"}, OutputTokens: []string{"nextToken"}, - LimitToken: "", + LimitToken: "maxResult", TruncationToken: "", }, } if input == nil { - input = &ListTestsInput{} + input = &ListTestGridProjectsInput{} } - output = &ListTestsOutput{} + output = &ListTestGridProjectsOutput{} req = c.newRequest(op, input, output) return } -// ListTests API operation for AWS Device Farm. +// ListTestGridProjects API operation for AWS Device Farm. // -// Gets information about tests in a given test suite. +// Gets a list of all Selenium testing projects in your account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Device Farm's -// API operation ListTests for usage and error information. +// API operation ListTestGridProjects for usage and error information. // // Returned Error Codes: // * ErrCodeArgumentException "ArgumentException" // An invalid argument was specified. // -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. +// * ErrCodeInternalServiceException "InternalServiceException" +// An internal exception was raised in the service. Contact aws-devicefarm-support@amazon.com +// (mailto:aws-devicefarm-support@amazon.com) if you see this error. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListTests -func (c *DeviceFarm) ListTests(input *ListTestsInput) (*ListTestsOutput, error) { - req, out := c.ListTestsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListTestGridProjects +func (c *DeviceFarm) ListTestGridProjects(input *ListTestGridProjectsInput) (*ListTestGridProjectsOutput, error) { + req, out := c.ListTestGridProjectsRequest(input) return out, req.Send() } -// ListTestsWithContext is the same as ListTests with the addition of +// ListTestGridProjectsWithContext is the same as ListTestGridProjects with the addition of // the ability to pass a context and additional request options. // -// See ListTests for details on how to use this API operation. +// See ListTestGridProjects for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) ListTestsWithContext(ctx aws.Context, input *ListTestsInput, opts ...request.Option) (*ListTestsOutput, error) { - req, out := c.ListTestsRequest(input) +func (c *DeviceFarm) ListTestGridProjectsWithContext(ctx aws.Context, input *ListTestGridProjectsInput, opts ...request.Option) (*ListTestGridProjectsOutput, error) { + req, out := c.ListTestGridProjectsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// ListTestsPages iterates over the pages of a ListTests operation, +// ListTestGridProjectsPages iterates over the pages of a ListTestGridProjects operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // -// See ListTests method for more information on how to use this operation. +// See ListTestGridProjects method for more information on how to use this operation. // // Note: This operation can generate multiple requests to a service. // -// // Example iterating over at most 3 pages of a ListTests operation. +// // Example iterating over at most 3 pages of a ListTestGridProjects operation. // pageNum := 0 -// err := client.ListTestsPages(params, -// func(page *devicefarm.ListTestsOutput, lastPage bool) bool { +// err := client.ListTestGridProjectsPages(params, +// func(page *devicefarm.ListTestGridProjectsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) // -func (c *DeviceFarm) ListTestsPages(input *ListTestsInput, fn func(*ListTestsOutput, bool) bool) error { - return c.ListTestsPagesWithContext(aws.BackgroundContext(), input, fn) +func (c *DeviceFarm) ListTestGridProjectsPages(input *ListTestGridProjectsInput, fn func(*ListTestGridProjectsOutput, bool) bool) error { + return c.ListTestGridProjectsPagesWithContext(aws.BackgroundContext(), input, fn) } -// ListTestsPagesWithContext same as ListTestsPages except +// ListTestGridProjectsPagesWithContext same as ListTestGridProjectsPages except // it takes a Context and allows setting request options on the pages. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) ListTestsPagesWithContext(ctx aws.Context, input *ListTestsInput, fn func(*ListTestsOutput, bool) bool, opts ...request.Option) error { +func (c *DeviceFarm) ListTestGridProjectsPagesWithContext(ctx aws.Context, input *ListTestGridProjectsInput, fn func(*ListTestGridProjectsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { - var inCpy *ListTestsInput + var inCpy *ListTestGridProjectsInput if input != nil { tmp := *input inCpy = &tmp } - req, _ := c.ListTestsRequest(inCpy) + req, _ := c.ListTestGridProjectsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil @@ -5061,7 +5499,7 @@ func (c *DeviceFarm) ListTestsPagesWithContext(ctx aws.Context, input *ListTests } for p.Next() { - if !fn(p.Page().(*ListTestsOutput), !p.HasNextPage()) { + if !fn(p.Page().(*ListTestGridProjectsOutput), !p.HasNextPage()) { break } } @@ -5069,137 +5507,135 @@ func (c *DeviceFarm) ListTestsPagesWithContext(ctx aws.Context, input *ListTests return p.Err() } -const opListUniqueProblems = "ListUniqueProblems" +const opListTestGridSessionActions = "ListTestGridSessionActions" -// ListUniqueProblemsRequest generates a "aws/request.Request" representing the -// client's request for the ListUniqueProblems operation. The "output" return +// ListTestGridSessionActionsRequest generates a "aws/request.Request" representing the +// client's request for the ListTestGridSessionActions operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ListUniqueProblems for more information on using the ListUniqueProblems +// See ListTestGridSessionActions for more information on using the ListTestGridSessionActions // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ListUniqueProblemsRequest method. -// req, resp := client.ListUniqueProblemsRequest(params) +// // Example sending a request using the ListTestGridSessionActionsRequest method. +// req, resp := client.ListTestGridSessionActionsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListUniqueProblems -func (c *DeviceFarm) ListUniqueProblemsRequest(input *ListUniqueProblemsInput) (req *request.Request, output *ListUniqueProblemsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListTestGridSessionActions +func (c *DeviceFarm) ListTestGridSessionActionsRequest(input *ListTestGridSessionActionsInput) (req *request.Request, output *ListTestGridSessionActionsOutput) { op := &request.Operation{ - Name: opListUniqueProblems, + Name: opListTestGridSessionActions, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"nextToken"}, OutputTokens: []string{"nextToken"}, - LimitToken: "", + LimitToken: "maxResult", TruncationToken: "", }, } if input == nil { - input = &ListUniqueProblemsInput{} + input = &ListTestGridSessionActionsInput{} } - output = &ListUniqueProblemsOutput{} + output = &ListTestGridSessionActionsOutput{} req = c.newRequest(op, input, output) return } -// ListUniqueProblems API operation for AWS Device Farm. +// ListTestGridSessionActions API operation for AWS Device Farm. // -// Gets information about unique problems. +// Returns a list of the actions taken in a TestGridSession. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Device Farm's -// API operation ListUniqueProblems for usage and error information. +// API operation ListTestGridSessionActions for usage and error information. // // Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// // * ErrCodeNotFoundException "NotFoundException" // The specified entity was not found. // -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. // -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. +// * ErrCodeInternalServiceException "InternalServiceException" +// An internal exception was raised in the service. Contact aws-devicefarm-support@amazon.com +// (mailto:aws-devicefarm-support@amazon.com) if you see this error. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListUniqueProblems -func (c *DeviceFarm) ListUniqueProblems(input *ListUniqueProblemsInput) (*ListUniqueProblemsOutput, error) { - req, out := c.ListUniqueProblemsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListTestGridSessionActions +func (c *DeviceFarm) ListTestGridSessionActions(input *ListTestGridSessionActionsInput) (*ListTestGridSessionActionsOutput, error) { + req, out := c.ListTestGridSessionActionsRequest(input) return out, req.Send() } -// ListUniqueProblemsWithContext is the same as ListUniqueProblems with the addition of +// ListTestGridSessionActionsWithContext is the same as ListTestGridSessionActions with the addition of // the ability to pass a context and additional request options. // -// See ListUniqueProblems for details on how to use this API operation. +// See ListTestGridSessionActions for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) ListUniqueProblemsWithContext(ctx aws.Context, input *ListUniqueProblemsInput, opts ...request.Option) (*ListUniqueProblemsOutput, error) { - req, out := c.ListUniqueProblemsRequest(input) +func (c *DeviceFarm) ListTestGridSessionActionsWithContext(ctx aws.Context, input *ListTestGridSessionActionsInput, opts ...request.Option) (*ListTestGridSessionActionsOutput, error) { + req, out := c.ListTestGridSessionActionsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// ListUniqueProblemsPages iterates over the pages of a ListUniqueProblems operation, +// ListTestGridSessionActionsPages iterates over the pages of a ListTestGridSessionActions operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // -// See ListUniqueProblems method for more information on how to use this operation. +// See ListTestGridSessionActions method for more information on how to use this operation. // // Note: This operation can generate multiple requests to a service. // -// // Example iterating over at most 3 pages of a ListUniqueProblems operation. +// // Example iterating over at most 3 pages of a ListTestGridSessionActions operation. // pageNum := 0 -// err := client.ListUniqueProblemsPages(params, -// func(page *devicefarm.ListUniqueProblemsOutput, lastPage bool) bool { +// err := client.ListTestGridSessionActionsPages(params, +// func(page *devicefarm.ListTestGridSessionActionsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) // -func (c *DeviceFarm) ListUniqueProblemsPages(input *ListUniqueProblemsInput, fn func(*ListUniqueProblemsOutput, bool) bool) error { - return c.ListUniqueProblemsPagesWithContext(aws.BackgroundContext(), input, fn) +func (c *DeviceFarm) ListTestGridSessionActionsPages(input *ListTestGridSessionActionsInput, fn func(*ListTestGridSessionActionsOutput, bool) bool) error { + return c.ListTestGridSessionActionsPagesWithContext(aws.BackgroundContext(), input, fn) } -// ListUniqueProblemsPagesWithContext same as ListUniqueProblemsPages except +// ListTestGridSessionActionsPagesWithContext same as ListTestGridSessionActionsPages except // it takes a Context and allows setting request options on the pages. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) ListUniqueProblemsPagesWithContext(ctx aws.Context, input *ListUniqueProblemsInput, fn func(*ListUniqueProblemsOutput, bool) bool, opts ...request.Option) error { +func (c *DeviceFarm) ListTestGridSessionActionsPagesWithContext(ctx aws.Context, input *ListTestGridSessionActionsInput, fn func(*ListTestGridSessionActionsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { - var inCpy *ListUniqueProblemsInput + var inCpy *ListTestGridSessionActionsInput if input != nil { tmp := *input inCpy = &tmp } - req, _ := c.ListUniqueProblemsRequest(inCpy) + req, _ := c.ListTestGridSessionActionsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil @@ -5207,7 +5643,7 @@ func (c *DeviceFarm) ListUniqueProblemsPagesWithContext(ctx aws.Context, input * } for p.Next() { - if !fn(p.Page().(*ListUniqueProblemsOutput), !p.HasNextPage()) { + if !fn(p.Page().(*ListTestGridSessionActionsOutput), !p.HasNextPage()) { break } } @@ -5215,137 +5651,135 @@ func (c *DeviceFarm) ListUniqueProblemsPagesWithContext(ctx aws.Context, input * return p.Err() } -const opListUploads = "ListUploads" +const opListTestGridSessionArtifacts = "ListTestGridSessionArtifacts" -// ListUploadsRequest generates a "aws/request.Request" representing the -// client's request for the ListUploads operation. The "output" return +// ListTestGridSessionArtifactsRequest generates a "aws/request.Request" representing the +// client's request for the ListTestGridSessionArtifacts operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ListUploads for more information on using the ListUploads +// See ListTestGridSessionArtifacts for more information on using the ListTestGridSessionArtifacts // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ListUploadsRequest method. -// req, resp := client.ListUploadsRequest(params) +// // Example sending a request using the ListTestGridSessionArtifactsRequest method. +// req, resp := client.ListTestGridSessionArtifactsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListUploads -func (c *DeviceFarm) ListUploadsRequest(input *ListUploadsInput) (req *request.Request, output *ListUploadsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListTestGridSessionArtifacts +func (c *DeviceFarm) ListTestGridSessionArtifactsRequest(input *ListTestGridSessionArtifactsInput) (req *request.Request, output *ListTestGridSessionArtifactsOutput) { op := &request.Operation{ - Name: opListUploads, + Name: opListTestGridSessionArtifacts, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"nextToken"}, OutputTokens: []string{"nextToken"}, - LimitToken: "", + LimitToken: "maxResult", TruncationToken: "", }, } if input == nil { - input = &ListUploadsInput{} + input = &ListTestGridSessionArtifactsInput{} } - output = &ListUploadsOutput{} + output = &ListTestGridSessionArtifactsOutput{} req = c.newRequest(op, input, output) return } -// ListUploads API operation for AWS Device Farm. +// ListTestGridSessionArtifacts API operation for AWS Device Farm. // -// Gets information about uploads, given an AWS Device Farm project ARN. +// Retrieves a list of artifacts created during the session. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Device Farm's -// API operation ListUploads for usage and error information. +// API operation ListTestGridSessionArtifacts for usage and error information. // // Returned Error Codes: -// * ErrCodeArgumentException "ArgumentException" -// An invalid argument was specified. -// // * ErrCodeNotFoundException "NotFoundException" // The specified entity was not found. // -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. // -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. +// * ErrCodeInternalServiceException "InternalServiceException" +// An internal exception was raised in the service. Contact aws-devicefarm-support@amazon.com +// (mailto:aws-devicefarm-support@amazon.com) if you see this error. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListUploads -func (c *DeviceFarm) ListUploads(input *ListUploadsInput) (*ListUploadsOutput, error) { - req, out := c.ListUploadsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListTestGridSessionArtifacts +func (c *DeviceFarm) ListTestGridSessionArtifacts(input *ListTestGridSessionArtifactsInput) (*ListTestGridSessionArtifactsOutput, error) { + req, out := c.ListTestGridSessionArtifactsRequest(input) return out, req.Send() } -// ListUploadsWithContext is the same as ListUploads with the addition of +// ListTestGridSessionArtifactsWithContext is the same as ListTestGridSessionArtifacts with the addition of // the ability to pass a context and additional request options. // -// See ListUploads for details on how to use this API operation. +// See ListTestGridSessionArtifacts for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) ListUploadsWithContext(ctx aws.Context, input *ListUploadsInput, opts ...request.Option) (*ListUploadsOutput, error) { - req, out := c.ListUploadsRequest(input) +func (c *DeviceFarm) ListTestGridSessionArtifactsWithContext(ctx aws.Context, input *ListTestGridSessionArtifactsInput, opts ...request.Option) (*ListTestGridSessionArtifactsOutput, error) { + req, out := c.ListTestGridSessionArtifactsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// ListUploadsPages iterates over the pages of a ListUploads operation, +// ListTestGridSessionArtifactsPages iterates over the pages of a ListTestGridSessionArtifacts operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // -// See ListUploads method for more information on how to use this operation. +// See ListTestGridSessionArtifacts method for more information on how to use this operation. // // Note: This operation can generate multiple requests to a service. // -// // Example iterating over at most 3 pages of a ListUploads operation. +// // Example iterating over at most 3 pages of a ListTestGridSessionArtifacts operation. // pageNum := 0 -// err := client.ListUploadsPages(params, -// func(page *devicefarm.ListUploadsOutput, lastPage bool) bool { +// err := client.ListTestGridSessionArtifactsPages(params, +// func(page *devicefarm.ListTestGridSessionArtifactsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) // -func (c *DeviceFarm) ListUploadsPages(input *ListUploadsInput, fn func(*ListUploadsOutput, bool) bool) error { - return c.ListUploadsPagesWithContext(aws.BackgroundContext(), input, fn) +func (c *DeviceFarm) ListTestGridSessionArtifactsPages(input *ListTestGridSessionArtifactsInput, fn func(*ListTestGridSessionArtifactsOutput, bool) bool) error { + return c.ListTestGridSessionArtifactsPagesWithContext(aws.BackgroundContext(), input, fn) } -// ListUploadsPagesWithContext same as ListUploadsPages except +// ListTestGridSessionArtifactsPagesWithContext same as ListTestGridSessionArtifactsPages except // it takes a Context and allows setting request options on the pages. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) ListUploadsPagesWithContext(ctx aws.Context, input *ListUploadsInput, fn func(*ListUploadsOutput, bool) bool, opts ...request.Option) error { +func (c *DeviceFarm) ListTestGridSessionArtifactsPagesWithContext(ctx aws.Context, input *ListTestGridSessionArtifactsInput, fn func(*ListTestGridSessionArtifactsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { - var inCpy *ListUploadsInput + var inCpy *ListTestGridSessionArtifactsInput if input != nil { tmp := *input inCpy = &tmp } - req, _ := c.ListUploadsRequest(inCpy) + req, _ := c.ListTestGridSessionArtifactsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil @@ -5353,7 +5787,7 @@ func (c *DeviceFarm) ListUploadsPagesWithContext(ctx aws.Context, input *ListUpl } for p.Next() { - if !fn(p.Page().(*ListUploadsOutput), !p.HasNextPage()) { + if !fn(p.Page().(*ListTestGridSessionArtifactsOutput), !p.HasNextPage()) { break } } @@ -5361,146 +5795,208 @@ func (c *DeviceFarm) ListUploadsPagesWithContext(ctx aws.Context, input *ListUpl return p.Err() } -const opListVPCEConfigurations = "ListVPCEConfigurations" +const opListTestGridSessions = "ListTestGridSessions" -// ListVPCEConfigurationsRequest generates a "aws/request.Request" representing the -// client's request for the ListVPCEConfigurations operation. The "output" return +// ListTestGridSessionsRequest generates a "aws/request.Request" representing the +// client's request for the ListTestGridSessions operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ListVPCEConfigurations for more information on using the ListVPCEConfigurations +// See ListTestGridSessions for more information on using the ListTestGridSessions // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ListVPCEConfigurationsRequest method. -// req, resp := client.ListVPCEConfigurationsRequest(params) +// // Example sending a request using the ListTestGridSessionsRequest method. +// req, resp := client.ListTestGridSessionsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListVPCEConfigurations -func (c *DeviceFarm) ListVPCEConfigurationsRequest(input *ListVPCEConfigurationsInput) (req *request.Request, output *ListVPCEConfigurationsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListTestGridSessions +func (c *DeviceFarm) ListTestGridSessionsRequest(input *ListTestGridSessionsInput) (req *request.Request, output *ListTestGridSessionsOutput) { op := &request.Operation{ - Name: opListVPCEConfigurations, + Name: opListTestGridSessions, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResult", + TruncationToken: "", + }, } if input == nil { - input = &ListVPCEConfigurationsInput{} + input = &ListTestGridSessionsInput{} } - output = &ListVPCEConfigurationsOutput{} + output = &ListTestGridSessionsOutput{} req = c.newRequest(op, input, output) return } -// ListVPCEConfigurations API operation for AWS Device Farm. +// ListTestGridSessions API operation for AWS Device Farm. // -// Returns information about all Amazon Virtual Private Cloud (VPC) endpoint -// configurations in the AWS account. +// Retrieves a list of sessions for a TestGridProject. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Device Farm's -// API operation ListVPCEConfigurations for usage and error information. +// API operation ListTestGridSessions for usage and error information. // // Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// // * ErrCodeArgumentException "ArgumentException" // An invalid argument was specified. // -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. +// * ErrCodeInternalServiceException "InternalServiceException" +// An internal exception was raised in the service. Contact aws-devicefarm-support@amazon.com +// (mailto:aws-devicefarm-support@amazon.com) if you see this error. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListVPCEConfigurations -func (c *DeviceFarm) ListVPCEConfigurations(input *ListVPCEConfigurationsInput) (*ListVPCEConfigurationsOutput, error) { - req, out := c.ListVPCEConfigurationsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListTestGridSessions +func (c *DeviceFarm) ListTestGridSessions(input *ListTestGridSessionsInput) (*ListTestGridSessionsOutput, error) { + req, out := c.ListTestGridSessionsRequest(input) return out, req.Send() } -// ListVPCEConfigurationsWithContext is the same as ListVPCEConfigurations with the addition of +// ListTestGridSessionsWithContext is the same as ListTestGridSessions with the addition of // the ability to pass a context and additional request options. // -// See ListVPCEConfigurations for details on how to use this API operation. +// See ListTestGridSessions for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) ListVPCEConfigurationsWithContext(ctx aws.Context, input *ListVPCEConfigurationsInput, opts ...request.Option) (*ListVPCEConfigurationsOutput, error) { - req, out := c.ListVPCEConfigurationsRequest(input) +func (c *DeviceFarm) ListTestGridSessionsWithContext(ctx aws.Context, input *ListTestGridSessionsInput, opts ...request.Option) (*ListTestGridSessionsOutput, error) { + req, out := c.ListTestGridSessionsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPurchaseOffering = "PurchaseOffering" +// ListTestGridSessionsPages iterates over the pages of a ListTestGridSessions operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListTestGridSessions method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListTestGridSessions operation. +// pageNum := 0 +// err := client.ListTestGridSessionsPages(params, +// func(page *devicefarm.ListTestGridSessionsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *DeviceFarm) ListTestGridSessionsPages(input *ListTestGridSessionsInput, fn func(*ListTestGridSessionsOutput, bool) bool) error { + return c.ListTestGridSessionsPagesWithContext(aws.BackgroundContext(), input, fn) +} -// PurchaseOfferingRequest generates a "aws/request.Request" representing the -// client's request for the PurchaseOffering operation. The "output" return +// ListTestGridSessionsPagesWithContext same as ListTestGridSessionsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) ListTestGridSessionsPagesWithContext(ctx aws.Context, input *ListTestGridSessionsInput, fn func(*ListTestGridSessionsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListTestGridSessionsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListTestGridSessionsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListTestGridSessionsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opListTests = "ListTests" + +// ListTestsRequest generates a "aws/request.Request" representing the +// client's request for the ListTests operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See PurchaseOffering for more information on using the PurchaseOffering +// See ListTests for more information on using the ListTests // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the PurchaseOfferingRequest method. -// req, resp := client.PurchaseOfferingRequest(params) +// // Example sending a request using the ListTestsRequest method. +// req, resp := client.ListTestsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/PurchaseOffering -func (c *DeviceFarm) PurchaseOfferingRequest(input *PurchaseOfferingInput) (req *request.Request, output *PurchaseOfferingOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListTests +func (c *DeviceFarm) ListTestsRequest(input *ListTestsInput) (req *request.Request, output *ListTestsOutput) { op := &request.Operation{ - Name: opPurchaseOffering, + Name: opListTests, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "", + TruncationToken: "", + }, } if input == nil { - input = &PurchaseOfferingInput{} + input = &ListTestsInput{} } - output = &PurchaseOfferingOutput{} + output = &ListTestsOutput{} req = c.newRequest(op, input, output) return } -// PurchaseOffering API operation for AWS Device Farm. +// ListTests API operation for AWS Device Farm. // -// Immediately purchases offerings for an AWS account. Offerings renew with -// the latest total purchased quantity for an offering, unless the renewal was -// overridden. The API returns a NotEligible error if the user is not permitted -// to invoke the operation. Please contact aws-devicefarm-support@amazon.com -// (mailto:aws-devicefarm-support@amazon.com) if you believe that you should -// be able to invoke this operation. +// Gets information about tests in a given test suite. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Device Farm's -// API operation PurchaseOffering for usage and error information. +// API operation ListTests for usage and error information. // // Returned Error Codes: // * ErrCodeArgumentException "ArgumentException" @@ -5509,94 +6005,149 @@ func (c *DeviceFarm) PurchaseOfferingRequest(input *PurchaseOfferingInput) (req // * ErrCodeNotFoundException "NotFoundException" // The specified entity was not found. // -// * ErrCodeNotEligibleException "NotEligibleException" -// Exception gets thrown when a user is not eligible to perform the specified -// transaction. -// // * ErrCodeLimitExceededException "LimitExceededException" // A limit was exceeded. // // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/PurchaseOffering -func (c *DeviceFarm) PurchaseOffering(input *PurchaseOfferingInput) (*PurchaseOfferingOutput, error) { - req, out := c.PurchaseOfferingRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListTests +func (c *DeviceFarm) ListTests(input *ListTestsInput) (*ListTestsOutput, error) { + req, out := c.ListTestsRequest(input) return out, req.Send() } -// PurchaseOfferingWithContext is the same as PurchaseOffering with the addition of +// ListTestsWithContext is the same as ListTests with the addition of // the ability to pass a context and additional request options. // -// See PurchaseOffering for details on how to use this API operation. +// See ListTests for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) PurchaseOfferingWithContext(ctx aws.Context, input *PurchaseOfferingInput, opts ...request.Option) (*PurchaseOfferingOutput, error) { - req, out := c.PurchaseOfferingRequest(input) +func (c *DeviceFarm) ListTestsWithContext(ctx aws.Context, input *ListTestsInput, opts ...request.Option) (*ListTestsOutput, error) { + req, out := c.ListTestsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opRenewOffering = "RenewOffering" +// ListTestsPages iterates over the pages of a ListTests operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListTests method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListTests operation. +// pageNum := 0 +// err := client.ListTestsPages(params, +// func(page *devicefarm.ListTestsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *DeviceFarm) ListTestsPages(input *ListTestsInput, fn func(*ListTestsOutput, bool) bool) error { + return c.ListTestsPagesWithContext(aws.BackgroundContext(), input, fn) +} -// RenewOfferingRequest generates a "aws/request.Request" representing the -// client's request for the RenewOffering operation. The "output" return +// ListTestsPagesWithContext same as ListTestsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) ListTestsPagesWithContext(ctx aws.Context, input *ListTestsInput, fn func(*ListTestsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListTestsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListTestsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListTestsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opListUniqueProblems = "ListUniqueProblems" + +// ListUniqueProblemsRequest generates a "aws/request.Request" representing the +// client's request for the ListUniqueProblems operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See RenewOffering for more information on using the RenewOffering +// See ListUniqueProblems for more information on using the ListUniqueProblems // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the RenewOfferingRequest method. -// req, resp := client.RenewOfferingRequest(params) +// // Example sending a request using the ListUniqueProblemsRequest method. +// req, resp := client.ListUniqueProblemsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/RenewOffering -func (c *DeviceFarm) RenewOfferingRequest(input *RenewOfferingInput) (req *request.Request, output *RenewOfferingOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListUniqueProblems +func (c *DeviceFarm) ListUniqueProblemsRequest(input *ListUniqueProblemsInput) (req *request.Request, output *ListUniqueProblemsOutput) { op := &request.Operation{ - Name: opRenewOffering, + Name: opListUniqueProblems, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "", + TruncationToken: "", + }, } if input == nil { - input = &RenewOfferingInput{} + input = &ListUniqueProblemsInput{} } - output = &RenewOfferingOutput{} + output = &ListUniqueProblemsOutput{} req = c.newRequest(op, input, output) return } -// RenewOffering API operation for AWS Device Farm. +// ListUniqueProblems API operation for AWS Device Farm. // -// Explicitly sets the quantity of devices to renew for an offering, starting -// from the effectiveDate of the next period. The API returns a NotEligible -// error if the user is not permitted to invoke the operation. Please contact -// aws-devicefarm-support@amazon.com (mailto:aws-devicefarm-support@amazon.com) -// if you believe that you should be able to invoke this operation. +// Gets information about unique problems, such as exceptions or crashes. +// +// Unique problems are defined as a single instance of an error across a run, +// job, or suite. For example, if a call in your application consistently raises +// an exception (OutOfBoundsException in MyActivity.java:386), ListUniqueProblems +// returns a single entry instead of many individual entries for that exception. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Device Farm's -// API operation RenewOffering for usage and error information. +// API operation ListUniqueProblems for usage and error information. // // Returned Error Codes: // * ErrCodeArgumentException "ArgumentException" @@ -5605,90 +6156,144 @@ func (c *DeviceFarm) RenewOfferingRequest(input *RenewOfferingInput) (req *reque // * ErrCodeNotFoundException "NotFoundException" // The specified entity was not found. // -// * ErrCodeNotEligibleException "NotEligibleException" -// Exception gets thrown when a user is not eligible to perform the specified -// transaction. -// // * ErrCodeLimitExceededException "LimitExceededException" // A limit was exceeded. // // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/RenewOffering -func (c *DeviceFarm) RenewOffering(input *RenewOfferingInput) (*RenewOfferingOutput, error) { - req, out := c.RenewOfferingRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListUniqueProblems +func (c *DeviceFarm) ListUniqueProblems(input *ListUniqueProblemsInput) (*ListUniqueProblemsOutput, error) { + req, out := c.ListUniqueProblemsRequest(input) return out, req.Send() } -// RenewOfferingWithContext is the same as RenewOffering with the addition of +// ListUniqueProblemsWithContext is the same as ListUniqueProblems with the addition of // the ability to pass a context and additional request options. // -// See RenewOffering for details on how to use this API operation. +// See ListUniqueProblems for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) RenewOfferingWithContext(ctx aws.Context, input *RenewOfferingInput, opts ...request.Option) (*RenewOfferingOutput, error) { - req, out := c.RenewOfferingRequest(input) +func (c *DeviceFarm) ListUniqueProblemsWithContext(ctx aws.Context, input *ListUniqueProblemsInput, opts ...request.Option) (*ListUniqueProblemsOutput, error) { + req, out := c.ListUniqueProblemsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opScheduleRun = "ScheduleRun" +// ListUniqueProblemsPages iterates over the pages of a ListUniqueProblems operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListUniqueProblems method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListUniqueProblems operation. +// pageNum := 0 +// err := client.ListUniqueProblemsPages(params, +// func(page *devicefarm.ListUniqueProblemsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *DeviceFarm) ListUniqueProblemsPages(input *ListUniqueProblemsInput, fn func(*ListUniqueProblemsOutput, bool) bool) error { + return c.ListUniqueProblemsPagesWithContext(aws.BackgroundContext(), input, fn) +} -// ScheduleRunRequest generates a "aws/request.Request" representing the -// client's request for the ScheduleRun operation. The "output" return +// ListUniqueProblemsPagesWithContext same as ListUniqueProblemsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) ListUniqueProblemsPagesWithContext(ctx aws.Context, input *ListUniqueProblemsInput, fn func(*ListUniqueProblemsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListUniqueProblemsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListUniqueProblemsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListUniqueProblemsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opListUploads = "ListUploads" + +// ListUploadsRequest generates a "aws/request.Request" representing the +// client's request for the ListUploads operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ScheduleRun for more information on using the ScheduleRun +// See ListUploads for more information on using the ListUploads // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ScheduleRunRequest method. -// req, resp := client.ScheduleRunRequest(params) +// // Example sending a request using the ListUploadsRequest method. +// req, resp := client.ListUploadsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ScheduleRun -func (c *DeviceFarm) ScheduleRunRequest(input *ScheduleRunInput) (req *request.Request, output *ScheduleRunOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListUploads +func (c *DeviceFarm) ListUploadsRequest(input *ListUploadsInput) (req *request.Request, output *ListUploadsOutput) { op := &request.Operation{ - Name: opScheduleRun, + Name: opListUploads, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "", + TruncationToken: "", + }, } if input == nil { - input = &ScheduleRunInput{} + input = &ListUploadsInput{} } - output = &ScheduleRunOutput{} + output = &ListUploadsOutput{} req = c.newRequest(op, input, output) return } -// ScheduleRun API operation for AWS Device Farm. +// ListUploads API operation for AWS Device Farm. // -// Schedules a run. +// Gets information about uploads, given an AWS Device Farm project ARN. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Device Farm's -// API operation ScheduleRun for usage and error information. +// API operation ListUploads for usage and error information. // // Returned Error Codes: // * ErrCodeArgumentException "ArgumentException" @@ -5700,179 +6305,222 @@ func (c *DeviceFarm) ScheduleRunRequest(input *ScheduleRunInput) (req *request.R // * ErrCodeLimitExceededException "LimitExceededException" // A limit was exceeded. // -// * ErrCodeIdempotencyException "IdempotencyException" -// An entity with the same name already exists. -// // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ScheduleRun -func (c *DeviceFarm) ScheduleRun(input *ScheduleRunInput) (*ScheduleRunOutput, error) { - req, out := c.ScheduleRunRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListUploads +func (c *DeviceFarm) ListUploads(input *ListUploadsInput) (*ListUploadsOutput, error) { + req, out := c.ListUploadsRequest(input) return out, req.Send() } -// ScheduleRunWithContext is the same as ScheduleRun with the addition of +// ListUploadsWithContext is the same as ListUploads with the addition of // the ability to pass a context and additional request options. // -// See ScheduleRun for details on how to use this API operation. +// See ListUploads for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) ScheduleRunWithContext(ctx aws.Context, input *ScheduleRunInput, opts ...request.Option) (*ScheduleRunOutput, error) { - req, out := c.ScheduleRunRequest(input) +func (c *DeviceFarm) ListUploadsWithContext(ctx aws.Context, input *ListUploadsInput, opts ...request.Option) (*ListUploadsOutput, error) { + req, out := c.ListUploadsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opStopJob = "StopJob" +// ListUploadsPages iterates over the pages of a ListUploads operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListUploads method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListUploads operation. +// pageNum := 0 +// err := client.ListUploadsPages(params, +// func(page *devicefarm.ListUploadsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *DeviceFarm) ListUploadsPages(input *ListUploadsInput, fn func(*ListUploadsOutput, bool) bool) error { + return c.ListUploadsPagesWithContext(aws.BackgroundContext(), input, fn) +} -// StopJobRequest generates a "aws/request.Request" representing the -// client's request for the StopJob operation. The "output" return +// ListUploadsPagesWithContext same as ListUploadsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) ListUploadsPagesWithContext(ctx aws.Context, input *ListUploadsInput, fn func(*ListUploadsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListUploadsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListUploadsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListUploadsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opListVPCEConfigurations = "ListVPCEConfigurations" + +// ListVPCEConfigurationsRequest generates a "aws/request.Request" representing the +// client's request for the ListVPCEConfigurations operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See StopJob for more information on using the StopJob +// See ListVPCEConfigurations for more information on using the ListVPCEConfigurations // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the StopJobRequest method. -// req, resp := client.StopJobRequest(params) +// // Example sending a request using the ListVPCEConfigurationsRequest method. +// req, resp := client.ListVPCEConfigurationsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopJob -func (c *DeviceFarm) StopJobRequest(input *StopJobInput) (req *request.Request, output *StopJobOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListVPCEConfigurations +func (c *DeviceFarm) ListVPCEConfigurationsRequest(input *ListVPCEConfigurationsInput) (req *request.Request, output *ListVPCEConfigurationsOutput) { op := &request.Operation{ - Name: opStopJob, + Name: opListVPCEConfigurations, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &StopJobInput{} + input = &ListVPCEConfigurationsInput{} } - output = &StopJobOutput{} + output = &ListVPCEConfigurationsOutput{} req = c.newRequest(op, input, output) return } -// StopJob API operation for AWS Device Farm. +// ListVPCEConfigurations API operation for AWS Device Farm. // -// Initiates a stop request for the current job. AWS Device Farm will immediately -// stop the job on the device where tests have not started executing, and you -// will not be billed for this device. On the device where tests have started -// executing, Setup Suite and Teardown Suite tests will run to completion before -// stopping execution on the device. You will be billed for Setup, Teardown, -// and any tests that were in progress or already completed. +// Returns information about all Amazon Virtual Private Cloud (VPC) endpoint +// configurations in the AWS account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Device Farm's -// API operation StopJob for usage and error information. +// API operation ListVPCEConfigurations for usage and error information. // // Returned Error Codes: // * ErrCodeArgumentException "ArgumentException" // An invalid argument was specified. // -// * ErrCodeNotFoundException "NotFoundException" -// The specified entity was not found. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopJob -func (c *DeviceFarm) StopJob(input *StopJobInput) (*StopJobOutput, error) { - req, out := c.StopJobRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListVPCEConfigurations +func (c *DeviceFarm) ListVPCEConfigurations(input *ListVPCEConfigurationsInput) (*ListVPCEConfigurationsOutput, error) { + req, out := c.ListVPCEConfigurationsRequest(input) return out, req.Send() } -// StopJobWithContext is the same as StopJob with the addition of +// ListVPCEConfigurationsWithContext is the same as ListVPCEConfigurations with the addition of // the ability to pass a context and additional request options. // -// See StopJob for details on how to use this API operation. +// See ListVPCEConfigurations for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) StopJobWithContext(ctx aws.Context, input *StopJobInput, opts ...request.Option) (*StopJobOutput, error) { - req, out := c.StopJobRequest(input) +func (c *DeviceFarm) ListVPCEConfigurationsWithContext(ctx aws.Context, input *ListVPCEConfigurationsInput, opts ...request.Option) (*ListVPCEConfigurationsOutput, error) { + req, out := c.ListVPCEConfigurationsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opStopRemoteAccessSession = "StopRemoteAccessSession" +const opPurchaseOffering = "PurchaseOffering" -// StopRemoteAccessSessionRequest generates a "aws/request.Request" representing the -// client's request for the StopRemoteAccessSession operation. The "output" return +// PurchaseOfferingRequest generates a "aws/request.Request" representing the +// client's request for the PurchaseOffering operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See StopRemoteAccessSession for more information on using the StopRemoteAccessSession +// See PurchaseOffering for more information on using the PurchaseOffering // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the StopRemoteAccessSessionRequest method. -// req, resp := client.StopRemoteAccessSessionRequest(params) +// // Example sending a request using the PurchaseOfferingRequest method. +// req, resp := client.PurchaseOfferingRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRemoteAccessSession -func (c *DeviceFarm) StopRemoteAccessSessionRequest(input *StopRemoteAccessSessionInput) (req *request.Request, output *StopRemoteAccessSessionOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/PurchaseOffering +func (c *DeviceFarm) PurchaseOfferingRequest(input *PurchaseOfferingInput) (req *request.Request, output *PurchaseOfferingOutput) { op := &request.Operation{ - Name: opStopRemoteAccessSession, + Name: opPurchaseOffering, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &StopRemoteAccessSessionInput{} + input = &PurchaseOfferingInput{} } - output = &StopRemoteAccessSessionOutput{} + output = &PurchaseOfferingOutput{} req = c.newRequest(op, input, output) return } -// StopRemoteAccessSession API operation for AWS Device Farm. +// PurchaseOffering API operation for AWS Device Farm. // -// Ends a specified remote access session. +// Immediately purchases offerings for an AWS account. Offerings renew with +// the latest total purchased quantity for an offering, unless the renewal was +// overridden. The API returns a NotEligible error if the user is not permitted +// to invoke the operation. If you must be able to invoke this operation, contact +// aws-devicefarm-support@amazon.com (mailto:aws-devicefarm-support@amazon.com). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Device Farm's -// API operation StopRemoteAccessSession for usage and error information. +// API operation PurchaseOffering for usage and error information. // // Returned Error Codes: // * ErrCodeArgumentException "ArgumentException" @@ -5881,91 +6529,94 @@ func (c *DeviceFarm) StopRemoteAccessSessionRequest(input *StopRemoteAccessSessi // * ErrCodeNotFoundException "NotFoundException" // The specified entity was not found. // +// * ErrCodeNotEligibleException "NotEligibleException" +// Exception gets thrown when a user is not eligible to perform the specified +// transaction. +// // * ErrCodeLimitExceededException "LimitExceededException" // A limit was exceeded. // // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRemoteAccessSession -func (c *DeviceFarm) StopRemoteAccessSession(input *StopRemoteAccessSessionInput) (*StopRemoteAccessSessionOutput, error) { - req, out := c.StopRemoteAccessSessionRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/PurchaseOffering +func (c *DeviceFarm) PurchaseOffering(input *PurchaseOfferingInput) (*PurchaseOfferingOutput, error) { + req, out := c.PurchaseOfferingRequest(input) return out, req.Send() } -// StopRemoteAccessSessionWithContext is the same as StopRemoteAccessSession with the addition of +// PurchaseOfferingWithContext is the same as PurchaseOffering with the addition of // the ability to pass a context and additional request options. // -// See StopRemoteAccessSession for details on how to use this API operation. +// See PurchaseOffering for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) StopRemoteAccessSessionWithContext(ctx aws.Context, input *StopRemoteAccessSessionInput, opts ...request.Option) (*StopRemoteAccessSessionOutput, error) { - req, out := c.StopRemoteAccessSessionRequest(input) +func (c *DeviceFarm) PurchaseOfferingWithContext(ctx aws.Context, input *PurchaseOfferingInput, opts ...request.Option) (*PurchaseOfferingOutput, error) { + req, out := c.PurchaseOfferingRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opStopRun = "StopRun" +const opRenewOffering = "RenewOffering" -// StopRunRequest generates a "aws/request.Request" representing the -// client's request for the StopRun operation. The "output" return +// RenewOfferingRequest generates a "aws/request.Request" representing the +// client's request for the RenewOffering operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See StopRun for more information on using the StopRun +// See RenewOffering for more information on using the RenewOffering // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the StopRunRequest method. -// req, resp := client.StopRunRequest(params) +// // Example sending a request using the RenewOfferingRequest method. +// req, resp := client.RenewOfferingRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRun -func (c *DeviceFarm) StopRunRequest(input *StopRunInput) (req *request.Request, output *StopRunOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/RenewOffering +func (c *DeviceFarm) RenewOfferingRequest(input *RenewOfferingInput) (req *request.Request, output *RenewOfferingOutput) { op := &request.Operation{ - Name: opStopRun, + Name: opRenewOffering, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &StopRunInput{} + input = &RenewOfferingInput{} } - output = &StopRunOutput{} + output = &RenewOfferingOutput{} req = c.newRequest(op, input, output) return } -// StopRun API operation for AWS Device Farm. +// RenewOffering API operation for AWS Device Farm. // -// Initiates a stop request for the current test run. AWS Device Farm will immediately -// stop the run on devices where tests have not started executing, and you will -// not be billed for these devices. On devices where tests have started executing, -// Setup Suite and Teardown Suite tests will run to completion before stopping -// execution on those devices. You will be billed for Setup, Teardown, and any -// tests that were in progress or already completed. +// Explicitly sets the quantity of devices to renew for an offering, starting +// from the effectiveDate of the next period. The API returns a NotEligible +// error if the user is not permitted to invoke the operation. If you must be +// able to invoke this operation, contact aws-devicefarm-support@amazon.com +// (mailto:aws-devicefarm-support@amazon.com). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Device Farm's -// API operation StopRun for usage and error information. +// API operation RenewOffering for usage and error information. // // Returned Error Codes: // * ErrCodeArgumentException "ArgumentException" @@ -5974,263 +6625,273 @@ func (c *DeviceFarm) StopRunRequest(input *StopRunInput) (req *request.Request, // * ErrCodeNotFoundException "NotFoundException" // The specified entity was not found. // +// * ErrCodeNotEligibleException "NotEligibleException" +// Exception gets thrown when a user is not eligible to perform the specified +// transaction. +// // * ErrCodeLimitExceededException "LimitExceededException" // A limit was exceeded. // // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRun -func (c *DeviceFarm) StopRun(input *StopRunInput) (*StopRunOutput, error) { - req, out := c.StopRunRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/RenewOffering +func (c *DeviceFarm) RenewOffering(input *RenewOfferingInput) (*RenewOfferingOutput, error) { + req, out := c.RenewOfferingRequest(input) return out, req.Send() } -// StopRunWithContext is the same as StopRun with the addition of +// RenewOfferingWithContext is the same as RenewOffering with the addition of // the ability to pass a context and additional request options. // -// See StopRun for details on how to use this API operation. +// See RenewOffering for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) StopRunWithContext(ctx aws.Context, input *StopRunInput, opts ...request.Option) (*StopRunOutput, error) { - req, out := c.StopRunRequest(input) +func (c *DeviceFarm) RenewOfferingWithContext(ctx aws.Context, input *RenewOfferingInput, opts ...request.Option) (*RenewOfferingOutput, error) { + req, out := c.RenewOfferingRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opTagResource = "TagResource" +const opScheduleRun = "ScheduleRun" -// TagResourceRequest generates a "aws/request.Request" representing the -// client's request for the TagResource operation. The "output" return +// ScheduleRunRequest generates a "aws/request.Request" representing the +// client's request for the ScheduleRun operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See TagResource for more information on using the TagResource +// See ScheduleRun for more information on using the ScheduleRun // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the TagResourceRequest method. -// req, resp := client.TagResourceRequest(params) +// // Example sending a request using the ScheduleRunRequest method. +// req, resp := client.ScheduleRunRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/TagResource -func (c *DeviceFarm) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ScheduleRun +func (c *DeviceFarm) ScheduleRunRequest(input *ScheduleRunInput) (req *request.Request, output *ScheduleRunOutput) { op := &request.Operation{ - Name: opTagResource, + Name: opScheduleRun, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &TagResourceInput{} + input = &ScheduleRunInput{} } - output = &TagResourceOutput{} + output = &ScheduleRunOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// TagResource API operation for AWS Device Farm. +// ScheduleRun API operation for AWS Device Farm. // -// Associates the specified tags to a resource with the specified resourceArn. -// If existing tags on a resource are not specified in the request parameters, -// they are not changed. When a resource is deleted, the tags associated with -// that resource are deleted as well. +// Schedules a run. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Device Farm's -// API operation TagResource for usage and error information. +// API operation ScheduleRun for usage and error information. // // Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// // * ErrCodeNotFoundException "NotFoundException" // The specified entity was not found. // -// * ErrCodeTagOperationException "TagOperationException" -// The operation was not successful. Try again. +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. // -// * ErrCodeTooManyTagsException "TooManyTagsException" -// The list of tags on the repository is over the limit. The maximum number -// of tags that can be applied to a repository is 50. +// * ErrCodeIdempotencyException "IdempotencyException" +// An entity with the same name already exists. // -// * ErrCodeTagPolicyException "TagPolicyException" -// The request doesn't comply with the AWS Identity and Access Management (IAM) -// tag policy. Correct your request and then retry it. +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/TagResource -func (c *DeviceFarm) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { - req, out := c.TagResourceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ScheduleRun +func (c *DeviceFarm) ScheduleRun(input *ScheduleRunInput) (*ScheduleRunOutput, error) { + req, out := c.ScheduleRunRequest(input) return out, req.Send() } -// TagResourceWithContext is the same as TagResource with the addition of +// ScheduleRunWithContext is the same as ScheduleRun with the addition of // the ability to pass a context and additional request options. // -// See TagResource for details on how to use this API operation. +// See ScheduleRun for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { - req, out := c.TagResourceRequest(input) +func (c *DeviceFarm) ScheduleRunWithContext(ctx aws.Context, input *ScheduleRunInput, opts ...request.Option) (*ScheduleRunOutput, error) { + req, out := c.ScheduleRunRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUntagResource = "UntagResource" +const opStopJob = "StopJob" -// UntagResourceRequest generates a "aws/request.Request" representing the -// client's request for the UntagResource operation. The "output" return +// StopJobRequest generates a "aws/request.Request" representing the +// client's request for the StopJob operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UntagResource for more information on using the UntagResource +// See StopJob for more information on using the StopJob // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the UntagResourceRequest method. -// req, resp := client.UntagResourceRequest(params) +// // Example sending a request using the StopJobRequest method. +// req, resp := client.StopJobRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UntagResource -func (c *DeviceFarm) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopJob +func (c *DeviceFarm) StopJobRequest(input *StopJobInput) (req *request.Request, output *StopJobOutput) { op := &request.Operation{ - Name: opUntagResource, + Name: opStopJob, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &UntagResourceInput{} + input = &StopJobInput{} } - output = &UntagResourceOutput{} + output = &StopJobOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// UntagResource API operation for AWS Device Farm. +// StopJob API operation for AWS Device Farm. // -// Deletes the specified tags from a resource. +// Initiates a stop request for the current job. AWS Device Farm immediately +// stops the job on the device where tests have not started. You are not billed +// for this device. On the device where tests have started, setup suite and +// teardown suite tests run to completion on the device. You are billed for +// setup, teardown, and any tests that were in progress or already completed. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Device Farm's -// API operation UntagResource for usage and error information. +// API operation StopJob for usage and error information. // // Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// // * ErrCodeNotFoundException "NotFoundException" // The specified entity was not found. // -// * ErrCodeTagOperationException "TagOperationException" -// The operation was not successful. Try again. +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UntagResource -func (c *DeviceFarm) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { - req, out := c.UntagResourceRequest(input) +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopJob +func (c *DeviceFarm) StopJob(input *StopJobInput) (*StopJobOutput, error) { + req, out := c.StopJobRequest(input) return out, req.Send() } -// UntagResourceWithContext is the same as UntagResource with the addition of +// StopJobWithContext is the same as StopJob with the addition of // the ability to pass a context and additional request options. // -// See UntagResource for details on how to use this API operation. +// See StopJob for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { - req, out := c.UntagResourceRequest(input) +func (c *DeviceFarm) StopJobWithContext(ctx aws.Context, input *StopJobInput, opts ...request.Option) (*StopJobOutput, error) { + req, out := c.StopJobRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUpdateDeviceInstance = "UpdateDeviceInstance" +const opStopRemoteAccessSession = "StopRemoteAccessSession" -// UpdateDeviceInstanceRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDeviceInstance operation. The "output" return +// StopRemoteAccessSessionRequest generates a "aws/request.Request" representing the +// client's request for the StopRemoteAccessSession operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UpdateDeviceInstance for more information on using the UpdateDeviceInstance +// See StopRemoteAccessSession for more information on using the StopRemoteAccessSession // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the UpdateDeviceInstanceRequest method. -// req, resp := client.UpdateDeviceInstanceRequest(params) +// // Example sending a request using the StopRemoteAccessSessionRequest method. +// req, resp := client.StopRemoteAccessSessionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateDeviceInstance -func (c *DeviceFarm) UpdateDeviceInstanceRequest(input *UpdateDeviceInstanceInput) (req *request.Request, output *UpdateDeviceInstanceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRemoteAccessSession +func (c *DeviceFarm) StopRemoteAccessSessionRequest(input *StopRemoteAccessSessionInput) (req *request.Request, output *StopRemoteAccessSessionOutput) { op := &request.Operation{ - Name: opUpdateDeviceInstance, + Name: opStopRemoteAccessSession, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &UpdateDeviceInstanceInput{} + input = &StopRemoteAccessSessionInput{} } - output = &UpdateDeviceInstanceOutput{} + output = &StopRemoteAccessSessionOutput{} req = c.newRequest(op, input, output) return } -// UpdateDeviceInstance API operation for AWS Device Farm. +// StopRemoteAccessSession API operation for AWS Device Farm. // -// Updates information about an existing private device instance. +// Ends a specified remote access session. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Device Farm's -// API operation UpdateDeviceInstance for usage and error information. +// API operation StopRemoteAccessSession for usage and error information. // // Returned Error Codes: // * ErrCodeArgumentException "ArgumentException" @@ -6245,82 +6906,84 @@ func (c *DeviceFarm) UpdateDeviceInstanceRequest(input *UpdateDeviceInstanceInpu // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateDeviceInstance -func (c *DeviceFarm) UpdateDeviceInstance(input *UpdateDeviceInstanceInput) (*UpdateDeviceInstanceOutput, error) { - req, out := c.UpdateDeviceInstanceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRemoteAccessSession +func (c *DeviceFarm) StopRemoteAccessSession(input *StopRemoteAccessSessionInput) (*StopRemoteAccessSessionOutput, error) { + req, out := c.StopRemoteAccessSessionRequest(input) return out, req.Send() } -// UpdateDeviceInstanceWithContext is the same as UpdateDeviceInstance with the addition of +// StopRemoteAccessSessionWithContext is the same as StopRemoteAccessSession with the addition of // the ability to pass a context and additional request options. // -// See UpdateDeviceInstance for details on how to use this API operation. +// See StopRemoteAccessSession for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) UpdateDeviceInstanceWithContext(ctx aws.Context, input *UpdateDeviceInstanceInput, opts ...request.Option) (*UpdateDeviceInstanceOutput, error) { - req, out := c.UpdateDeviceInstanceRequest(input) +func (c *DeviceFarm) StopRemoteAccessSessionWithContext(ctx aws.Context, input *StopRemoteAccessSessionInput, opts ...request.Option) (*StopRemoteAccessSessionOutput, error) { + req, out := c.StopRemoteAccessSessionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUpdateDevicePool = "UpdateDevicePool" +const opStopRun = "StopRun" -// UpdateDevicePoolRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDevicePool operation. The "output" return +// StopRunRequest generates a "aws/request.Request" representing the +// client's request for the StopRun operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UpdateDevicePool for more information on using the UpdateDevicePool +// See StopRun for more information on using the StopRun // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the UpdateDevicePoolRequest method. -// req, resp := client.UpdateDevicePoolRequest(params) +// // Example sending a request using the StopRunRequest method. +// req, resp := client.StopRunRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateDevicePool -func (c *DeviceFarm) UpdateDevicePoolRequest(input *UpdateDevicePoolInput) (req *request.Request, output *UpdateDevicePoolOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRun +func (c *DeviceFarm) StopRunRequest(input *StopRunInput) (req *request.Request, output *StopRunOutput) { op := &request.Operation{ - Name: opUpdateDevicePool, + Name: opStopRun, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &UpdateDevicePoolInput{} + input = &StopRunInput{} } - output = &UpdateDevicePoolOutput{} + output = &StopRunOutput{} req = c.newRequest(op, input, output) return } -// UpdateDevicePool API operation for AWS Device Farm. +// StopRun API operation for AWS Device Farm. // -// Modifies the name, description, and rules in a device pool given the attributes -// and the pool ARN. Rule updates are all-or-nothing, meaning they can only -// be updated as a whole (or not at all). +// Initiates a stop request for the current test run. AWS Device Farm immediately +// stops the run on devices where tests have not started. You are not billed +// for these devices. On devices where tests have started executing, setup suite +// and teardown suite tests run to completion on those devices. You are billed +// for setup, teardown, and any tests that were in progress or already completed. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Device Farm's -// API operation UpdateDevicePool for usage and error information. +// API operation StopRun for usage and error information. // // Returned Error Codes: // * ErrCodeArgumentException "ArgumentException" @@ -6335,80 +6998,84 @@ func (c *DeviceFarm) UpdateDevicePoolRequest(input *UpdateDevicePoolInput) (req // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateDevicePool -func (c *DeviceFarm) UpdateDevicePool(input *UpdateDevicePoolInput) (*UpdateDevicePoolOutput, error) { - req, out := c.UpdateDevicePoolRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRun +func (c *DeviceFarm) StopRun(input *StopRunInput) (*StopRunOutput, error) { + req, out := c.StopRunRequest(input) return out, req.Send() } -// UpdateDevicePoolWithContext is the same as UpdateDevicePool with the addition of +// StopRunWithContext is the same as StopRun with the addition of // the ability to pass a context and additional request options. // -// See UpdateDevicePool for details on how to use this API operation. +// See StopRun for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) UpdateDevicePoolWithContext(ctx aws.Context, input *UpdateDevicePoolInput, opts ...request.Option) (*UpdateDevicePoolOutput, error) { - req, out := c.UpdateDevicePoolRequest(input) +func (c *DeviceFarm) StopRunWithContext(ctx aws.Context, input *StopRunInput, opts ...request.Option) (*StopRunOutput, error) { + req, out := c.StopRunRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUpdateInstanceProfile = "UpdateInstanceProfile" +const opTagResource = "TagResource" -// UpdateInstanceProfileRequest generates a "aws/request.Request" representing the -// client's request for the UpdateInstanceProfile operation. The "output" return +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UpdateInstanceProfile for more information on using the UpdateInstanceProfile +// See TagResource for more information on using the TagResource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the UpdateInstanceProfileRequest method. -// req, resp := client.UpdateInstanceProfileRequest(params) +// // Example sending a request using the TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateInstanceProfile -func (c *DeviceFarm) UpdateInstanceProfileRequest(input *UpdateInstanceProfileInput) (req *request.Request, output *UpdateInstanceProfileOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/TagResource +func (c *DeviceFarm) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { op := &request.Operation{ - Name: opUpdateInstanceProfile, + Name: opTagResource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &UpdateInstanceProfileInput{} + input = &TagResourceInput{} } - output = &UpdateInstanceProfileOutput{} + output = &TagResourceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// UpdateInstanceProfile API operation for AWS Device Farm. +// TagResource API operation for AWS Device Farm. // -// Updates information about an existing private device instance profile. +// Associates the specified tags to a resource with the specified resourceArn. +// If existing tags on a resource are not specified in the request parameters, +// they are not changed. When a resource is deleted, the tags associated with +// that resource are also deleted. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Device Farm's -// API operation UpdateInstanceProfile for usage and error information. +// API operation TagResource for usage and error information. // // Returned Error Codes: // * ErrCodeArgumentException "ArgumentException" @@ -6417,86 +7084,92 @@ func (c *DeviceFarm) UpdateInstanceProfileRequest(input *UpdateInstanceProfileIn // * ErrCodeNotFoundException "NotFoundException" // The specified entity was not found. // -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. +// * ErrCodeTagOperationException "TagOperationException" +// The operation was not successful. Try again. // -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. +// * ErrCodeTooManyTagsException "TooManyTagsException" +// The list of tags on the repository is over the limit. The maximum number +// of tags that can be applied to a repository is 50. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateInstanceProfile -func (c *DeviceFarm) UpdateInstanceProfile(input *UpdateInstanceProfileInput) (*UpdateInstanceProfileOutput, error) { - req, out := c.UpdateInstanceProfileRequest(input) +// * ErrCodeTagPolicyException "TagPolicyException" +// The request doesn't comply with the AWS Identity and Access Management (IAM) +// tag policy. Correct your request and then retry it. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/TagResource +func (c *DeviceFarm) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) return out, req.Send() } -// UpdateInstanceProfileWithContext is the same as UpdateInstanceProfile with the addition of +// TagResourceWithContext is the same as TagResource with the addition of // the ability to pass a context and additional request options. // -// See UpdateInstanceProfile for details on how to use this API operation. +// See TagResource for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) UpdateInstanceProfileWithContext(ctx aws.Context, input *UpdateInstanceProfileInput, opts ...request.Option) (*UpdateInstanceProfileOutput, error) { - req, out := c.UpdateInstanceProfileRequest(input) +func (c *DeviceFarm) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUpdateNetworkProfile = "UpdateNetworkProfile" +const opUntagResource = "UntagResource" -// UpdateNetworkProfileRequest generates a "aws/request.Request" representing the -// client's request for the UpdateNetworkProfile operation. The "output" return +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UpdateNetworkProfile for more information on using the UpdateNetworkProfile +// See UntagResource for more information on using the UntagResource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the UpdateNetworkProfileRequest method. -// req, resp := client.UpdateNetworkProfileRequest(params) +// // Example sending a request using the UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateNetworkProfile -func (c *DeviceFarm) UpdateNetworkProfileRequest(input *UpdateNetworkProfileInput) (req *request.Request, output *UpdateNetworkProfileOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UntagResource +func (c *DeviceFarm) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { op := &request.Operation{ - Name: opUpdateNetworkProfile, + Name: opUntagResource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &UpdateNetworkProfileInput{} + input = &UntagResourceInput{} } - output = &UpdateNetworkProfileOutput{} + output = &UntagResourceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// UpdateNetworkProfile API operation for AWS Device Farm. +// UntagResource API operation for AWS Device Farm. // -// Updates the network profile with specific settings. +// Deletes the specified tags from a resource. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Device Farm's -// API operation UpdateNetworkProfile for usage and error information. +// API operation UntagResource for usage and error information. // // Returned Error Codes: // * ErrCodeArgumentException "ArgumentException" @@ -6505,86 +7178,83 @@ func (c *DeviceFarm) UpdateNetworkProfileRequest(input *UpdateNetworkProfileInpu // * ErrCodeNotFoundException "NotFoundException" // The specified entity was not found. // -// * ErrCodeLimitExceededException "LimitExceededException" -// A limit was exceeded. -// -// * ErrCodeServiceAccountException "ServiceAccountException" -// There was a problem with the service account. +// * ErrCodeTagOperationException "TagOperationException" +// The operation was not successful. Try again. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateNetworkProfile -func (c *DeviceFarm) UpdateNetworkProfile(input *UpdateNetworkProfileInput) (*UpdateNetworkProfileOutput, error) { - req, out := c.UpdateNetworkProfileRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UntagResource +func (c *DeviceFarm) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) return out, req.Send() } -// UpdateNetworkProfileWithContext is the same as UpdateNetworkProfile with the addition of +// UntagResourceWithContext is the same as UntagResource with the addition of // the ability to pass a context and additional request options. // -// See UpdateNetworkProfile for details on how to use this API operation. +// See UntagResource for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) UpdateNetworkProfileWithContext(ctx aws.Context, input *UpdateNetworkProfileInput, opts ...request.Option) (*UpdateNetworkProfileOutput, error) { - req, out := c.UpdateNetworkProfileRequest(input) +func (c *DeviceFarm) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUpdateProject = "UpdateProject" +const opUpdateDeviceInstance = "UpdateDeviceInstance" -// UpdateProjectRequest generates a "aws/request.Request" representing the -// client's request for the UpdateProject operation. The "output" return +// UpdateDeviceInstanceRequest generates a "aws/request.Request" representing the +// client's request for the UpdateDeviceInstance operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UpdateProject for more information on using the UpdateProject +// See UpdateDeviceInstance for more information on using the UpdateDeviceInstance // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the UpdateProjectRequest method. -// req, resp := client.UpdateProjectRequest(params) +// // Example sending a request using the UpdateDeviceInstanceRequest method. +// req, resp := client.UpdateDeviceInstanceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateProject -func (c *DeviceFarm) UpdateProjectRequest(input *UpdateProjectInput) (req *request.Request, output *UpdateProjectOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateDeviceInstance +func (c *DeviceFarm) UpdateDeviceInstanceRequest(input *UpdateDeviceInstanceInput) (req *request.Request, output *UpdateDeviceInstanceOutput) { op := &request.Operation{ - Name: opUpdateProject, + Name: opUpdateDeviceInstance, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &UpdateProjectInput{} + input = &UpdateDeviceInstanceInput{} } - output = &UpdateProjectOutput{} + output = &UpdateDeviceInstanceOutput{} req = c.newRequest(op, input, output) return } -// UpdateProject API operation for AWS Device Farm. +// UpdateDeviceInstance API operation for AWS Device Farm. // -// Modifies the specified project name, given the project ARN and a new name. +// Updates information about a private device instance. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Device Farm's -// API operation UpdateProject for usage and error information. +// API operation UpdateDeviceInstance for usage and error information. // // Returned Error Codes: // * ErrCodeArgumentException "ArgumentException" @@ -6599,80 +7269,82 @@ func (c *DeviceFarm) UpdateProjectRequest(input *UpdateProjectInput) (req *reque // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateProject -func (c *DeviceFarm) UpdateProject(input *UpdateProjectInput) (*UpdateProjectOutput, error) { - req, out := c.UpdateProjectRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateDeviceInstance +func (c *DeviceFarm) UpdateDeviceInstance(input *UpdateDeviceInstanceInput) (*UpdateDeviceInstanceOutput, error) { + req, out := c.UpdateDeviceInstanceRequest(input) return out, req.Send() } -// UpdateProjectWithContext is the same as UpdateProject with the addition of +// UpdateDeviceInstanceWithContext is the same as UpdateDeviceInstance with the addition of // the ability to pass a context and additional request options. // -// See UpdateProject for details on how to use this API operation. +// See UpdateDeviceInstance for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) UpdateProjectWithContext(ctx aws.Context, input *UpdateProjectInput, opts ...request.Option) (*UpdateProjectOutput, error) { - req, out := c.UpdateProjectRequest(input) +func (c *DeviceFarm) UpdateDeviceInstanceWithContext(ctx aws.Context, input *UpdateDeviceInstanceInput, opts ...request.Option) (*UpdateDeviceInstanceOutput, error) { + req, out := c.UpdateDeviceInstanceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUpdateUpload = "UpdateUpload" +const opUpdateDevicePool = "UpdateDevicePool" -// UpdateUploadRequest generates a "aws/request.Request" representing the -// client's request for the UpdateUpload operation. The "output" return +// UpdateDevicePoolRequest generates a "aws/request.Request" representing the +// client's request for the UpdateDevicePool operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UpdateUpload for more information on using the UpdateUpload +// See UpdateDevicePool for more information on using the UpdateDevicePool // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the UpdateUploadRequest method. -// req, resp := client.UpdateUploadRequest(params) +// // Example sending a request using the UpdateDevicePoolRequest method. +// req, resp := client.UpdateDevicePoolRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateUpload -func (c *DeviceFarm) UpdateUploadRequest(input *UpdateUploadInput) (req *request.Request, output *UpdateUploadOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateDevicePool +func (c *DeviceFarm) UpdateDevicePoolRequest(input *UpdateDevicePoolInput) (req *request.Request, output *UpdateDevicePoolOutput) { op := &request.Operation{ - Name: opUpdateUpload, + Name: opUpdateDevicePool, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &UpdateUploadInput{} + input = &UpdateDevicePoolInput{} } - output = &UpdateUploadOutput{} + output = &UpdateDevicePoolOutput{} req = c.newRequest(op, input, output) return } -// UpdateUpload API operation for AWS Device Farm. +// UpdateDevicePool API operation for AWS Device Farm. // -// Update an uploaded test specification (test spec). +// Modifies the name, description, and rules in a device pool given the attributes +// and the pool ARN. Rule updates are all-or-nothing, meaning they can only +// be updated as a whole (or not at all). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Device Farm's -// API operation UpdateUpload for usage and error information. +// API operation UpdateDevicePool for usage and error information. // // Returned Error Codes: // * ErrCodeArgumentException "ArgumentException" @@ -6687,81 +7359,80 @@ func (c *DeviceFarm) UpdateUploadRequest(input *UpdateUploadInput) (req *request // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateUpload -func (c *DeviceFarm) UpdateUpload(input *UpdateUploadInput) (*UpdateUploadOutput, error) { - req, out := c.UpdateUploadRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateDevicePool +func (c *DeviceFarm) UpdateDevicePool(input *UpdateDevicePoolInput) (*UpdateDevicePoolOutput, error) { + req, out := c.UpdateDevicePoolRequest(input) return out, req.Send() } -// UpdateUploadWithContext is the same as UpdateUpload with the addition of +// UpdateDevicePoolWithContext is the same as UpdateDevicePool with the addition of // the ability to pass a context and additional request options. // -// See UpdateUpload for details on how to use this API operation. +// See UpdateDevicePool for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) UpdateUploadWithContext(ctx aws.Context, input *UpdateUploadInput, opts ...request.Option) (*UpdateUploadOutput, error) { - req, out := c.UpdateUploadRequest(input) +func (c *DeviceFarm) UpdateDevicePoolWithContext(ctx aws.Context, input *UpdateDevicePoolInput, opts ...request.Option) (*UpdateDevicePoolOutput, error) { + req, out := c.UpdateDevicePoolRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUpdateVPCEConfiguration = "UpdateVPCEConfiguration" +const opUpdateInstanceProfile = "UpdateInstanceProfile" -// UpdateVPCEConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the UpdateVPCEConfiguration operation. The "output" return +// UpdateInstanceProfileRequest generates a "aws/request.Request" representing the +// client's request for the UpdateInstanceProfile operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UpdateVPCEConfiguration for more information on using the UpdateVPCEConfiguration +// See UpdateInstanceProfile for more information on using the UpdateInstanceProfile // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the UpdateVPCEConfigurationRequest method. -// req, resp := client.UpdateVPCEConfigurationRequest(params) +// // Example sending a request using the UpdateInstanceProfileRequest method. +// req, resp := client.UpdateInstanceProfileRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateVPCEConfiguration -func (c *DeviceFarm) UpdateVPCEConfigurationRequest(input *UpdateVPCEConfigurationInput) (req *request.Request, output *UpdateVPCEConfigurationOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateInstanceProfile +func (c *DeviceFarm) UpdateInstanceProfileRequest(input *UpdateInstanceProfileInput) (req *request.Request, output *UpdateInstanceProfileOutput) { op := &request.Operation{ - Name: opUpdateVPCEConfiguration, + Name: opUpdateInstanceProfile, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &UpdateVPCEConfigurationInput{} + input = &UpdateInstanceProfileInput{} } - output = &UpdateVPCEConfigurationOutput{} + output = &UpdateInstanceProfileOutput{} req = c.newRequest(op, input, output) return } -// UpdateVPCEConfiguration API operation for AWS Device Farm. +// UpdateInstanceProfile API operation for AWS Device Farm. // -// Updates information about an existing Amazon Virtual Private Cloud (VPC) -// endpoint configuration. +// Updates information about an existing private device instance profile. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Device Farm's -// API operation UpdateVPCEConfiguration for usage and error information. +// API operation UpdateInstanceProfile for usage and error information. // // Returned Error Codes: // * ErrCodeArgumentException "ArgumentException" @@ -6770,423 +7441,1632 @@ func (c *DeviceFarm) UpdateVPCEConfigurationRequest(input *UpdateVPCEConfigurati // * ErrCodeNotFoundException "NotFoundException" // The specified entity was not found. // +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. +// // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// * ErrCodeInvalidOperationException "InvalidOperationException" -// There was an error with the update request, or you do not have sufficient -// permissions to update this VPC endpoint configuration. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateVPCEConfiguration -func (c *DeviceFarm) UpdateVPCEConfiguration(input *UpdateVPCEConfigurationInput) (*UpdateVPCEConfigurationOutput, error) { - req, out := c.UpdateVPCEConfigurationRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateInstanceProfile +func (c *DeviceFarm) UpdateInstanceProfile(input *UpdateInstanceProfileInput) (*UpdateInstanceProfileOutput, error) { + req, out := c.UpdateInstanceProfileRequest(input) return out, req.Send() } -// UpdateVPCEConfigurationWithContext is the same as UpdateVPCEConfiguration with the addition of +// UpdateInstanceProfileWithContext is the same as UpdateInstanceProfile with the addition of // the ability to pass a context and additional request options. // -// See UpdateVPCEConfiguration for details on how to use this API operation. +// See UpdateInstanceProfile for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) UpdateVPCEConfigurationWithContext(ctx aws.Context, input *UpdateVPCEConfigurationInput, opts ...request.Option) (*UpdateVPCEConfigurationOutput, error) { - req, out := c.UpdateVPCEConfigurationRequest(input) +func (c *DeviceFarm) UpdateInstanceProfileWithContext(ctx aws.Context, input *UpdateInstanceProfileInput, opts ...request.Option) (*UpdateInstanceProfileOutput, error) { + req, out := c.UpdateInstanceProfileRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// A container for account-level settings within AWS Device Farm. -type AccountSettings struct { - _ struct{} `type:"structure"` - - // The AWS account number specified in the AccountSettings container. - AwsAccountNumber *string `locationName:"awsAccountNumber" min:"2" type:"string"` - - // The default number of minutes (at the account level) a test run will execute - // before it times out. The default value is 150 minutes. - DefaultJobTimeoutMinutes *int64 `locationName:"defaultJobTimeoutMinutes" type:"integer"` +const opUpdateNetworkProfile = "UpdateNetworkProfile" - // The maximum number of minutes a test run will execute before it times out. - MaxJobTimeoutMinutes *int64 `locationName:"maxJobTimeoutMinutes" type:"integer"` +// UpdateNetworkProfileRequest generates a "aws/request.Request" representing the +// client's request for the UpdateNetworkProfile operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateNetworkProfile for more information on using the UpdateNetworkProfile +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateNetworkProfileRequest method. +// req, resp := client.UpdateNetworkProfileRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateNetworkProfile +func (c *DeviceFarm) UpdateNetworkProfileRequest(input *UpdateNetworkProfileInput) (req *request.Request, output *UpdateNetworkProfileOutput) { + op := &request.Operation{ + Name: opUpdateNetworkProfile, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateNetworkProfileInput{} + } + + output = &UpdateNetworkProfileOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateNetworkProfile API operation for AWS Device Farm. +// +// Updates the network profile. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation UpdateNetworkProfile for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateNetworkProfile +func (c *DeviceFarm) UpdateNetworkProfile(input *UpdateNetworkProfileInput) (*UpdateNetworkProfileOutput, error) { + req, out := c.UpdateNetworkProfileRequest(input) + return out, req.Send() +} + +// UpdateNetworkProfileWithContext is the same as UpdateNetworkProfile with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateNetworkProfile for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) UpdateNetworkProfileWithContext(ctx aws.Context, input *UpdateNetworkProfileInput, opts ...request.Option) (*UpdateNetworkProfileOutput, error) { + req, out := c.UpdateNetworkProfileRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateProject = "UpdateProject" + +// UpdateProjectRequest generates a "aws/request.Request" representing the +// client's request for the UpdateProject operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateProject for more information on using the UpdateProject +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateProjectRequest method. +// req, resp := client.UpdateProjectRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateProject +func (c *DeviceFarm) UpdateProjectRequest(input *UpdateProjectInput) (req *request.Request, output *UpdateProjectOutput) { + op := &request.Operation{ + Name: opUpdateProject, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateProjectInput{} + } + + output = &UpdateProjectOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateProject API operation for AWS Device Farm. +// +// Modifies the specified project name, given the project ARN and a new name. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation UpdateProject for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateProject +func (c *DeviceFarm) UpdateProject(input *UpdateProjectInput) (*UpdateProjectOutput, error) { + req, out := c.UpdateProjectRequest(input) + return out, req.Send() +} + +// UpdateProjectWithContext is the same as UpdateProject with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateProject for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) UpdateProjectWithContext(ctx aws.Context, input *UpdateProjectInput, opts ...request.Option) (*UpdateProjectOutput, error) { + req, out := c.UpdateProjectRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateTestGridProject = "UpdateTestGridProject" + +// UpdateTestGridProjectRequest generates a "aws/request.Request" representing the +// client's request for the UpdateTestGridProject operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateTestGridProject for more information on using the UpdateTestGridProject +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateTestGridProjectRequest method. +// req, resp := client.UpdateTestGridProjectRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateTestGridProject +func (c *DeviceFarm) UpdateTestGridProjectRequest(input *UpdateTestGridProjectInput) (req *request.Request, output *UpdateTestGridProjectOutput) { + op := &request.Operation{ + Name: opUpdateTestGridProject, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateTestGridProjectInput{} + } + + output = &UpdateTestGridProjectOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateTestGridProject API operation for AWS Device Farm. +// +// Change details of a project. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation UpdateTestGridProject for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeInternalServiceException "InternalServiceException" +// An internal exception was raised in the service. Contact aws-devicefarm-support@amazon.com +// (mailto:aws-devicefarm-support@amazon.com) if you see this error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateTestGridProject +func (c *DeviceFarm) UpdateTestGridProject(input *UpdateTestGridProjectInput) (*UpdateTestGridProjectOutput, error) { + req, out := c.UpdateTestGridProjectRequest(input) + return out, req.Send() +} + +// UpdateTestGridProjectWithContext is the same as UpdateTestGridProject with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateTestGridProject for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) UpdateTestGridProjectWithContext(ctx aws.Context, input *UpdateTestGridProjectInput, opts ...request.Option) (*UpdateTestGridProjectOutput, error) { + req, out := c.UpdateTestGridProjectRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateUpload = "UpdateUpload" + +// UpdateUploadRequest generates a "aws/request.Request" representing the +// client's request for the UpdateUpload operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateUpload for more information on using the UpdateUpload +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateUploadRequest method. +// req, resp := client.UpdateUploadRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateUpload +func (c *DeviceFarm) UpdateUploadRequest(input *UpdateUploadInput) (req *request.Request, output *UpdateUploadOutput) { + op := &request.Operation{ + Name: opUpdateUpload, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateUploadInput{} + } + + output = &UpdateUploadOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateUpload API operation for AWS Device Farm. +// +// Updates an uploaded test spec. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation UpdateUpload for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateUpload +func (c *DeviceFarm) UpdateUpload(input *UpdateUploadInput) (*UpdateUploadOutput, error) { + req, out := c.UpdateUploadRequest(input) + return out, req.Send() +} + +// UpdateUploadWithContext is the same as UpdateUpload with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateUpload for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) UpdateUploadWithContext(ctx aws.Context, input *UpdateUploadInput, opts ...request.Option) (*UpdateUploadOutput, error) { + req, out := c.UpdateUploadRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateVPCEConfiguration = "UpdateVPCEConfiguration" + +// UpdateVPCEConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the UpdateVPCEConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateVPCEConfiguration for more information on using the UpdateVPCEConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateVPCEConfigurationRequest method. +// req, resp := client.UpdateVPCEConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateVPCEConfiguration +func (c *DeviceFarm) UpdateVPCEConfigurationRequest(input *UpdateVPCEConfigurationInput) (req *request.Request, output *UpdateVPCEConfigurationOutput) { + op := &request.Operation{ + Name: opUpdateVPCEConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateVPCEConfigurationInput{} + } + + output = &UpdateVPCEConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateVPCEConfiguration API operation for AWS Device Farm. +// +// Updates information about an Amazon Virtual Private Cloud (VPC) endpoint +// configuration. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation UpdateVPCEConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// * ErrCodeInvalidOperationException "InvalidOperationException" +// There was an error with the update request, or you do not have sufficient +// permissions to update this VPC endpoint configuration. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateVPCEConfiguration +func (c *DeviceFarm) UpdateVPCEConfiguration(input *UpdateVPCEConfigurationInput) (*UpdateVPCEConfigurationOutput, error) { + req, out := c.UpdateVPCEConfigurationRequest(input) + return out, req.Send() +} + +// UpdateVPCEConfigurationWithContext is the same as UpdateVPCEConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateVPCEConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) UpdateVPCEConfigurationWithContext(ctx aws.Context, input *UpdateVPCEConfigurationInput, opts ...request.Option) (*UpdateVPCEConfigurationOutput, error) { + req, out := c.UpdateVPCEConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// A container for account-level settings in AWS Device Farm. +type AccountSettings struct { + _ struct{} `type:"structure"` + + // The AWS account number specified in the AccountSettings container. + AwsAccountNumber *string `locationName:"awsAccountNumber" min:"2" type:"string"` + + // The default number of minutes (at the account level) a test run executes + // before it times out. The default value is 150 minutes. + DefaultJobTimeoutMinutes *int64 `locationName:"defaultJobTimeoutMinutes" type:"integer"` + + // The maximum number of minutes a test run executes before it times out. + MaxJobTimeoutMinutes *int64 `locationName:"maxJobTimeoutMinutes" type:"integer"` + + // The maximum number of device slots that the AWS account can purchase. Each + // maximum is expressed as an offering-id:number pair, where the offering-id + // represents one of the IDs returned by the ListOfferings command. + MaxSlots map[string]*int64 `locationName:"maxSlots" type:"map"` + + // When set to true, for private devices, Device Farm does not sign your app + // again. For public devices, Device Farm always signs your apps again. + // + // For more information about how Device Farm re-signs your apps, see Do you + // modify my app? (https://aws.amazon.com/device-farm/faq/) in the AWS Device + // Farm FAQs. + SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` + + // Information about an AWS account's usage of free trial device minutes. + TrialMinutes *TrialMinutes `locationName:"trialMinutes" type:"structure"` + + // Returns the unmetered devices you have purchased or want to purchase. + UnmeteredDevices map[string]*int64 `locationName:"unmeteredDevices" type:"map"` + + // Returns the unmetered remote access devices you have purchased or want to + // purchase. + UnmeteredRemoteAccessDevices map[string]*int64 `locationName:"unmeteredRemoteAccessDevices" type:"map"` +} + +// String returns the string representation +func (s AccountSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AccountSettings) GoString() string { + return s.String() +} + +// SetAwsAccountNumber sets the AwsAccountNumber field's value. +func (s *AccountSettings) SetAwsAccountNumber(v string) *AccountSettings { + s.AwsAccountNumber = &v + return s +} + +// SetDefaultJobTimeoutMinutes sets the DefaultJobTimeoutMinutes field's value. +func (s *AccountSettings) SetDefaultJobTimeoutMinutes(v int64) *AccountSettings { + s.DefaultJobTimeoutMinutes = &v + return s +} + +// SetMaxJobTimeoutMinutes sets the MaxJobTimeoutMinutes field's value. +func (s *AccountSettings) SetMaxJobTimeoutMinutes(v int64) *AccountSettings { + s.MaxJobTimeoutMinutes = &v + return s +} + +// SetMaxSlots sets the MaxSlots field's value. +func (s *AccountSettings) SetMaxSlots(v map[string]*int64) *AccountSettings { + s.MaxSlots = v + return s +} + +// SetSkipAppResign sets the SkipAppResign field's value. +func (s *AccountSettings) SetSkipAppResign(v bool) *AccountSettings { + s.SkipAppResign = &v + return s +} + +// SetTrialMinutes sets the TrialMinutes field's value. +func (s *AccountSettings) SetTrialMinutes(v *TrialMinutes) *AccountSettings { + s.TrialMinutes = v + return s +} + +// SetUnmeteredDevices sets the UnmeteredDevices field's value. +func (s *AccountSettings) SetUnmeteredDevices(v map[string]*int64) *AccountSettings { + s.UnmeteredDevices = v + return s +} + +// SetUnmeteredRemoteAccessDevices sets the UnmeteredRemoteAccessDevices field's value. +func (s *AccountSettings) SetUnmeteredRemoteAccessDevices(v map[string]*int64) *AccountSettings { + s.UnmeteredRemoteAccessDevices = v + return s +} + +// Represents the output of a test. Examples of artifacts include logs and screenshots. +type Artifact struct { + _ struct{} `type:"structure"` + + // The artifact's ARN. + Arn *string `locationName:"arn" min:"32" type:"string"` + + // The artifact's file extension. + Extension *string `locationName:"extension" type:"string"` + + // The artifact's name. + Name *string `locationName:"name" type:"string"` + + // The artifact's type. + // + // Allowed values include the following: + // + // * UNKNOWN + // + // * SCREENSHOT + // + // * DEVICE_LOG + // + // * MESSAGE_LOG + // + // * VIDEO_LOG + // + // * RESULT_LOG + // + // * SERVICE_LOG + // + // * WEBKIT_LOG + // + // * INSTRUMENTATION_OUTPUT + // + // * EXERCISER_MONKEY_OUTPUT: the artifact (log) generated by an Android + // fuzz test. + // + // * CALABASH_JSON_OUTPUT + // + // * CALABASH_PRETTY_OUTPUT + // + // * CALABASH_STANDARD_OUTPUT + // + // * CALABASH_JAVA_XML_OUTPUT + // + // * AUTOMATION_OUTPUT + // + // * APPIUM_SERVER_OUTPUT + // + // * APPIUM_JAVA_OUTPUT + // + // * APPIUM_JAVA_XML_OUTPUT + // + // * APPIUM_PYTHON_OUTPUT + // + // * APPIUM_PYTHON_XML_OUTPUT + // + // * EXPLORER_EVENT_LOG + // + // * EXPLORER_SUMMARY_LOG + // + // * APPLICATION_CRASH_REPORT + // + // * XCTEST_LOG + // + // * VIDEO + // + // * CUSTOMER_ARTIFACT + // + // * CUSTOMER_ARTIFACT_LOG + // + // * TESTSPEC_OUTPUT + Type *string `locationName:"type" type:"string" enum:"ArtifactType"` + + // The presigned Amazon S3 URL that can be used with a GET request to download + // the artifact's file. + Url *string `locationName:"url" type:"string"` +} + +// String returns the string representation +func (s Artifact) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Artifact) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *Artifact) SetArn(v string) *Artifact { + s.Arn = &v + return s +} + +// SetExtension sets the Extension field's value. +func (s *Artifact) SetExtension(v string) *Artifact { + s.Extension = &v + return s +} + +// SetName sets the Name field's value. +func (s *Artifact) SetName(v string) *Artifact { + s.Name = &v + return s +} + +// SetType sets the Type field's value. +func (s *Artifact) SetType(v string) *Artifact { + s.Type = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *Artifact) SetUrl(v string) *Artifact { + s.Url = &v + return s +} + +// Represents the amount of CPU that an app is using on a physical device. Does +// not represent system-wide CPU usage. +type CPU struct { + _ struct{} `type:"structure"` + + // The CPU's architecture (for example, x86 or ARM). + Architecture *string `locationName:"architecture" type:"string"` + + // The clock speed of the device's CPU, expressed in hertz (Hz). For example, + // a 1.2 GHz CPU is expressed as 1200000000. + Clock *float64 `locationName:"clock" type:"double"` + + // The CPU's frequency. + Frequency *string `locationName:"frequency" type:"string"` +} + +// String returns the string representation +func (s CPU) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CPU) GoString() string { + return s.String() +} + +// SetArchitecture sets the Architecture field's value. +func (s *CPU) SetArchitecture(v string) *CPU { + s.Architecture = &v + return s +} + +// SetClock sets the Clock field's value. +func (s *CPU) SetClock(v float64) *CPU { + s.Clock = &v + return s +} + +// SetFrequency sets the Frequency field's value. +func (s *CPU) SetFrequency(v string) *CPU { + s.Frequency = &v + return s +} + +// Represents entity counters. +type Counters struct { + _ struct{} `type:"structure"` + + // The number of errored entities. + Errored *int64 `locationName:"errored" type:"integer"` + + // The number of failed entities. + Failed *int64 `locationName:"failed" type:"integer"` + + // The number of passed entities. + Passed *int64 `locationName:"passed" type:"integer"` + + // The number of skipped entities. + Skipped *int64 `locationName:"skipped" type:"integer"` + + // The number of stopped entities. + Stopped *int64 `locationName:"stopped" type:"integer"` + + // The total number of entities. + Total *int64 `locationName:"total" type:"integer"` + + // The number of warned entities. + Warned *int64 `locationName:"warned" type:"integer"` +} + +// String returns the string representation +func (s Counters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Counters) GoString() string { + return s.String() +} + +// SetErrored sets the Errored field's value. +func (s *Counters) SetErrored(v int64) *Counters { + s.Errored = &v + return s +} + +// SetFailed sets the Failed field's value. +func (s *Counters) SetFailed(v int64) *Counters { + s.Failed = &v + return s +} + +// SetPassed sets the Passed field's value. +func (s *Counters) SetPassed(v int64) *Counters { + s.Passed = &v + return s +} + +// SetSkipped sets the Skipped field's value. +func (s *Counters) SetSkipped(v int64) *Counters { + s.Skipped = &v + return s +} + +// SetStopped sets the Stopped field's value. +func (s *Counters) SetStopped(v int64) *Counters { + s.Stopped = &v + return s +} + +// SetTotal sets the Total field's value. +func (s *Counters) SetTotal(v int64) *Counters { + s.Total = &v + return s +} + +// SetWarned sets the Warned field's value. +func (s *Counters) SetWarned(v int64) *Counters { + s.Warned = &v + return s +} + +// Represents a request to the create device pool operation. +type CreateDevicePoolInput struct { + _ struct{} `type:"structure"` + + // The device pool's description. + Description *string `locationName:"description" type:"string"` + + // The number of devices that Device Farm can add to your device pool. Device + // Farm adds devices that are available and meet the criteria that you assign + // for the rules parameter. Depending on how many devices meet these constraints, + // your device pool might contain fewer devices than the value for this parameter. + // + // By specifying the maximum number of devices, you can control the costs that + // you incur by running tests. + MaxDevices *int64 `locationName:"maxDevices" type:"integer"` + + // The device pool's name. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // The ARN of the project for the device pool. + // + // ProjectArn is a required field + ProjectArn *string `locationName:"projectArn" min:"32" type:"string" required:"true"` + + // The device pool's rules. + // + // Rules is a required field + Rules []*Rule `locationName:"rules" type:"list" required:"true"` +} + +// String returns the string representation +func (s CreateDevicePoolInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDevicePoolInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDevicePoolInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDevicePoolInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.ProjectArn == nil { + invalidParams.Add(request.NewErrParamRequired("ProjectArn")) + } + if s.ProjectArn != nil && len(*s.ProjectArn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("ProjectArn", 32)) + } + if s.Rules == nil { + invalidParams.Add(request.NewErrParamRequired("Rules")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *CreateDevicePoolInput) SetDescription(v string) *CreateDevicePoolInput { + s.Description = &v + return s +} + +// SetMaxDevices sets the MaxDevices field's value. +func (s *CreateDevicePoolInput) SetMaxDevices(v int64) *CreateDevicePoolInput { + s.MaxDevices = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateDevicePoolInput) SetName(v string) *CreateDevicePoolInput { + s.Name = &v + return s +} + +// SetProjectArn sets the ProjectArn field's value. +func (s *CreateDevicePoolInput) SetProjectArn(v string) *CreateDevicePoolInput { + s.ProjectArn = &v + return s +} + +// SetRules sets the Rules field's value. +func (s *CreateDevicePoolInput) SetRules(v []*Rule) *CreateDevicePoolInput { + s.Rules = v + return s +} + +// Represents the result of a create device pool request. +type CreateDevicePoolOutput struct { + _ struct{} `type:"structure"` + + // The newly created device pool. + DevicePool *DevicePool `locationName:"devicePool" type:"structure"` +} + +// String returns the string representation +func (s CreateDevicePoolOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDevicePoolOutput) GoString() string { + return s.String() +} + +// SetDevicePool sets the DevicePool field's value. +func (s *CreateDevicePoolOutput) SetDevicePool(v *DevicePool) *CreateDevicePoolOutput { + s.DevicePool = v + return s +} + +type CreateInstanceProfileInput struct { + _ struct{} `type:"structure"` + + // The description of your instance profile. + Description *string `locationName:"description" type:"string"` + + // An array of strings that specifies the list of app packages that should not + // be cleaned up from the device after a test run. + // + // The list of packages is considered only if you set packageCleanup to true. + ExcludeAppPackagesFromCleanup []*string `locationName:"excludeAppPackagesFromCleanup" type:"list"` + + // The name of your instance profile. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // When set to true, Device Farm removes app packages after a test run. The + // default value is false for private devices. + PackageCleanup *bool `locationName:"packageCleanup" type:"boolean"` + + // When set to true, Device Farm reboots the instance after a test run. The + // default value is true. + RebootAfterUse *bool `locationName:"rebootAfterUse" type:"boolean"` +} + +// String returns the string representation +func (s CreateInstanceProfileInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInstanceProfileInput) GoString() string { + return s.String() +} - // The maximum number of device slots that the AWS account can purchase. Each - // maximum is expressed as an offering-id:number pair, where the offering-id - // represents one of the IDs returned by the ListOfferings command. - MaxSlots map[string]*int64 `locationName:"maxSlots" type:"map"` +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateInstanceProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateInstanceProfileInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *CreateInstanceProfileInput) SetDescription(v string) *CreateInstanceProfileInput { + s.Description = &v + return s +} + +// SetExcludeAppPackagesFromCleanup sets the ExcludeAppPackagesFromCleanup field's value. +func (s *CreateInstanceProfileInput) SetExcludeAppPackagesFromCleanup(v []*string) *CreateInstanceProfileInput { + s.ExcludeAppPackagesFromCleanup = v + return s +} + +// SetName sets the Name field's value. +func (s *CreateInstanceProfileInput) SetName(v string) *CreateInstanceProfileInput { + s.Name = &v + return s +} + +// SetPackageCleanup sets the PackageCleanup field's value. +func (s *CreateInstanceProfileInput) SetPackageCleanup(v bool) *CreateInstanceProfileInput { + s.PackageCleanup = &v + return s +} + +// SetRebootAfterUse sets the RebootAfterUse field's value. +func (s *CreateInstanceProfileInput) SetRebootAfterUse(v bool) *CreateInstanceProfileInput { + s.RebootAfterUse = &v + return s +} + +type CreateInstanceProfileOutput struct { + _ struct{} `type:"structure"` + + // An object that contains information about your instance profile. + InstanceProfile *InstanceProfile `locationName:"instanceProfile" type:"structure"` +} + +// String returns the string representation +func (s CreateInstanceProfileOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInstanceProfileOutput) GoString() string { + return s.String() +} + +// SetInstanceProfile sets the InstanceProfile field's value. +func (s *CreateInstanceProfileOutput) SetInstanceProfile(v *InstanceProfile) *CreateInstanceProfileOutput { + s.InstanceProfile = v + return s +} + +type CreateNetworkProfileInput struct { + _ struct{} `type:"structure"` + + // The description of the network profile. + Description *string `locationName:"description" type:"string"` + + // The data throughput rate in bits per second, as an integer from 0 to 104857600. + DownlinkBandwidthBits *int64 `locationName:"downlinkBandwidthBits" type:"long"` - // When set to true, for private devices, Device Farm will not sign your app - // again. For public devices, Device Farm always signs your apps again and this - // parameter has no effect. + // Delay time for all packets to destination in milliseconds as an integer from + // 0 to 2000. + DownlinkDelayMs *int64 `locationName:"downlinkDelayMs" type:"long"` + + // Time variation in the delay of received packets in milliseconds as an integer + // from 0 to 2000. + DownlinkJitterMs *int64 `locationName:"downlinkJitterMs" type:"long"` + + // Proportion of received packets that fail to arrive from 0 to 100 percent. + DownlinkLossPercent *int64 `locationName:"downlinkLossPercent" type:"integer"` + + // The name for the new network profile. // - // For more information about how Device Farm re-signs your app(s), see Do you - // modify my app? (https://aws.amazon.com/device-farm/faq/) in the AWS Device - // Farm FAQs. - SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` - // Information about an AWS account's usage of free trial device minutes. - TrialMinutes *TrialMinutes `locationName:"trialMinutes" type:"structure"` + // The Amazon Resource Name (ARN) of the project for which you want to create + // a network profile. + // + // ProjectArn is a required field + ProjectArn *string `locationName:"projectArn" min:"32" type:"string" required:"true"` - // Returns the unmetered devices you have purchased or want to purchase. - UnmeteredDevices map[string]*int64 `locationName:"unmeteredDevices" type:"map"` + // The type of network profile to create. Valid values are listed here. + Type *string `locationName:"type" type:"string" enum:"NetworkProfileType"` - // Returns the unmetered remote access devices you have purchased or want to - // purchase. - UnmeteredRemoteAccessDevices map[string]*int64 `locationName:"unmeteredRemoteAccessDevices" type:"map"` + // The data throughput rate in bits per second, as an integer from 0 to 104857600. + UplinkBandwidthBits *int64 `locationName:"uplinkBandwidthBits" type:"long"` + + // Delay time for all packets to destination in milliseconds as an integer from + // 0 to 2000. + UplinkDelayMs *int64 `locationName:"uplinkDelayMs" type:"long"` + + // Time variation in the delay of received packets in milliseconds as an integer + // from 0 to 2000. + UplinkJitterMs *int64 `locationName:"uplinkJitterMs" type:"long"` + + // Proportion of transmitted packets that fail to arrive from 0 to 100 percent. + UplinkLossPercent *int64 `locationName:"uplinkLossPercent" type:"integer"` +} + +// String returns the string representation +func (s CreateNetworkProfileInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateNetworkProfileInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateNetworkProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateNetworkProfileInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.ProjectArn == nil { + invalidParams.Add(request.NewErrParamRequired("ProjectArn")) + } + if s.ProjectArn != nil && len(*s.ProjectArn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("ProjectArn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *CreateNetworkProfileInput) SetDescription(v string) *CreateNetworkProfileInput { + s.Description = &v + return s +} + +// SetDownlinkBandwidthBits sets the DownlinkBandwidthBits field's value. +func (s *CreateNetworkProfileInput) SetDownlinkBandwidthBits(v int64) *CreateNetworkProfileInput { + s.DownlinkBandwidthBits = &v + return s +} + +// SetDownlinkDelayMs sets the DownlinkDelayMs field's value. +func (s *CreateNetworkProfileInput) SetDownlinkDelayMs(v int64) *CreateNetworkProfileInput { + s.DownlinkDelayMs = &v + return s +} + +// SetDownlinkJitterMs sets the DownlinkJitterMs field's value. +func (s *CreateNetworkProfileInput) SetDownlinkJitterMs(v int64) *CreateNetworkProfileInput { + s.DownlinkJitterMs = &v + return s +} + +// SetDownlinkLossPercent sets the DownlinkLossPercent field's value. +func (s *CreateNetworkProfileInput) SetDownlinkLossPercent(v int64) *CreateNetworkProfileInput { + s.DownlinkLossPercent = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateNetworkProfileInput) SetName(v string) *CreateNetworkProfileInput { + s.Name = &v + return s +} + +// SetProjectArn sets the ProjectArn field's value. +func (s *CreateNetworkProfileInput) SetProjectArn(v string) *CreateNetworkProfileInput { + s.ProjectArn = &v + return s +} + +// SetType sets the Type field's value. +func (s *CreateNetworkProfileInput) SetType(v string) *CreateNetworkProfileInput { + s.Type = &v + return s +} + +// SetUplinkBandwidthBits sets the UplinkBandwidthBits field's value. +func (s *CreateNetworkProfileInput) SetUplinkBandwidthBits(v int64) *CreateNetworkProfileInput { + s.UplinkBandwidthBits = &v + return s +} + +// SetUplinkDelayMs sets the UplinkDelayMs field's value. +func (s *CreateNetworkProfileInput) SetUplinkDelayMs(v int64) *CreateNetworkProfileInput { + s.UplinkDelayMs = &v + return s +} + +// SetUplinkJitterMs sets the UplinkJitterMs field's value. +func (s *CreateNetworkProfileInput) SetUplinkJitterMs(v int64) *CreateNetworkProfileInput { + s.UplinkJitterMs = &v + return s +} + +// SetUplinkLossPercent sets the UplinkLossPercent field's value. +func (s *CreateNetworkProfileInput) SetUplinkLossPercent(v int64) *CreateNetworkProfileInput { + s.UplinkLossPercent = &v + return s +} + +type CreateNetworkProfileOutput struct { + _ struct{} `type:"structure"` + + // The network profile that is returned by the create network profile request. + NetworkProfile *NetworkProfile `locationName:"networkProfile" type:"structure"` +} + +// String returns the string representation +func (s CreateNetworkProfileOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateNetworkProfileOutput) GoString() string { + return s.String() +} + +// SetNetworkProfile sets the NetworkProfile field's value. +func (s *CreateNetworkProfileOutput) SetNetworkProfile(v *NetworkProfile) *CreateNetworkProfileOutput { + s.NetworkProfile = v + return s +} + +// Represents a request to the create project operation. +type CreateProjectInput struct { + _ struct{} `type:"structure"` + + // Sets the execution timeout value (in minutes) for a project. All test runs + // in this project use the specified execution timeout value unless overridden + // when scheduling a run. + DefaultJobTimeoutMinutes *int64 `locationName:"defaultJobTimeoutMinutes" type:"integer"` + + // The project's name. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` } // String returns the string representation -func (s AccountSettings) String() string { +func (s CreateProjectInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AccountSettings) GoString() string { +func (s CreateProjectInput) GoString() string { return s.String() } -// SetAwsAccountNumber sets the AwsAccountNumber field's value. -func (s *AccountSettings) SetAwsAccountNumber(v string) *AccountSettings { - s.AwsAccountNumber = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateProjectInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateProjectInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } // SetDefaultJobTimeoutMinutes sets the DefaultJobTimeoutMinutes field's value. -func (s *AccountSettings) SetDefaultJobTimeoutMinutes(v int64) *AccountSettings { +func (s *CreateProjectInput) SetDefaultJobTimeoutMinutes(v int64) *CreateProjectInput { s.DefaultJobTimeoutMinutes = &v return s } -// SetMaxJobTimeoutMinutes sets the MaxJobTimeoutMinutes field's value. -func (s *AccountSettings) SetMaxJobTimeoutMinutes(v int64) *AccountSettings { - s.MaxJobTimeoutMinutes = &v +// SetName sets the Name field's value. +func (s *CreateProjectInput) SetName(v string) *CreateProjectInput { + s.Name = &v return s } -// SetMaxSlots sets the MaxSlots field's value. -func (s *AccountSettings) SetMaxSlots(v map[string]*int64) *AccountSettings { - s.MaxSlots = v - return s +// Represents the result of a create project request. +type CreateProjectOutput struct { + _ struct{} `type:"structure"` + + // The newly created project. + Project *Project `locationName:"project" type:"structure"` } -// SetSkipAppResign sets the SkipAppResign field's value. -func (s *AccountSettings) SetSkipAppResign(v bool) *AccountSettings { - s.SkipAppResign = &v - return s +// String returns the string representation +func (s CreateProjectOutput) String() string { + return awsutil.Prettify(s) } -// SetTrialMinutes sets the TrialMinutes field's value. -func (s *AccountSettings) SetTrialMinutes(v *TrialMinutes) *AccountSettings { - s.TrialMinutes = v +// GoString returns the string representation +func (s CreateProjectOutput) GoString() string { + return s.String() +} + +// SetProject sets the Project field's value. +func (s *CreateProjectOutput) SetProject(v *Project) *CreateProjectOutput { + s.Project = v return s } -// SetUnmeteredDevices sets the UnmeteredDevices field's value. -func (s *AccountSettings) SetUnmeteredDevices(v map[string]*int64) *AccountSettings { - s.UnmeteredDevices = v +// Configuration settings for a remote access session, including billing method. +type CreateRemoteAccessSessionConfiguration struct { + _ struct{} `type:"structure"` + + // The billing method for the remote access session. + BillingMethod *string `locationName:"billingMethod" type:"string" enum:"BillingMethod"` + + // An array of ARNs included in the VPC endpoint configuration. + VpceConfigurationArns []*string `locationName:"vpceConfigurationArns" type:"list"` +} + +// String returns the string representation +func (s CreateRemoteAccessSessionConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateRemoteAccessSessionConfiguration) GoString() string { + return s.String() +} + +// SetBillingMethod sets the BillingMethod field's value. +func (s *CreateRemoteAccessSessionConfiguration) SetBillingMethod(v string) *CreateRemoteAccessSessionConfiguration { + s.BillingMethod = &v return s } -// SetUnmeteredRemoteAccessDevices sets the UnmeteredRemoteAccessDevices field's value. -func (s *AccountSettings) SetUnmeteredRemoteAccessDevices(v map[string]*int64) *AccountSettings { - s.UnmeteredRemoteAccessDevices = v +// SetVpceConfigurationArns sets the VpceConfigurationArns field's value. +func (s *CreateRemoteAccessSessionConfiguration) SetVpceConfigurationArns(v []*string) *CreateRemoteAccessSessionConfiguration { + s.VpceConfigurationArns = v return s } -// Represents the output of a test. Examples of artifacts include logs and screenshots. -type Artifact struct { +// Creates and submits a request to start a remote access session. +type CreateRemoteAccessSessionInput struct { _ struct{} `type:"structure"` - // The artifact's ARN. - Arn *string `locationName:"arn" min:"32" type:"string"` - - // The artifact's file extension. - Extension *string `locationName:"extension" type:"string"` + // Unique identifier for the client. If you want access to multiple devices + // on the same client, you should pass the same clientId value in each call + // to CreateRemoteAccessSession. This identifier is required only if remoteDebugEnabled + // is set to true. + // + // Remote debugging is no longer supported (https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html). + ClientId *string `locationName:"clientId" type:"string"` - // The artifact's name. - Name *string `locationName:"name" type:"string"` + // The configuration information for the remote access session request. + Configuration *CreateRemoteAccessSessionConfiguration `locationName:"configuration" type:"structure"` - // The artifact's type. - // - // Allowed values include the following: - // - // * UNKNOWN: An unknown type. - // - // * SCREENSHOT: The screenshot type. - // - // * DEVICE_LOG: The device log type. - // - // * MESSAGE_LOG: The message log type. - // - // * VIDEO_LOG: The video log type. - // - // * RESULT_LOG: The result log type. - // - // * SERVICE_LOG: The service log type. - // - // * WEBKIT_LOG: The web kit log type. - // - // * INSTRUMENTATION_OUTPUT: The instrumentation type. - // - // * EXERCISER_MONKEY_OUTPUT: For Android, the artifact (log) generated by - // an Android fuzz test. - // - // * CALABASH_JSON_OUTPUT: The Calabash JSON output type. - // - // * CALABASH_PRETTY_OUTPUT: The Calabash pretty output type. - // - // * CALABASH_STANDARD_OUTPUT: The Calabash standard output type. - // - // * CALABASH_JAVA_XML_OUTPUT: The Calabash Java XML output type. - // - // * AUTOMATION_OUTPUT: The automation output type. + // The ARN of the device for which you want to create a remote access session. // - // * APPIUM_SERVER_OUTPUT: The Appium server output type. - // - // * APPIUM_JAVA_OUTPUT: The Appium Java output type. - // - // * APPIUM_JAVA_XML_OUTPUT: The Appium Java XML output type. - // - // * APPIUM_PYTHON_OUTPUT: The Appium Python output type. - // - // * APPIUM_PYTHON_XML_OUTPUT: The Appium Python XML output type. - // - // * EXPLORER_EVENT_LOG: The Explorer event log output type. - // - // * EXPLORER_SUMMARY_LOG: The Explorer summary log output type. + // DeviceArn is a required field + DeviceArn *string `locationName:"deviceArn" min:"32" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the device instance for which you want + // to create a remote access session. + InstanceArn *string `locationName:"instanceArn" min:"32" type:"string"` + + // The interaction mode of the remote access session. Valid values are: // - // * APPLICATION_CRASH_REPORT: The application crash report output type. + // * INTERACTIVE: You can interact with the iOS device by viewing, touching, + // and rotating the screen. You cannot run XCUITest framework-based tests + // in this mode. // - // * XCTEST_LOG: The Xcode test output type. + // * NO_VIDEO: You are connected to the device, but cannot interact with + // it or view the screen. This mode has the fastest test execution speed. + // You can run XCUITest framework-based tests in this mode. // - // * VIDEO: The Video output type. + // * VIDEO_ONLY: You can view the screen, but cannot touch or rotate it. + // You can run XCUITest framework-based tests and watch the screen in this + // mode. + InteractionMode *string `locationName:"interactionMode" type:"string" enum:"InteractionMode"` + + // The name of the remote access session to create. + Name *string `locationName:"name" type:"string"` + + // The Amazon Resource Name (ARN) of the project for which you want to create + // a remote access session. // - // * CUSTOMER_ARTIFACT:The Customer Artifact output type. + // ProjectArn is a required field + ProjectArn *string `locationName:"projectArn" min:"32" type:"string" required:"true"` + + // Set to true if you want to access devices remotely for debugging in your + // remote access session. // - // * CUSTOMER_ARTIFACT_LOG: The Customer Artifact Log output type. + // Remote debugging is no longer supported (https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html). + RemoteDebugEnabled *bool `locationName:"remoteDebugEnabled" type:"boolean"` + + // The Amazon Resource Name (ARN) for the app to be recorded in the remote access + // session. + RemoteRecordAppArn *string `locationName:"remoteRecordAppArn" min:"32" type:"string"` + + // Set to true to enable remote recording for the remote access session. + RemoteRecordEnabled *bool `locationName:"remoteRecordEnabled" type:"boolean"` + + // When set to true, for private devices, Device Farm does not sign your app + // again. For public devices, Device Farm always signs your apps again. // - // * TESTSPEC_OUTPUT: The Test Spec Output type. - Type *string `locationName:"type" type:"string" enum:"ArtifactType"` + // For more information on how Device Farm modifies your uploads during tests, + // see Do you modify my app? (https://aws.amazon.com/device-farm/faq/) + SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` - // The pre-signed Amazon S3 URL that can be used with a corresponding GET request - // to download the artifact's file. - Url *string `locationName:"url" type:"string"` + // Ignored. The public key of the ssh key pair you want to use for connecting + // to remote devices in your remote debugging session. This key is required + // only if remoteDebugEnabled is set to true. + // + // Remote debugging is no longer supported (https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html). + SshPublicKey *string `locationName:"sshPublicKey" type:"string"` } // String returns the string representation -func (s Artifact) String() string { +func (s CreateRemoteAccessSessionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Artifact) GoString() string { +func (s CreateRemoteAccessSessionInput) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *Artifact) SetArn(v string) *Artifact { - s.Arn = &v +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateRemoteAccessSessionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateRemoteAccessSessionInput"} + if s.DeviceArn == nil { + invalidParams.Add(request.NewErrParamRequired("DeviceArn")) + } + if s.DeviceArn != nil && len(*s.DeviceArn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("DeviceArn", 32)) + } + if s.InstanceArn != nil && len(*s.InstanceArn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("InstanceArn", 32)) + } + if s.ProjectArn == nil { + invalidParams.Add(request.NewErrParamRequired("ProjectArn")) + } + if s.ProjectArn != nil && len(*s.ProjectArn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("ProjectArn", 32)) + } + if s.RemoteRecordAppArn != nil && len(*s.RemoteRecordAppArn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("RemoteRecordAppArn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientId sets the ClientId field's value. +func (s *CreateRemoteAccessSessionInput) SetClientId(v string) *CreateRemoteAccessSessionInput { + s.ClientId = &v return s } -// SetExtension sets the Extension field's value. -func (s *Artifact) SetExtension(v string) *Artifact { - s.Extension = &v +// SetConfiguration sets the Configuration field's value. +func (s *CreateRemoteAccessSessionInput) SetConfiguration(v *CreateRemoteAccessSessionConfiguration) *CreateRemoteAccessSessionInput { + s.Configuration = v + return s +} + +// SetDeviceArn sets the DeviceArn field's value. +func (s *CreateRemoteAccessSessionInput) SetDeviceArn(v string) *CreateRemoteAccessSessionInput { + s.DeviceArn = &v + return s +} + +// SetInstanceArn sets the InstanceArn field's value. +func (s *CreateRemoteAccessSessionInput) SetInstanceArn(v string) *CreateRemoteAccessSessionInput { + s.InstanceArn = &v + return s +} + +// SetInteractionMode sets the InteractionMode field's value. +func (s *CreateRemoteAccessSessionInput) SetInteractionMode(v string) *CreateRemoteAccessSessionInput { + s.InteractionMode = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateRemoteAccessSessionInput) SetName(v string) *CreateRemoteAccessSessionInput { + s.Name = &v + return s +} + +// SetProjectArn sets the ProjectArn field's value. +func (s *CreateRemoteAccessSessionInput) SetProjectArn(v string) *CreateRemoteAccessSessionInput { + s.ProjectArn = &v + return s +} + +// SetRemoteDebugEnabled sets the RemoteDebugEnabled field's value. +func (s *CreateRemoteAccessSessionInput) SetRemoteDebugEnabled(v bool) *CreateRemoteAccessSessionInput { + s.RemoteDebugEnabled = &v + return s +} + +// SetRemoteRecordAppArn sets the RemoteRecordAppArn field's value. +func (s *CreateRemoteAccessSessionInput) SetRemoteRecordAppArn(v string) *CreateRemoteAccessSessionInput { + s.RemoteRecordAppArn = &v return s } -// SetName sets the Name field's value. -func (s *Artifact) SetName(v string) *Artifact { - s.Name = &v +// SetRemoteRecordEnabled sets the RemoteRecordEnabled field's value. +func (s *CreateRemoteAccessSessionInput) SetRemoteRecordEnabled(v bool) *CreateRemoteAccessSessionInput { + s.RemoteRecordEnabled = &v return s } -// SetType sets the Type field's value. -func (s *Artifact) SetType(v string) *Artifact { - s.Type = &v +// SetSkipAppResign sets the SkipAppResign field's value. +func (s *CreateRemoteAccessSessionInput) SetSkipAppResign(v bool) *CreateRemoteAccessSessionInput { + s.SkipAppResign = &v return s } -// SetUrl sets the Url field's value. -func (s *Artifact) SetUrl(v string) *Artifact { - s.Url = &v +// SetSshPublicKey sets the SshPublicKey field's value. +func (s *CreateRemoteAccessSessionInput) SetSshPublicKey(v string) *CreateRemoteAccessSessionInput { + s.SshPublicKey = &v return s } -// Represents the amount of CPU that an app is using on a physical device. -// -// Note that this does not represent system-wide CPU usage. -type CPU struct { +// Represents the server response from a request to create a remote access session. +type CreateRemoteAccessSessionOutput struct { _ struct{} `type:"structure"` - // The CPU's architecture, for example x86 or ARM. - Architecture *string `locationName:"architecture" type:"string"` - - // The clock speed of the device's CPU, expressed in hertz (Hz). For example, - // a 1.2 GHz CPU is expressed as 1200000000. - Clock *float64 `locationName:"clock" type:"double"` - - // The CPU's frequency. - Frequency *string `locationName:"frequency" type:"string"` + // A container that describes the remote access session when the request to + // create a remote access session is sent. + RemoteAccessSession *RemoteAccessSession `locationName:"remoteAccessSession" type:"structure"` } // String returns the string representation -func (s CPU) String() string { +func (s CreateRemoteAccessSessionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CPU) GoString() string { +func (s CreateRemoteAccessSessionOutput) GoString() string { return s.String() } -// SetArchitecture sets the Architecture field's value. -func (s *CPU) SetArchitecture(v string) *CPU { - s.Architecture = &v - return s -} - -// SetClock sets the Clock field's value. -func (s *CPU) SetClock(v float64) *CPU { - s.Clock = &v - return s -} - -// SetFrequency sets the Frequency field's value. -func (s *CPU) SetFrequency(v string) *CPU { - s.Frequency = &v +// SetRemoteAccessSession sets the RemoteAccessSession field's value. +func (s *CreateRemoteAccessSessionOutput) SetRemoteAccessSession(v *RemoteAccessSession) *CreateRemoteAccessSessionOutput { + s.RemoteAccessSession = v return s } -// Represents entity counters. -type Counters struct { +type CreateTestGridProjectInput struct { _ struct{} `type:"structure"` - // The number of errored entities. - Errored *int64 `locationName:"errored" type:"integer"` - - // The number of failed entities. - Failed *int64 `locationName:"failed" type:"integer"` - - // The number of passed entities. - Passed *int64 `locationName:"passed" type:"integer"` - - // The number of skipped entities. - Skipped *int64 `locationName:"skipped" type:"integer"` - - // The number of stopped entities. - Stopped *int64 `locationName:"stopped" type:"integer"` - - // The total number of entities. - Total *int64 `locationName:"total" type:"integer"` + // Human-readable description of the project. + Description *string `locationName:"description" min:"1" type:"string"` - // The number of warned entities. - Warned *int64 `locationName:"warned" type:"integer"` + // Human-readable name of the Selenium testing project. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` } // String returns the string representation -func (s Counters) String() string { +func (s CreateTestGridProjectInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Counters) GoString() string { +func (s CreateTestGridProjectInput) GoString() string { return s.String() } -// SetErrored sets the Errored field's value. -func (s *Counters) SetErrored(v int64) *Counters { - s.Errored = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTestGridProjectInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTestGridProjectInput"} + if s.Description != nil && len(*s.Description) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Description", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetFailed sets the Failed field's value. -func (s *Counters) SetFailed(v int64) *Counters { - s.Failed = &v +// SetDescription sets the Description field's value. +func (s *CreateTestGridProjectInput) SetDescription(v string) *CreateTestGridProjectInput { + s.Description = &v return s } -// SetPassed sets the Passed field's value. -func (s *Counters) SetPassed(v int64) *Counters { - s.Passed = &v +// SetName sets the Name field's value. +func (s *CreateTestGridProjectInput) SetName(v string) *CreateTestGridProjectInput { + s.Name = &v return s } -// SetSkipped sets the Skipped field's value. -func (s *Counters) SetSkipped(v int64) *Counters { - s.Skipped = &v - return s +type CreateTestGridProjectOutput struct { + _ struct{} `type:"structure"` + + // ARN of the Selenium testing project that was created. + TestGridProject *TestGridProject `locationName:"testGridProject" type:"structure"` } -// SetStopped sets the Stopped field's value. -func (s *Counters) SetStopped(v int64) *Counters { - s.Stopped = &v - return s +// String returns the string representation +func (s CreateTestGridProjectOutput) String() string { + return awsutil.Prettify(s) } -// SetTotal sets the Total field's value. -func (s *Counters) SetTotal(v int64) *Counters { - s.Total = &v - return s +// GoString returns the string representation +func (s CreateTestGridProjectOutput) GoString() string { + return s.String() } -// SetWarned sets the Warned field's value. -func (s *Counters) SetWarned(v int64) *Counters { - s.Warned = &v +// SetTestGridProject sets the TestGridProject field's value. +func (s *CreateTestGridProjectOutput) SetTestGridProject(v *TestGridProject) *CreateTestGridProjectOutput { + s.TestGridProject = v return s } -// Represents a request to the create device pool operation. -type CreateDevicePoolInput struct { +type CreateTestGridUrlInput struct { _ struct{} `type:"structure"` - // The device pool's description. - Description *string `locationName:"description" type:"string"` - - // The number of devices that Device Farm can add to your device pool. Device - // Farm adds devices that are available and that meet the criteria that you - // assign for the rules parameter. Depending on how many devices meet these - // constraints, your device pool might contain fewer devices than the value - // for this parameter. - // - // By specifying the maximum number of devices, you can control the costs that - // you incur by running tests. - MaxDevices *int64 `locationName:"maxDevices" type:"integer"` - - // The device pool's name. + // Lifetime, in seconds, of the URL. // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` + // ExpiresInSeconds is a required field + ExpiresInSeconds *int64 `locationName:"expiresInSeconds" min:"60" type:"integer" required:"true"` - // The ARN of the project for the device pool. + // ARN (from CreateTestGridProject or ListTestGridProjects) to associate with + // the short-term URL. // // ProjectArn is a required field ProjectArn *string `locationName:"projectArn" min:"32" type:"string" required:"true"` - - // The device pool's rules. - // - // Rules is a required field - Rules []*Rule `locationName:"rules" type:"list" required:"true"` } // String returns the string representation -func (s CreateDevicePoolInput) String() string { +func (s CreateTestGridUrlInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateDevicePoolInput) GoString() string { +func (s CreateTestGridUrlInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDevicePoolInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDevicePoolInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) +func (s *CreateTestGridUrlInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTestGridUrlInput"} + if s.ExpiresInSeconds == nil { + invalidParams.Add(request.NewErrParamRequired("ExpiresInSeconds")) + } + if s.ExpiresInSeconds != nil && *s.ExpiresInSeconds < 60 { + invalidParams.Add(request.NewErrParamMinValue("ExpiresInSeconds", 60)) } if s.ProjectArn == nil { invalidParams.Add(request.NewErrParamRequired("ProjectArn")) @@ -7194,9 +9074,6 @@ func (s *CreateDevicePoolInput) Validate() error { if s.ProjectArn != nil && len(*s.ProjectArn) < 32 { invalidParams.Add(request.NewErrParamMinLen("ProjectArn", 32)) } - if s.Rules == nil { - invalidParams.Add(request.NewErrParamRequired("Rules")) - } if invalidParams.Len() > 0 { return invalidParams @@ -7204,102 +9081,171 @@ func (s *CreateDevicePoolInput) Validate() error { return nil } -// SetDescription sets the Description field's value. -func (s *CreateDevicePoolInput) SetDescription(v string) *CreateDevicePoolInput { - s.Description = &v - return s -} - -// SetMaxDevices sets the MaxDevices field's value. -func (s *CreateDevicePoolInput) SetMaxDevices(v int64) *CreateDevicePoolInput { - s.MaxDevices = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateDevicePoolInput) SetName(v string) *CreateDevicePoolInput { - s.Name = &v +// SetExpiresInSeconds sets the ExpiresInSeconds field's value. +func (s *CreateTestGridUrlInput) SetExpiresInSeconds(v int64) *CreateTestGridUrlInput { + s.ExpiresInSeconds = &v return s } // SetProjectArn sets the ProjectArn field's value. -func (s *CreateDevicePoolInput) SetProjectArn(v string) *CreateDevicePoolInput { +func (s *CreateTestGridUrlInput) SetProjectArn(v string) *CreateTestGridUrlInput { s.ProjectArn = &v return s } -// SetRules sets the Rules field's value. -func (s *CreateDevicePoolInput) SetRules(v []*Rule) *CreateDevicePoolInput { - s.Rules = v - return s -} - -// Represents the result of a create device pool request. -type CreateDevicePoolOutput struct { +type CreateTestGridUrlOutput struct { _ struct{} `type:"structure"` - // The newly created device pool. - DevicePool *DevicePool `locationName:"devicePool" type:"structure"` + // The number of seconds the URL from CreateTestGridUrlResult$url stays active. + Expires *time.Time `locationName:"expires" type:"timestamp"` + + // A signed URL, expiring in CreateTestGridUrlRequest$expiresInSeconds seconds, + // to be passed to a RemoteWebDriver. + Url *string `locationName:"url" type:"string"` } // String returns the string representation -func (s CreateDevicePoolOutput) String() string { +func (s CreateTestGridUrlOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateDevicePoolOutput) GoString() string { +func (s CreateTestGridUrlOutput) GoString() string { return s.String() } -// SetDevicePool sets the DevicePool field's value. -func (s *CreateDevicePoolOutput) SetDevicePool(v *DevicePool) *CreateDevicePoolOutput { - s.DevicePool = v +// SetExpires sets the Expires field's value. +func (s *CreateTestGridUrlOutput) SetExpires(v time.Time) *CreateTestGridUrlOutput { + s.Expires = &v return s } -type CreateInstanceProfileInput struct { - _ struct{} `type:"structure"` +// SetUrl sets the Url field's value. +func (s *CreateTestGridUrlOutput) SetUrl(v string) *CreateTestGridUrlOutput { + s.Url = &v + return s +} - // The description of your instance profile. - Description *string `locationName:"description" type:"string"` +// Represents a request to the create upload operation. +type CreateUploadInput struct { + _ struct{} `type:"structure"` - // An array of strings specifying the list of app packages that should not be - // cleaned up from the device after a test run is over. - // - // The list of packages is only considered if you set packageCleanup to true. - ExcludeAppPackagesFromCleanup []*string `locationName:"excludeAppPackagesFromCleanup" type:"list"` + // The upload's content type (for example, application/octet-stream). + ContentType *string `locationName:"contentType" type:"string"` - // The name of your instance profile. + // The upload's file name. The name should not contain any forward slashes (/). + // If you are uploading an iOS app, the file name must end with the .ipa extension. + // If you are uploading an Android app, the file name must end with the .apk + // extension. For all others, the file name must end with the .zip file extension. // // Name is a required field Name *string `locationName:"name" type:"string" required:"true"` - // When set to true, Device Farm will remove app packages after a test run. - // The default value is false for private devices. - PackageCleanup *bool `locationName:"packageCleanup" type:"boolean"` + // The ARN of the project for the upload. + // + // ProjectArn is a required field + ProjectArn *string `locationName:"projectArn" min:"32" type:"string" required:"true"` - // When set to true, Device Farm will reboot the instance after a test run. - // The default value is true. - RebootAfterUse *bool `locationName:"rebootAfterUse" type:"boolean"` + // The upload's upload type. + // + // Must be one of the following values: + // + // * ANDROID_APP + // + // * IOS_APP + // + // * WEB_APP + // + // * EXTERNAL_DATA + // + // * APPIUM_JAVA_JUNIT_TEST_PACKAGE + // + // * APPIUM_JAVA_TESTNG_TEST_PACKAGE + // + // * APPIUM_PYTHON_TEST_PACKAGE + // + // * APPIUM_NODE_TEST_PACKAGE + // + // * APPIUM_RUBY_TEST_PACKAGE + // + // * APPIUM_WEB_JAVA_JUNIT_TEST_PACKAGE + // + // * APPIUM_WEB_JAVA_TESTNG_TEST_PACKAGE + // + // * APPIUM_WEB_PYTHON_TEST_PACKAGE + // + // * APPIUM_WEB_NODE_TEST_PACKAGE + // + // * APPIUM_WEB_RUBY_TEST_PACKAGE + // + // * CALABASH_TEST_PACKAGE + // + // * INSTRUMENTATION_TEST_PACKAGE + // + // * UIAUTOMATION_TEST_PACKAGE + // + // * UIAUTOMATOR_TEST_PACKAGE + // + // * XCTEST_TEST_PACKAGE + // + // * XCTEST_UI_TEST_PACKAGE + // + // * APPIUM_JAVA_JUNIT_TEST_SPEC + // + // * APPIUM_JAVA_TESTNG_TEST_SPEC + // + // * APPIUM_PYTHON_TEST_SPEC + // + // * APPIUM_NODE_TEST_SPEC + // + // * APPIUM_RUBY_TEST_SPEC + // + // * APPIUM_WEB_JAVA_JUNIT_TEST_SPEC + // + // * APPIUM_WEB_JAVA_TESTNG_TEST_SPEC + // + // * APPIUM_WEB_PYTHON_TEST_SPEC + // + // * APPIUM_WEB_NODE_TEST_SPEC + // + // * APPIUM_WEB_RUBY_TEST_SPEC + // + // * INSTRUMENTATION_TEST_SPEC + // + // * XCTEST_UI_TEST_SPEC + // + // If you call CreateUpload with WEB_APP specified, AWS Device Farm throws an + // ArgumentException error. + // + // Type is a required field + Type *string `locationName:"type" type:"string" required:"true" enum:"UploadType"` } // String returns the string representation -func (s CreateInstanceProfileInput) String() string { +func (s CreateUploadInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateInstanceProfileInput) GoString() string { +func (s CreateUploadInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateInstanceProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateInstanceProfileInput"} +func (s *CreateUploadInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateUploadInput"} if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } + if s.ProjectArn == nil { + invalidParams.Add(request.NewErrParamRequired("ProjectArn")) + } + if s.ProjectArn != nil && len(*s.ProjectArn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("ProjectArn", 32)) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } if invalidParams.Len() > 0 { return invalidParams @@ -7307,129 +9253,100 @@ func (s *CreateInstanceProfileInput) Validate() error { return nil } -// SetDescription sets the Description field's value. -func (s *CreateInstanceProfileInput) SetDescription(v string) *CreateInstanceProfileInput { - s.Description = &v - return s -} - -// SetExcludeAppPackagesFromCleanup sets the ExcludeAppPackagesFromCleanup field's value. -func (s *CreateInstanceProfileInput) SetExcludeAppPackagesFromCleanup(v []*string) *CreateInstanceProfileInput { - s.ExcludeAppPackagesFromCleanup = v +// SetContentType sets the ContentType field's value. +func (s *CreateUploadInput) SetContentType(v string) *CreateUploadInput { + s.ContentType = &v return s } // SetName sets the Name field's value. -func (s *CreateInstanceProfileInput) SetName(v string) *CreateInstanceProfileInput { +func (s *CreateUploadInput) SetName(v string) *CreateUploadInput { s.Name = &v return s } -// SetPackageCleanup sets the PackageCleanup field's value. -func (s *CreateInstanceProfileInput) SetPackageCleanup(v bool) *CreateInstanceProfileInput { - s.PackageCleanup = &v +// SetProjectArn sets the ProjectArn field's value. +func (s *CreateUploadInput) SetProjectArn(v string) *CreateUploadInput { + s.ProjectArn = &v return s } -// SetRebootAfterUse sets the RebootAfterUse field's value. -func (s *CreateInstanceProfileInput) SetRebootAfterUse(v bool) *CreateInstanceProfileInput { - s.RebootAfterUse = &v +// SetType sets the Type field's value. +func (s *CreateUploadInput) SetType(v string) *CreateUploadInput { + s.Type = &v return s } -type CreateInstanceProfileOutput struct { +// Represents the result of a create upload request. +type CreateUploadOutput struct { _ struct{} `type:"structure"` - // An object containing information about your instance profile. - InstanceProfile *InstanceProfile `locationName:"instanceProfile" type:"structure"` + // The newly created upload. + Upload *Upload `locationName:"upload" type:"structure"` } // String returns the string representation -func (s CreateInstanceProfileOutput) String() string { +func (s CreateUploadOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateInstanceProfileOutput) GoString() string { +func (s CreateUploadOutput) GoString() string { return s.String() } -// SetInstanceProfile sets the InstanceProfile field's value. -func (s *CreateInstanceProfileOutput) SetInstanceProfile(v *InstanceProfile) *CreateInstanceProfileOutput { - s.InstanceProfile = v +// SetUpload sets the Upload field's value. +func (s *CreateUploadOutput) SetUpload(v *Upload) *CreateUploadOutput { + s.Upload = v return s } -type CreateNetworkProfileInput struct { +type CreateVPCEConfigurationInput struct { _ struct{} `type:"structure"` - // The description of the network profile. - Description *string `locationName:"description" type:"string"` - - // The data throughput rate in bits per second, as an integer from 0 to 104857600. - DownlinkBandwidthBits *int64 `locationName:"downlinkBandwidthBits" type:"long"` - - // Delay time for all packets to destination in milliseconds as an integer from - // 0 to 2000. - DownlinkDelayMs *int64 `locationName:"downlinkDelayMs" type:"long"` - - // Time variation in the delay of received packets in milliseconds as an integer - // from 0 to 2000. - DownlinkJitterMs *int64 `locationName:"downlinkJitterMs" type:"long"` + // The DNS name of the service running in your VPC that you want Device Farm + // to test. + // + // ServiceDnsName is a required field + ServiceDnsName *string `locationName:"serviceDnsName" type:"string" required:"true"` - // Proportion of received packets that fail to arrive from 0 to 100 percent. - DownlinkLossPercent *int64 `locationName:"downlinkLossPercent" type:"integer"` + // An optional description that provides details about your VPC endpoint configuration. + VpceConfigurationDescription *string `locationName:"vpceConfigurationDescription" type:"string"` - // The name you wish to specify for the new network profile. + // The friendly name you give to your VPC endpoint configuration, to manage + // your configurations more easily. // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` + // VpceConfigurationName is a required field + VpceConfigurationName *string `locationName:"vpceConfigurationName" type:"string" required:"true"` - // The Amazon Resource Name (ARN) of the project for which you want to create - // a network profile. + // The name of the VPC endpoint service running in your AWS account that you + // want Device Farm to test. // - // ProjectArn is a required field - ProjectArn *string `locationName:"projectArn" min:"32" type:"string" required:"true"` - - // The type of network profile you wish to create. Valid values are listed below. - Type *string `locationName:"type" type:"string" enum:"NetworkProfileType"` - - // The data throughput rate in bits per second, as an integer from 0 to 104857600. - UplinkBandwidthBits *int64 `locationName:"uplinkBandwidthBits" type:"long"` - - // Delay time for all packets to destination in milliseconds as an integer from - // 0 to 2000. - UplinkDelayMs *int64 `locationName:"uplinkDelayMs" type:"long"` - - // Time variation in the delay of received packets in milliseconds as an integer - // from 0 to 2000. - UplinkJitterMs *int64 `locationName:"uplinkJitterMs" type:"long"` - - // Proportion of transmitted packets that fail to arrive from 0 to 100 percent. - UplinkLossPercent *int64 `locationName:"uplinkLossPercent" type:"integer"` + // VpceServiceName is a required field + VpceServiceName *string `locationName:"vpceServiceName" type:"string" required:"true"` } // String returns the string representation -func (s CreateNetworkProfileInput) String() string { +func (s CreateVPCEConfigurationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateNetworkProfileInput) GoString() string { +func (s CreateVPCEConfigurationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateNetworkProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateNetworkProfileInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) +func (s *CreateVPCEConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateVPCEConfigurationInput"} + if s.ServiceDnsName == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceDnsName")) } - if s.ProjectArn == nil { - invalidParams.Add(request.NewErrParamRequired("ProjectArn")) + if s.VpceConfigurationName == nil { + invalidParams.Add(request.NewErrParamRequired("VpceConfigurationName")) } - if s.ProjectArn != nil && len(*s.ProjectArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("ProjectArn", 32)) + if s.VpceServiceName == nil { + invalidParams.Add(request.NewErrParamRequired("VpceServiceName")) } if invalidParams.Len() > 0 { @@ -7438,131 +9355,189 @@ func (s *CreateNetworkProfileInput) Validate() error { return nil } -// SetDescription sets the Description field's value. -func (s *CreateNetworkProfileInput) SetDescription(v string) *CreateNetworkProfileInput { - s.Description = &v +// SetServiceDnsName sets the ServiceDnsName field's value. +func (s *CreateVPCEConfigurationInput) SetServiceDnsName(v string) *CreateVPCEConfigurationInput { + s.ServiceDnsName = &v return s } -// SetDownlinkBandwidthBits sets the DownlinkBandwidthBits field's value. -func (s *CreateNetworkProfileInput) SetDownlinkBandwidthBits(v int64) *CreateNetworkProfileInput { - s.DownlinkBandwidthBits = &v +// SetVpceConfigurationDescription sets the VpceConfigurationDescription field's value. +func (s *CreateVPCEConfigurationInput) SetVpceConfigurationDescription(v string) *CreateVPCEConfigurationInput { + s.VpceConfigurationDescription = &v return s } -// SetDownlinkDelayMs sets the DownlinkDelayMs field's value. -func (s *CreateNetworkProfileInput) SetDownlinkDelayMs(v int64) *CreateNetworkProfileInput { - s.DownlinkDelayMs = &v +// SetVpceConfigurationName sets the VpceConfigurationName field's value. +func (s *CreateVPCEConfigurationInput) SetVpceConfigurationName(v string) *CreateVPCEConfigurationInput { + s.VpceConfigurationName = &v return s } -// SetDownlinkJitterMs sets the DownlinkJitterMs field's value. -func (s *CreateNetworkProfileInput) SetDownlinkJitterMs(v int64) *CreateNetworkProfileInput { - s.DownlinkJitterMs = &v +// SetVpceServiceName sets the VpceServiceName field's value. +func (s *CreateVPCEConfigurationInput) SetVpceServiceName(v string) *CreateVPCEConfigurationInput { + s.VpceServiceName = &v return s } -// SetDownlinkLossPercent sets the DownlinkLossPercent field's value. -func (s *CreateNetworkProfileInput) SetDownlinkLossPercent(v int64) *CreateNetworkProfileInput { - s.DownlinkLossPercent = &v - return s +type CreateVPCEConfigurationOutput struct { + _ struct{} `type:"structure"` + + // An object that contains information about your VPC endpoint configuration. + VpceConfiguration *VPCEConfiguration `locationName:"vpceConfiguration" type:"structure"` } -// SetName sets the Name field's value. -func (s *CreateNetworkProfileInput) SetName(v string) *CreateNetworkProfileInput { - s.Name = &v - return s +// String returns the string representation +func (s CreateVPCEConfigurationOutput) String() string { + return awsutil.Prettify(s) } -// SetProjectArn sets the ProjectArn field's value. -func (s *CreateNetworkProfileInput) SetProjectArn(v string) *CreateNetworkProfileInput { - s.ProjectArn = &v +// GoString returns the string representation +func (s CreateVPCEConfigurationOutput) GoString() string { + return s.String() +} + +// SetVpceConfiguration sets the VpceConfiguration field's value. +func (s *CreateVPCEConfigurationOutput) SetVpceConfiguration(v *VPCEConfiguration) *CreateVPCEConfigurationOutput { + s.VpceConfiguration = v return s } -// SetType sets the Type field's value. -func (s *CreateNetworkProfileInput) SetType(v string) *CreateNetworkProfileInput { - s.Type = &v +// A JSON object that specifies the paths where the artifacts generated by the +// customer's tests, on the device or in the test environment, are pulled from. +// +// Specify deviceHostPaths and optionally specify either iosPaths or androidPaths. +// +// For web app tests, you can specify both iosPaths and androidPaths. +type CustomerArtifactPaths struct { + _ struct{} `type:"structure"` + + // Comma-separated list of paths on the Android device where the artifacts generated + // by the customer's tests are pulled from. + AndroidPaths []*string `locationName:"androidPaths" type:"list"` + + // Comma-separated list of paths in the test execution environment where the + // artifacts generated by the customer's tests are pulled from. + DeviceHostPaths []*string `locationName:"deviceHostPaths" type:"list"` + + // Comma-separated list of paths on the iOS device where the artifacts generated + // by the customer's tests are pulled from. + IosPaths []*string `locationName:"iosPaths" type:"list"` +} + +// String returns the string representation +func (s CustomerArtifactPaths) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CustomerArtifactPaths) GoString() string { + return s.String() +} + +// SetAndroidPaths sets the AndroidPaths field's value. +func (s *CustomerArtifactPaths) SetAndroidPaths(v []*string) *CustomerArtifactPaths { + s.AndroidPaths = v return s } -// SetUplinkBandwidthBits sets the UplinkBandwidthBits field's value. -func (s *CreateNetworkProfileInput) SetUplinkBandwidthBits(v int64) *CreateNetworkProfileInput { - s.UplinkBandwidthBits = &v +// SetDeviceHostPaths sets the DeviceHostPaths field's value. +func (s *CustomerArtifactPaths) SetDeviceHostPaths(v []*string) *CustomerArtifactPaths { + s.DeviceHostPaths = v return s } -// SetUplinkDelayMs sets the UplinkDelayMs field's value. -func (s *CreateNetworkProfileInput) SetUplinkDelayMs(v int64) *CreateNetworkProfileInput { - s.UplinkDelayMs = &v +// SetIosPaths sets the IosPaths field's value. +func (s *CustomerArtifactPaths) SetIosPaths(v []*string) *CustomerArtifactPaths { + s.IosPaths = v return s } -// SetUplinkJitterMs sets the UplinkJitterMs field's value. -func (s *CreateNetworkProfileInput) SetUplinkJitterMs(v int64) *CreateNetworkProfileInput { - s.UplinkJitterMs = &v - return s +// Represents a request to the delete device pool operation. +type DeleteDevicePoolInput struct { + _ struct{} `type:"structure"` + + // Represents the Amazon Resource Name (ARN) of the Device Farm device pool + // to delete. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDevicePoolInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDevicePoolInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDevicePoolInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDevicePoolInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetUplinkLossPercent sets the UplinkLossPercent field's value. -func (s *CreateNetworkProfileInput) SetUplinkLossPercent(v int64) *CreateNetworkProfileInput { - s.UplinkLossPercent = &v +// SetArn sets the Arn field's value. +func (s *DeleteDevicePoolInput) SetArn(v string) *DeleteDevicePoolInput { + s.Arn = &v return s } -type CreateNetworkProfileOutput struct { +// Represents the result of a delete device pool request. +type DeleteDevicePoolOutput struct { _ struct{} `type:"structure"` - - // The network profile that is returned by the create network profile request. - NetworkProfile *NetworkProfile `locationName:"networkProfile" type:"structure"` } // String returns the string representation -func (s CreateNetworkProfileOutput) String() string { +func (s DeleteDevicePoolOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateNetworkProfileOutput) GoString() string { +func (s DeleteDevicePoolOutput) GoString() string { return s.String() } -// SetNetworkProfile sets the NetworkProfile field's value. -func (s *CreateNetworkProfileOutput) SetNetworkProfile(v *NetworkProfile) *CreateNetworkProfileOutput { - s.NetworkProfile = v - return s -} - -// Represents a request to the create project operation. -type CreateProjectInput struct { +type DeleteInstanceProfileInput struct { _ struct{} `type:"structure"` - // Sets the execution timeout value (in minutes) for a project. All test runs - // in this project will use the specified execution timeout value unless overridden - // when scheduling a run. - DefaultJobTimeoutMinutes *int64 `locationName:"defaultJobTimeoutMinutes" type:"integer"` - - // The project's name. + // The Amazon Resource Name (ARN) of the instance profile you are requesting + // to delete. // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` } // String returns the string representation -func (s CreateProjectInput) String() string { +func (s DeleteInstanceProfileInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateProjectInput) GoString() string { +func (s DeleteInstanceProfileInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateProjectInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateProjectInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) +func (s *DeleteInstanceProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteInstanceProfileInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) } if invalidParams.Len() > 0 { @@ -7571,183 +9546,167 @@ func (s *CreateProjectInput) Validate() error { return nil } -// SetDefaultJobTimeoutMinutes sets the DefaultJobTimeoutMinutes field's value. -func (s *CreateProjectInput) SetDefaultJobTimeoutMinutes(v int64) *CreateProjectInput { - s.DefaultJobTimeoutMinutes = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateProjectInput) SetName(v string) *CreateProjectInput { - s.Name = &v +// SetArn sets the Arn field's value. +func (s *DeleteInstanceProfileInput) SetArn(v string) *DeleteInstanceProfileInput { + s.Arn = &v return s } -// Represents the result of a create project request. -type CreateProjectOutput struct { +type DeleteInstanceProfileOutput struct { _ struct{} `type:"structure"` - - // The newly created project. - Project *Project `locationName:"project" type:"structure"` } // String returns the string representation -func (s CreateProjectOutput) String() string { +func (s DeleteInstanceProfileOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateProjectOutput) GoString() string { +func (s DeleteInstanceProfileOutput) GoString() string { return s.String() } -// SetProject sets the Project field's value. -func (s *CreateProjectOutput) SetProject(v *Project) *CreateProjectOutput { - s.Project = v - return s -} - -// Configuration settings for a remote access session, including billing method. -type CreateRemoteAccessSessionConfiguration struct { +type DeleteNetworkProfileInput struct { _ struct{} `type:"structure"` - // The billing method for the remote access session. - BillingMethod *string `locationName:"billingMethod" type:"string" enum:"BillingMethod"` - - // An array of Amazon Resource Names (ARNs) included in the VPC endpoint configuration. - VpceConfigurationArns []*string `locationName:"vpceConfigurationArns" type:"list"` + // The ARN of the network profile to delete. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` } // String returns the string representation -func (s CreateRemoteAccessSessionConfiguration) String() string { +func (s DeleteNetworkProfileInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateRemoteAccessSessionConfiguration) GoString() string { +func (s DeleteNetworkProfileInput) GoString() string { return s.String() } -// SetBillingMethod sets the BillingMethod field's value. -func (s *CreateRemoteAccessSessionConfiguration) SetBillingMethod(v string) *CreateRemoteAccessSessionConfiguration { - s.BillingMethod = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteNetworkProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteNetworkProfileInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetVpceConfigurationArns sets the VpceConfigurationArns field's value. -func (s *CreateRemoteAccessSessionConfiguration) SetVpceConfigurationArns(v []*string) *CreateRemoteAccessSessionConfiguration { - s.VpceConfigurationArns = v +// SetArn sets the Arn field's value. +func (s *DeleteNetworkProfileInput) SetArn(v string) *DeleteNetworkProfileInput { + s.Arn = &v return s } -// Creates and submits a request to start a remote access session. -type CreateRemoteAccessSessionInput struct { +type DeleteNetworkProfileOutput struct { _ struct{} `type:"structure"` +} - // Unique identifier for the client. If you want access to multiple devices - // on the same client, you should pass the same clientId value in each call - // to CreateRemoteAccessSession. This is required only if remoteDebugEnabled - // is set to true. - // - // Remote debugging is no longer supported (https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html). - ClientId *string `locationName:"clientId" type:"string"` - - // The configuration information for the remote access session request. - Configuration *CreateRemoteAccessSessionConfiguration `locationName:"configuration" type:"structure"` +// String returns the string representation +func (s DeleteNetworkProfileOutput) String() string { + return awsutil.Prettify(s) +} - // The Amazon Resource Name (ARN) of the device for which you want to create - // a remote access session. - // - // DeviceArn is a required field - DeviceArn *string `locationName:"deviceArn" min:"32" type:"string" required:"true"` +// GoString returns the string representation +func (s DeleteNetworkProfileOutput) GoString() string { + return s.String() +} - // The Amazon Resource Name (ARN) of the device instance for which you want - // to create a remote access session. - InstanceArn *string `locationName:"instanceArn" min:"32" type:"string"` +// Represents a request to the delete project operation. +type DeleteProjectInput struct { + _ struct{} `type:"structure"` - // The interaction mode of the remote access session. Valid values are: - // - // * INTERACTIVE: You can interact with the iOS device by viewing, touching, - // and rotating the screen. You cannot run XCUITest framework-based tests - // in this mode. + // Represents the Amazon Resource Name (ARN) of the Device Farm project to delete. // - // * NO_VIDEO: You are connected to the device but cannot interact with it - // or view the screen. This mode has the fastest test execution speed. You - // can run XCUITest framework-based tests in this mode. - // - // * VIDEO_ONLY: You can view the screen but cannot touch or rotate it. You - // can run XCUITest framework-based tests and watch the screen in this mode. - InteractionMode *string `locationName:"interactionMode" type:"string" enum:"InteractionMode"` - - // The name of the remote access session that you wish to create. - Name *string `locationName:"name" type:"string"` + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` +} - // The Amazon Resource Name (ARN) of the project for which you want to create - // a remote access session. - // - // ProjectArn is a required field - ProjectArn *string `locationName:"projectArn" min:"32" type:"string" required:"true"` +// String returns the string representation +func (s DeleteProjectInput) String() string { + return awsutil.Prettify(s) +} - // Set to true if you want to access devices remotely for debugging in your - // remote access session. - // - // Remote debugging is no longer supported (https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html). - RemoteDebugEnabled *bool `locationName:"remoteDebugEnabled" type:"boolean"` +// GoString returns the string representation +func (s DeleteProjectInput) GoString() string { + return s.String() +} - // The Amazon Resource Name (ARN) for the app to be recorded in the remote access - // session. - RemoteRecordAppArn *string `locationName:"remoteRecordAppArn" min:"32" type:"string"` +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteProjectInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteProjectInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } - // Set to true to enable remote recording for the remote access session. - RemoteRecordEnabled *bool `locationName:"remoteRecordEnabled" type:"boolean"` + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} - // When set to true, for private devices, Device Farm will not sign your app - // again. For public devices, Device Farm always signs your apps again and this - // parameter has no effect. - // - // For more information about how Device Farm re-signs your app(s), see Do you - // modify my app? (https://aws.amazon.com/device-farm/faq/) in the AWS Device - // Farm FAQs. - SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` +// SetArn sets the Arn field's value. +func (s *DeleteProjectInput) SetArn(v string) *DeleteProjectInput { + s.Arn = &v + return s +} - // Ignored. The public key of the ssh key pair you want to use for connecting - // to remote devices in your remote debugging session. This is only required - // if remoteDebugEnabled is set to true. - // - // Remote debugging is no longer supported (https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html). - SshPublicKey *string `locationName:"sshPublicKey" type:"string"` +// Represents the result of a delete project request. +type DeleteProjectOutput struct { + _ struct{} `type:"structure"` } // String returns the string representation -func (s CreateRemoteAccessSessionInput) String() string { +func (s DeleteProjectOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateRemoteAccessSessionInput) GoString() string { +func (s DeleteProjectOutput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRemoteAccessSessionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRemoteAccessSessionInput"} - if s.DeviceArn == nil { - invalidParams.Add(request.NewErrParamRequired("DeviceArn")) - } - if s.DeviceArn != nil && len(*s.DeviceArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("DeviceArn", 32)) - } - if s.InstanceArn != nil && len(*s.InstanceArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("InstanceArn", 32)) - } - if s.ProjectArn == nil { - invalidParams.Add(request.NewErrParamRequired("ProjectArn")) - } - if s.ProjectArn != nil && len(*s.ProjectArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("ProjectArn", 32)) +// Represents the request to delete the specified remote access session. +type DeleteRemoteAccessSessionInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the session for which you want to delete + // remote access. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteRemoteAccessSessionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRemoteAccessSessionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRemoteAccessSessionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRemoteAccessSessionInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) } - if s.RemoteRecordAppArn != nil && len(*s.RemoteRecordAppArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("RemoteRecordAppArn", 32)) + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) } if invalidParams.Len() > 0 { @@ -7756,234 +9715,113 @@ func (s *CreateRemoteAccessSessionInput) Validate() error { return nil } -// SetClientId sets the ClientId field's value. -func (s *CreateRemoteAccessSessionInput) SetClientId(v string) *CreateRemoteAccessSessionInput { - s.ClientId = &v - return s -} - -// SetConfiguration sets the Configuration field's value. -func (s *CreateRemoteAccessSessionInput) SetConfiguration(v *CreateRemoteAccessSessionConfiguration) *CreateRemoteAccessSessionInput { - s.Configuration = v +// SetArn sets the Arn field's value. +func (s *DeleteRemoteAccessSessionInput) SetArn(v string) *DeleteRemoteAccessSessionInput { + s.Arn = &v return s } -// SetDeviceArn sets the DeviceArn field's value. -func (s *CreateRemoteAccessSessionInput) SetDeviceArn(v string) *CreateRemoteAccessSessionInput { - s.DeviceArn = &v - return s +// The response from the server when a request is made to delete the remote +// access session. +type DeleteRemoteAccessSessionOutput struct { + _ struct{} `type:"structure"` } -// SetInstanceArn sets the InstanceArn field's value. -func (s *CreateRemoteAccessSessionInput) SetInstanceArn(v string) *CreateRemoteAccessSessionInput { - s.InstanceArn = &v - return s +// String returns the string representation +func (s DeleteRemoteAccessSessionOutput) String() string { + return awsutil.Prettify(s) } -// SetInteractionMode sets the InteractionMode field's value. -func (s *CreateRemoteAccessSessionInput) SetInteractionMode(v string) *CreateRemoteAccessSessionInput { - s.InteractionMode = &v - return s +// GoString returns the string representation +func (s DeleteRemoteAccessSessionOutput) GoString() string { + return s.String() } -// SetName sets the Name field's value. -func (s *CreateRemoteAccessSessionInput) SetName(v string) *CreateRemoteAccessSessionInput { - s.Name = &v - return s -} +// Represents a request to the delete run operation. +type DeleteRunInput struct { + _ struct{} `type:"structure"` -// SetProjectArn sets the ProjectArn field's value. -func (s *CreateRemoteAccessSessionInput) SetProjectArn(v string) *CreateRemoteAccessSessionInput { - s.ProjectArn = &v - return s + // The Amazon Resource Name (ARN) for the run to delete. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` } -// SetRemoteDebugEnabled sets the RemoteDebugEnabled field's value. -func (s *CreateRemoteAccessSessionInput) SetRemoteDebugEnabled(v bool) *CreateRemoteAccessSessionInput { - s.RemoteDebugEnabled = &v - return s +// String returns the string representation +func (s DeleteRunInput) String() string { + return awsutil.Prettify(s) } -// SetRemoteRecordAppArn sets the RemoteRecordAppArn field's value. -func (s *CreateRemoteAccessSessionInput) SetRemoteRecordAppArn(v string) *CreateRemoteAccessSessionInput { - s.RemoteRecordAppArn = &v - return s +// GoString returns the string representation +func (s DeleteRunInput) GoString() string { + return s.String() } -// SetRemoteRecordEnabled sets the RemoteRecordEnabled field's value. -func (s *CreateRemoteAccessSessionInput) SetRemoteRecordEnabled(v bool) *CreateRemoteAccessSessionInput { - s.RemoteRecordEnabled = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRunInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRunInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } -// SetSkipAppResign sets the SkipAppResign field's value. -func (s *CreateRemoteAccessSessionInput) SetSkipAppResign(v bool) *CreateRemoteAccessSessionInput { - s.SkipAppResign = &v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetSshPublicKey sets the SshPublicKey field's value. -func (s *CreateRemoteAccessSessionInput) SetSshPublicKey(v string) *CreateRemoteAccessSessionInput { - s.SshPublicKey = &v +// SetArn sets the Arn field's value. +func (s *DeleteRunInput) SetArn(v string) *DeleteRunInput { + s.Arn = &v return s } -// Represents the server response from a request to create a remote access session. -type CreateRemoteAccessSessionOutput struct { +// Represents the result of a delete run request. +type DeleteRunOutput struct { _ struct{} `type:"structure"` - - // A container that describes the remote access session when the request to - // create a remote access session is sent. - RemoteAccessSession *RemoteAccessSession `locationName:"remoteAccessSession" type:"structure"` } // String returns the string representation -func (s CreateRemoteAccessSessionOutput) String() string { +func (s DeleteRunOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateRemoteAccessSessionOutput) GoString() string { +func (s DeleteRunOutput) GoString() string { return s.String() } -// SetRemoteAccessSession sets the RemoteAccessSession field's value. -func (s *CreateRemoteAccessSessionOutput) SetRemoteAccessSession(v *RemoteAccessSession) *CreateRemoteAccessSessionOutput { - s.RemoteAccessSession = v - return s -} - -// Represents a request to the create upload operation. -type CreateUploadInput struct { +type DeleteTestGridProjectInput struct { _ struct{} `type:"structure"` - // The upload's content type (for example, "application/octet-stream"). - ContentType *string `locationName:"contentType" type:"string"` - - // The upload's file name. The name should not contain the '/' character. If - // uploading an iOS app, the file name needs to end with the .ipa extension. - // If uploading an Android app, the file name needs to end with the .apk extension. - // For all others, the file name must end with the .zip file extension. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` - - // The ARN of the project for the upload. + // The ARN of the project to delete, from CreateTestGridProject or ListTestGridProjects. // // ProjectArn is a required field ProjectArn *string `locationName:"projectArn" min:"32" type:"string" required:"true"` - - // The upload's upload type. - // - // Must be one of the following values: - // - // * ANDROID_APP: An Android upload. - // - // * IOS_APP: An iOS upload. - // - // * WEB_APP: A web application upload. - // - // * EXTERNAL_DATA: An external data upload. - // - // * APPIUM_JAVA_JUNIT_TEST_PACKAGE: An Appium Java JUnit test package upload. - // - // * APPIUM_JAVA_TESTNG_TEST_PACKAGE: An Appium Java TestNG test package - // upload. - // - // * APPIUM_PYTHON_TEST_PACKAGE: An Appium Python test package upload. - // - // * APPIUM_NODE_TEST_PACKAGE: An Appium Node.js test package upload. - // - // * APPIUM_RUBY_TEST_PACKAGE: An Appium Ruby test package upload. - // - // * APPIUM_WEB_JAVA_JUNIT_TEST_PACKAGE: An Appium Java JUnit test package - // upload for a web app. - // - // * APPIUM_WEB_JAVA_TESTNG_TEST_PACKAGE: An Appium Java TestNG test package - // upload for a web app. - // - // * APPIUM_WEB_PYTHON_TEST_PACKAGE: An Appium Python test package upload - // for a web app. - // - // * APPIUM_WEB_NODE_TEST_PACKAGE: An Appium Node.js test package upload - // for a web app. - // - // * APPIUM_WEB_RUBY_TEST_PACKAGE: An Appium Ruby test package upload for - // a web app. - // - // * CALABASH_TEST_PACKAGE: A Calabash test package upload. - // - // * INSTRUMENTATION_TEST_PACKAGE: An instrumentation upload. - // - // * UIAUTOMATION_TEST_PACKAGE: A uiautomation test package upload. - // - // * UIAUTOMATOR_TEST_PACKAGE: A uiautomator test package upload. - // - // * XCTEST_TEST_PACKAGE: An Xcode test package upload. - // - // * XCTEST_UI_TEST_PACKAGE: An Xcode UI test package upload. - // - // * APPIUM_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload. - // - // * APPIUM_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload. - // - // * APPIUM_PYTHON_TEST_SPEC: An Appium Python test spec upload. - // - // * APPIUM_NODE_TEST_SPEC: An Appium Node.js test spec upload. - // - // * APPIUM_RUBY_TEST_SPEC: An Appium Ruby test spec upload. - // - // * APPIUM_WEB_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload - // for a web app. - // - // * APPIUM_WEB_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload - // for a web app. - // - // * APPIUM_WEB_PYTHON_TEST_SPEC: An Appium Python test spec upload for a - // web app. - // - // * APPIUM_WEB_NODE_TEST_SPEC: An Appium Node.js test spec upload for a - // web app. - // - // * APPIUM_WEB_RUBY_TEST_SPEC: An Appium Ruby test spec upload for a web - // app. - // - // * INSTRUMENTATION_TEST_SPEC: An instrumentation test spec upload. - // - // * XCTEST_UI_TEST_SPEC: An Xcode UI test spec upload. - // - // Note If you call CreateUpload with WEB_APP specified, AWS Device Farm throws - // an ArgumentException error. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true" enum:"UploadType"` } // String returns the string representation -func (s CreateUploadInput) String() string { +func (s DeleteTestGridProjectInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateUploadInput) GoString() string { +func (s DeleteTestGridProjectInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateUploadInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateUploadInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } +func (s *DeleteTestGridProjectInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTestGridProjectInput"} if s.ProjectArn == nil { invalidParams.Add(request.NewErrParamRequired("ProjectArn")) } if s.ProjectArn != nil && len(*s.ProjectArn) < 32 { invalidParams.Add(request.NewErrParamMinLen("ProjectArn", 32)) } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } if invalidParams.Len() > 0 { return invalidParams @@ -7991,100 +9829,111 @@ func (s *CreateUploadInput) Validate() error { return nil } -// SetContentType sets the ContentType field's value. -func (s *CreateUploadInput) SetContentType(v string) *CreateUploadInput { - s.ContentType = &v +// SetProjectArn sets the ProjectArn field's value. +func (s *DeleteTestGridProjectInput) SetProjectArn(v string) *DeleteTestGridProjectInput { + s.ProjectArn = &v return s } -// SetName sets the Name field's value. -func (s *CreateUploadInput) SetName(v string) *CreateUploadInput { - s.Name = &v - return s +type DeleteTestGridProjectOutput struct { + _ struct{} `type:"structure"` } -// SetProjectArn sets the ProjectArn field's value. -func (s *CreateUploadInput) SetProjectArn(v string) *CreateUploadInput { - s.ProjectArn = &v - return s +// String returns the string representation +func (s DeleteTestGridProjectOutput) String() string { + return awsutil.Prettify(s) } -// SetType sets the Type field's value. -func (s *CreateUploadInput) SetType(v string) *CreateUploadInput { - s.Type = &v - return s +// GoString returns the string representation +func (s DeleteTestGridProjectOutput) GoString() string { + return s.String() } -// Represents the result of a create upload request. -type CreateUploadOutput struct { +// Represents a request to the delete upload operation. +type DeleteUploadInput struct { _ struct{} `type:"structure"` - // The newly created upload. - Upload *Upload `locationName:"upload" type:"structure"` + // Represents the Amazon Resource Name (ARN) of the Device Farm upload to delete. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` } // String returns the string representation -func (s CreateUploadOutput) String() string { +func (s DeleteUploadInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateUploadOutput) GoString() string { +func (s DeleteUploadInput) GoString() string { return s.String() } -// SetUpload sets the Upload field's value. -func (s *CreateUploadOutput) SetUpload(v *Upload) *CreateUploadOutput { - s.Upload = v +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteUploadInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteUploadInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *DeleteUploadInput) SetArn(v string) *DeleteUploadInput { + s.Arn = &v return s } -type CreateVPCEConfigurationInput struct { +// Represents the result of a delete upload request. +type DeleteUploadOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteUploadOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteUploadOutput) GoString() string { + return s.String() +} + +type DeleteVPCEConfigurationInput struct { _ struct{} `type:"structure"` - // The DNS name of the service running in your VPC that you want Device Farm - // to test. - // - // ServiceDnsName is a required field - ServiceDnsName *string `locationName:"serviceDnsName" type:"string" required:"true"` - - // An optional description, providing more details about your VPC endpoint configuration. - VpceConfigurationDescription *string `locationName:"vpceConfigurationDescription" type:"string"` - - // The friendly name you give to your VPC endpoint configuration, to manage - // your configurations more easily. - // - // VpceConfigurationName is a required field - VpceConfigurationName *string `locationName:"vpceConfigurationName" type:"string" required:"true"` - - // The name of the VPC endpoint service running inside your AWS account that - // you want Device Farm to test. + // The Amazon Resource Name (ARN) of the VPC endpoint configuration you want + // to delete. // - // VpceServiceName is a required field - VpceServiceName *string `locationName:"vpceServiceName" type:"string" required:"true"` + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` } // String returns the string representation -func (s CreateVPCEConfigurationInput) String() string { +func (s DeleteVPCEConfigurationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateVPCEConfigurationInput) GoString() string { +func (s DeleteVPCEConfigurationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateVPCEConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateVPCEConfigurationInput"} - if s.ServiceDnsName == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceDnsName")) - } - if s.VpceConfigurationName == nil { - invalidParams.Add(request.NewErrParamRequired("VpceConfigurationName")) +func (s *DeleteVPCEConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVPCEConfigurationInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) } - if s.VpceServiceName == nil { - invalidParams.Add(request.NewErrParamRequired("VpceServiceName")) + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) } if invalidParams.Len() > 0 { @@ -8093,532 +9942,703 @@ func (s *CreateVPCEConfigurationInput) Validate() error { return nil } -// SetServiceDnsName sets the ServiceDnsName field's value. -func (s *CreateVPCEConfigurationInput) SetServiceDnsName(v string) *CreateVPCEConfigurationInput { - s.ServiceDnsName = &v - return s -} - -// SetVpceConfigurationDescription sets the VpceConfigurationDescription field's value. -func (s *CreateVPCEConfigurationInput) SetVpceConfigurationDescription(v string) *CreateVPCEConfigurationInput { - s.VpceConfigurationDescription = &v - return s -} - -// SetVpceConfigurationName sets the VpceConfigurationName field's value. -func (s *CreateVPCEConfigurationInput) SetVpceConfigurationName(v string) *CreateVPCEConfigurationInput { - s.VpceConfigurationName = &v - return s -} - -// SetVpceServiceName sets the VpceServiceName field's value. -func (s *CreateVPCEConfigurationInput) SetVpceServiceName(v string) *CreateVPCEConfigurationInput { - s.VpceServiceName = &v +// SetArn sets the Arn field's value. +func (s *DeleteVPCEConfigurationInput) SetArn(v string) *DeleteVPCEConfigurationInput { + s.Arn = &v return s } -type CreateVPCEConfigurationOutput struct { +type DeleteVPCEConfigurationOutput struct { _ struct{} `type:"structure"` - - // An object containing information about your VPC endpoint configuration. - VpceConfiguration *VPCEConfiguration `locationName:"vpceConfiguration" type:"structure"` } // String returns the string representation -func (s CreateVPCEConfigurationOutput) String() string { +func (s DeleteVPCEConfigurationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateVPCEConfigurationOutput) GoString() string { +func (s DeleteVPCEConfigurationOutput) GoString() string { return s.String() } -// SetVpceConfiguration sets the VpceConfiguration field's value. -func (s *CreateVPCEConfigurationOutput) SetVpceConfiguration(v *VPCEConfiguration) *CreateVPCEConfigurationOutput { - s.VpceConfiguration = v - return s -} - -// A JSON object specifying the paths where the artifacts generated by the customer's -// tests, on the device or in the test environment, will be pulled from. -// -// Specify deviceHostPaths and optionally specify either iosPaths or androidPaths. -// -// For web app tests, you can specify both iosPaths and androidPaths. -type CustomerArtifactPaths struct { +// Represents a device type that an app is tested against. +type Device struct { _ struct{} `type:"structure"` - // Comma-separated list of paths on the Android device where the artifacts generated - // by the customer's tests will be pulled from. - AndroidPaths []*string `locationName:"androidPaths" type:"list"` + // The device's ARN. + Arn *string `locationName:"arn" min:"32" type:"string"` - // Comma-separated list of paths in the test execution environment where the - // artifacts generated by the customer's tests will be pulled from. - DeviceHostPaths []*string `locationName:"deviceHostPaths" type:"list"` + // Indicates how likely a device is available for a test run. Currently available + // in the ListDevices and GetDevice API methods. + Availability *string `locationName:"availability" type:"string" enum:"DeviceAvailability"` - // Comma-separated list of paths on the iOS device where the artifacts generated - // by the customer's tests will be pulled from. - IosPaths []*string `locationName:"iosPaths" type:"list"` + // The device's carrier. + Carrier *string `locationName:"carrier" type:"string"` + + // Information about the device's CPU. + Cpu *CPU `locationName:"cpu" type:"structure"` + + // The name of the fleet to which this device belongs. + FleetName *string `locationName:"fleetName" type:"string"` + + // The type of fleet to which this device belongs. Possible values are PRIVATE + // and PUBLIC. + FleetType *string `locationName:"fleetType" type:"string"` + + // The device's form factor. + // + // Allowed values include: + // + // * PHONE + // + // * TABLET + FormFactor *string `locationName:"formFactor" type:"string" enum:"DeviceFormFactor"` + + // The device's heap size, expressed in bytes. + HeapSize *int64 `locationName:"heapSize" type:"long"` + + // The device's image name. + Image *string `locationName:"image" type:"string"` + + // The instances that belong to this device. + Instances []*DeviceInstance `locationName:"instances" type:"list"` + + // The device's manufacturer name. + Manufacturer *string `locationName:"manufacturer" type:"string"` + + // The device's total memory size, expressed in bytes. + Memory *int64 `locationName:"memory" type:"long"` + + // The device's model name. + Model *string `locationName:"model" type:"string"` + + // The device's model ID. + ModelId *string `locationName:"modelId" type:"string"` + + // The device's display name. + Name *string `locationName:"name" type:"string"` + + // The device's operating system type. + Os *string `locationName:"os" type:"string"` + + // The device's platform. + // + // Allowed values include: + // + // * ANDROID + // + // * IOS + Platform *string `locationName:"platform" type:"string" enum:"DevicePlatform"` + + // The device's radio. + Radio *string `locationName:"radio" type:"string"` + + // Specifies whether remote access has been enabled for the specified device. + RemoteAccessEnabled *bool `locationName:"remoteAccessEnabled" type:"boolean"` + + // This flag is set to true if remote debugging is enabled for the device. + // + // Remote debugging is no longer supported (https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html). + RemoteDebugEnabled *bool `locationName:"remoteDebugEnabled" type:"boolean"` + + // The resolution of the device. + Resolution *Resolution `locationName:"resolution" type:"structure"` } // String returns the string representation -func (s CustomerArtifactPaths) String() string { +func (s Device) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CustomerArtifactPaths) GoString() string { +func (s Device) GoString() string { return s.String() } -// SetAndroidPaths sets the AndroidPaths field's value. -func (s *CustomerArtifactPaths) SetAndroidPaths(v []*string) *CustomerArtifactPaths { - s.AndroidPaths = v +// SetArn sets the Arn field's value. +func (s *Device) SetArn(v string) *Device { + s.Arn = &v return s } -// SetDeviceHostPaths sets the DeviceHostPaths field's value. -func (s *CustomerArtifactPaths) SetDeviceHostPaths(v []*string) *CustomerArtifactPaths { - s.DeviceHostPaths = v +// SetAvailability sets the Availability field's value. +func (s *Device) SetAvailability(v string) *Device { + s.Availability = &v return s } -// SetIosPaths sets the IosPaths field's value. -func (s *CustomerArtifactPaths) SetIosPaths(v []*string) *CustomerArtifactPaths { - s.IosPaths = v +// SetCarrier sets the Carrier field's value. +func (s *Device) SetCarrier(v string) *Device { + s.Carrier = &v return s } -// Represents a request to the delete device pool operation. -type DeleteDevicePoolInput struct { - _ struct{} `type:"structure"` - - // Represents the Amazon Resource Name (ARN) of the Device Farm device pool - // you wish to delete. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` +// SetCpu sets the Cpu field's value. +func (s *Device) SetCpu(v *CPU) *Device { + s.Cpu = v + return s } -// String returns the string representation -func (s DeleteDevicePoolInput) String() string { - return awsutil.Prettify(s) +// SetFleetName sets the FleetName field's value. +func (s *Device) SetFleetName(v string) *Device { + s.FleetName = &v + return s } -// GoString returns the string representation -func (s DeleteDevicePoolInput) GoString() string { - return s.String() +// SetFleetType sets the FleetType field's value. +func (s *Device) SetFleetType(v string) *Device { + s.FleetType = &v + return s } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDevicePoolInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDevicePoolInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } +// SetFormFactor sets the FormFactor field's value. +func (s *Device) SetFormFactor(v string) *Device { + s.FormFactor = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetHeapSize sets the HeapSize field's value. +func (s *Device) SetHeapSize(v int64) *Device { + s.HeapSize = &v + return s } -// SetArn sets the Arn field's value. -func (s *DeleteDevicePoolInput) SetArn(v string) *DeleteDevicePoolInput { - s.Arn = &v +// SetImage sets the Image field's value. +func (s *Device) SetImage(v string) *Device { + s.Image = &v return s } -// Represents the result of a delete device pool request. -type DeleteDevicePoolOutput struct { - _ struct{} `type:"structure"` +// SetInstances sets the Instances field's value. +func (s *Device) SetInstances(v []*DeviceInstance) *Device { + s.Instances = v + return s } -// String returns the string representation -func (s DeleteDevicePoolOutput) String() string { - return awsutil.Prettify(s) +// SetManufacturer sets the Manufacturer field's value. +func (s *Device) SetManufacturer(v string) *Device { + s.Manufacturer = &v + return s } -// GoString returns the string representation -func (s DeleteDevicePoolOutput) GoString() string { - return s.String() +// SetMemory sets the Memory field's value. +func (s *Device) SetMemory(v int64) *Device { + s.Memory = &v + return s } -type DeleteInstanceProfileInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the instance profile you are requesting - // to delete. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` +// SetModel sets the Model field's value. +func (s *Device) SetModel(v string) *Device { + s.Model = &v + return s } -// String returns the string representation -func (s DeleteInstanceProfileInput) String() string { - return awsutil.Prettify(s) +// SetModelId sets the ModelId field's value. +func (s *Device) SetModelId(v string) *Device { + s.ModelId = &v + return s } -// GoString returns the string representation -func (s DeleteInstanceProfileInput) GoString() string { - return s.String() +// SetName sets the Name field's value. +func (s *Device) SetName(v string) *Device { + s.Name = &v + return s } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteInstanceProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteInstanceProfileInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } +// SetOs sets the Os field's value. +func (s *Device) SetOs(v string) *Device { + s.Os = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetPlatform sets the Platform field's value. +func (s *Device) SetPlatform(v string) *Device { + s.Platform = &v + return s } -// SetArn sets the Arn field's value. -func (s *DeleteInstanceProfileInput) SetArn(v string) *DeleteInstanceProfileInput { - s.Arn = &v +// SetRadio sets the Radio field's value. +func (s *Device) SetRadio(v string) *Device { + s.Radio = &v return s } -type DeleteInstanceProfileOutput struct { - _ struct{} `type:"structure"` +// SetRemoteAccessEnabled sets the RemoteAccessEnabled field's value. +func (s *Device) SetRemoteAccessEnabled(v bool) *Device { + s.RemoteAccessEnabled = &v + return s } -// String returns the string representation -func (s DeleteInstanceProfileOutput) String() string { - return awsutil.Prettify(s) +// SetRemoteDebugEnabled sets the RemoteDebugEnabled field's value. +func (s *Device) SetRemoteDebugEnabled(v bool) *Device { + s.RemoteDebugEnabled = &v + return s } -// GoString returns the string representation -func (s DeleteInstanceProfileOutput) GoString() string { - return s.String() +// SetResolution sets the Resolution field's value. +func (s *Device) SetResolution(v *Resolution) *Device { + s.Resolution = v + return s } -type DeleteNetworkProfileInput struct { +// Represents a device filter used to select a set of devices to be included +// in a test run. This data structure is passed in as the deviceSelectionConfiguration +// parameter to ScheduleRun. For an example of the JSON request syntax, see +// ScheduleRun. +// +// It is also passed in as the filters parameter to ListDevices. For an example +// of the JSON request syntax, see ListDevices. +type DeviceFilter struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the network profile you want to delete. + // The aspect of a device such as platform or model used as the selection criteria + // in a device filter. // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + // The supported operators for each attribute are provided in the following + // list. + // + // ARN + // + // The Amazon Resource Name (ARN) of the device (for example, arn:aws:devicefarm:us-west-2::device:12345Example). + // + // Supported operators: EQUALS, IN, NOT_IN + // + // PLATFORM + // + // The device platform. Valid values are ANDROID or IOS. + // + // Supported operators: EQUALS + // + // OS_VERSION + // + // The operating system version (for example, 10.3.2). + // + // Supported operators: EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUALS, IN, LESS_THAN, + // LESS_THAN_OR_EQUALS, NOT_IN + // + // MODEL + // + // The device model (for example, iPad 5th Gen). + // + // Supported operators: CONTAINS, EQUALS, IN, NOT_IN + // + // AVAILABILITY + // + // The current availability of the device. Valid values are AVAILABLE, HIGHLY_AVAILABLE, + // BUSY, or TEMPORARY_NOT_AVAILABLE. + // + // Supported operators: EQUALS + // + // FORM_FACTOR + // + // The device form factor. Valid values are PHONE or TABLET. + // + // Supported operators: EQUALS + // + // MANUFACTURER + // + // The device manufacturer (for example, Apple). + // + // Supported operators: EQUALS, IN, NOT_IN + // + // REMOTE_ACCESS_ENABLED + // + // Whether the device is enabled for remote access. Valid values are TRUE or + // FALSE. + // + // Supported operators: EQUALS + // + // REMOTE_DEBUG_ENABLED + // + // Whether the device is enabled for remote debugging. Valid values are TRUE + // or FALSE. + // + // Supported operators: EQUALS + // + // Because remote debugging is no longer supported (https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html), + // this filter is ignored. + // + // INSTANCE_ARN + // + // The Amazon Resource Name (ARN) of the device instance. + // + // Supported operators: EQUALS, IN, NOT_IN + // + // INSTANCE_LABELS + // + // The label of the device instance. + // + // Supported operators: CONTAINS + // + // FLEET_TYPE + // + // The fleet type. Valid values are PUBLIC or PRIVATE. + // + // Supported operators: EQUALS + Attribute *string `locationName:"attribute" type:"string" enum:"DeviceFilterAttribute"` + + // Specifies how Device Farm compares the filter's attribute to the value. See + // the attribute descriptions. + Operator *string `locationName:"operator" type:"string" enum:"RuleOperator"` + + // An array of one or more filter values used in a device filter. + // + // Operator Values + // + // * The IN and NOT_IN operators can take a values array that has more than + // one element. + // + // * The other operators require an array with a single element. + // + // Attribute Values + // + // * The PLATFORM attribute can be set to ANDROID or IOS. + // + // * The AVAILABILITY attribute can be set to AVAILABLE, HIGHLY_AVAILABLE, + // BUSY, or TEMPORARY_NOT_AVAILABLE. + // + // * The FORM_FACTOR attribute can be set to PHONE or TABLET. + // + // * The FLEET_TYPE attribute can be set to PUBLIC or PRIVATE. + Values []*string `locationName:"values" type:"list"` } // String returns the string representation -func (s DeleteNetworkProfileInput) String() string { +func (s DeviceFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteNetworkProfileInput) GoString() string { +func (s DeviceFilter) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteNetworkProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteNetworkProfileInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } +// SetAttribute sets the Attribute field's value. +func (s *DeviceFilter) SetAttribute(v string) *DeviceFilter { + s.Attribute = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetOperator sets the Operator field's value. +func (s *DeviceFilter) SetOperator(v string) *DeviceFilter { + s.Operator = &v + return s } -// SetArn sets the Arn field's value. -func (s *DeleteNetworkProfileInput) SetArn(v string) *DeleteNetworkProfileInput { - s.Arn = &v +// SetValues sets the Values field's value. +func (s *DeviceFilter) SetValues(v []*string) *DeviceFilter { + s.Values = v return s } -type DeleteNetworkProfileOutput struct { +// Represents the device instance. +type DeviceInstance struct { _ struct{} `type:"structure"` -} -// String returns the string representation -func (s DeleteNetworkProfileOutput) String() string { - return awsutil.Prettify(s) -} + // The Amazon Resource Name (ARN) of the device instance. + Arn *string `locationName:"arn" min:"32" type:"string"` -// GoString returns the string representation -func (s DeleteNetworkProfileOutput) GoString() string { - return s.String() -} + // The ARN of the device. + DeviceArn *string `locationName:"deviceArn" min:"32" type:"string"` -// Represents a request to the delete project operation. -type DeleteProjectInput struct { - _ struct{} `type:"structure"` + // A object that contains information about the instance profile. + InstanceProfile *InstanceProfile `locationName:"instanceProfile" type:"structure"` - // Represents the Amazon Resource Name (ARN) of the Device Farm project you - // wish to delete. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + // An array of strings that describe the device instance. + Labels []*string `locationName:"labels" type:"list"` + + // The status of the device instance. Valid values are listed here. + Status *string `locationName:"status" type:"string" enum:"InstanceStatus"` + + // Unique device identifier for the device instance. + Udid *string `locationName:"udid" type:"string"` } // String returns the string representation -func (s DeleteProjectInput) String() string { +func (s DeviceInstance) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteProjectInput) GoString() string { +func (s DeviceInstance) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteProjectInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteProjectInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } +// SetArn sets the Arn field's value. +func (s *DeviceInstance) SetArn(v string) *DeviceInstance { + s.Arn = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetDeviceArn sets the DeviceArn field's value. +func (s *DeviceInstance) SetDeviceArn(v string) *DeviceInstance { + s.DeviceArn = &v + return s } -// SetArn sets the Arn field's value. -func (s *DeleteProjectInput) SetArn(v string) *DeleteProjectInput { - s.Arn = &v +// SetInstanceProfile sets the InstanceProfile field's value. +func (s *DeviceInstance) SetInstanceProfile(v *InstanceProfile) *DeviceInstance { + s.InstanceProfile = v return s } -// Represents the result of a delete project request. -type DeleteProjectOutput struct { - _ struct{} `type:"structure"` +// SetLabels sets the Labels field's value. +func (s *DeviceInstance) SetLabels(v []*string) *DeviceInstance { + s.Labels = v + return s } -// String returns the string representation -func (s DeleteProjectOutput) String() string { - return awsutil.Prettify(s) +// SetStatus sets the Status field's value. +func (s *DeviceInstance) SetStatus(v string) *DeviceInstance { + s.Status = &v + return s } -// GoString returns the string representation -func (s DeleteProjectOutput) GoString() string { - return s.String() +// SetUdid sets the Udid field's value. +func (s *DeviceInstance) SetUdid(v string) *DeviceInstance { + s.Udid = &v + return s } -// Represents the request to delete the specified remote access session. -type DeleteRemoteAccessSessionInput struct { +// Represents the total (metered or unmetered) minutes used by the resource +// to run tests. Contains the sum of minutes consumed by all children. +type DeviceMinutes struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the session for which you want to delete - // remote access. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + // When specified, represents only the sum of metered minutes used by the resource + // to run tests. + Metered *float64 `locationName:"metered" type:"double"` + + // When specified, represents the total minutes used by the resource to run + // tests. + Total *float64 `locationName:"total" type:"double"` + + // When specified, represents only the sum of unmetered minutes used by the + // resource to run tests. + Unmetered *float64 `locationName:"unmetered" type:"double"` } // String returns the string representation -func (s DeleteRemoteAccessSessionInput) String() string { +func (s DeviceMinutes) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteRemoteAccessSessionInput) GoString() string { +func (s DeviceMinutes) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRemoteAccessSessionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRemoteAccessSessionInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } +// SetMetered sets the Metered field's value. +func (s *DeviceMinutes) SetMetered(v float64) *DeviceMinutes { + s.Metered = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetTotal sets the Total field's value. +func (s *DeviceMinutes) SetTotal(v float64) *DeviceMinutes { + s.Total = &v + return s } -// SetArn sets the Arn field's value. -func (s *DeleteRemoteAccessSessionInput) SetArn(v string) *DeleteRemoteAccessSessionInput { - s.Arn = &v +// SetUnmetered sets the Unmetered field's value. +func (s *DeviceMinutes) SetUnmetered(v float64) *DeviceMinutes { + s.Unmetered = &v return s } -// The response from the server when a request is made to delete the remote -// access session. -type DeleteRemoteAccessSessionOutput struct { +// Represents a collection of device types. +type DevicePool struct { _ struct{} `type:"structure"` -} -// String returns the string representation -func (s DeleteRemoteAccessSessionOutput) String() string { - return awsutil.Prettify(s) -} + // The device pool's ARN. + Arn *string `locationName:"arn" min:"32" type:"string"` -// GoString returns the string representation -func (s DeleteRemoteAccessSessionOutput) GoString() string { - return s.String() -} + // The device pool's description. + Description *string `locationName:"description" type:"string"` -// Represents a request to the delete run operation. -type DeleteRunInput struct { - _ struct{} `type:"structure"` + // The number of devices that Device Farm can add to your device pool. Device + // Farm adds devices that are available and meet the criteria that you assign + // for the rules parameter. Depending on how many devices meet these constraints, + // your device pool might contain fewer devices than the value for this parameter. + // + // By specifying the maximum number of devices, you can control the costs that + // you incur by running tests. + MaxDevices *int64 `locationName:"maxDevices" type:"integer"` + + // The device pool's name. + Name *string `locationName:"name" type:"string"` - // The Amazon Resource Name (ARN) for the run you wish to delete. + // Information about the device pool's rules. + Rules []*Rule `locationName:"rules" type:"list"` + + // The device pool's type. // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + // Allowed values include: + // + // * CURATED: A device pool that is created and managed by AWS Device Farm. + // + // * PRIVATE: A device pool that is created and managed by the device pool + // developer. + Type *string `locationName:"type" type:"string" enum:"DevicePoolType"` } // String returns the string representation -func (s DeleteRunInput) String() string { +func (s DevicePool) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteRunInput) GoString() string { +func (s DevicePool) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRunInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRunInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } +// SetArn sets the Arn field's value. +func (s *DevicePool) SetArn(v string) *DevicePool { + s.Arn = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetDescription sets the Description field's value. +func (s *DevicePool) SetDescription(v string) *DevicePool { + s.Description = &v + return s } -// SetArn sets the Arn field's value. -func (s *DeleteRunInput) SetArn(v string) *DeleteRunInput { - s.Arn = &v +// SetMaxDevices sets the MaxDevices field's value. +func (s *DevicePool) SetMaxDevices(v int64) *DevicePool { + s.MaxDevices = &v return s } -// Represents the result of a delete run request. -type DeleteRunOutput struct { - _ struct{} `type:"structure"` +// SetName sets the Name field's value. +func (s *DevicePool) SetName(v string) *DevicePool { + s.Name = &v + return s } -// String returns the string representation -func (s DeleteRunOutput) String() string { - return awsutil.Prettify(s) +// SetRules sets the Rules field's value. +func (s *DevicePool) SetRules(v []*Rule) *DevicePool { + s.Rules = v + return s } -// GoString returns the string representation -func (s DeleteRunOutput) GoString() string { - return s.String() +// SetType sets the Type field's value. +func (s *DevicePool) SetType(v string) *DevicePool { + s.Type = &v + return s } -// Represents a request to the delete upload operation. -type DeleteUploadInput struct { +// Represents a device pool compatibility result. +type DevicePoolCompatibilityResult struct { _ struct{} `type:"structure"` - // Represents the Amazon Resource Name (ARN) of the Device Farm upload you wish - // to delete. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + // Whether the result was compatible with the device pool. + Compatible *bool `locationName:"compatible" type:"boolean"` + + // The device (phone or tablet) to return information about. + Device *Device `locationName:"device" type:"structure"` + + // Information about the compatibility. + IncompatibilityMessages []*IncompatibilityMessage `locationName:"incompatibilityMessages" type:"list"` } // String returns the string representation -func (s DeleteUploadInput) String() string { +func (s DevicePoolCompatibilityResult) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteUploadInput) GoString() string { +func (s DevicePoolCompatibilityResult) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteUploadInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteUploadInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *DeleteUploadInput) SetArn(v string) *DeleteUploadInput { - s.Arn = &v +// SetCompatible sets the Compatible field's value. +func (s *DevicePoolCompatibilityResult) SetCompatible(v bool) *DevicePoolCompatibilityResult { + s.Compatible = &v return s } -// Represents the result of a delete upload request. -type DeleteUploadOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteUploadOutput) String() string { - return awsutil.Prettify(s) +// SetDevice sets the Device field's value. +func (s *DevicePoolCompatibilityResult) SetDevice(v *Device) *DevicePoolCompatibilityResult { + s.Device = v + return s } -// GoString returns the string representation -func (s DeleteUploadOutput) GoString() string { - return s.String() +// SetIncompatibilityMessages sets the IncompatibilityMessages field's value. +func (s *DevicePoolCompatibilityResult) SetIncompatibilityMessages(v []*IncompatibilityMessage) *DevicePoolCompatibilityResult { + s.IncompatibilityMessages = v + return s } -type DeleteVPCEConfigurationInput struct { +// Represents the device filters used in a test run and the maximum number of +// devices to be included in the run. It is passed in as the deviceSelectionConfiguration +// request parameter in ScheduleRun. +type DeviceSelectionConfiguration struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the VPC endpoint configuration you want - // to delete. + // Used to dynamically select a set of devices for a test run. A filter is made + // up of an attribute, an operator, and one or more values. + // + // * Attribute The aspect of a device such as platform or model used as the + // selection criteria in a device filter. Allowed values include: ARN: The + // Amazon Resource Name (ARN) of the device (for example, arn:aws:devicefarm:us-west-2::device:12345Example). + // PLATFORM: The device platform. Valid values are ANDROID or IOS. OS_VERSION: + // The operating system version (for example, 10.3.2). MODEL: The device + // model (for example, iPad 5th Gen). AVAILABILITY: The current availability + // of the device. Valid values are AVAILABLE, HIGHLY_AVAILABLE, BUSY, or + // TEMPORARY_NOT_AVAILABLE. FORM_FACTOR: The device form factor. Valid values + // are PHONE or TABLET. MANUFACTURER: The device manufacturer (for example, + // Apple). REMOTE_ACCESS_ENABLED: Whether the device is enabled for remote + // access. Valid values are TRUE or FALSE. REMOTE_DEBUG_ENABLED: Whether + // the device is enabled for remote debugging. Valid values are TRUE or FALSE. + // Because remote debugging is no longer supported (https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html), + // this filter is ignored. INSTANCE_ARN: The Amazon Resource Name (ARN) of + // the device instance. INSTANCE_LABELS: The label of the device instance. + // FLEET_TYPE: The fleet type. Valid values are PUBLIC or PRIVATE. + // + // * Operator The filter operator. The EQUALS operator is available for every + // attribute except INSTANCE_LABELS. The CONTAINS operator is available for + // the INSTANCE_LABELS and MODEL attributes. The IN and NOT_IN operators + // are available for the ARN, OS_VERSION, MODEL, MANUFACTURER, and INSTANCE_ARN + // attributes. The LESS_THAN, GREATER_THAN, LESS_THAN_OR_EQUALS, and GREATER_THAN_OR_EQUALS + // operators are also available for the OS_VERSION attribute. + // + // * Values An array of one or more filter values. Operator Values The IN + // and NOT_IN operators can take a values array that has more than one element. + // The other operators require an array with a single element. Attribute + // Values The PLATFORM attribute can be set to ANDROID or IOS. The AVAILABILITY + // attribute can be set to AVAILABLE, HIGHLY_AVAILABLE, BUSY, or TEMPORARY_NOT_AVAILABLE. + // The FORM_FACTOR attribute can be set to PHONE or TABLET. The FLEET_TYPE + // attribute can be set to PUBLIC or PRIVATE. + // + // Filters is a required field + Filters []*DeviceFilter `locationName:"filters" type:"list" required:"true"` + + // The maximum number of devices to be included in a test run. // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + // MaxDevices is a required field + MaxDevices *int64 `locationName:"maxDevices" type:"integer" required:"true"` } // String returns the string representation -func (s DeleteVPCEConfigurationInput) String() string { +func (s DeviceSelectionConfiguration) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteVPCEConfigurationInput) GoString() string { +func (s DeviceSelectionConfiguration) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVPCEConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVPCEConfigurationInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) +func (s *DeviceSelectionConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeviceSelectionConfiguration"} + if s.Filters == nil { + invalidParams.Add(request.NewErrParamRequired("Filters")) } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + if s.MaxDevices == nil { + invalidParams.Add(request.NewErrParamRequired("MaxDevices")) } if invalidParams.Len() > 0 { @@ -8627,704 +10647,559 @@ func (s *DeleteVPCEConfigurationInput) Validate() error { return nil } -// SetArn sets the Arn field's value. -func (s *DeleteVPCEConfigurationInput) SetArn(v string) *DeleteVPCEConfigurationInput { - s.Arn = &v +// SetFilters sets the Filters field's value. +func (s *DeviceSelectionConfiguration) SetFilters(v []*DeviceFilter) *DeviceSelectionConfiguration { + s.Filters = v return s } -type DeleteVPCEConfigurationOutput struct { +// SetMaxDevices sets the MaxDevices field's value. +func (s *DeviceSelectionConfiguration) SetMaxDevices(v int64) *DeviceSelectionConfiguration { + s.MaxDevices = &v + return s +} + +// Contains the run results requested by the device selection configuration +// and how many devices were returned. For an example of the JSON response syntax, +// see ScheduleRun. +type DeviceSelectionResult struct { _ struct{} `type:"structure"` + + // The filters in a device selection result. + Filters []*DeviceFilter `locationName:"filters" type:"list"` + + // The number of devices that matched the device filter selection criteria. + MatchedDevicesCount *int64 `locationName:"matchedDevicesCount" type:"integer"` + + // The maximum number of devices to be selected by a device filter and included + // in a test run. + MaxDevices *int64 `locationName:"maxDevices" type:"integer"` } // String returns the string representation -func (s DeleteVPCEConfigurationOutput) String() string { +func (s DeviceSelectionResult) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteVPCEConfigurationOutput) GoString() string { +func (s DeviceSelectionResult) GoString() string { return s.String() } -// Represents a device type that an app is tested against. -type Device struct { - _ struct{} `type:"structure"` +// SetFilters sets the Filters field's value. +func (s *DeviceSelectionResult) SetFilters(v []*DeviceFilter) *DeviceSelectionResult { + s.Filters = v + return s +} - // The device's ARN. - Arn *string `locationName:"arn" min:"32" type:"string"` +// SetMatchedDevicesCount sets the MatchedDevicesCount field's value. +func (s *DeviceSelectionResult) SetMatchedDevicesCount(v int64) *DeviceSelectionResult { + s.MatchedDevicesCount = &v + return s +} - // Reflects how likely a device will be available for a test run. It is currently - // available in the ListDevices and GetDevice API methods. - Availability *string `locationName:"availability" type:"string" enum:"DeviceAvailability"` +// SetMaxDevices sets the MaxDevices field's value. +func (s *DeviceSelectionResult) SetMaxDevices(v int64) *DeviceSelectionResult { + s.MaxDevices = &v + return s +} - // The device's carrier. - Carrier *string `locationName:"carrier" type:"string"` +// Represents configuration information about a test run, such as the execution +// timeout (in minutes). +type ExecutionConfiguration struct { + _ struct{} `type:"structure"` - // Information about the device's CPU. - Cpu *CPU `locationName:"cpu" type:"structure"` + // True if account cleanup is enabled at the beginning of the test. Otherwise, + // false. + AccountsCleanup *bool `locationName:"accountsCleanup" type:"boolean"` - // The name of the fleet to which this device belongs. - FleetName *string `locationName:"fleetName" type:"string"` + // True if app package cleanup is enabled at the beginning of the test. Otherwise, + // false. + AppPackagesCleanup *bool `locationName:"appPackagesCleanup" type:"boolean"` - // The type of fleet to which this device belongs. Possible values for fleet - // type are PRIVATE and PUBLIC. - FleetType *string `locationName:"fleetType" type:"string"` + // The number of minutes a test run executes before it times out. + JobTimeoutMinutes *int64 `locationName:"jobTimeoutMinutes" type:"integer"` - // The device's form factor. - // - // Allowed values include: - // - // * PHONE: The phone form factor. + // When set to true, for private devices, Device Farm does not sign your app + // again. For public devices, Device Farm always signs your apps again. // - // * TABLET: The tablet form factor. - FormFactor *string `locationName:"formFactor" type:"string" enum:"DeviceFormFactor"` - - // The device's heap size, expressed in bytes. - HeapSize *int64 `locationName:"heapSize" type:"long"` - - // The device's image name. - Image *string `locationName:"image" type:"string"` - - // The instances belonging to this device. - Instances []*DeviceInstance `locationName:"instances" type:"list"` - - // The device's manufacturer name. - Manufacturer *string `locationName:"manufacturer" type:"string"` - - // The device's total memory size, expressed in bytes. - Memory *int64 `locationName:"memory" type:"long"` + // For more information about how Device Farm re-signs your apps, see Do you + // modify my app? (https://aws.amazon.com/device-farm/faq/) in the AWS Device + // Farm FAQs. + SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` - // The device's model name. - Model *string `locationName:"model" type:"string"` + // Set to true to enable video capture. Otherwise, set to false. The default + // is true. + VideoCapture *bool `locationName:"videoCapture" type:"boolean"` +} - // The device's model ID. - ModelId *string `locationName:"modelId" type:"string"` +// String returns the string representation +func (s ExecutionConfiguration) String() string { + return awsutil.Prettify(s) +} - // The device's display name. - Name *string `locationName:"name" type:"string"` +// GoString returns the string representation +func (s ExecutionConfiguration) GoString() string { + return s.String() +} - // The device's operating system type. - Os *string `locationName:"os" type:"string"` +// SetAccountsCleanup sets the AccountsCleanup field's value. +func (s *ExecutionConfiguration) SetAccountsCleanup(v bool) *ExecutionConfiguration { + s.AccountsCleanup = &v + return s +} - // The device's platform. - // - // Allowed values include: - // - // * ANDROID: The Android platform. - // - // * IOS: The iOS platform. - Platform *string `locationName:"platform" type:"string" enum:"DevicePlatform"` +// SetAppPackagesCleanup sets the AppPackagesCleanup field's value. +func (s *ExecutionConfiguration) SetAppPackagesCleanup(v bool) *ExecutionConfiguration { + s.AppPackagesCleanup = &v + return s +} - // The device's radio. - Radio *string `locationName:"radio" type:"string"` +// SetJobTimeoutMinutes sets the JobTimeoutMinutes field's value. +func (s *ExecutionConfiguration) SetJobTimeoutMinutes(v int64) *ExecutionConfiguration { + s.JobTimeoutMinutes = &v + return s +} - // Specifies whether remote access has been enabled for the specified device. - RemoteAccessEnabled *bool `locationName:"remoteAccessEnabled" type:"boolean"` +// SetSkipAppResign sets the SkipAppResign field's value. +func (s *ExecutionConfiguration) SetSkipAppResign(v bool) *ExecutionConfiguration { + s.SkipAppResign = &v + return s +} - // This flag is set to true if remote debugging is enabled for the device. - // - // Remote debugging is no longer supported (https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html). - RemoteDebugEnabled *bool `locationName:"remoteDebugEnabled" type:"boolean"` +// SetVideoCapture sets the VideoCapture field's value. +func (s *ExecutionConfiguration) SetVideoCapture(v bool) *ExecutionConfiguration { + s.VideoCapture = &v + return s +} - // The resolution of the device. - Resolution *Resolution `locationName:"resolution" type:"structure"` +// Represents the request sent to retrieve the account settings. +type GetAccountSettingsInput struct { + _ struct{} `type:"structure"` } // String returns the string representation -func (s Device) String() string { +func (s GetAccountSettingsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Device) GoString() string { +func (s GetAccountSettingsInput) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *Device) SetArn(v string) *Device { - s.Arn = &v - return s +// Represents the account settings return values from the GetAccountSettings +// request. +type GetAccountSettingsOutput struct { + _ struct{} `type:"structure"` + + // The account settings. + AccountSettings *AccountSettings `locationName:"accountSettings" type:"structure"` } -// SetAvailability sets the Availability field's value. -func (s *Device) SetAvailability(v string) *Device { - s.Availability = &v - return s +// String returns the string representation +func (s GetAccountSettingsOutput) String() string { + return awsutil.Prettify(s) } -// SetCarrier sets the Carrier field's value. -func (s *Device) SetCarrier(v string) *Device { - s.Carrier = &v - return s +// GoString returns the string representation +func (s GetAccountSettingsOutput) GoString() string { + return s.String() } -// SetCpu sets the Cpu field's value. -func (s *Device) SetCpu(v *CPU) *Device { - s.Cpu = v +// SetAccountSettings sets the AccountSettings field's value. +func (s *GetAccountSettingsOutput) SetAccountSettings(v *AccountSettings) *GetAccountSettingsOutput { + s.AccountSettings = v return s } -// SetFleetName sets the FleetName field's value. -func (s *Device) SetFleetName(v string) *Device { - s.FleetName = &v - return s +// Represents a request to the get device request. +type GetDeviceInput struct { + _ struct{} `type:"structure"` + + // The device type's ARN. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` } -// SetFleetType sets the FleetType field's value. -func (s *Device) SetFleetType(v string) *Device { - s.FleetType = &v - return s +// String returns the string representation +func (s GetDeviceInput) String() string { + return awsutil.Prettify(s) } -// SetFormFactor sets the FormFactor field's value. -func (s *Device) SetFormFactor(v string) *Device { - s.FormFactor = &v - return s +// GoString returns the string representation +func (s GetDeviceInput) GoString() string { + return s.String() } -// SetHeapSize sets the HeapSize field's value. -func (s *Device) SetHeapSize(v int64) *Device { - s.HeapSize = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDeviceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDeviceInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetImage sets the Image field's value. -func (s *Device) SetImage(v string) *Device { - s.Image = &v +// SetArn sets the Arn field's value. +func (s *GetDeviceInput) SetArn(v string) *GetDeviceInput { + s.Arn = &v return s } -// SetInstances sets the Instances field's value. -func (s *Device) SetInstances(v []*DeviceInstance) *Device { - s.Instances = v - return s -} +type GetDeviceInstanceInput struct { + _ struct{} `type:"structure"` -// SetManufacturer sets the Manufacturer field's value. -func (s *Device) SetManufacturer(v string) *Device { - s.Manufacturer = &v - return s + // The Amazon Resource Name (ARN) of the instance you're requesting information + // about. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` } -// SetMemory sets the Memory field's value. -func (s *Device) SetMemory(v int64) *Device { - s.Memory = &v - return s +// String returns the string representation +func (s GetDeviceInstanceInput) String() string { + return awsutil.Prettify(s) } -// SetModel sets the Model field's value. -func (s *Device) SetModel(v string) *Device { - s.Model = &v - return s +// GoString returns the string representation +func (s GetDeviceInstanceInput) GoString() string { + return s.String() } -// SetModelId sets the ModelId field's value. -func (s *Device) SetModelId(v string) *Device { - s.ModelId = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDeviceInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDeviceInstanceInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } -// SetName sets the Name field's value. -func (s *Device) SetName(v string) *Device { - s.Name = &v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetOs sets the Os field's value. -func (s *Device) SetOs(v string) *Device { - s.Os = &v +// SetArn sets the Arn field's value. +func (s *GetDeviceInstanceInput) SetArn(v string) *GetDeviceInstanceInput { + s.Arn = &v return s } -// SetPlatform sets the Platform field's value. -func (s *Device) SetPlatform(v string) *Device { - s.Platform = &v - return s -} +type GetDeviceInstanceOutput struct { + _ struct{} `type:"structure"` -// SetRadio sets the Radio field's value. -func (s *Device) SetRadio(v string) *Device { - s.Radio = &v - return s + // An object that contains information about your device instance. + DeviceInstance *DeviceInstance `locationName:"deviceInstance" type:"structure"` } -// SetRemoteAccessEnabled sets the RemoteAccessEnabled field's value. -func (s *Device) SetRemoteAccessEnabled(v bool) *Device { - s.RemoteAccessEnabled = &v - return s +// String returns the string representation +func (s GetDeviceInstanceOutput) String() string { + return awsutil.Prettify(s) } -// SetRemoteDebugEnabled sets the RemoteDebugEnabled field's value. -func (s *Device) SetRemoteDebugEnabled(v bool) *Device { - s.RemoteDebugEnabled = &v - return s +// GoString returns the string representation +func (s GetDeviceInstanceOutput) GoString() string { + return s.String() } -// SetResolution sets the Resolution field's value. -func (s *Device) SetResolution(v *Resolution) *Device { - s.Resolution = v +// SetDeviceInstance sets the DeviceInstance field's value. +func (s *GetDeviceInstanceOutput) SetDeviceInstance(v *DeviceInstance) *GetDeviceInstanceOutput { + s.DeviceInstance = v return s } -// Represents a device filter used to select a set of devices to be included -// in a test run. This data structure is passed in as the deviceSelectionConfiguration -// parameter to ScheduleRun. For an example of the JSON request syntax, see -// ScheduleRun. -// -// It is also passed in as the filters parameter to ListDevices. For an example -// of the JSON request syntax, see ListDevices. -type DeviceFilter struct { +// Represents the result of a get device request. +type GetDeviceOutput struct { _ struct{} `type:"structure"` - // The aspect of a device such as platform or model used as the selection criteria - // in a device filter. - // - // The supported operators for each attribute are provided in the following - // list. - // - // ARN - // - // The Amazon Resource Name (ARN) of the device. For example, "arn:aws:devicefarm:us-west-2::device:12345Example". - // - // Supported operators: EQUALS, IN, NOT_IN - // - // PLATFORM - // - // The device platform. Valid values are "ANDROID" or "IOS". - // - // Supported operators: EQUALS - // - // OS_VERSION - // - // The operating system version. For example, "10.3.2". - // - // Supported operators: EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUALS, IN, LESS_THAN, - // LESS_THAN_OR_EQUALS, NOT_IN - // - // MODEL - // - // The device model. For example, "iPad 5th Gen". - // - // Supported operators: CONTAINS, EQUALS, IN, NOT_IN - // - // AVAILABILITY - // - // The current availability of the device. Valid values are "AVAILABLE", "HIGHLY_AVAILABLE", - // "BUSY", or "TEMPORARY_NOT_AVAILABLE". - // - // Supported operators: EQUALS - // - // FORM_FACTOR - // - // The device form factor. Valid values are "PHONE" or "TABLET". - // - // Supported operators: EQUALS - // - // MANUFACTURER - // - // The device manufacturer. For example, "Apple". - // - // Supported operators: EQUALS, IN, NOT_IN - // - // REMOTE_ACCESS_ENABLED - // - // Whether the device is enabled for remote access. Valid values are "TRUE" - // or "FALSE". - // - // Supported operators: EQUALS - // - // REMOTE_DEBUG_ENABLED - // - // Ignored.Whether the device is enabled for remote debugging. Valid values - // are "TRUE" or "FALSE". - // - // Supported operators: EQUALS - // - // This filter will be ignored, as remote debugging is no longer supported (https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html). - // - // INSTANCE_ARN - // - // The Amazon Resource Name (ARN) of the device instance. - // - // Supported operators: EQUALS, IN, NOT_IN - // - // INSTANCE_LABELS - // - // The label of the device instance. - // - // Supported operators: CONTAINS - // - // FLEET_TYPE - // - // The fleet type. Valid values are "PUBLIC" or "PRIVATE". - // - // Supported operators: EQUALS - Attribute *string `locationName:"attribute" type:"string" enum:"DeviceFilterAttribute"` - - // Specifies how Device Farm compares the filter's attribute to the value. For - // the operators that are supported by each attribute, see the attribute descriptions. - Operator *string `locationName:"operator" type:"string" enum:"RuleOperator"` - - // An array of one or more filter values used in a device filter. - // - // Operator Values - // - // * The IN and NOT_IN operators can take a values array that has more than - // one element. - // - // * The other operators require an array with a single element. - // - // Attribute Values - // - // * The PLATFORM attribute can be set to "ANDROID" or "IOS". - // - // * The AVAILABILITY attribute can be set to "AVAILABLE", "HIGHLY_AVAILABLE", - // "BUSY", or "TEMPORARY_NOT_AVAILABLE". - // - // * The FORM_FACTOR attribute can be set to "PHONE" or "TABLET". - // - // * The FLEET_TYPE attribute can be set to "PUBLIC" or "PRIVATE". - Values []*string `locationName:"values" type:"list"` + // An object that contains information about the requested device. + Device *Device `locationName:"device" type:"structure"` } // String returns the string representation -func (s DeviceFilter) String() string { +func (s GetDeviceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeviceFilter) GoString() string { +func (s GetDeviceOutput) GoString() string { return s.String() } -// SetAttribute sets the Attribute field's value. -func (s *DeviceFilter) SetAttribute(v string) *DeviceFilter { - s.Attribute = &v - return s -} - -// SetOperator sets the Operator field's value. -func (s *DeviceFilter) SetOperator(v string) *DeviceFilter { - s.Operator = &v - return s -} - -// SetValues sets the Values field's value. -func (s *DeviceFilter) SetValues(v []*string) *DeviceFilter { - s.Values = v +// SetDevice sets the Device field's value. +func (s *GetDeviceOutput) SetDevice(v *Device) *GetDeviceOutput { + s.Device = v return s } -// Represents the device instance. -type DeviceInstance struct { +// Represents a request to the get device pool compatibility operation. +type GetDevicePoolCompatibilityInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the device instance. - Arn *string `locationName:"arn" min:"32" type:"string"` - - // The Amazon Resource Name (ARN) of the device. - DeviceArn *string `locationName:"deviceArn" min:"32" type:"string"` + // The ARN of the app that is associated with the specified device pool. + AppArn *string `locationName:"appArn" min:"32" type:"string"` - // A object containing information about the instance profile. - InstanceProfile *InstanceProfile `locationName:"instanceProfile" type:"structure"` + // An object that contains information about the settings for a run. + Configuration *ScheduleRunConfiguration `locationName:"configuration" type:"structure"` - // An array of strings describing the device instance. - Labels []*string `locationName:"labels" type:"list"` + // The device pool's ARN. + // + // DevicePoolArn is a required field + DevicePoolArn *string `locationName:"devicePoolArn" min:"32" type:"string" required:"true"` - // The status of the device instance. Valid values are listed below. - Status *string `locationName:"status" type:"string" enum:"InstanceStatus"` + // Information about the uploaded test to be run against the device pool. + Test *ScheduleRunTest `locationName:"test" type:"structure"` - // Unique device identifier for the device instance. - Udid *string `locationName:"udid" type:"string"` + // The test type for the specified device pool. + // + // Allowed values include the following: + // + // * BUILTIN_FUZZ. + // + // * BUILTIN_EXPLORER. For Android, an app explorer that traverses an Android + // app, interacting with it and capturing screenshots at the same time. + // + // * APPIUM_JAVA_JUNIT. + // + // * APPIUM_JAVA_TESTNG. + // + // * APPIUM_PYTHON. + // + // * APPIUM_NODE. + // + // * APPIUM_RUBY. + // + // * APPIUM_WEB_JAVA_JUNIT. + // + // * APPIUM_WEB_JAVA_TESTNG. + // + // * APPIUM_WEB_PYTHON. + // + // * APPIUM_WEB_NODE. + // + // * APPIUM_WEB_RUBY. + // + // * CALABASH. + // + // * INSTRUMENTATION. + // + // * UIAUTOMATION. + // + // * UIAUTOMATOR. + // + // * XCTEST. + // + // * XCTEST_UI. + TestType *string `locationName:"testType" type:"string" enum:"TestType"` } // String returns the string representation -func (s DeviceInstance) String() string { +func (s GetDevicePoolCompatibilityInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeviceInstance) GoString() string { +func (s GetDevicePoolCompatibilityInput) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *DeviceInstance) SetArn(v string) *DeviceInstance { - s.Arn = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDevicePoolCompatibilityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDevicePoolCompatibilityInput"} + if s.AppArn != nil && len(*s.AppArn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("AppArn", 32)) + } + if s.DevicePoolArn == nil { + invalidParams.Add(request.NewErrParamRequired("DevicePoolArn")) + } + if s.DevicePoolArn != nil && len(*s.DevicePoolArn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("DevicePoolArn", 32)) + } + if s.Configuration != nil { + if err := s.Configuration.Validate(); err != nil { + invalidParams.AddNested("Configuration", err.(request.ErrInvalidParams)) + } + } + if s.Test != nil { + if err := s.Test.Validate(); err != nil { + invalidParams.AddNested("Test", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetDeviceArn sets the DeviceArn field's value. -func (s *DeviceInstance) SetDeviceArn(v string) *DeviceInstance { - s.DeviceArn = &v +// SetAppArn sets the AppArn field's value. +func (s *GetDevicePoolCompatibilityInput) SetAppArn(v string) *GetDevicePoolCompatibilityInput { + s.AppArn = &v return s } -// SetInstanceProfile sets the InstanceProfile field's value. -func (s *DeviceInstance) SetInstanceProfile(v *InstanceProfile) *DeviceInstance { - s.InstanceProfile = v +// SetConfiguration sets the Configuration field's value. +func (s *GetDevicePoolCompatibilityInput) SetConfiguration(v *ScheduleRunConfiguration) *GetDevicePoolCompatibilityInput { + s.Configuration = v return s } -// SetLabels sets the Labels field's value. -func (s *DeviceInstance) SetLabels(v []*string) *DeviceInstance { - s.Labels = v +// SetDevicePoolArn sets the DevicePoolArn field's value. +func (s *GetDevicePoolCompatibilityInput) SetDevicePoolArn(v string) *GetDevicePoolCompatibilityInput { + s.DevicePoolArn = &v return s } -// SetStatus sets the Status field's value. -func (s *DeviceInstance) SetStatus(v string) *DeviceInstance { - s.Status = &v +// SetTest sets the Test field's value. +func (s *GetDevicePoolCompatibilityInput) SetTest(v *ScheduleRunTest) *GetDevicePoolCompatibilityInput { + s.Test = v return s } -// SetUdid sets the Udid field's value. -func (s *DeviceInstance) SetUdid(v string) *DeviceInstance { - s.Udid = &v +// SetTestType sets the TestType field's value. +func (s *GetDevicePoolCompatibilityInput) SetTestType(v string) *GetDevicePoolCompatibilityInput { + s.TestType = &v return s } -// Represents the total (metered or unmetered) minutes used by the resource -// to run tests. Contains the sum of minutes consumed by all children. -type DeviceMinutes struct { +// Represents the result of describe device pool compatibility request. +type GetDevicePoolCompatibilityOutput struct { _ struct{} `type:"structure"` - // When specified, represents only the sum of metered minutes used by the resource - // to run tests. - Metered *float64 `locationName:"metered" type:"double"` - - // When specified, represents the total minutes used by the resource to run - // tests. - Total *float64 `locationName:"total" type:"double"` + // Information about compatible devices. + CompatibleDevices []*DevicePoolCompatibilityResult `locationName:"compatibleDevices" type:"list"` - // When specified, represents only the sum of unmetered minutes used by the - // resource to run tests. - Unmetered *float64 `locationName:"unmetered" type:"double"` + // Information about incompatible devices. + IncompatibleDevices []*DevicePoolCompatibilityResult `locationName:"incompatibleDevices" type:"list"` } // String returns the string representation -func (s DeviceMinutes) String() string { +func (s GetDevicePoolCompatibilityOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeviceMinutes) GoString() string { +func (s GetDevicePoolCompatibilityOutput) GoString() string { return s.String() } -// SetMetered sets the Metered field's value. -func (s *DeviceMinutes) SetMetered(v float64) *DeviceMinutes { - s.Metered = &v - return s -} - -// SetTotal sets the Total field's value. -func (s *DeviceMinutes) SetTotal(v float64) *DeviceMinutes { - s.Total = &v +// SetCompatibleDevices sets the CompatibleDevices field's value. +func (s *GetDevicePoolCompatibilityOutput) SetCompatibleDevices(v []*DevicePoolCompatibilityResult) *GetDevicePoolCompatibilityOutput { + s.CompatibleDevices = v return s } -// SetUnmetered sets the Unmetered field's value. -func (s *DeviceMinutes) SetUnmetered(v float64) *DeviceMinutes { - s.Unmetered = &v +// SetIncompatibleDevices sets the IncompatibleDevices field's value. +func (s *GetDevicePoolCompatibilityOutput) SetIncompatibleDevices(v []*DevicePoolCompatibilityResult) *GetDevicePoolCompatibilityOutput { + s.IncompatibleDevices = v return s } -// Represents a collection of device types. -type DevicePool struct { +// Represents a request to the get device pool operation. +type GetDevicePoolInput struct { _ struct{} `type:"structure"` // The device pool's ARN. - Arn *string `locationName:"arn" min:"32" type:"string"` - - // The device pool's description. - Description *string `locationName:"description" type:"string"` - - // The number of devices that Device Farm can add to your device pool. Device - // Farm adds devices that are available and that meet the criteria that you - // assign for the rules parameter. Depending on how many devices meet these - // constraints, your device pool might contain fewer devices than the value - // for this parameter. // - // By specifying the maximum number of devices, you can control the costs that - // you incur by running tests. - MaxDevices *int64 `locationName:"maxDevices" type:"integer"` - - // The device pool's name. - Name *string `locationName:"name" type:"string"` - - // Information about the device pool's rules. - Rules []*Rule `locationName:"rules" type:"list"` - - // The device pool's type. - // - // Allowed values include: - // - // * CURATED: A device pool that is created and managed by AWS Device Farm. - // - // * PRIVATE: A device pool that is created and managed by the device pool - // developer. - Type *string `locationName:"type" type:"string" enum:"DevicePoolType"` + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` } // String returns the string representation -func (s DevicePool) String() string { +func (s GetDevicePoolInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DevicePool) GoString() string { +func (s GetDevicePoolInput) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *DevicePool) SetArn(v string) *DevicePool { - s.Arn = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *DevicePool) SetDescription(v string) *DevicePool { - s.Description = &v - return s -} - -// SetMaxDevices sets the MaxDevices field's value. -func (s *DevicePool) SetMaxDevices(v int64) *DevicePool { - s.MaxDevices = &v - return s -} - -// SetName sets the Name field's value. -func (s *DevicePool) SetName(v string) *DevicePool { - s.Name = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDevicePoolInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDevicePoolInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } -// SetRules sets the Rules field's value. -func (s *DevicePool) SetRules(v []*Rule) *DevicePool { - s.Rules = v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetType sets the Type field's value. -func (s *DevicePool) SetType(v string) *DevicePool { - s.Type = &v +// SetArn sets the Arn field's value. +func (s *GetDevicePoolInput) SetArn(v string) *GetDevicePoolInput { + s.Arn = &v return s } -// Represents a device pool compatibility result. -type DevicePoolCompatibilityResult struct { +// Represents the result of a get device pool request. +type GetDevicePoolOutput struct { _ struct{} `type:"structure"` - // Whether the result was compatible with the device pool. - Compatible *bool `locationName:"compatible" type:"boolean"` - - // The device (phone or tablet) that you wish to return information about. - Device *Device `locationName:"device" type:"structure"` - - // Information about the compatibility. - IncompatibilityMessages []*IncompatibilityMessage `locationName:"incompatibilityMessages" type:"list"` + // An object that contains information about the requested device pool. + DevicePool *DevicePool `locationName:"devicePool" type:"structure"` } // String returns the string representation -func (s DevicePoolCompatibilityResult) String() string { +func (s GetDevicePoolOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DevicePoolCompatibilityResult) GoString() string { +func (s GetDevicePoolOutput) GoString() string { return s.String() } -// SetCompatible sets the Compatible field's value. -func (s *DevicePoolCompatibilityResult) SetCompatible(v bool) *DevicePoolCompatibilityResult { - s.Compatible = &v - return s -} - -// SetDevice sets the Device field's value. -func (s *DevicePoolCompatibilityResult) SetDevice(v *Device) *DevicePoolCompatibilityResult { - s.Device = v - return s -} - -// SetIncompatibilityMessages sets the IncompatibilityMessages field's value. -func (s *DevicePoolCompatibilityResult) SetIncompatibilityMessages(v []*IncompatibilityMessage) *DevicePoolCompatibilityResult { - s.IncompatibilityMessages = v +// SetDevicePool sets the DevicePool field's value. +func (s *GetDevicePoolOutput) SetDevicePool(v *DevicePool) *GetDevicePoolOutput { + s.DevicePool = v return s } -// Represents the device filters used in a test run as well as the maximum number -// of devices to be included in the run. It is passed in as the deviceSelectionConfiguration -// request parameter in ScheduleRun. -type DeviceSelectionConfiguration struct { +type GetInstanceProfileInput struct { _ struct{} `type:"structure"` - // Used to dynamically select a set of devices for a test run. A filter is made - // up of an attribute, an operator, and one or more values. - // - // * Attribute The aspect of a device such as platform or model used as the - // selection criteria in a device filter. Allowed values include: ARN: The - // Amazon Resource Name (ARN) of the device. For example, "arn:aws:devicefarm:us-west-2::device:12345Example". - // PLATFORM: The device platform. Valid values are "ANDROID" or "IOS". OS_VERSION: - // The operating system version. For example, "10.3.2". MODEL: The device - // model. For example, "iPad 5th Gen". AVAILABILITY: The current availability - // of the device. Valid values are "AVAILABLE", "HIGHLY_AVAILABLE", "BUSY", - // or "TEMPORARY_NOT_AVAILABLE". FORM_FACTOR: The device form factor. Valid - // values are "PHONE" or "TABLET". MANUFACTURER: The device manufacturer. - // For example, "Apple". REMOTE_ACCESS_ENABLED: Whether the device is enabled - // for remote access. Valid values are "TRUE" or "FALSE". REMOTE_DEBUG_ENABLED: - // Whether the device is enabled for remote debugging. Valid values are "TRUE" - // or "FALSE". This filter will be ignored, as remote debugging is no longer - // supported (https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html). - // INSTANCE_ARN: The Amazon Resource Name (ARN) of the device instance. INSTANCE_LABELS: - // The label of the device instance. FLEET_TYPE: The fleet type. Valid values - // are "PUBLIC" or "PRIVATE". - // - // * Operator The filter operator. The EQUALS operator is available for every - // attribute except INSTANCE_LABELS. The CONTAINS operator is available for - // the INSTANCE_LABELS and MODEL attributes. The IN and NOT_IN operators - // are available for the ARN, OS_VERSION, MODEL, MANUFACTURER, and INSTANCE_ARN - // attributes. The LESS_THAN, GREATER_THAN, LESS_THAN_OR_EQUALS, and GREATER_THAN_OR_EQUALS - // operators are also available for the OS_VERSION attribute. - // - // * Values An array of one or more filter values. Operator Values The IN - // and NOT_IN operators can take a values array that has more than one element. - // The other operators require an array with a single element. Attribute - // Values The PLATFORM attribute can be set to "ANDROID" or "IOS". The AVAILABILITY - // attribute can be set to "AVAILABLE", "HIGHLY_AVAILABLE", "BUSY", or "TEMPORARY_NOT_AVAILABLE". - // The FORM_FACTOR attribute can be set to "PHONE" or "TABLET". The FLEET_TYPE - // attribute can be set to "PUBLIC" or "PRIVATE". - // - // Filters is a required field - Filters []*DeviceFilter `locationName:"filters" type:"list" required:"true"` - - // The maximum number of devices to be included in a test run. + // The Amazon Resource Name (ARN) of an instance profile. // - // MaxDevices is a required field - MaxDevices *int64 `locationName:"maxDevices" type:"integer" required:"true"` + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` } // String returns the string representation -func (s DeviceSelectionConfiguration) String() string { +func (s GetInstanceProfileInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeviceSelectionConfiguration) GoString() string { +func (s GetInstanceProfileInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeviceSelectionConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeviceSelectionConfiguration"} - if s.Filters == nil { - invalidParams.Add(request.NewErrParamRequired("Filters")) +func (s *GetInstanceProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetInstanceProfileInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) } - if s.MaxDevices == nil { - invalidParams.Add(request.NewErrParamRequired("MaxDevices")) + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) } if invalidParams.Len() > 0 { @@ -9333,238 +11208,270 @@ func (s *DeviceSelectionConfiguration) Validate() error { return nil } -// SetFilters sets the Filters field's value. -func (s *DeviceSelectionConfiguration) SetFilters(v []*DeviceFilter) *DeviceSelectionConfiguration { - s.Filters = v - return s -} - -// SetMaxDevices sets the MaxDevices field's value. -func (s *DeviceSelectionConfiguration) SetMaxDevices(v int64) *DeviceSelectionConfiguration { - s.MaxDevices = &v +// SetArn sets the Arn field's value. +func (s *GetInstanceProfileInput) SetArn(v string) *GetInstanceProfileInput { + s.Arn = &v return s } -// Contains the run results requested by the device selection configuration -// as well as how many devices were returned. For an example of the JSON response -// syntax, see ScheduleRun. -type DeviceSelectionResult struct { +type GetInstanceProfileOutput struct { _ struct{} `type:"structure"` - // The filters in a device selection result. - Filters []*DeviceFilter `locationName:"filters" type:"list"` - - // The number of devices that matched the device filter selection criteria. - MatchedDevicesCount *int64 `locationName:"matchedDevicesCount" type:"integer"` - - // The maximum number of devices to be selected by a device filter and included - // in a test run. - MaxDevices *int64 `locationName:"maxDevices" type:"integer"` + // An object that contains information about an instance profile. + InstanceProfile *InstanceProfile `locationName:"instanceProfile" type:"structure"` } // String returns the string representation -func (s DeviceSelectionResult) String() string { +func (s GetInstanceProfileOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeviceSelectionResult) GoString() string { +func (s GetInstanceProfileOutput) GoString() string { return s.String() } -// SetFilters sets the Filters field's value. -func (s *DeviceSelectionResult) SetFilters(v []*DeviceFilter) *DeviceSelectionResult { - s.Filters = v +// SetInstanceProfile sets the InstanceProfile field's value. +func (s *GetInstanceProfileOutput) SetInstanceProfile(v *InstanceProfile) *GetInstanceProfileOutput { + s.InstanceProfile = v return s } -// SetMatchedDevicesCount sets the MatchedDevicesCount field's value. -func (s *DeviceSelectionResult) SetMatchedDevicesCount(v int64) *DeviceSelectionResult { - s.MatchedDevicesCount = &v - return s +// Represents a request to the get job operation. +type GetJobInput struct { + _ struct{} `type:"structure"` + + // The job's ARN. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` } -// SetMaxDevices sets the MaxDevices field's value. -func (s *DeviceSelectionResult) SetMaxDevices(v int64) *DeviceSelectionResult { - s.MaxDevices = &v - return s +// String returns the string representation +func (s GetJobInput) String() string { + return awsutil.Prettify(s) } -// Represents configuration information about a test run, such as the execution -// timeout (in minutes). -type ExecutionConfiguration struct { - _ struct{} `type:"structure"` +// GoString returns the string representation +func (s GetJobInput) GoString() string { + return s.String() +} - // True if account cleanup is enabled at the beginning of the test; otherwise, - // false. - AccountsCleanup *bool `locationName:"accountsCleanup" type:"boolean"` +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetJobInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } - // True if app package cleanup is enabled at the beginning of the test; otherwise, - // false. - AppPackagesCleanup *bool `locationName:"appPackagesCleanup" type:"boolean"` + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} - // The number of minutes a test run will execute before it times out. - JobTimeoutMinutes *int64 `locationName:"jobTimeoutMinutes" type:"integer"` +// SetArn sets the Arn field's value. +func (s *GetJobInput) SetArn(v string) *GetJobInput { + s.Arn = &v + return s +} - // When set to true, for private devices, Device Farm will not sign your app - // again. For public devices, Device Farm always signs your apps again and this - // parameter has no effect. - // - // For more information about how Device Farm re-signs your app(s), see Do you - // modify my app? (https://aws.amazon.com/device-farm/faq/) in the AWS Device - // Farm FAQs. - SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` +// Represents the result of a get job request. +type GetJobOutput struct { + _ struct{} `type:"structure"` - // Set to true to enable video capture; otherwise, set to false. The default - // is true. - VideoCapture *bool `locationName:"videoCapture" type:"boolean"` + // An object that contains information about the requested job. + Job *Job `locationName:"job" type:"structure"` } // String returns the string representation -func (s ExecutionConfiguration) String() string { +func (s GetJobOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ExecutionConfiguration) GoString() string { +func (s GetJobOutput) GoString() string { return s.String() } -// SetAccountsCleanup sets the AccountsCleanup field's value. -func (s *ExecutionConfiguration) SetAccountsCleanup(v bool) *ExecutionConfiguration { - s.AccountsCleanup = &v +// SetJob sets the Job field's value. +func (s *GetJobOutput) SetJob(v *Job) *GetJobOutput { + s.Job = v return s } -// SetAppPackagesCleanup sets the AppPackagesCleanup field's value. -func (s *ExecutionConfiguration) SetAppPackagesCleanup(v bool) *ExecutionConfiguration { - s.AppPackagesCleanup = &v - return s +type GetNetworkProfileInput struct { + _ struct{} `type:"structure"` + + // The ARN of the network profile to return information about. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` } -// SetJobTimeoutMinutes sets the JobTimeoutMinutes field's value. -func (s *ExecutionConfiguration) SetJobTimeoutMinutes(v int64) *ExecutionConfiguration { - s.JobTimeoutMinutes = &v - return s +// String returns the string representation +func (s GetNetworkProfileInput) String() string { + return awsutil.Prettify(s) } -// SetSkipAppResign sets the SkipAppResign field's value. -func (s *ExecutionConfiguration) SetSkipAppResign(v bool) *ExecutionConfiguration { - s.SkipAppResign = &v - return s +// GoString returns the string representation +func (s GetNetworkProfileInput) GoString() string { + return s.String() } -// SetVideoCapture sets the VideoCapture field's value. -func (s *ExecutionConfiguration) SetVideoCapture(v bool) *ExecutionConfiguration { - s.VideoCapture = &v +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetNetworkProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetNetworkProfileInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *GetNetworkProfileInput) SetArn(v string) *GetNetworkProfileInput { + s.Arn = &v return s } -// Represents the request sent to retrieve the account settings. -type GetAccountSettingsInput struct { +type GetNetworkProfileOutput struct { _ struct{} `type:"structure"` + + // The network profile. + NetworkProfile *NetworkProfile `locationName:"networkProfile" type:"structure"` } // String returns the string representation -func (s GetAccountSettingsInput) String() string { +func (s GetNetworkProfileOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetAccountSettingsInput) GoString() string { +func (s GetNetworkProfileOutput) GoString() string { return s.String() } -// Represents the account settings return values from the GetAccountSettings -// request. -type GetAccountSettingsOutput struct { +// SetNetworkProfile sets the NetworkProfile field's value. +func (s *GetNetworkProfileOutput) SetNetworkProfile(v *NetworkProfile) *GetNetworkProfileOutput { + s.NetworkProfile = v + return s +} + +// Represents the request to retrieve the offering status for the specified +// customer or account. +type GetOfferingStatusInput struct { _ struct{} `type:"structure"` - // The account settings. - AccountSettings *AccountSettings `locationName:"accountSettings" type:"structure"` + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` } // String returns the string representation -func (s GetAccountSettingsOutput) String() string { +func (s GetOfferingStatusInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetAccountSettingsOutput) GoString() string { +func (s GetOfferingStatusInput) GoString() string { return s.String() } -// SetAccountSettings sets the AccountSettings field's value. -func (s *GetAccountSettingsOutput) SetAccountSettings(v *AccountSettings) *GetAccountSettingsOutput { - s.AccountSettings = v +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetOfferingStatusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetOfferingStatusInput"} + if s.NextToken != nil && len(*s.NextToken) < 4 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNextToken sets the NextToken field's value. +func (s *GetOfferingStatusInput) SetNextToken(v string) *GetOfferingStatusInput { + s.NextToken = &v return s } -// Represents a request to the get device request. -type GetDeviceInput struct { +// Returns the status result for a device offering. +type GetOfferingStatusOutput struct { _ struct{} `type:"structure"` - // The device type's ARN. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + // When specified, gets the offering status for the current period. + Current map[string]*OfferingStatus `locationName:"current" type:"map"` + + // When specified, gets the offering status for the next period. + NextPeriod map[string]*OfferingStatus `locationName:"nextPeriod" type:"map"` + + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` } // String returns the string representation -func (s GetDeviceInput) String() string { +func (s GetOfferingStatusOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDeviceInput) GoString() string { +func (s GetOfferingStatusOutput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDeviceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDeviceInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } +// SetCurrent sets the Current field's value. +func (s *GetOfferingStatusOutput) SetCurrent(v map[string]*OfferingStatus) *GetOfferingStatusOutput { + s.Current = v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetNextPeriod sets the NextPeriod field's value. +func (s *GetOfferingStatusOutput) SetNextPeriod(v map[string]*OfferingStatus) *GetOfferingStatusOutput { + s.NextPeriod = v + return s } -// SetArn sets the Arn field's value. -func (s *GetDeviceInput) SetArn(v string) *GetDeviceInput { - s.Arn = &v +// SetNextToken sets the NextToken field's value. +func (s *GetOfferingStatusOutput) SetNextToken(v string) *GetOfferingStatusOutput { + s.NextToken = &v return s } -type GetDeviceInstanceInput struct { +// Represents a request to the get project operation. +type GetProjectInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the instance you're requesting information - // about. + // The project's ARN. // // Arn is a required field Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` } // String returns the string representation -func (s GetDeviceInstanceInput) String() string { +func (s GetProjectInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDeviceInstanceInput) GoString() string { +func (s GetProjectInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetDeviceInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDeviceInstanceInput"} +func (s *GetProjectInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetProjectInput"} if s.Arn == nil { invalidParams.Add(request.NewErrParamRequired("Arn")) } @@ -9579,151 +11486,65 @@ func (s *GetDeviceInstanceInput) Validate() error { } // SetArn sets the Arn field's value. -func (s *GetDeviceInstanceInput) SetArn(v string) *GetDeviceInstanceInput { +func (s *GetProjectInput) SetArn(v string) *GetProjectInput { s.Arn = &v return s } -type GetDeviceInstanceOutput struct { - _ struct{} `type:"structure"` - - // An object containing information about your device instance. - DeviceInstance *DeviceInstance `locationName:"deviceInstance" type:"structure"` -} - -// String returns the string representation -func (s GetDeviceInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetDeviceInstanceOutput) GoString() string { - return s.String() -} - -// SetDeviceInstance sets the DeviceInstance field's value. -func (s *GetDeviceInstanceOutput) SetDeviceInstance(v *DeviceInstance) *GetDeviceInstanceOutput { - s.DeviceInstance = v - return s -} - -// Represents the result of a get device request. -type GetDeviceOutput struct { +// Represents the result of a get project request. +type GetProjectOutput struct { _ struct{} `type:"structure"` - // An object containing information about the requested device. - Device *Device `locationName:"device" type:"structure"` + // The project to get information about. + Project *Project `locationName:"project" type:"structure"` } // String returns the string representation -func (s GetDeviceOutput) String() string { +func (s GetProjectOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDeviceOutput) GoString() string { +func (s GetProjectOutput) GoString() string { return s.String() } -// SetDevice sets the Device field's value. -func (s *GetDeviceOutput) SetDevice(v *Device) *GetDeviceOutput { - s.Device = v +// SetProject sets the Project field's value. +func (s *GetProjectOutput) SetProject(v *Project) *GetProjectOutput { + s.Project = v return s } -// Represents a request to the get device pool compatibility operation. -type GetDevicePoolCompatibilityInput struct { +// Represents the request to get information about the specified remote access +// session. +type GetRemoteAccessSessionInput struct { _ struct{} `type:"structure"` - // The ARN of the app that is associated with the specified device pool. - AppArn *string `locationName:"appArn" min:"32" type:"string"` - - // An object containing information about the settings for a run. - Configuration *ScheduleRunConfiguration `locationName:"configuration" type:"structure"` - - // The device pool's ARN. - // - // DevicePoolArn is a required field - DevicePoolArn *string `locationName:"devicePoolArn" min:"32" type:"string" required:"true"` - - // Information about the uploaded test to be run against the device pool. - Test *ScheduleRunTest `locationName:"test" type:"structure"` - - // The test type for the specified device pool. - // - // Allowed values include the following: - // - // * BUILTIN_FUZZ: The built-in fuzz type. - // - // * BUILTIN_EXPLORER: For Android, an app explorer that will traverse an - // Android app, interacting with it and capturing screenshots at the same - // time. - // - // * APPIUM_JAVA_JUNIT: The Appium Java JUnit type. - // - // * APPIUM_JAVA_TESTNG: The Appium Java TestNG type. - // - // * APPIUM_PYTHON: The Appium Python type. - // - // * APPIUM_NODE: The Appium Node.js type. - // - // * APPIUM_RUBY: The Appium Ruby type. - // - // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for web apps. - // - // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for web apps. - // - // * APPIUM_WEB_PYTHON: The Appium Python type for web apps. - // - // * APPIUM_WEB_NODE: The Appium Node.js type for web apps. - // - // * APPIUM_WEB_RUBY: The Appium Ruby type for web apps. - // - // * CALABASH: The Calabash type. - // - // * INSTRUMENTATION: The Instrumentation type. - // - // * UIAUTOMATION: The uiautomation type. - // - // * UIAUTOMATOR: The uiautomator type. - // - // * XCTEST: The Xcode test type. + // The Amazon Resource Name (ARN) of the remote access session about which you + // want to get session information. // - // * XCTEST_UI: The Xcode UI test type. - TestType *string `locationName:"testType" type:"string" enum:"TestType"` + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` } // String returns the string representation -func (s GetDevicePoolCompatibilityInput) String() string { +func (s GetRemoteAccessSessionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDevicePoolCompatibilityInput) GoString() string { +func (s GetRemoteAccessSessionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetDevicePoolCompatibilityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDevicePoolCompatibilityInput"} - if s.AppArn != nil && len(*s.AppArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("AppArn", 32)) - } - if s.DevicePoolArn == nil { - invalidParams.Add(request.NewErrParamRequired("DevicePoolArn")) - } - if s.DevicePoolArn != nil && len(*s.DevicePoolArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("DevicePoolArn", 32)) - } - if s.Configuration != nil { - if err := s.Configuration.Validate(); err != nil { - invalidParams.AddNested("Configuration", err.(request.ErrInvalidParams)) - } +func (s *GetRemoteAccessSessionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRemoteAccessSessionInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) } - if s.Test != nil { - if err := s.Test.Validate(); err != nil { - invalidParams.AddNested("Test", err.(request.ErrInvalidParams)) - } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) } if invalidParams.Len() > 0 { @@ -9732,92 +11553,60 @@ func (s *GetDevicePoolCompatibilityInput) Validate() error { return nil } -// SetAppArn sets the AppArn field's value. -func (s *GetDevicePoolCompatibilityInput) SetAppArn(v string) *GetDevicePoolCompatibilityInput { - s.AppArn = &v - return s -} - -// SetConfiguration sets the Configuration field's value. -func (s *GetDevicePoolCompatibilityInput) SetConfiguration(v *ScheduleRunConfiguration) *GetDevicePoolCompatibilityInput { - s.Configuration = v - return s -} - -// SetDevicePoolArn sets the DevicePoolArn field's value. -func (s *GetDevicePoolCompatibilityInput) SetDevicePoolArn(v string) *GetDevicePoolCompatibilityInput { - s.DevicePoolArn = &v - return s -} - -// SetTest sets the Test field's value. -func (s *GetDevicePoolCompatibilityInput) SetTest(v *ScheduleRunTest) *GetDevicePoolCompatibilityInput { - s.Test = v - return s -} - -// SetTestType sets the TestType field's value. -func (s *GetDevicePoolCompatibilityInput) SetTestType(v string) *GetDevicePoolCompatibilityInput { - s.TestType = &v +// SetArn sets the Arn field's value. +func (s *GetRemoteAccessSessionInput) SetArn(v string) *GetRemoteAccessSessionInput { + s.Arn = &v return s } -// Represents the result of describe device pool compatibility request. -type GetDevicePoolCompatibilityOutput struct { +// Represents the response from the server that lists detailed information about +// the remote access session. +type GetRemoteAccessSessionOutput struct { _ struct{} `type:"structure"` - // Information about compatible devices. - CompatibleDevices []*DevicePoolCompatibilityResult `locationName:"compatibleDevices" type:"list"` - - // Information about incompatible devices. - IncompatibleDevices []*DevicePoolCompatibilityResult `locationName:"incompatibleDevices" type:"list"` + // A container that lists detailed information about the remote access session. + RemoteAccessSession *RemoteAccessSession `locationName:"remoteAccessSession" type:"structure"` } // String returns the string representation -func (s GetDevicePoolCompatibilityOutput) String() string { +func (s GetRemoteAccessSessionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDevicePoolCompatibilityOutput) GoString() string { +func (s GetRemoteAccessSessionOutput) GoString() string { return s.String() } -// SetCompatibleDevices sets the CompatibleDevices field's value. -func (s *GetDevicePoolCompatibilityOutput) SetCompatibleDevices(v []*DevicePoolCompatibilityResult) *GetDevicePoolCompatibilityOutput { - s.CompatibleDevices = v - return s -} - -// SetIncompatibleDevices sets the IncompatibleDevices field's value. -func (s *GetDevicePoolCompatibilityOutput) SetIncompatibleDevices(v []*DevicePoolCompatibilityResult) *GetDevicePoolCompatibilityOutput { - s.IncompatibleDevices = v +// SetRemoteAccessSession sets the RemoteAccessSession field's value. +func (s *GetRemoteAccessSessionOutput) SetRemoteAccessSession(v *RemoteAccessSession) *GetRemoteAccessSessionOutput { + s.RemoteAccessSession = v return s } -// Represents a request to the get device pool operation. -type GetDevicePoolInput struct { +// Represents a request to the get run operation. +type GetRunInput struct { _ struct{} `type:"structure"` - // The device pool's ARN. + // The run's ARN. // // Arn is a required field Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` } // String returns the string representation -func (s GetDevicePoolInput) String() string { +func (s GetRunInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDevicePoolInput) GoString() string { +func (s GetRunInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetDevicePoolInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDevicePoolInput"} +func (s *GetRunInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRunInput"} if s.Arn == nil { invalidParams.Add(request.NewErrParamRequired("Arn")) } @@ -9832,57 +11621,58 @@ func (s *GetDevicePoolInput) Validate() error { } // SetArn sets the Arn field's value. -func (s *GetDevicePoolInput) SetArn(v string) *GetDevicePoolInput { +func (s *GetRunInput) SetArn(v string) *GetRunInput { s.Arn = &v return s } -// Represents the result of a get device pool request. -type GetDevicePoolOutput struct { +// Represents the result of a get run request. +type GetRunOutput struct { _ struct{} `type:"structure"` - // An object containing information about the requested device pool. - DevicePool *DevicePool `locationName:"devicePool" type:"structure"` + // The run to get results from. + Run *Run `locationName:"run" type:"structure"` } // String returns the string representation -func (s GetDevicePoolOutput) String() string { +func (s GetRunOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDevicePoolOutput) GoString() string { +func (s GetRunOutput) GoString() string { return s.String() } -// SetDevicePool sets the DevicePool field's value. -func (s *GetDevicePoolOutput) SetDevicePool(v *DevicePool) *GetDevicePoolOutput { - s.DevicePool = v +// SetRun sets the Run field's value. +func (s *GetRunOutput) SetRun(v *Run) *GetRunOutput { + s.Run = v return s } -type GetInstanceProfileInput struct { +// Represents a request to the get suite operation. +type GetSuiteInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of your instance profile. + // The suite's ARN. // // Arn is a required field Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` } // String returns the string representation -func (s GetInstanceProfileInput) String() string { +func (s GetSuiteInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstanceProfileInput) GoString() string { +func (s GetSuiteInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetInstanceProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInstanceProfileInput"} +func (s *GetSuiteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSuiteInput"} if s.Arn == nil { invalidParams.Add(request.NewErrParamRequired("Arn")) } @@ -9897,62 +11687,63 @@ func (s *GetInstanceProfileInput) Validate() error { } // SetArn sets the Arn field's value. -func (s *GetInstanceProfileInput) SetArn(v string) *GetInstanceProfileInput { +func (s *GetSuiteInput) SetArn(v string) *GetSuiteInput { s.Arn = &v return s } -type GetInstanceProfileOutput struct { +// Represents the result of a get suite request. +type GetSuiteOutput struct { _ struct{} `type:"structure"` - // An object containing information about your instance profile. - InstanceProfile *InstanceProfile `locationName:"instanceProfile" type:"structure"` + // A collection of one or more tests. + Suite *Suite `locationName:"suite" type:"structure"` } // String returns the string representation -func (s GetInstanceProfileOutput) String() string { +func (s GetSuiteOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstanceProfileOutput) GoString() string { +func (s GetSuiteOutput) GoString() string { return s.String() } -// SetInstanceProfile sets the InstanceProfile field's value. -func (s *GetInstanceProfileOutput) SetInstanceProfile(v *InstanceProfile) *GetInstanceProfileOutput { - s.InstanceProfile = v +// SetSuite sets the Suite field's value. +func (s *GetSuiteOutput) SetSuite(v *Suite) *GetSuiteOutput { + s.Suite = v return s } -// Represents a request to the get job operation. -type GetJobInput struct { +type GetTestGridProjectInput struct { _ struct{} `type:"structure"` - // The job's ARN. + // The ARN of the Selenium testing project, from either CreateTestGridProject + // or ListTestGridProjects. // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + // ProjectArn is a required field + ProjectArn *string `locationName:"projectArn" min:"32" type:"string" required:"true"` } // String returns the string representation -func (s GetJobInput) String() string { +func (s GetTestGridProjectInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetJobInput) GoString() string { +func (s GetTestGridProjectInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetJobInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetJobInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) +func (s *GetTestGridProjectInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetTestGridProjectInput"} + if s.ProjectArn == nil { + invalidParams.Add(request.NewErrParamRequired("ProjectArn")) } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + if s.ProjectArn != nil && len(*s.ProjectArn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("ProjectArn", 32)) } if invalidParams.Len() > 0 { @@ -9961,64 +11752,70 @@ func (s *GetJobInput) Validate() error { return nil } -// SetArn sets the Arn field's value. -func (s *GetJobInput) SetArn(v string) *GetJobInput { - s.Arn = &v +// SetProjectArn sets the ProjectArn field's value. +func (s *GetTestGridProjectInput) SetProjectArn(v string) *GetTestGridProjectInput { + s.ProjectArn = &v return s } -// Represents the result of a get job request. -type GetJobOutput struct { +type GetTestGridProjectOutput struct { _ struct{} `type:"structure"` - // An object containing information about the requested job. - Job *Job `locationName:"job" type:"structure"` + // A TestGridProject. + TestGridProject *TestGridProject `locationName:"testGridProject" type:"structure"` } // String returns the string representation -func (s GetJobOutput) String() string { +func (s GetTestGridProjectOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetJobOutput) GoString() string { +func (s GetTestGridProjectOutput) GoString() string { return s.String() } -// SetJob sets the Job field's value. -func (s *GetJobOutput) SetJob(v *Job) *GetJobOutput { - s.Job = v +// SetTestGridProject sets the TestGridProject field's value. +func (s *GetTestGridProjectOutput) SetTestGridProject(v *TestGridProject) *GetTestGridProjectOutput { + s.TestGridProject = v return s } -type GetNetworkProfileInput struct { +type GetTestGridSessionInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the network profile you want to return - // information about. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + // The ARN for the project that this session belongs to. See CreateTestGridProject + // and ListTestGridProjects. + ProjectArn *string `locationName:"projectArn" min:"32" type:"string"` + + // An ARN that uniquely identifies a TestGridSession. + SessionArn *string `locationName:"sessionArn" min:"32" type:"string"` + + // An ID associated with this session. + SessionId *string `locationName:"sessionId" min:"1" type:"string"` } // String returns the string representation -func (s GetNetworkProfileInput) String() string { +func (s GetTestGridSessionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetNetworkProfileInput) GoString() string { +func (s GetTestGridSessionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetNetworkProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetNetworkProfileInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) +func (s *GetTestGridSessionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetTestGridSessionInput"} + if s.ProjectArn != nil && len(*s.ProjectArn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("ProjectArn", 32)) } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + if s.SessionArn != nil && len(*s.SessionArn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("SessionArn", 32)) + } + if s.SessionId != nil && len(*s.SessionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SessionId", 1)) } if invalidParams.Len() > 0 { @@ -10027,60 +11824,75 @@ func (s *GetNetworkProfileInput) Validate() error { return nil } -// SetArn sets the Arn field's value. -func (s *GetNetworkProfileInput) SetArn(v string) *GetNetworkProfileInput { - s.Arn = &v +// SetProjectArn sets the ProjectArn field's value. +func (s *GetTestGridSessionInput) SetProjectArn(v string) *GetTestGridSessionInput { + s.ProjectArn = &v return s } -type GetNetworkProfileOutput struct { +// SetSessionArn sets the SessionArn field's value. +func (s *GetTestGridSessionInput) SetSessionArn(v string) *GetTestGridSessionInput { + s.SessionArn = &v + return s +} + +// SetSessionId sets the SessionId field's value. +func (s *GetTestGridSessionInput) SetSessionId(v string) *GetTestGridSessionInput { + s.SessionId = &v + return s +} + +type GetTestGridSessionOutput struct { _ struct{} `type:"structure"` - // The network profile. - NetworkProfile *NetworkProfile `locationName:"networkProfile" type:"structure"` + // The TestGridSession that was requested. + TestGridSession *TestGridSession `locationName:"testGridSession" type:"structure"` } // String returns the string representation -func (s GetNetworkProfileOutput) String() string { +func (s GetTestGridSessionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetNetworkProfileOutput) GoString() string { +func (s GetTestGridSessionOutput) GoString() string { return s.String() } -// SetNetworkProfile sets the NetworkProfile field's value. -func (s *GetNetworkProfileOutput) SetNetworkProfile(v *NetworkProfile) *GetNetworkProfileOutput { - s.NetworkProfile = v +// SetTestGridSession sets the TestGridSession field's value. +func (s *GetTestGridSessionOutput) SetTestGridSession(v *TestGridSession) *GetTestGridSessionOutput { + s.TestGridSession = v return s } -// Represents the request to retrieve the offering status for the specified -// customer or account. -type GetOfferingStatusInput struct { +// Represents a request to the get test operation. +type GetTestInput struct { _ struct{} `type:"structure"` - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` + // The test's ARN. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` } // String returns the string representation -func (s GetOfferingStatusInput) String() string { +func (s GetTestInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetOfferingStatusInput) GoString() string { +func (s GetTestInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetOfferingStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetOfferingStatusInput"} - if s.NextToken != nil && len(*s.NextToken) < 4 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) +func (s *GetTestInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetTestInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) } if invalidParams.Len() > 0 { @@ -10089,78 +11901,59 @@ func (s *GetOfferingStatusInput) Validate() error { return nil } -// SetNextToken sets the NextToken field's value. -func (s *GetOfferingStatusInput) SetNextToken(v string) *GetOfferingStatusInput { - s.NextToken = &v +// SetArn sets the Arn field's value. +func (s *GetTestInput) SetArn(v string) *GetTestInput { + s.Arn = &v return s } -// Returns the status result for a device offering. -type GetOfferingStatusOutput struct { +// Represents the result of a get test request. +type GetTestOutput struct { _ struct{} `type:"structure"` - // When specified, gets the offering status for the current period. - Current map[string]*OfferingStatus `locationName:"current" type:"map"` - - // When specified, gets the offering status for the next period. - NextPeriod map[string]*OfferingStatus `locationName:"nextPeriod" type:"map"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` + // A test condition that is evaluated. + Test *Test `locationName:"test" type:"structure"` } // String returns the string representation -func (s GetOfferingStatusOutput) String() string { +func (s GetTestOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetOfferingStatusOutput) GoString() string { +func (s GetTestOutput) GoString() string { return s.String() } -// SetCurrent sets the Current field's value. -func (s *GetOfferingStatusOutput) SetCurrent(v map[string]*OfferingStatus) *GetOfferingStatusOutput { - s.Current = v - return s -} - -// SetNextPeriod sets the NextPeriod field's value. -func (s *GetOfferingStatusOutput) SetNextPeriod(v map[string]*OfferingStatus) *GetOfferingStatusOutput { - s.NextPeriod = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *GetOfferingStatusOutput) SetNextToken(v string) *GetOfferingStatusOutput { - s.NextToken = &v +// SetTest sets the Test field's value. +func (s *GetTestOutput) SetTest(v *Test) *GetTestOutput { + s.Test = v return s } -// Represents a request to the get project operation. -type GetProjectInput struct { +// Represents a request to the get upload operation. +type GetUploadInput struct { _ struct{} `type:"structure"` - // The project's ARN. + // The upload's ARN. // // Arn is a required field Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` } // String returns the string representation -func (s GetProjectInput) String() string { +func (s GetUploadInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetProjectInput) GoString() string { +func (s GetUploadInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetProjectInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetProjectInput"} +func (s *GetUploadInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetUploadInput"} if s.Arn == nil { invalidParams.Add(request.NewErrParamRequired("Arn")) } @@ -10175,60 +11968,58 @@ func (s *GetProjectInput) Validate() error { } // SetArn sets the Arn field's value. -func (s *GetProjectInput) SetArn(v string) *GetProjectInput { +func (s *GetUploadInput) SetArn(v string) *GetUploadInput { s.Arn = &v return s } -// Represents the result of a get project request. -type GetProjectOutput struct { +// Represents the result of a get upload request. +type GetUploadOutput struct { _ struct{} `type:"structure"` - // The project you wish to get information about. - Project *Project `locationName:"project" type:"structure"` + // An app or a set of one or more tests to upload or that have been uploaded. + Upload *Upload `locationName:"upload" type:"structure"` } // String returns the string representation -func (s GetProjectOutput) String() string { +func (s GetUploadOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetProjectOutput) GoString() string { +func (s GetUploadOutput) GoString() string { return s.String() } -// SetProject sets the Project field's value. -func (s *GetProjectOutput) SetProject(v *Project) *GetProjectOutput { - s.Project = v +// SetUpload sets the Upload field's value. +func (s *GetUploadOutput) SetUpload(v *Upload) *GetUploadOutput { + s.Upload = v return s } -// Represents the request to get information about the specified remote access -// session. -type GetRemoteAccessSessionInput struct { +type GetVPCEConfigurationInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the remote access session about which you - // want to get session information. + // The Amazon Resource Name (ARN) of the VPC endpoint configuration you want + // to describe. // // Arn is a required field Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` } // String returns the string representation -func (s GetRemoteAccessSessionInput) String() string { +func (s GetVPCEConfigurationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetRemoteAccessSessionInput) GoString() string { +func (s GetVPCEConfigurationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetRemoteAccessSessionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRemoteAccessSessionInput"} +func (s *GetVPCEConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetVPCEConfigurationInput"} if s.Arn == nil { invalidParams.Add(request.NewErrParamRequired("Arn")) } @@ -10243,64 +12034,122 @@ func (s *GetRemoteAccessSessionInput) Validate() error { } // SetArn sets the Arn field's value. -func (s *GetRemoteAccessSessionInput) SetArn(v string) *GetRemoteAccessSessionInput { +func (s *GetVPCEConfigurationInput) SetArn(v string) *GetVPCEConfigurationInput { s.Arn = &v return s } -// Represents the response from the server that lists detailed information about -// the remote access session. -type GetRemoteAccessSessionOutput struct { +type GetVPCEConfigurationOutput struct { _ struct{} `type:"structure"` - // A container that lists detailed information about the remote access session. - RemoteAccessSession *RemoteAccessSession `locationName:"remoteAccessSession" type:"structure"` + // An object that contains information about your VPC endpoint configuration. + VpceConfiguration *VPCEConfiguration `locationName:"vpceConfiguration" type:"structure"` } // String returns the string representation -func (s GetRemoteAccessSessionOutput) String() string { +func (s GetVPCEConfigurationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetRemoteAccessSessionOutput) GoString() string { +func (s GetVPCEConfigurationOutput) GoString() string { return s.String() } -// SetRemoteAccessSession sets the RemoteAccessSession field's value. -func (s *GetRemoteAccessSessionOutput) SetRemoteAccessSession(v *RemoteAccessSession) *GetRemoteAccessSessionOutput { - s.RemoteAccessSession = v +// SetVpceConfiguration sets the VpceConfiguration field's value. +func (s *GetVPCEConfigurationOutput) SetVpceConfiguration(v *VPCEConfiguration) *GetVPCEConfigurationOutput { + s.VpceConfiguration = v return s } -// Represents a request to the get run operation. -type GetRunInput struct { +// Represents information about incompatibility. +type IncompatibilityMessage struct { + _ struct{} `type:"structure"` + + // A message about the incompatibility. + Message *string `locationName:"message" type:"string"` + + // The type of incompatibility. + // + // Allowed values include: + // + // * ARN + // + // * FORM_FACTOR (for example, phone or tablet) + // + // * MANUFACTURER + // + // * PLATFORM (for example, Android or iOS) + // + // * REMOTE_ACCESS_ENABLED + // + // * APPIUM_VERSION + Type *string `locationName:"type" type:"string" enum:"DeviceAttribute"` +} + +// String returns the string representation +func (s IncompatibilityMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IncompatibilityMessage) GoString() string { + return s.String() +} + +// SetMessage sets the Message field's value. +func (s *IncompatibilityMessage) SetMessage(v string) *IncompatibilityMessage { + s.Message = &v + return s +} + +// SetType sets the Type field's value. +func (s *IncompatibilityMessage) SetType(v string) *IncompatibilityMessage { + s.Type = &v + return s +} + +// Represents the request to install an Android application (in .apk format) +// or an iOS application (in .ipa format) as part of a remote access session. +type InstallToRemoteAccessSessionInput struct { _ struct{} `type:"structure"` - // The run's ARN. + // The ARN of the app about which you are requesting information. // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + // AppArn is a required field + AppArn *string `locationName:"appArn" min:"32" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the remote access session about which you + // are requesting information. + // + // RemoteAccessSessionArn is a required field + RemoteAccessSessionArn *string `locationName:"remoteAccessSessionArn" min:"32" type:"string" required:"true"` } // String returns the string representation -func (s GetRunInput) String() string { +func (s InstallToRemoteAccessSessionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetRunInput) GoString() string { +func (s InstallToRemoteAccessSessionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetRunInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRunInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) +func (s *InstallToRemoteAccessSessionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InstallToRemoteAccessSessionInput"} + if s.AppArn == nil { + invalidParams.Add(request.NewErrParamRequired("AppArn")) } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + if s.AppArn != nil && len(*s.AppArn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("AppArn", 32)) + } + if s.RemoteAccessSessionArn == nil { + invalidParams.Add(request.NewErrParamRequired("RemoteAccessSessionArn")) + } + if s.RemoteAccessSessionArn != nil && len(*s.RemoteAccessSessionArn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("RemoteAccessSessionArn", 32)) } if invalidParams.Len() > 0 { @@ -10309,263 +12158,395 @@ func (s *GetRunInput) Validate() error { return nil } -// SetArn sets the Arn field's value. -func (s *GetRunInput) SetArn(v string) *GetRunInput { - s.Arn = &v +// SetAppArn sets the AppArn field's value. +func (s *InstallToRemoteAccessSessionInput) SetAppArn(v string) *InstallToRemoteAccessSessionInput { + s.AppArn = &v return s } -// Represents the result of a get run request. -type GetRunOutput struct { +// SetRemoteAccessSessionArn sets the RemoteAccessSessionArn field's value. +func (s *InstallToRemoteAccessSessionInput) SetRemoteAccessSessionArn(v string) *InstallToRemoteAccessSessionInput { + s.RemoteAccessSessionArn = &v + return s +} + +// Represents the response from the server after AWS Device Farm makes a request +// to install to a remote access session. +type InstallToRemoteAccessSessionOutput struct { _ struct{} `type:"structure"` - // The run you wish to get results from. - Run *Run `locationName:"run" type:"structure"` + // An app to upload or that has been uploaded. + AppUpload *Upload `locationName:"appUpload" type:"structure"` } // String returns the string representation -func (s GetRunOutput) String() string { +func (s InstallToRemoteAccessSessionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetRunOutput) GoString() string { +func (s InstallToRemoteAccessSessionOutput) GoString() string { return s.String() } -// SetRun sets the Run field's value. -func (s *GetRunOutput) SetRun(v *Run) *GetRunOutput { - s.Run = v +// SetAppUpload sets the AppUpload field's value. +func (s *InstallToRemoteAccessSessionOutput) SetAppUpload(v *Upload) *InstallToRemoteAccessSessionOutput { + s.AppUpload = v return s } -// Represents a request to the get suite operation. -type GetSuiteInput struct { +// Represents the instance profile. +type InstanceProfile struct { _ struct{} `type:"structure"` - // The suite's ARN. + // The Amazon Resource Name (ARN) of the instance profile. + Arn *string `locationName:"arn" min:"32" type:"string"` + + // The description of the instance profile. + Description *string `locationName:"description" type:"string"` + + // An array of strings containing the list of app packages that should not be + // cleaned up from the device after a test run completes. // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + // The list of packages is considered only if you set packageCleanup to true. + ExcludeAppPackagesFromCleanup []*string `locationName:"excludeAppPackagesFromCleanup" type:"list"` + + // The name of the instance profile. + Name *string `locationName:"name" type:"string"` + + // When set to true, Device Farm removes app packages after a test run. The + // default value is false for private devices. + PackageCleanup *bool `locationName:"packageCleanup" type:"boolean"` + + // When set to true, Device Farm reboots the instance after a test run. The + // default value is true. + RebootAfterUse *bool `locationName:"rebootAfterUse" type:"boolean"` } // String returns the string representation -func (s GetSuiteInput) String() string { +func (s InstanceProfile) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetSuiteInput) GoString() string { +func (s InstanceProfile) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSuiteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSuiteInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetArn sets the Arn field's value. -func (s *GetSuiteInput) SetArn(v string) *GetSuiteInput { +func (s *InstanceProfile) SetArn(v string) *InstanceProfile { s.Arn = &v return s } -// Represents the result of a get suite request. -type GetSuiteOutput struct { - _ struct{} `type:"structure"` +// SetDescription sets the Description field's value. +func (s *InstanceProfile) SetDescription(v string) *InstanceProfile { + s.Description = &v + return s +} - // A collection of one or more tests. - Suite *Suite `locationName:"suite" type:"structure"` +// SetExcludeAppPackagesFromCleanup sets the ExcludeAppPackagesFromCleanup field's value. +func (s *InstanceProfile) SetExcludeAppPackagesFromCleanup(v []*string) *InstanceProfile { + s.ExcludeAppPackagesFromCleanup = v + return s } -// String returns the string representation -func (s GetSuiteOutput) String() string { - return awsutil.Prettify(s) +// SetName sets the Name field's value. +func (s *InstanceProfile) SetName(v string) *InstanceProfile { + s.Name = &v + return s } -// GoString returns the string representation -func (s GetSuiteOutput) GoString() string { - return s.String() +// SetPackageCleanup sets the PackageCleanup field's value. +func (s *InstanceProfile) SetPackageCleanup(v bool) *InstanceProfile { + s.PackageCleanup = &v + return s } -// SetSuite sets the Suite field's value. -func (s *GetSuiteOutput) SetSuite(v *Suite) *GetSuiteOutput { - s.Suite = v +// SetRebootAfterUse sets the RebootAfterUse field's value. +func (s *InstanceProfile) SetRebootAfterUse(v bool) *InstanceProfile { + s.RebootAfterUse = &v return s } -// Represents a request to the get test operation. -type GetTestInput struct { +// Represents a device. +type Job struct { _ struct{} `type:"structure"` - // The test's ARN. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` -} + // The job's ARN. + Arn *string `locationName:"arn" min:"32" type:"string"` -// String returns the string representation -func (s GetTestInput) String() string { - return awsutil.Prettify(s) -} + // The job's result counters. + Counters *Counters `locationName:"counters" type:"structure"` -// GoString returns the string representation -func (s GetTestInput) GoString() string { - return s.String() -} + // When the job was created. + Created *time.Time `locationName:"created" type:"timestamp"` -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetTestInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetTestInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } + // The device (phone or tablet). + Device *Device `locationName:"device" type:"structure"` - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} + // Represents the total (metered or unmetered) minutes used by the job. + DeviceMinutes *DeviceMinutes `locationName:"deviceMinutes" type:"structure"` -// SetArn sets the Arn field's value. -func (s *GetTestInput) SetArn(v string) *GetTestInput { - s.Arn = &v - return s -} + // The ARN of the instance. + InstanceArn *string `locationName:"instanceArn" min:"32" type:"string"` -// Represents the result of a get test request. -type GetTestOutput struct { - _ struct{} `type:"structure"` + // A message about the job's result. + Message *string `locationName:"message" type:"string"` + + // The job's name. + Name *string `locationName:"name" type:"string"` + + // The job's result. + // + // Allowed values include: + // + // * PENDING + // + // * PASSED + // + // * WARNED + // + // * FAILED + // + // * SKIPPED + // + // * ERRORED + // + // * STOPPED + Result *string `locationName:"result" type:"string" enum:"ExecutionResult"` + + // The job's start time. + Started *time.Time `locationName:"started" type:"timestamp"` + + // The job's status. + // + // Allowed values include: + // + // * PENDING + // + // * PENDING_CONCURRENCY + // + // * PENDING_DEVICE + // + // * PROCESSING + // + // * SCHEDULING + // + // * PREPARING + // + // * RUNNING + // + // * COMPLETED + // + // * STOPPING + Status *string `locationName:"status" type:"string" enum:"ExecutionStatus"` + + // The job's stop time. + Stopped *time.Time `locationName:"stopped" type:"timestamp"` + + // The job's type. + // + // Allowed values include the following: + // + // * BUILTIN_FUZZ + // + // * BUILTIN_EXPLORER. For Android, an app explorer that traverses an Android + // app, interacting with it and capturing screenshots at the same time. + // + // * APPIUM_JAVA_JUNIT + // + // * APPIUM_JAVA_TESTNG + // + // * APPIUM_PYTHON + // + // * APPIUM_NODE + // + // * APPIUM_RUBY + // + // * APPIUM_WEB_JAVA_JUNIT + // + // * APPIUM_WEB_JAVA_TESTNG + // + // * APPIUM_WEB_PYTHON + // + // * APPIUM_WEB_NODE + // + // * APPIUM_WEB_RUBY + // + // * CALABASH + // + // * INSTRUMENTATION + // + // * UIAUTOMATION + // + // * UIAUTOMATOR + // + // * XCTEST + // + // * XCTEST_UI + Type *string `locationName:"type" type:"string" enum:"TestType"` + + // This value is set to true if video capture is enabled. Otherwise, it is set + // to false. + VideoCapture *bool `locationName:"videoCapture" type:"boolean"` - // A test condition that is evaluated. - Test *Test `locationName:"test" type:"structure"` + // The endpoint for streaming device video. + VideoEndpoint *string `locationName:"videoEndpoint" type:"string"` } // String returns the string representation -func (s GetTestOutput) String() string { +func (s Job) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetTestOutput) GoString() string { +func (s Job) GoString() string { return s.String() } -// SetTest sets the Test field's value. -func (s *GetTestOutput) SetTest(v *Test) *GetTestOutput { - s.Test = v +// SetArn sets the Arn field's value. +func (s *Job) SetArn(v string) *Job { + s.Arn = &v return s } -// Represents a request to the get upload operation. -type GetUploadInput struct { - _ struct{} `type:"structure"` +// SetCounters sets the Counters field's value. +func (s *Job) SetCounters(v *Counters) *Job { + s.Counters = v + return s +} - // The upload's ARN. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` +// SetCreated sets the Created field's value. +func (s *Job) SetCreated(v time.Time) *Job { + s.Created = &v + return s } -// String returns the string representation -func (s GetUploadInput) String() string { - return awsutil.Prettify(s) +// SetDevice sets the Device field's value. +func (s *Job) SetDevice(v *Device) *Job { + s.Device = v + return s } -// GoString returns the string representation -func (s GetUploadInput) GoString() string { - return s.String() +// SetDeviceMinutes sets the DeviceMinutes field's value. +func (s *Job) SetDeviceMinutes(v *DeviceMinutes) *Job { + s.DeviceMinutes = v + return s } -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetUploadInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetUploadInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } +// SetInstanceArn sets the InstanceArn field's value. +func (s *Job) SetInstanceArn(v string) *Job { + s.InstanceArn = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetMessage sets the Message field's value. +func (s *Job) SetMessage(v string) *Job { + s.Message = &v + return s } -// SetArn sets the Arn field's value. -func (s *GetUploadInput) SetArn(v string) *GetUploadInput { - s.Arn = &v +// SetName sets the Name field's value. +func (s *Job) SetName(v string) *Job { + s.Name = &v return s } -// Represents the result of a get upload request. -type GetUploadOutput struct { - _ struct{} `type:"structure"` +// SetResult sets the Result field's value. +func (s *Job) SetResult(v string) *Job { + s.Result = &v + return s +} - // An app or a set of one or more tests to upload or that have been uploaded. - Upload *Upload `locationName:"upload" type:"structure"` +// SetStarted sets the Started field's value. +func (s *Job) SetStarted(v time.Time) *Job { + s.Started = &v + return s } -// String returns the string representation -func (s GetUploadOutput) String() string { - return awsutil.Prettify(s) +// SetStatus sets the Status field's value. +func (s *Job) SetStatus(v string) *Job { + s.Status = &v + return s } -// GoString returns the string representation -func (s GetUploadOutput) GoString() string { - return s.String() +// SetStopped sets the Stopped field's value. +func (s *Job) SetStopped(v time.Time) *Job { + s.Stopped = &v + return s } -// SetUpload sets the Upload field's value. -func (s *GetUploadOutput) SetUpload(v *Upload) *GetUploadOutput { - s.Upload = v +// SetType sets the Type field's value. +func (s *Job) SetType(v string) *Job { + s.Type = &v return s } -type GetVPCEConfigurationInput struct { +// SetVideoCapture sets the VideoCapture field's value. +func (s *Job) SetVideoCapture(v bool) *Job { + s.VideoCapture = &v + return s +} + +// SetVideoEndpoint sets the VideoEndpoint field's value. +func (s *Job) SetVideoEndpoint(v string) *Job { + s.VideoEndpoint = &v + return s +} + +// Represents a request to the list artifacts operation. +type ListArtifactsInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the VPC endpoint configuration you want - // to describe. + // The run, job, suite, or test ARN. // // Arn is a required field Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` + + // The artifacts' type. + // + // Allowed values include: + // + // * FILE + // + // * LOG + // + // * SCREENSHOT + // + // Type is a required field + Type *string `locationName:"type" type:"string" required:"true" enum:"ArtifactCategory"` } // String returns the string representation -func (s GetVPCEConfigurationInput) String() string { +func (s ListArtifactsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetVPCEConfigurationInput) GoString() string { +func (s ListArtifactsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetVPCEConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetVPCEConfigurationInput"} +func (s *ListArtifactsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListArtifactsInput"} if s.Arn == nil { invalidParams.Add(request.NewErrParamRequired("Arn")) } if s.Arn != nil && len(*s.Arn) < 32 { invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) } + if s.NextToken != nil && len(*s.NextToken) < 4 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } if invalidParams.Len() > 0 { return invalidParams @@ -10574,123 +12555,85 @@ func (s *GetVPCEConfigurationInput) Validate() error { } // SetArn sets the Arn field's value. -func (s *GetVPCEConfigurationInput) SetArn(v string) *GetVPCEConfigurationInput { +func (s *ListArtifactsInput) SetArn(v string) *ListArtifactsInput { s.Arn = &v return s } -type GetVPCEConfigurationOutput struct { - _ struct{} `type:"structure"` - - // An object containing information about your VPC endpoint configuration. - VpceConfiguration *VPCEConfiguration `locationName:"vpceConfiguration" type:"structure"` -} - -// String returns the string representation -func (s GetVPCEConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetVPCEConfigurationOutput) GoString() string { - return s.String() +// SetNextToken sets the NextToken field's value. +func (s *ListArtifactsInput) SetNextToken(v string) *ListArtifactsInput { + s.NextToken = &v + return s } -// SetVpceConfiguration sets the VpceConfiguration field's value. -func (s *GetVPCEConfigurationOutput) SetVpceConfiguration(v *VPCEConfiguration) *GetVPCEConfigurationOutput { - s.VpceConfiguration = v +// SetType sets the Type field's value. +func (s *ListArtifactsInput) SetType(v string) *ListArtifactsInput { + s.Type = &v return s } -// Represents information about incompatibility. -type IncompatibilityMessage struct { +// Represents the result of a list artifacts operation. +type ListArtifactsOutput struct { _ struct{} `type:"structure"` - // A message about the incompatibility. - Message *string `locationName:"message" type:"string"` + // Information about the artifacts. + Artifacts []*Artifact `locationName:"artifacts" type:"list"` - // The type of incompatibility. - // - // Allowed values include: - // - // * ARN: The ARN. - // - // * FORM_FACTOR: The form factor (for example, phone or tablet). - // - // * MANUFACTURER: The manufacturer. - // - // * PLATFORM: The platform (for example, Android or iOS). - // - // * REMOTE_ACCESS_ENABLED: Whether the device is enabled for remote access. - // - // * APPIUM_VERSION: The Appium version for the test. - Type *string `locationName:"type" type:"string" enum:"DeviceAttribute"` + // If the number of items that are returned is significantly large, this is + // an identifier that is also returned. It can be used in a subsequent call + // to this operation to return the next set of items in the list. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` } // String returns the string representation -func (s IncompatibilityMessage) String() string { +func (s ListArtifactsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s IncompatibilityMessage) GoString() string { +func (s ListArtifactsOutput) GoString() string { return s.String() } -// SetMessage sets the Message field's value. -func (s *IncompatibilityMessage) SetMessage(v string) *IncompatibilityMessage { - s.Message = &v +// SetArtifacts sets the Artifacts field's value. +func (s *ListArtifactsOutput) SetArtifacts(v []*Artifact) *ListArtifactsOutput { + s.Artifacts = v return s } -// SetType sets the Type field's value. -func (s *IncompatibilityMessage) SetType(v string) *IncompatibilityMessage { - s.Type = &v +// SetNextToken sets the NextToken field's value. +func (s *ListArtifactsOutput) SetNextToken(v string) *ListArtifactsOutput { + s.NextToken = &v return s } -// Represents the request to install an Android application (in .apk format) -// or an iOS application (in .ipa format) as part of a remote access session. -type InstallToRemoteAccessSessionInput struct { +type ListDeviceInstancesInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the app about which you are requesting - // information. - // - // AppArn is a required field - AppArn *string `locationName:"appArn" min:"32" type:"string" required:"true"` + // An integer that specifies the maximum number of items you want to return + // in the API response. + MaxResults *int64 `locationName:"maxResults" type:"integer"` - // The Amazon Resource Name (ARN) of the remote access session about which you - // are requesting information. - // - // RemoteAccessSessionArn is a required field - RemoteAccessSessionArn *string `locationName:"remoteAccessSessionArn" min:"32" type:"string" required:"true"` + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` } // String returns the string representation -func (s InstallToRemoteAccessSessionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstallToRemoteAccessSessionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InstallToRemoteAccessSessionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InstallToRemoteAccessSessionInput"} - if s.AppArn == nil { - invalidParams.Add(request.NewErrParamRequired("AppArn")) - } - if s.AppArn != nil && len(*s.AppArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("AppArn", 32)) - } - if s.RemoteAccessSessionArn == nil { - invalidParams.Add(request.NewErrParamRequired("RemoteAccessSessionArn")) - } - if s.RemoteAccessSessionArn != nil && len(*s.RemoteAccessSessionArn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("RemoteAccessSessionArn", 32)) +func (s ListDeviceInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDeviceInstancesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListDeviceInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListDeviceInstancesInput"} + if s.NextToken != nil && len(*s.NextToken) < 4 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) } if invalidParams.Len() > 0 { @@ -10699,396 +12642,310 @@ func (s *InstallToRemoteAccessSessionInput) Validate() error { return nil } -// SetAppArn sets the AppArn field's value. -func (s *InstallToRemoteAccessSessionInput) SetAppArn(v string) *InstallToRemoteAccessSessionInput { - s.AppArn = &v +// SetMaxResults sets the MaxResults field's value. +func (s *ListDeviceInstancesInput) SetMaxResults(v int64) *ListDeviceInstancesInput { + s.MaxResults = &v return s } -// SetRemoteAccessSessionArn sets the RemoteAccessSessionArn field's value. -func (s *InstallToRemoteAccessSessionInput) SetRemoteAccessSessionArn(v string) *InstallToRemoteAccessSessionInput { - s.RemoteAccessSessionArn = &v +// SetNextToken sets the NextToken field's value. +func (s *ListDeviceInstancesInput) SetNextToken(v string) *ListDeviceInstancesInput { + s.NextToken = &v return s } -// Represents the response from the server after AWS Device Farm makes a request -// to install to a remote access session. -type InstallToRemoteAccessSessionOutput struct { +type ListDeviceInstancesOutput struct { _ struct{} `type:"structure"` - // An app to upload or that has been uploaded. - AppUpload *Upload `locationName:"appUpload" type:"structure"` + // An object that contains information about your device instances. + DeviceInstances []*DeviceInstance `locationName:"deviceInstances" type:"list"` + + // An identifier that can be used in the next call to this operation to return + // the next set of items in the list. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` } // String returns the string representation -func (s InstallToRemoteAccessSessionOutput) String() string { +func (s ListDeviceInstancesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InstallToRemoteAccessSessionOutput) GoString() string { +func (s ListDeviceInstancesOutput) GoString() string { return s.String() } -// SetAppUpload sets the AppUpload field's value. -func (s *InstallToRemoteAccessSessionOutput) SetAppUpload(v *Upload) *InstallToRemoteAccessSessionOutput { - s.AppUpload = v +// SetDeviceInstances sets the DeviceInstances field's value. +func (s *ListDeviceInstancesOutput) SetDeviceInstances(v []*DeviceInstance) *ListDeviceInstancesOutput { + s.DeviceInstances = v return s } -// Represents the instance profile. -type InstanceProfile struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the instance profile. - Arn *string `locationName:"arn" min:"32" type:"string"` +// SetNextToken sets the NextToken field's value. +func (s *ListDeviceInstancesOutput) SetNextToken(v string) *ListDeviceInstancesOutput { + s.NextToken = &v + return s +} - // The description of the instance profile. - Description *string `locationName:"description" type:"string"` +// Represents the result of a list device pools request. +type ListDevicePoolsInput struct { + _ struct{} `type:"structure"` - // An array of strings specifying the list of app packages that should not be - // cleaned up from the device after a test run is over. + // The project ARN. // - // The list of packages is only considered if you set packageCleanup to true. - ExcludeAppPackagesFromCleanup []*string `locationName:"excludeAppPackagesFromCleanup" type:"list"` - - // The name of the instance profile. - Name *string `locationName:"name" type:"string"` + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` - // When set to true, Device Farm will remove app packages after a test run. - // The default value is false for private devices. - PackageCleanup *bool `locationName:"packageCleanup" type:"boolean"` + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` - // When set to true, Device Farm will reboot the instance after a test run. - // The default value is true. - RebootAfterUse *bool `locationName:"rebootAfterUse" type:"boolean"` + // The device pools' type. + // + // Allowed values include: + // + // * CURATED: A device pool that is created and managed by AWS Device Farm. + // + // * PRIVATE: A device pool that is created and managed by the device pool + // developer. + Type *string `locationName:"type" type:"string" enum:"DevicePoolType"` } // String returns the string representation -func (s InstanceProfile) String() string { +func (s ListDevicePoolsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InstanceProfile) GoString() string { +func (s ListDevicePoolsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListDevicePoolsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListDevicePoolsInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + if s.NextToken != nil && len(*s.NextToken) < 4 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetArn sets the Arn field's value. -func (s *InstanceProfile) SetArn(v string) *InstanceProfile { +func (s *ListDevicePoolsInput) SetArn(v string) *ListDevicePoolsInput { s.Arn = &v return s } -// SetDescription sets the Description field's value. -func (s *InstanceProfile) SetDescription(v string) *InstanceProfile { - s.Description = &v +// SetNextToken sets the NextToken field's value. +func (s *ListDevicePoolsInput) SetNextToken(v string) *ListDevicePoolsInput { + s.NextToken = &v return s } -// SetExcludeAppPackagesFromCleanup sets the ExcludeAppPackagesFromCleanup field's value. -func (s *InstanceProfile) SetExcludeAppPackagesFromCleanup(v []*string) *InstanceProfile { - s.ExcludeAppPackagesFromCleanup = v +// SetType sets the Type field's value. +func (s *ListDevicePoolsInput) SetType(v string) *ListDevicePoolsInput { + s.Type = &v return s } -// SetName sets the Name field's value. -func (s *InstanceProfile) SetName(v string) *InstanceProfile { - s.Name = &v - return s +// Represents the result of a list device pools request. +type ListDevicePoolsOutput struct { + _ struct{} `type:"structure"` + + // Information about the device pools. + DevicePools []*DevicePool `locationName:"devicePools" type:"list"` + + // If the number of items that are returned is significantly large, this is + // an identifier that is also returned. It can be used in a subsequent call + // to this operation to return the next set of items in the list. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` } -// SetPackageCleanup sets the PackageCleanup field's value. -func (s *InstanceProfile) SetPackageCleanup(v bool) *InstanceProfile { - s.PackageCleanup = &v +// String returns the string representation +func (s ListDevicePoolsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDevicePoolsOutput) GoString() string { + return s.String() +} + +// SetDevicePools sets the DevicePools field's value. +func (s *ListDevicePoolsOutput) SetDevicePools(v []*DevicePool) *ListDevicePoolsOutput { + s.DevicePools = v return s } -// SetRebootAfterUse sets the RebootAfterUse field's value. -func (s *InstanceProfile) SetRebootAfterUse(v bool) *InstanceProfile { - s.RebootAfterUse = &v +// SetNextToken sets the NextToken field's value. +func (s *ListDevicePoolsOutput) SetNextToken(v string) *ListDevicePoolsOutput { + s.NextToken = &v return s } -// Represents a device. -type Job struct { +// Represents the result of a list devices request. +type ListDevicesInput struct { _ struct{} `type:"structure"` - // The job's ARN. + // The Amazon Resource Name (ARN) of the project. Arn *string `locationName:"arn" min:"32" type:"string"` - // The job's result counters. - Counters *Counters `locationName:"counters" type:"structure"` - - // When the job was created. - Created *time.Time `locationName:"created" type:"timestamp"` - - // The device (phone or tablet). - Device *Device `locationName:"device" type:"structure"` - - // Represents the total (metered or unmetered) minutes used by the job. - DeviceMinutes *DeviceMinutes `locationName:"deviceMinutes" type:"structure"` - - // The Amazon Resource Name (ARN) of the instance. - InstanceArn *string `locationName:"instanceArn" min:"32" type:"string"` - - // A message about the job's result. - Message *string `locationName:"message" type:"string"` - - // The job's name. - Name *string `locationName:"name" type:"string"` - - // The job's result. - // - // Allowed values include: - // - // * PENDING: A pending condition. - // - // * PASSED: A passing condition. - // - // * WARNED: A warning condition. - // - // * FAILED: A failed condition. - // - // * SKIPPED: A skipped condition. - // - // * ERRORED: An error condition. - // - // * STOPPED: A stopped condition. - Result *string `locationName:"result" type:"string" enum:"ExecutionResult"` - - // The job's start time. - Started *time.Time `locationName:"started" type:"timestamp"` - - // The job's status. - // - // Allowed values include: - // - // * PENDING: A pending status. - // - // * PENDING_CONCURRENCY: A pending concurrency status. - // - // * PENDING_DEVICE: A pending device status. - // - // * PROCESSING: A processing status. - // - // * SCHEDULING: A scheduling status. - // - // * PREPARING: A preparing status. - // - // * RUNNING: A running status. - // - // * COMPLETED: A completed status. - // - // * STOPPING: A stopping status. - Status *string `locationName:"status" type:"string" enum:"ExecutionStatus"` - - // The job's stop time. - Stopped *time.Time `locationName:"stopped" type:"timestamp"` - - // The job's type. - // - // Allowed values include the following: - // - // * BUILTIN_FUZZ: The built-in fuzz type. - // - // * BUILTIN_EXPLORER: For Android, an app explorer that will traverse an - // Android app, interacting with it and capturing screenshots at the same - // time. - // - // * APPIUM_JAVA_JUNIT: The Appium Java JUnit type. - // - // * APPIUM_JAVA_TESTNG: The Appium Java TestNG type. - // - // * APPIUM_PYTHON: The Appium Python type. - // - // * APPIUM_NODE: The Appium Node.js type. - // - // * APPIUM_RUBY: The Appium Ruby type. - // - // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for web apps. - // - // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for web apps. - // - // * APPIUM_WEB_PYTHON: The Appium Python type for web apps. - // - // * APPIUM_WEB_NODE: The Appium Node.js type for web apps. - // - // * APPIUM_WEB_RUBY: The Appium Ruby test type for web apps. - // - // * CALABASH: The Calabash type. - // - // * INSTRUMENTATION: The Instrumentation type. - // - // * UIAUTOMATION: The uiautomation type. + // Used to select a set of devices. A filter is made up of an attribute, an + // operator, and one or more values. // - // * UIAUTOMATOR: The uiautomator type. + // * Attribute: The aspect of a device such as platform or model used as + // the selection criteria in a device filter. Allowed values include: ARN: + // The Amazon Resource Name (ARN) of the device (for example, arn:aws:devicefarm:us-west-2::device:12345Example). + // PLATFORM: The device platform. Valid values are ANDROID or IOS. OS_VERSION: + // The operating system version (for example, 10.3.2). MODEL: The device + // model (for example, iPad 5th Gen). AVAILABILITY: The current availability + // of the device. Valid values are AVAILABLE, HIGHLY_AVAILABLE, BUSY, or + // TEMPORARY_NOT_AVAILABLE. FORM_FACTOR: The device form factor. Valid values + // are PHONE or TABLET. MANUFACTURER: The device manufacturer (for example, + // Apple). REMOTE_ACCESS_ENABLED: Whether the device is enabled for remote + // access. Valid values are TRUE or FALSE. REMOTE_DEBUG_ENABLED: Whether + // the device is enabled for remote debugging. Valid values are TRUE or FALSE. + // Because remote debugging is no longer supported (https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html), + // this attribute is ignored. INSTANCE_ARN: The Amazon Resource Name (ARN) + // of the device instance. INSTANCE_LABELS: The label of the device instance. + // FLEET_TYPE: The fleet type. Valid values are PUBLIC or PRIVATE. // - // * XCTEST: The Xcode test type. + // * Operator: The filter operator. The EQUALS operator is available for + // every attribute except INSTANCE_LABELS. The CONTAINS operator is available + // for the INSTANCE_LABELS and MODEL attributes. The IN and NOT_IN operators + // are available for the ARN, OS_VERSION, MODEL, MANUFACTURER, and INSTANCE_ARN + // attributes. The LESS_THAN, GREATER_THAN, LESS_THAN_OR_EQUALS, and GREATER_THAN_OR_EQUALS + // operators are also available for the OS_VERSION attribute. // - // * XCTEST_UI: The Xcode UI test type. - Type *string `locationName:"type" type:"string" enum:"TestType"` - - // This value is set to true if video capture is enabled; otherwise, it is set - // to false. - VideoCapture *bool `locationName:"videoCapture" type:"boolean"` + // * Values: An array of one or more filter values. The IN and NOT_IN operators + // take a values array that has one or more elements. The other operators + // require an array with a single element. In a request, the AVAILABILITY + // attribute takes the following values: AVAILABLE, HIGHLY_AVAILABLE, BUSY, + // or TEMPORARY_NOT_AVAILABLE. + Filters []*DeviceFilter `locationName:"filters" type:"list"` - // The endpoint for streaming device video. - VideoEndpoint *string `locationName:"videoEndpoint" type:"string"` + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` } // String returns the string representation -func (s Job) String() string { +func (s ListDevicesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Job) GoString() string { +func (s ListDevicesInput) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *Job) SetArn(v string) *Job { - s.Arn = &v - return s -} - -// SetCounters sets the Counters field's value. -func (s *Job) SetCounters(v *Counters) *Job { - s.Counters = v - return s -} - -// SetCreated sets the Created field's value. -func (s *Job) SetCreated(v time.Time) *Job { - s.Created = &v - return s -} - -// SetDevice sets the Device field's value. -func (s *Job) SetDevice(v *Device) *Job { - s.Device = v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListDevicesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListDevicesInput"} + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + if s.NextToken != nil && len(*s.NextToken) < 4 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) + } -// SetDeviceMinutes sets the DeviceMinutes field's value. -func (s *Job) SetDeviceMinutes(v *DeviceMinutes) *Job { - s.DeviceMinutes = v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetInstanceArn sets the InstanceArn field's value. -func (s *Job) SetInstanceArn(v string) *Job { - s.InstanceArn = &v +// SetArn sets the Arn field's value. +func (s *ListDevicesInput) SetArn(v string) *ListDevicesInput { + s.Arn = &v return s } -// SetMessage sets the Message field's value. -func (s *Job) SetMessage(v string) *Job { - s.Message = &v +// SetFilters sets the Filters field's value. +func (s *ListDevicesInput) SetFilters(v []*DeviceFilter) *ListDevicesInput { + s.Filters = v return s } -// SetName sets the Name field's value. -func (s *Job) SetName(v string) *Job { - s.Name = &v +// SetNextToken sets the NextToken field's value. +func (s *ListDevicesInput) SetNextToken(v string) *ListDevicesInput { + s.NextToken = &v return s } -// SetResult sets the Result field's value. -func (s *Job) SetResult(v string) *Job { - s.Result = &v - return s -} +// Represents the result of a list devices operation. +type ListDevicesOutput struct { + _ struct{} `type:"structure"` -// SetStarted sets the Started field's value. -func (s *Job) SetStarted(v time.Time) *Job { - s.Started = &v - return s -} + // Information about the devices. + Devices []*Device `locationName:"devices" type:"list"` -// SetStatus sets the Status field's value. -func (s *Job) SetStatus(v string) *Job { - s.Status = &v - return s + // If the number of items that are returned is significantly large, this is + // an identifier that is also returned. It can be used in a subsequent call + // to this operation to return the next set of items in the list. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` } -// SetStopped sets the Stopped field's value. -func (s *Job) SetStopped(v time.Time) *Job { - s.Stopped = &v - return s +// String returns the string representation +func (s ListDevicesOutput) String() string { + return awsutil.Prettify(s) } -// SetType sets the Type field's value. -func (s *Job) SetType(v string) *Job { - s.Type = &v - return s +// GoString returns the string representation +func (s ListDevicesOutput) GoString() string { + return s.String() } -// SetVideoCapture sets the VideoCapture field's value. -func (s *Job) SetVideoCapture(v bool) *Job { - s.VideoCapture = &v +// SetDevices sets the Devices field's value. +func (s *ListDevicesOutput) SetDevices(v []*Device) *ListDevicesOutput { + s.Devices = v return s } -// SetVideoEndpoint sets the VideoEndpoint field's value. -func (s *Job) SetVideoEndpoint(v string) *Job { - s.VideoEndpoint = &v +// SetNextToken sets the NextToken field's value. +func (s *ListDevicesOutput) SetNextToken(v string) *ListDevicesOutput { + s.NextToken = &v return s } -// Represents a request to the list artifacts operation. -type ListArtifactsInput struct { +type ListInstanceProfilesInput struct { _ struct{} `type:"structure"` - // The Run, Job, Suite, or Test ARN. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + // An integer that specifies the maximum number of items you want to return + // in the API response. + MaxResults *int64 `locationName:"maxResults" type:"integer"` // An identifier that was returned from the previous call to this operation, // which can be used to return the next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` - - // The artifacts' type. - // - // Allowed values include: - // - // * FILE: The artifacts are files. - // - // * LOG: The artifacts are logs. - // - // * SCREENSHOT: The artifacts are screenshots. - // - // Type is a required field - Type *string `locationName:"type" type:"string" required:"true" enum:"ArtifactCategory"` } // String returns the string representation -func (s ListArtifactsInput) String() string { +func (s ListInstanceProfilesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListArtifactsInput) GoString() string { +func (s ListInstanceProfilesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ListArtifactsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListArtifactsInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } +func (s *ListInstanceProfilesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListInstanceProfilesInput"} if s.NextToken != nil && len(*s.NextToken) < 4 { invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } if invalidParams.Len() > 0 { return invalidParams @@ -11096,65 +12953,59 @@ func (s *ListArtifactsInput) Validate() error { return nil } -// SetArn sets the Arn field's value. -func (s *ListArtifactsInput) SetArn(v string) *ListArtifactsInput { - s.Arn = &v +// SetMaxResults sets the MaxResults field's value. +func (s *ListInstanceProfilesInput) SetMaxResults(v int64) *ListInstanceProfilesInput { + s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. -func (s *ListArtifactsInput) SetNextToken(v string) *ListArtifactsInput { +func (s *ListInstanceProfilesInput) SetNextToken(v string) *ListInstanceProfilesInput { s.NextToken = &v return s } -// SetType sets the Type field's value. -func (s *ListArtifactsInput) SetType(v string) *ListArtifactsInput { - s.Type = &v - return s -} - -// Represents the result of a list artifacts operation. -type ListArtifactsOutput struct { +type ListInstanceProfilesOutput struct { _ struct{} `type:"structure"` - // Information about the artifacts. - Artifacts []*Artifact `locationName:"artifacts" type:"list"` + // An object that contains information about your instance profiles. + InstanceProfiles []*InstanceProfile `locationName:"instanceProfiles" type:"list"` - // If the number of items that are returned is significantly large, this is - // an identifier that is also returned, which can be used in a subsequent call - // to this operation to return the next set of items in the list. + // An identifier that can be used in the next call to this operation to return + // the next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` } // String returns the string representation -func (s ListArtifactsOutput) String() string { +func (s ListInstanceProfilesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListArtifactsOutput) GoString() string { +func (s ListInstanceProfilesOutput) GoString() string { return s.String() } -// SetArtifacts sets the Artifacts field's value. -func (s *ListArtifactsOutput) SetArtifacts(v []*Artifact) *ListArtifactsOutput { - s.Artifacts = v +// SetInstanceProfiles sets the InstanceProfiles field's value. +func (s *ListInstanceProfilesOutput) SetInstanceProfiles(v []*InstanceProfile) *ListInstanceProfilesOutput { + s.InstanceProfiles = v return s } // SetNextToken sets the NextToken field's value. -func (s *ListArtifactsOutput) SetNextToken(v string) *ListArtifactsOutput { +func (s *ListInstanceProfilesOutput) SetNextToken(v string) *ListInstanceProfilesOutput { s.NextToken = &v return s } -type ListDeviceInstancesInput struct { +// Represents a request to the list jobs operation. +type ListJobsInput struct { _ struct{} `type:"structure"` - // An integer specifying the maximum number of items you want to return in the - // API response. - MaxResults *int64 `locationName:"maxResults" type:"integer"` + // The run's Amazon Resource Name (ARN). + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` // An identifier that was returned from the previous call to this operation, // which can be used to return the next set of items in the list. @@ -11162,18 +13013,24 @@ type ListDeviceInstancesInput struct { } // String returns the string representation -func (s ListDeviceInstancesInput) String() string { +func (s ListJobsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListDeviceInstancesInput) GoString() string { +func (s ListJobsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ListDeviceInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListDeviceInstancesInput"} +func (s *ListJobsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListJobsInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } if s.NextToken != nil && len(*s.NextToken) < 4 { invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) } @@ -11184,56 +13041,58 @@ func (s *ListDeviceInstancesInput) Validate() error { return nil } -// SetMaxResults sets the MaxResults field's value. -func (s *ListDeviceInstancesInput) SetMaxResults(v int64) *ListDeviceInstancesInput { - s.MaxResults = &v +// SetArn sets the Arn field's value. +func (s *ListJobsInput) SetArn(v string) *ListJobsInput { + s.Arn = &v return s } // SetNextToken sets the NextToken field's value. -func (s *ListDeviceInstancesInput) SetNextToken(v string) *ListDeviceInstancesInput { +func (s *ListJobsInput) SetNextToken(v string) *ListJobsInput { s.NextToken = &v return s } -type ListDeviceInstancesOutput struct { +// Represents the result of a list jobs request. +type ListJobsOutput struct { _ struct{} `type:"structure"` - // An object containing information about your device instances. - DeviceInstances []*DeviceInstance `locationName:"deviceInstances" type:"list"` + // Information about the jobs. + Jobs []*Job `locationName:"jobs" type:"list"` - // An identifier that can be used in the next call to this operation to return - // the next set of items in the list. + // If the number of items that are returned is significantly large, this is + // an identifier that is also returned. It can be used in a subsequent call + // to this operation to return the next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` } // String returns the string representation -func (s ListDeviceInstancesOutput) String() string { +func (s ListJobsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListDeviceInstancesOutput) GoString() string { +func (s ListJobsOutput) GoString() string { return s.String() } -// SetDeviceInstances sets the DeviceInstances field's value. -func (s *ListDeviceInstancesOutput) SetDeviceInstances(v []*DeviceInstance) *ListDeviceInstancesOutput { - s.DeviceInstances = v +// SetJobs sets the Jobs field's value. +func (s *ListJobsOutput) SetJobs(v []*Job) *ListJobsOutput { + s.Jobs = v return s } // SetNextToken sets the NextToken field's value. -func (s *ListDeviceInstancesOutput) SetNextToken(v string) *ListDeviceInstancesOutput { +func (s *ListJobsOutput) SetNextToken(v string) *ListJobsOutput { s.NextToken = &v return s } -// Represents the result of a list device pools request. -type ListDevicePoolsInput struct { +type ListNetworkProfilesInput struct { _ struct{} `type:"structure"` - // The project ARN. + // The Amazon Resource Name (ARN) of the project for which you want to list + // network profiles. // // Arn is a required field Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` @@ -11242,30 +13101,24 @@ type ListDevicePoolsInput struct { // which can be used to return the next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` - // The device pools' type. - // - // Allowed values include: - // - // * CURATED: A device pool that is created and managed by AWS Device Farm. - // - // * PRIVATE: A device pool that is created and managed by the device pool - // developer. - Type *string `locationName:"type" type:"string" enum:"DevicePoolType"` + // The type of network profile to return information about. Valid values are + // listed here. + Type *string `locationName:"type" type:"string" enum:"NetworkProfileType"` } // String returns the string representation -func (s ListDevicePoolsInput) String() string { +func (s ListNetworkProfilesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListDevicePoolsInput) GoString() string { +func (s ListNetworkProfilesInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListDevicePoolsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListDevicePoolsInput"} +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListNetworkProfilesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListNetworkProfilesInput"} if s.Arn == nil { invalidParams.Add(request.NewErrParamRequired("Arn")) } @@ -11283,121 +13136,77 @@ func (s *ListDevicePoolsInput) Validate() error { } // SetArn sets the Arn field's value. -func (s *ListDevicePoolsInput) SetArn(v string) *ListDevicePoolsInput { +func (s *ListNetworkProfilesInput) SetArn(v string) *ListNetworkProfilesInput { s.Arn = &v return s } // SetNextToken sets the NextToken field's value. -func (s *ListDevicePoolsInput) SetNextToken(v string) *ListDevicePoolsInput { +func (s *ListNetworkProfilesInput) SetNextToken(v string) *ListNetworkProfilesInput { s.NextToken = &v return s } // SetType sets the Type field's value. -func (s *ListDevicePoolsInput) SetType(v string) *ListDevicePoolsInput { +func (s *ListNetworkProfilesInput) SetType(v string) *ListNetworkProfilesInput { s.Type = &v return s } -// Represents the result of a list device pools request. -type ListDevicePoolsOutput struct { +type ListNetworkProfilesOutput struct { _ struct{} `type:"structure"` - // Information about the device pools. - DevicePools []*DevicePool `locationName:"devicePools" type:"list"` + // A list of the available network profiles. + NetworkProfiles []*NetworkProfile `locationName:"networkProfiles" type:"list"` - // If the number of items that are returned is significantly large, this is - // an identifier that is also returned, which can be used in a subsequent call - // to this operation to return the next set of items in the list. + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` } // String returns the string representation -func (s ListDevicePoolsOutput) String() string { +func (s ListNetworkProfilesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListDevicePoolsOutput) GoString() string { +func (s ListNetworkProfilesOutput) GoString() string { return s.String() } -// SetDevicePools sets the DevicePools field's value. -func (s *ListDevicePoolsOutput) SetDevicePools(v []*DevicePool) *ListDevicePoolsOutput { - s.DevicePools = v +// SetNetworkProfiles sets the NetworkProfiles field's value. +func (s *ListNetworkProfilesOutput) SetNetworkProfiles(v []*NetworkProfile) *ListNetworkProfilesOutput { + s.NetworkProfiles = v return s } // SetNextToken sets the NextToken field's value. -func (s *ListDevicePoolsOutput) SetNextToken(v string) *ListDevicePoolsOutput { +func (s *ListNetworkProfilesOutput) SetNextToken(v string) *ListNetworkProfilesOutput { s.NextToken = &v return s } -// Represents the result of a list devices request. -type ListDevicesInput struct { +type ListOfferingPromotionsInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the project. - Arn *string `locationName:"arn" min:"32" type:"string"` - - // Used to select a set of devices. A filter is made up of an attribute, an - // operator, and one or more values. - // - // * Attribute: The aspect of a device such as platform or model used as - // the selection criteria in a device filter. Allowed values include: ARN: - // The Amazon Resource Name (ARN) of the device. For example, "arn:aws:devicefarm:us-west-2::device:12345Example". - // PLATFORM: The device platform. Valid values are "ANDROID" or "IOS". OS_VERSION: - // The operating system version. For example, "10.3.2". MODEL: The device - // model. For example, "iPad 5th Gen". AVAILABILITY: The current availability - // of the device. Valid values are "AVAILABLE", "HIGHLY_AVAILABLE", "BUSY", - // or "TEMPORARY_NOT_AVAILABLE". FORM_FACTOR: The device form factor. Valid - // values are "PHONE" or "TABLET". MANUFACTURER: The device manufacturer. - // For example, "Apple". REMOTE_ACCESS_ENABLED: Whether the device is enabled - // for remote access. Valid values are "TRUE" or "FALSE". REMOTE_DEBUG_ENABLED: - // Whether the device is enabled for remote debugging. Valid values are "TRUE" - // or "FALSE". This attribute will be ignored, as remote debugging is no - // longer supported (https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html). - // INSTANCE_ARN: The Amazon Resource Name (ARN) of the device instance. INSTANCE_LABELS: - // The label of the device instance. FLEET_TYPE: The fleet type. Valid values - // are "PUBLIC" or "PRIVATE". - // - // * Operator: The filter operator. The EQUALS operator is available for - // every attribute except INSTANCE_LABELS. The CONTAINS operator is available - // for the INSTANCE_LABELS and MODEL attributes. The IN and NOT_IN operators - // are available for the ARN, OS_VERSION, MODEL, MANUFACTURER, and INSTANCE_ARN - // attributes. The LESS_THAN, GREATER_THAN, LESS_THAN_OR_EQUALS, and GREATER_THAN_OR_EQUALS - // operators are also available for the OS_VERSION attribute. - // - // * Values: An array of one or more filter values. The IN and NOT_IN operators - // take a values array that has one or more elements. The other operators - // require an array with a single element. In a request, the AVAILABILITY - // attribute takes "AVAILABLE", "HIGHLY_AVAILABLE", "BUSY", or "TEMPORARY_NOT_AVAILABLE" - // as values. - Filters []*DeviceFilter `locationName:"filters" type:"list"` - // An identifier that was returned from the previous call to this operation, // which can be used to return the next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` } // String returns the string representation -func (s ListDevicesInput) String() string { +func (s ListOfferingPromotionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListDevicesInput) GoString() string { +func (s ListOfferingPromotionsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ListDevicesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListDevicesInput"} - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } +func (s *ListOfferingPromotionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListOfferingPromotionsInput"} if s.NextToken != nil && len(*s.NextToken) < 4 { invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) } @@ -11408,84 +13217,67 @@ func (s *ListDevicesInput) Validate() error { return nil } -// SetArn sets the Arn field's value. -func (s *ListDevicesInput) SetArn(v string) *ListDevicesInput { - s.Arn = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *ListDevicesInput) SetFilters(v []*DeviceFilter) *ListDevicesInput { - s.Filters = v - return s -} - // SetNextToken sets the NextToken field's value. -func (s *ListDevicesInput) SetNextToken(v string) *ListDevicesInput { +func (s *ListOfferingPromotionsInput) SetNextToken(v string) *ListOfferingPromotionsInput { s.NextToken = &v return s } -// Represents the result of a list devices operation. -type ListDevicesOutput struct { +type ListOfferingPromotionsOutput struct { _ struct{} `type:"structure"` - // Information about the devices. - Devices []*Device `locationName:"devices" type:"list"` - - // If the number of items that are returned is significantly large, this is - // an identifier that is also returned, which can be used in a subsequent call - // to this operation to return the next set of items in the list. + // An identifier to be used in the next call to this operation, to return the + // next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` + + // Information about the offering promotions. + OfferingPromotions []*OfferingPromotion `locationName:"offeringPromotions" type:"list"` } // String returns the string representation -func (s ListDevicesOutput) String() string { +func (s ListOfferingPromotionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListDevicesOutput) GoString() string { +func (s ListOfferingPromotionsOutput) GoString() string { return s.String() } -// SetDevices sets the Devices field's value. -func (s *ListDevicesOutput) SetDevices(v []*Device) *ListDevicesOutput { - s.Devices = v +// SetNextToken sets the NextToken field's value. +func (s *ListOfferingPromotionsOutput) SetNextToken(v string) *ListOfferingPromotionsOutput { + s.NextToken = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *ListDevicesOutput) SetNextToken(v string) *ListDevicesOutput { - s.NextToken = &v +// SetOfferingPromotions sets the OfferingPromotions field's value. +func (s *ListOfferingPromotionsOutput) SetOfferingPromotions(v []*OfferingPromotion) *ListOfferingPromotionsOutput { + s.OfferingPromotions = v return s } -type ListInstanceProfilesInput struct { +// Represents the request to list the offering transaction history. +type ListOfferingTransactionsInput struct { _ struct{} `type:"structure"` - // An integer specifying the maximum number of items you want to return in the - // API response. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - // An identifier that was returned from the previous call to this operation, // which can be used to return the next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` } // String returns the string representation -func (s ListInstanceProfilesInput) String() string { +func (s ListOfferingTransactionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListInstanceProfilesInput) GoString() string { +func (s ListOfferingTransactionsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ListInstanceProfilesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListInstanceProfilesInput"} +func (s *ListOfferingTransactionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListOfferingTransactionsInput"} if s.NextToken != nil && len(*s.NextToken) < 4 { invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) } @@ -11496,84 +13288,69 @@ func (s *ListInstanceProfilesInput) Validate() error { return nil } -// SetMaxResults sets the MaxResults field's value. -func (s *ListInstanceProfilesInput) SetMaxResults(v int64) *ListInstanceProfilesInput { - s.MaxResults = &v - return s -} - // SetNextToken sets the NextToken field's value. -func (s *ListInstanceProfilesInput) SetNextToken(v string) *ListInstanceProfilesInput { +func (s *ListOfferingTransactionsInput) SetNextToken(v string) *ListOfferingTransactionsInput { s.NextToken = &v return s } -type ListInstanceProfilesOutput struct { +// Returns the transaction log of the specified offerings. +type ListOfferingTransactionsOutput struct { _ struct{} `type:"structure"` - // An object containing information about your instance profiles. - InstanceProfiles []*InstanceProfile `locationName:"instanceProfiles" type:"list"` - - // An identifier that can be used in the next call to this operation to return - // the next set of items in the list. + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` + + // The audit log of subscriptions you have purchased and modified through AWS + // Device Farm. + OfferingTransactions []*OfferingTransaction `locationName:"offeringTransactions" type:"list"` } // String returns the string representation -func (s ListInstanceProfilesOutput) String() string { +func (s ListOfferingTransactionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListInstanceProfilesOutput) GoString() string { +func (s ListOfferingTransactionsOutput) GoString() string { return s.String() } -// SetInstanceProfiles sets the InstanceProfiles field's value. -func (s *ListInstanceProfilesOutput) SetInstanceProfiles(v []*InstanceProfile) *ListInstanceProfilesOutput { - s.InstanceProfiles = v +// SetNextToken sets the NextToken field's value. +func (s *ListOfferingTransactionsOutput) SetNextToken(v string) *ListOfferingTransactionsOutput { + s.NextToken = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *ListInstanceProfilesOutput) SetNextToken(v string) *ListInstanceProfilesOutput { - s.NextToken = &v +// SetOfferingTransactions sets the OfferingTransactions field's value. +func (s *ListOfferingTransactionsOutput) SetOfferingTransactions(v []*OfferingTransaction) *ListOfferingTransactionsOutput { + s.OfferingTransactions = v return s } -// Represents a request to the list jobs operation. -type ListJobsInput struct { +// Represents the request to list all offerings. +type ListOfferingsInput struct { _ struct{} `type:"structure"` - // The run's Amazon Resource Name (ARN). - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` - // An identifier that was returned from the previous call to this operation, // which can be used to return the next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` } // String returns the string representation -func (s ListJobsInput) String() string { +func (s ListOfferingsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListJobsInput) GoString() string { +func (s ListOfferingsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ListJobsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListJobsInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } +func (s *ListOfferingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListOfferingsInput"} if s.NextToken != nil && len(*s.NextToken) < 4 { invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) } @@ -11584,87 +13361,73 @@ func (s *ListJobsInput) Validate() error { return nil } -// SetArn sets the Arn field's value. -func (s *ListJobsInput) SetArn(v string) *ListJobsInput { - s.Arn = &v - return s -} - // SetNextToken sets the NextToken field's value. -func (s *ListJobsInput) SetNextToken(v string) *ListJobsInput { +func (s *ListOfferingsInput) SetNextToken(v string) *ListOfferingsInput { s.NextToken = &v return s } -// Represents the result of a list jobs request. -type ListJobsOutput struct { +// Represents the return values of the list of offerings. +type ListOfferingsOutput struct { _ struct{} `type:"structure"` - // Information about the jobs. - Jobs []*Job `locationName:"jobs" type:"list"` - - // If the number of items that are returned is significantly large, this is - // an identifier that is also returned, which can be used in a subsequent call - // to this operation to return the next set of items in the list. + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` + + // A value that represents the list offering results. + Offerings []*Offering `locationName:"offerings" type:"list"` } // String returns the string representation -func (s ListJobsOutput) String() string { +func (s ListOfferingsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListJobsOutput) GoString() string { +func (s ListOfferingsOutput) GoString() string { return s.String() } -// SetJobs sets the Jobs field's value. -func (s *ListJobsOutput) SetJobs(v []*Job) *ListJobsOutput { - s.Jobs = v +// SetNextToken sets the NextToken field's value. +func (s *ListOfferingsOutput) SetNextToken(v string) *ListOfferingsOutput { + s.NextToken = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *ListJobsOutput) SetNextToken(v string) *ListJobsOutput { - s.NextToken = &v +// SetOfferings sets the Offerings field's value. +func (s *ListOfferingsOutput) SetOfferings(v []*Offering) *ListOfferingsOutput { + s.Offerings = v return s } -type ListNetworkProfilesInput struct { +// Represents a request to the list projects operation. +type ListProjectsInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the project for which you want to list - // network profiles. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + // Optional. If no Amazon Resource Name (ARN) is specified, then AWS Device + // Farm returns a list of all projects for the AWS account. You can also specify + // a project ARN. + Arn *string `locationName:"arn" min:"32" type:"string"` // An identifier that was returned from the previous call to this operation, // which can be used to return the next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` - - // The type of network profile you wish to return information about. Valid values - // are listed below. - Type *string `locationName:"type" type:"string" enum:"NetworkProfileType"` } // String returns the string representation -func (s ListNetworkProfilesInput) String() string { +func (s ListProjectsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListNetworkProfilesInput) GoString() string { +func (s ListProjectsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ListNetworkProfilesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListNetworkProfilesInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } +func (s *ListProjectsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListProjectsInput"} if s.Arn != nil && len(*s.Arn) < 32 { invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) } @@ -11679,77 +13442,86 @@ func (s *ListNetworkProfilesInput) Validate() error { } // SetArn sets the Arn field's value. -func (s *ListNetworkProfilesInput) SetArn(v string) *ListNetworkProfilesInput { +func (s *ListProjectsInput) SetArn(v string) *ListProjectsInput { s.Arn = &v return s } // SetNextToken sets the NextToken field's value. -func (s *ListNetworkProfilesInput) SetNextToken(v string) *ListNetworkProfilesInput { - s.NextToken = &v - return s -} - -// SetType sets the Type field's value. -func (s *ListNetworkProfilesInput) SetType(v string) *ListNetworkProfilesInput { - s.Type = &v +func (s *ListProjectsInput) SetNextToken(v string) *ListProjectsInput { + s.NextToken = &v return s } -type ListNetworkProfilesOutput struct { +// Represents the result of a list projects request. +type ListProjectsOutput struct { _ struct{} `type:"structure"` - // A list of the available network profiles. - NetworkProfiles []*NetworkProfile `locationName:"networkProfiles" type:"list"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. + // If the number of items that are returned is significantly large, this is + // an identifier that is also returned. It can be used in a subsequent call + // to this operation to return the next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` + + // Information about the projects. + Projects []*Project `locationName:"projects" type:"list"` } // String returns the string representation -func (s ListNetworkProfilesOutput) String() string { +func (s ListProjectsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListNetworkProfilesOutput) GoString() string { +func (s ListProjectsOutput) GoString() string { return s.String() } -// SetNetworkProfiles sets the NetworkProfiles field's value. -func (s *ListNetworkProfilesOutput) SetNetworkProfiles(v []*NetworkProfile) *ListNetworkProfilesOutput { - s.NetworkProfiles = v +// SetNextToken sets the NextToken field's value. +func (s *ListProjectsOutput) SetNextToken(v string) *ListProjectsOutput { + s.NextToken = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *ListNetworkProfilesOutput) SetNextToken(v string) *ListNetworkProfilesOutput { - s.NextToken = &v +// SetProjects sets the Projects field's value. +func (s *ListProjectsOutput) SetProjects(v []*Project) *ListProjectsOutput { + s.Projects = v return s } -type ListOfferingPromotionsInput struct { +// Represents the request to return information about the remote access session. +type ListRemoteAccessSessionsInput struct { _ struct{} `type:"structure"` + // The Amazon Resource Name (ARN) of the project about which you are requesting + // information. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + // An identifier that was returned from the previous call to this operation, // which can be used to return the next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` } // String returns the string representation -func (s ListOfferingPromotionsInput) String() string { +func (s ListRemoteAccessSessionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListOfferingPromotionsInput) GoString() string { +func (s ListRemoteAccessSessionsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ListOfferingPromotionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListOfferingPromotionsInput"} +func (s *ListRemoteAccessSessionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListRemoteAccessSessionsInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } if s.NextToken != nil && len(*s.NextToken) < 4 { invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) } @@ -11760,67 +13532,88 @@ func (s *ListOfferingPromotionsInput) Validate() error { return nil } +// SetArn sets the Arn field's value. +func (s *ListRemoteAccessSessionsInput) SetArn(v string) *ListRemoteAccessSessionsInput { + s.Arn = &v + return s +} + // SetNextToken sets the NextToken field's value. -func (s *ListOfferingPromotionsInput) SetNextToken(v string) *ListOfferingPromotionsInput { +func (s *ListRemoteAccessSessionsInput) SetNextToken(v string) *ListRemoteAccessSessionsInput { s.NextToken = &v return s } -type ListOfferingPromotionsOutput struct { +// Represents the response from the server after AWS Device Farm makes a request +// to return information about the remote access session. +type ListRemoteAccessSessionsOutput struct { _ struct{} `type:"structure"` - // An identifier to be used in the next call to this operation, to return the - // next set of items in the list. + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` - // Information about the offering promotions. - OfferingPromotions []*OfferingPromotion `locationName:"offeringPromotions" type:"list"` + // A container that represents the metadata from the service about each remote + // access session you are requesting. + RemoteAccessSessions []*RemoteAccessSession `locationName:"remoteAccessSessions" type:"list"` } // String returns the string representation -func (s ListOfferingPromotionsOutput) String() string { +func (s ListRemoteAccessSessionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListOfferingPromotionsOutput) GoString() string { +func (s ListRemoteAccessSessionsOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. -func (s *ListOfferingPromotionsOutput) SetNextToken(v string) *ListOfferingPromotionsOutput { +func (s *ListRemoteAccessSessionsOutput) SetNextToken(v string) *ListRemoteAccessSessionsOutput { s.NextToken = &v return s } -// SetOfferingPromotions sets the OfferingPromotions field's value. -func (s *ListOfferingPromotionsOutput) SetOfferingPromotions(v []*OfferingPromotion) *ListOfferingPromotionsOutput { - s.OfferingPromotions = v +// SetRemoteAccessSessions sets the RemoteAccessSessions field's value. +func (s *ListRemoteAccessSessionsOutput) SetRemoteAccessSessions(v []*RemoteAccessSession) *ListRemoteAccessSessionsOutput { + s.RemoteAccessSessions = v return s } -// Represents the request to list the offering transaction history. -type ListOfferingTransactionsInput struct { +// Represents a request to the list runs operation. +type ListRunsInput struct { _ struct{} `type:"structure"` + // The Amazon Resource Name (ARN) of the project for which you want to list + // runs. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + // An identifier that was returned from the previous call to this operation, // which can be used to return the next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` } // String returns the string representation -func (s ListOfferingTransactionsInput) String() string { +func (s ListRunsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListOfferingTransactionsInput) GoString() string { +func (s ListRunsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ListOfferingTransactionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListOfferingTransactionsInput"} +func (s *ListRunsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListRunsInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } if s.NextToken != nil && len(*s.NextToken) < 4 { invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) } @@ -11831,69 +13624,86 @@ func (s *ListOfferingTransactionsInput) Validate() error { return nil } +// SetArn sets the Arn field's value. +func (s *ListRunsInput) SetArn(v string) *ListRunsInput { + s.Arn = &v + return s +} + // SetNextToken sets the NextToken field's value. -func (s *ListOfferingTransactionsInput) SetNextToken(v string) *ListOfferingTransactionsInput { +func (s *ListRunsInput) SetNextToken(v string) *ListRunsInput { s.NextToken = &v return s } -// Returns the transaction log of the specified offerings. -type ListOfferingTransactionsOutput struct { +// Represents the result of a list runs request. +type ListRunsOutput struct { _ struct{} `type:"structure"` - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. + // If the number of items that are returned is significantly large, this is + // an identifier that is also returned. It can be used in a subsequent call + // to this operation to return the next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` - // The audit log of subscriptions you have purchased and modified through AWS - // Device Farm. - OfferingTransactions []*OfferingTransaction `locationName:"offeringTransactions" type:"list"` + // Information about the runs. + Runs []*Run `locationName:"runs" type:"list"` } // String returns the string representation -func (s ListOfferingTransactionsOutput) String() string { +func (s ListRunsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListOfferingTransactionsOutput) GoString() string { +func (s ListRunsOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. -func (s *ListOfferingTransactionsOutput) SetNextToken(v string) *ListOfferingTransactionsOutput { +func (s *ListRunsOutput) SetNextToken(v string) *ListRunsOutput { s.NextToken = &v return s } -// SetOfferingTransactions sets the OfferingTransactions field's value. -func (s *ListOfferingTransactionsOutput) SetOfferingTransactions(v []*OfferingTransaction) *ListOfferingTransactionsOutput { - s.OfferingTransactions = v +// SetRuns sets the Runs field's value. +func (s *ListRunsOutput) SetRuns(v []*Run) *ListRunsOutput { + s.Runs = v return s } -// Represents the request to list all offerings. -type ListOfferingsInput struct { +// Represents a request to the list samples operation. +type ListSamplesInput struct { _ struct{} `type:"structure"` + // The Amazon Resource Name (ARN) of the job used to list samples. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + // An identifier that was returned from the previous call to this operation, // which can be used to return the next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` } // String returns the string representation -func (s ListOfferingsInput) String() string { +func (s ListSamplesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListOfferingsInput) GoString() string { +func (s ListSamplesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ListOfferingsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListOfferingsInput"} +func (s *ListSamplesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListSamplesInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } if s.NextToken != nil && len(*s.NextToken) < 4 { invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) } @@ -11904,54 +13714,61 @@ func (s *ListOfferingsInput) Validate() error { return nil } +// SetArn sets the Arn field's value. +func (s *ListSamplesInput) SetArn(v string) *ListSamplesInput { + s.Arn = &v + return s +} + // SetNextToken sets the NextToken field's value. -func (s *ListOfferingsInput) SetNextToken(v string) *ListOfferingsInput { +func (s *ListSamplesInput) SetNextToken(v string) *ListSamplesInput { s.NextToken = &v return s } -// Represents the return values of the list of offerings. -type ListOfferingsOutput struct { +// Represents the result of a list samples request. +type ListSamplesOutput struct { _ struct{} `type:"structure"` - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. + // If the number of items that are returned is significantly large, this is + // an identifier that is also returned. It can be used in a subsequent call + // to this operation to return the next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` - // A value representing the list offering results. - Offerings []*Offering `locationName:"offerings" type:"list"` + // Information about the samples. + Samples []*Sample `locationName:"samples" type:"list"` } // String returns the string representation -func (s ListOfferingsOutput) String() string { +func (s ListSamplesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListOfferingsOutput) GoString() string { +func (s ListSamplesOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. -func (s *ListOfferingsOutput) SetNextToken(v string) *ListOfferingsOutput { +func (s *ListSamplesOutput) SetNextToken(v string) *ListSamplesOutput { s.NextToken = &v return s } -// SetOfferings sets the Offerings field's value. -func (s *ListOfferingsOutput) SetOfferings(v []*Offering) *ListOfferingsOutput { - s.Offerings = v +// SetSamples sets the Samples field's value. +func (s *ListSamplesOutput) SetSamples(v []*Sample) *ListSamplesOutput { + s.Samples = v return s } -// Represents a request to the list projects operation. -type ListProjectsInput struct { +// Represents a request to the list suites operation. +type ListSuitesInput struct { _ struct{} `type:"structure"` - // Optional. If no Amazon Resource Name (ARN) is specified, then AWS Device - // Farm returns a list of all projects for the AWS account. You can also specify - // a project ARN. - Arn *string `locationName:"arn" min:"32" type:"string"` + // The job's Amazon Resource Name (ARN). + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` // An identifier that was returned from the previous call to this operation, // which can be used to return the next set of items in the list. @@ -11959,18 +13776,21 @@ type ListProjectsInput struct { } // String returns the string representation -func (s ListProjectsInput) String() string { +func (s ListSuitesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListProjectsInput) GoString() string { +func (s ListSuitesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ListProjectsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListProjectsInput"} +func (s *ListSuitesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListSuitesInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } if s.Arn != nil && len(*s.Arn) < 32 { invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) } @@ -11985,88 +13805,82 @@ func (s *ListProjectsInput) Validate() error { } // SetArn sets the Arn field's value. -func (s *ListProjectsInput) SetArn(v string) *ListProjectsInput { +func (s *ListSuitesInput) SetArn(v string) *ListSuitesInput { s.Arn = &v return s } // SetNextToken sets the NextToken field's value. -func (s *ListProjectsInput) SetNextToken(v string) *ListProjectsInput { +func (s *ListSuitesInput) SetNextToken(v string) *ListSuitesInput { s.NextToken = &v return s } -// Represents the result of a list projects request. -type ListProjectsOutput struct { +// Represents the result of a list suites request. +type ListSuitesOutput struct { _ struct{} `type:"structure"` // If the number of items that are returned is significantly large, this is - // an identifier that is also returned, which can be used in a subsequent call + // an identifier that is also returned. It can be used in a subsequent call // to this operation to return the next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` - // Information about the projects. - Projects []*Project `locationName:"projects" type:"list"` + // Information about the suites. + Suites []*Suite `locationName:"suites" type:"list"` } // String returns the string representation -func (s ListProjectsOutput) String() string { +func (s ListSuitesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListProjectsOutput) GoString() string { +func (s ListSuitesOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. -func (s *ListProjectsOutput) SetNextToken(v string) *ListProjectsOutput { +func (s *ListSuitesOutput) SetNextToken(v string) *ListSuitesOutput { s.NextToken = &v return s } -// SetProjects sets the Projects field's value. -func (s *ListProjectsOutput) SetProjects(v []*Project) *ListProjectsOutput { - s.Projects = v +// SetSuites sets the Suites field's value. +func (s *ListSuitesOutput) SetSuites(v []*Suite) *ListSuitesOutput { + s.Suites = v return s } -// Represents the request to return information about the remote access session. -type ListRemoteAccessSessionsInput struct { +type ListTagsForResourceInput struct { _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the project about which you are requesting - // information. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` - - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` + + // The Amazon Resource Name (ARN) of the resource or resources for which to + // list tags. You can associate tags with the following Device Farm resources: + // PROJECT, RUN, NETWORK_PROFILE, INSTANCE_PROFILE, DEVICE_INSTANCE, SESSION, + // DEVICE_POOL, DEVICE, and VPCE_CONFIGURATION. + // + // ResourceARN is a required field + ResourceARN *string `min:"32" type:"string" required:"true"` } // String returns the string representation -func (s ListRemoteAccessSessionsInput) String() string { +func (s ListTagsForResourceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListRemoteAccessSessionsInput) GoString() string { +func (s ListTagsForResourceInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ListRemoteAccessSessionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListRemoteAccessSessionsInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) +func (s *ListTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} + if s.ResourceARN == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceARN")) } - if s.NextToken != nil && len(*s.NextToken) < 4 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) + if s.ResourceARN != nil && len(*s.ResourceARN) < 32 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 32)) } if invalidParams.Len() > 0 { @@ -12075,87 +13889,62 @@ func (s *ListRemoteAccessSessionsInput) Validate() error { return nil } -// SetArn sets the Arn field's value. -func (s *ListRemoteAccessSessionsInput) SetArn(v string) *ListRemoteAccessSessionsInput { - s.Arn = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListRemoteAccessSessionsInput) SetNextToken(v string) *ListRemoteAccessSessionsInput { - s.NextToken = &v +// SetResourceARN sets the ResourceARN field's value. +func (s *ListTagsForResourceInput) SetResourceARN(v string) *ListTagsForResourceInput { + s.ResourceARN = &v return s } -// Represents the response from the server after AWS Device Farm makes a request -// to return information about the remote access session. -type ListRemoteAccessSessionsOutput struct { +type ListTagsForResourceOutput struct { _ struct{} `type:"structure"` - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` - - // A container representing the metadata from the service about each remote - // access session you are requesting. - RemoteAccessSessions []*RemoteAccessSession `locationName:"remoteAccessSessions" type:"list"` + // The tags to add to the resource. A tag is an array of key-value pairs. Tag + // keys can have a maximum character length of 128 characters. Tag values can + // have a maximum length of 256 characters. + Tags []*Tag `type:"list"` } // String returns the string representation -func (s ListRemoteAccessSessionsOutput) String() string { +func (s ListTagsForResourceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListRemoteAccessSessionsOutput) GoString() string { +func (s ListTagsForResourceOutput) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *ListRemoteAccessSessionsOutput) SetNextToken(v string) *ListRemoteAccessSessionsOutput { - s.NextToken = &v - return s -} - -// SetRemoteAccessSessions sets the RemoteAccessSessions field's value. -func (s *ListRemoteAccessSessionsOutput) SetRemoteAccessSessions(v []*RemoteAccessSession) *ListRemoteAccessSessionsOutput { - s.RemoteAccessSessions = v +// SetTags sets the Tags field's value. +func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { + s.Tags = v return s } -// Represents a request to the list runs operation. -type ListRunsInput struct { +type ListTestGridProjectsInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the project for which you want to list - // runs. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + // Return no more than this number of results. + MaxResult *int64 `locationName:"maxResult" min:"1" type:"integer"` - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. + // From a response, used to continue a paginated listing. NextToken *string `locationName:"nextToken" min:"4" type:"string"` } // String returns the string representation -func (s ListRunsInput) String() string { +func (s ListTestGridProjectsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListRunsInput) GoString() string { +func (s ListTestGridProjectsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ListRunsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListRunsInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) +func (s *ListTestGridProjectsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTestGridProjectsInput"} + if s.MaxResult != nil && *s.MaxResult < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResult", 1)) } if s.NextToken != nil && len(*s.NextToken) < 4 { invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) @@ -12167,89 +13956,91 @@ func (s *ListRunsInput) Validate() error { return nil } -// SetArn sets the Arn field's value. -func (s *ListRunsInput) SetArn(v string) *ListRunsInput { - s.Arn = &v +// SetMaxResult sets the MaxResult field's value. +func (s *ListTestGridProjectsInput) SetMaxResult(v int64) *ListTestGridProjectsInput { + s.MaxResult = &v return s } // SetNextToken sets the NextToken field's value. -func (s *ListRunsInput) SetNextToken(v string) *ListRunsInput { +func (s *ListTestGridProjectsInput) SetNextToken(v string) *ListTestGridProjectsInput { s.NextToken = &v return s } -// Represents the result of a list runs request. -type ListRunsOutput struct { +type ListTestGridProjectsOutput struct { _ struct{} `type:"structure"` - // If the number of items that are returned is significantly large, this is - // an identifier that is also returned, which can be used in a subsequent call - // to this operation to return the next set of items in the list. + // Used for pagination. Pass into ListTestGridProjects to get more results in + // a paginated request. NextToken *string `locationName:"nextToken" min:"4" type:"string"` - // Information about the runs. - Runs []*Run `locationName:"runs" type:"list"` + // The list of TestGridProjects, based on a ListTestGridProjectsRequest. + TestGridProjects []*TestGridProject `locationName:"testGridProjects" type:"list"` } // String returns the string representation -func (s ListRunsOutput) String() string { +func (s ListTestGridProjectsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListRunsOutput) GoString() string { +func (s ListTestGridProjectsOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. -func (s *ListRunsOutput) SetNextToken(v string) *ListRunsOutput { +func (s *ListTestGridProjectsOutput) SetNextToken(v string) *ListTestGridProjectsOutput { s.NextToken = &v return s } -// SetRuns sets the Runs field's value. -func (s *ListRunsOutput) SetRuns(v []*Run) *ListRunsOutput { - s.Runs = v +// SetTestGridProjects sets the TestGridProjects field's value. +func (s *ListTestGridProjectsOutput) SetTestGridProjects(v []*TestGridProject) *ListTestGridProjectsOutput { + s.TestGridProjects = v return s } -// Represents a request to the list samples operation. -type ListSamplesInput struct { +type ListTestGridSessionActionsInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the job used to list samples. - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + // The maximum number of sessions to return per response. + MaxResult *int64 `locationName:"maxResult" min:"1" type:"integer"` - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. + // Pagination token. NextToken *string `locationName:"nextToken" min:"4" type:"string"` + + // The ARN of the session to retrieve. + // + // SessionArn is a required field + SessionArn *string `locationName:"sessionArn" min:"32" type:"string" required:"true"` } // String returns the string representation -func (s ListSamplesInput) String() string { +func (s ListTestGridSessionActionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListSamplesInput) GoString() string { +func (s ListTestGridSessionActionsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ListSamplesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListSamplesInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) +func (s *ListTestGridSessionActionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTestGridSessionActionsInput"} + if s.MaxResult != nil && *s.MaxResult < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResult", 1)) } if s.NextToken != nil && len(*s.NextToken) < 4 { invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) } + if s.SessionArn == nil { + invalidParams.Add(request.NewErrParamRequired("SessionArn")) + } + if s.SessionArn != nil && len(*s.SessionArn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("SessionArn", 32)) + } if invalidParams.Len() > 0 { return invalidParams @@ -12257,89 +14048,99 @@ func (s *ListSamplesInput) Validate() error { return nil } -// SetArn sets the Arn field's value. -func (s *ListSamplesInput) SetArn(v string) *ListSamplesInput { - s.Arn = &v +// SetMaxResult sets the MaxResult field's value. +func (s *ListTestGridSessionActionsInput) SetMaxResult(v int64) *ListTestGridSessionActionsInput { + s.MaxResult = &v return s } // SetNextToken sets the NextToken field's value. -func (s *ListSamplesInput) SetNextToken(v string) *ListSamplesInput { +func (s *ListTestGridSessionActionsInput) SetNextToken(v string) *ListTestGridSessionActionsInput { s.NextToken = &v return s } -// Represents the result of a list samples request. -type ListSamplesOutput struct { +// SetSessionArn sets the SessionArn field's value. +func (s *ListTestGridSessionActionsInput) SetSessionArn(v string) *ListTestGridSessionActionsInput { + s.SessionArn = &v + return s +} + +type ListTestGridSessionActionsOutput struct { _ struct{} `type:"structure"` - // If the number of items that are returned is significantly large, this is - // an identifier that is also returned, which can be used in a subsequent call - // to this operation to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` + // The action taken by the session. + Actions []*TestGridSessionAction `locationName:"actions" type:"list"` - // Information about the samples. - Samples []*Sample `locationName:"samples" type:"list"` + // Pagination token. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` } // String returns the string representation -func (s ListSamplesOutput) String() string { +func (s ListTestGridSessionActionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListSamplesOutput) GoString() string { +func (s ListTestGridSessionActionsOutput) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *ListSamplesOutput) SetNextToken(v string) *ListSamplesOutput { - s.NextToken = &v +// SetActions sets the Actions field's value. +func (s *ListTestGridSessionActionsOutput) SetActions(v []*TestGridSessionAction) *ListTestGridSessionActionsOutput { + s.Actions = v return s } -// SetSamples sets the Samples field's value. -func (s *ListSamplesOutput) SetSamples(v []*Sample) *ListSamplesOutput { - s.Samples = v +// SetNextToken sets the NextToken field's value. +func (s *ListTestGridSessionActionsOutput) SetNextToken(v string) *ListTestGridSessionActionsOutput { + s.NextToken = &v return s } -// Represents a request to the list suites operation. -type ListSuitesInput struct { +type ListTestGridSessionArtifactsInput struct { _ struct{} `type:"structure"` - // The job's Amazon Resource Name (ARN). - // - // Arn is a required field - Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + // The maximum number of results to be returned by a request. + MaxResult *int64 `locationName:"maxResult" min:"1" type:"integer"` - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. + // Pagination token. NextToken *string `locationName:"nextToken" min:"4" type:"string"` + + // The ARN of a TestGridSession. + // + // SessionArn is a required field + SessionArn *string `locationName:"sessionArn" min:"32" type:"string" required:"true"` + + // Limit results to a specified type of artifact. + Type *string `locationName:"type" type:"string" enum:"TestGridSessionArtifactCategory"` } // String returns the string representation -func (s ListSuitesInput) String() string { +func (s ListTestGridSessionArtifactsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListSuitesInput) GoString() string { +func (s ListTestGridSessionArtifactsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ListSuitesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListSuitesInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) +func (s *ListTestGridSessionArtifactsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTestGridSessionArtifactsInput"} + if s.MaxResult != nil && *s.MaxResult < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResult", 1)) } if s.NextToken != nil && len(*s.NextToken) < 4 { invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) } + if s.SessionArn == nil { + invalidParams.Add(request.NewErrParamRequired("SessionArn")) + } + if s.SessionArn != nil && len(*s.SessionArn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("SessionArn", 32)) + } if invalidParams.Len() > 0 { return invalidParams @@ -12347,83 +14148,116 @@ func (s *ListSuitesInput) Validate() error { return nil } -// SetArn sets the Arn field's value. -func (s *ListSuitesInput) SetArn(v string) *ListSuitesInput { - s.Arn = &v +// SetMaxResult sets the MaxResult field's value. +func (s *ListTestGridSessionArtifactsInput) SetMaxResult(v int64) *ListTestGridSessionArtifactsInput { + s.MaxResult = &v return s } // SetNextToken sets the NextToken field's value. -func (s *ListSuitesInput) SetNextToken(v string) *ListSuitesInput { +func (s *ListTestGridSessionArtifactsInput) SetNextToken(v string) *ListTestGridSessionArtifactsInput { s.NextToken = &v return s } -// Represents the result of a list suites request. -type ListSuitesOutput struct { +// SetSessionArn sets the SessionArn field's value. +func (s *ListTestGridSessionArtifactsInput) SetSessionArn(v string) *ListTestGridSessionArtifactsInput { + s.SessionArn = &v + return s +} + +// SetType sets the Type field's value. +func (s *ListTestGridSessionArtifactsInput) SetType(v string) *ListTestGridSessionArtifactsInput { + s.Type = &v + return s +} + +type ListTestGridSessionArtifactsOutput struct { _ struct{} `type:"structure"` - // If the number of items that are returned is significantly large, this is - // an identifier that is also returned, which can be used in a subsequent call - // to this operation to return the next set of items in the list. - NextToken *string `locationName:"nextToken" min:"4" type:"string"` + // A list of test grid session artifacts for a TestGridSession. + Artifacts []*TestGridSessionArtifact `locationName:"artifacts" type:"list"` - // Information about the suites. - Suites []*Suite `locationName:"suites" type:"list"` + // Pagination token. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` } // String returns the string representation -func (s ListSuitesOutput) String() string { +func (s ListTestGridSessionArtifactsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListSuitesOutput) GoString() string { +func (s ListTestGridSessionArtifactsOutput) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *ListSuitesOutput) SetNextToken(v string) *ListSuitesOutput { - s.NextToken = &v +// SetArtifacts sets the Artifacts field's value. +func (s *ListTestGridSessionArtifactsOutput) SetArtifacts(v []*TestGridSessionArtifact) *ListTestGridSessionArtifactsOutput { + s.Artifacts = v return s } -// SetSuites sets the Suites field's value. -func (s *ListSuitesOutput) SetSuites(v []*Suite) *ListSuitesOutput { - s.Suites = v +// SetNextToken sets the NextToken field's value. +func (s *ListTestGridSessionArtifactsOutput) SetNextToken(v string) *ListTestGridSessionArtifactsOutput { + s.NextToken = &v return s } -type ListTagsForResourceInput struct { +type ListTestGridSessionsInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the resource(s) for which to list tags. - // You can associate tags with the following Device Farm resources: PROJECT, - // RUN, NETWORK_PROFILE, INSTANCE_PROFILE, DEVICE_INSTANCE, SESSION, DEVICE_POOL, - // DEVICE, and VPCE_CONFIGURATION. + // Return only sessions created after this time. + CreationTimeAfter *time.Time `locationName:"creationTimeAfter" type:"timestamp"` + + // Return only sessions created before this time. + CreationTimeBefore *time.Time `locationName:"creationTimeBefore" type:"timestamp"` + + // Return only sessions that ended after this time. + EndTimeAfter *time.Time `locationName:"endTimeAfter" type:"timestamp"` + + // Return only sessions that ended before this time. + EndTimeBefore *time.Time `locationName:"endTimeBefore" type:"timestamp"` + + // Return only this many results at a time. + MaxResult *int64 `locationName:"maxResult" min:"1" type:"integer"` + + // Pagination token. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` + + // ARN of a TestGridProject. // - // ResourceARN is a required field - ResourceARN *string `min:"32" type:"string" required:"true"` + // ProjectArn is a required field + ProjectArn *string `locationName:"projectArn" min:"32" type:"string" required:"true"` + + // Return only sessions in this state. + Status *string `locationName:"status" type:"string" enum:"TestGridSessionStatus"` } // String returns the string representation -func (s ListTagsForResourceInput) String() string { +func (s ListTestGridSessionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListTagsForResourceInput) GoString() string { +func (s ListTestGridSessionsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsForResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} - if s.ResourceARN == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceARN")) +func (s *ListTestGridSessionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTestGridSessionsInput"} + if s.MaxResult != nil && *s.MaxResult < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResult", 1)) } - if s.ResourceARN != nil && len(*s.ResourceARN) < 32 { - invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 32)) + if s.NextToken != nil && len(*s.NextToken) < 4 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) + } + if s.ProjectArn == nil { + invalidParams.Add(request.NewErrParamRequired("ProjectArn")) + } + if s.ProjectArn != nil && len(*s.ProjectArn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("ProjectArn", 32)) } if invalidParams.Len() > 0 { @@ -12432,34 +14266,83 @@ func (s *ListTagsForResourceInput) Validate() error { return nil } -// SetResourceARN sets the ResourceARN field's value. -func (s *ListTagsForResourceInput) SetResourceARN(v string) *ListTagsForResourceInput { - s.ResourceARN = &v +// SetCreationTimeAfter sets the CreationTimeAfter field's value. +func (s *ListTestGridSessionsInput) SetCreationTimeAfter(v time.Time) *ListTestGridSessionsInput { + s.CreationTimeAfter = &v + return s +} + +// SetCreationTimeBefore sets the CreationTimeBefore field's value. +func (s *ListTestGridSessionsInput) SetCreationTimeBefore(v time.Time) *ListTestGridSessionsInput { + s.CreationTimeBefore = &v + return s +} + +// SetEndTimeAfter sets the EndTimeAfter field's value. +func (s *ListTestGridSessionsInput) SetEndTimeAfter(v time.Time) *ListTestGridSessionsInput { + s.EndTimeAfter = &v + return s +} + +// SetEndTimeBefore sets the EndTimeBefore field's value. +func (s *ListTestGridSessionsInput) SetEndTimeBefore(v time.Time) *ListTestGridSessionsInput { + s.EndTimeBefore = &v + return s +} + +// SetMaxResult sets the MaxResult field's value. +func (s *ListTestGridSessionsInput) SetMaxResult(v int64) *ListTestGridSessionsInput { + s.MaxResult = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTestGridSessionsInput) SetNextToken(v string) *ListTestGridSessionsInput { + s.NextToken = &v + return s +} + +// SetProjectArn sets the ProjectArn field's value. +func (s *ListTestGridSessionsInput) SetProjectArn(v string) *ListTestGridSessionsInput { + s.ProjectArn = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *ListTestGridSessionsInput) SetStatus(v string) *ListTestGridSessionsInput { + s.Status = &v return s } -type ListTagsForResourceOutput struct { +type ListTestGridSessionsOutput struct { _ struct{} `type:"structure"` - // The tags to add to the resource. A tag is an array of key-value pairs. Tag - // keys can have a maximum character length of 128 characters, and tag values - // can have a maximum length of 256 characters. - Tags []*Tag `type:"list"` + // Pagination token. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` + + // The sessions that match the criteria in a ListTestGridSessionsRequest. + TestGridSessions []*TestGridSession `locationName:"testGridSessions" type:"list"` } // String returns the string representation -func (s ListTagsForResourceOutput) String() string { +func (s ListTestGridSessionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListTagsForResourceOutput) GoString() string { +func (s ListTestGridSessionsOutput) GoString() string { return s.String() } -// SetTags sets the Tags field's value. -func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { - s.Tags = v +// SetNextToken sets the NextToken field's value. +func (s *ListTestGridSessionsOutput) SetNextToken(v string) *ListTestGridSessionsOutput { + s.NextToken = &v + return s +} + +// SetTestGridSessions sets the TestGridSessions field's value. +func (s *ListTestGridSessionsOutput) SetTestGridSessions(v []*TestGridSession) *ListTestGridSessionsOutput { + s.TestGridSessions = v return s } @@ -12523,7 +14406,7 @@ type ListTestsOutput struct { _ struct{} `type:"structure"` // If the number of items that are returned is significantly large, this is - // an identifier that is also returned, which can be used in a subsequent call + // an identifier that is also returned. It can be used in a subsequent call // to this operation to return the next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` @@ -12613,7 +14496,7 @@ type ListUniqueProblemsOutput struct { _ struct{} `type:"structure"` // If the number of items that are returned is significantly large, this is - // an identifier that is also returned, which can be used in a subsequent call + // an identifier that is also returned. It can be used in a subsequent call // to this operation to return the next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` @@ -12621,19 +14504,19 @@ type ListUniqueProblemsOutput struct { // // Allowed values include: // - // * PENDING: A pending condition. + // * PENDING // - // * PASSED: A passing condition. + // * PASSED // - // * WARNED: A warning condition. + // * WARNED // - // * FAILED: A failed condition. + // * FAILED // - // * SKIPPED: A skipped condition. + // * SKIPPED // - // * ERRORED: An error condition. + // * ERRORED // - // * STOPPED: A stopped condition. + // * STOPPED UniqueProblems map[string][]*UniqueProblem `locationName:"uniqueProblems" type:"map"` } @@ -12677,80 +14560,69 @@ type ListUploadsInput struct { // // Must be one of the following values: // - // * ANDROID_APP: An Android upload. + // * ANDROID_APP // - // * IOS_APP: An iOS upload. + // * IOS_APP // - // * WEB_APP: A web application upload. + // * WEB_APP // - // * EXTERNAL_DATA: An external data upload. + // * EXTERNAL_DATA // - // * APPIUM_JAVA_JUNIT_TEST_PACKAGE: An Appium Java JUnit test package upload. + // * APPIUM_JAVA_JUNIT_TEST_PACKAGE // - // * APPIUM_JAVA_TESTNG_TEST_PACKAGE: An Appium Java TestNG test package - // upload. + // * APPIUM_JAVA_TESTNG_TEST_PACKAGE // - // * APPIUM_PYTHON_TEST_PACKAGE: An Appium Python test package upload. + // * APPIUM_PYTHON_TEST_PACKAGE // - // * APPIUM_NODE_TEST_PACKAGE: An Appium Node.js test package upload. + // * APPIUM_NODE_TEST_PACKAGE // - // * APPIUM_RUBY_TEST_PACKAGE: An Appium Ruby test package upload. + // * APPIUM_RUBY_TEST_PACKAGE // - // * APPIUM_WEB_JAVA_JUNIT_TEST_PACKAGE: An Appium Java JUnit test package - // upload for a web app. + // * APPIUM_WEB_JAVA_JUNIT_TEST_PACKAGE // - // * APPIUM_WEB_JAVA_TESTNG_TEST_PACKAGE: An Appium Java TestNG test package - // upload for a web app. + // * APPIUM_WEB_JAVA_TESTNG_TEST_PACKAGE // - // * APPIUM_WEB_PYTHON_TEST_PACKAGE: An Appium Python test package upload - // for a web app. + // * APPIUM_WEB_PYTHON_TEST_PACKAGE // - // * APPIUM_WEB_NODE_TEST_PACKAGE: An Appium Node.js test package upload - // for a web app. + // * APPIUM_WEB_NODE_TEST_PACKAGE // - // * APPIUM_WEB_RUBY_TEST_PACKAGE: An Appium Ruby test package upload for - // a web app. + // * APPIUM_WEB_RUBY_TEST_PACKAGE // - // * CALABASH_TEST_PACKAGE: A Calabash test package upload. + // * CALABASH_TEST_PACKAGE // - // * INSTRUMENTATION_TEST_PACKAGE: An instrumentation upload. + // * INSTRUMENTATION_TEST_PACKAGE // - // * UIAUTOMATION_TEST_PACKAGE: A uiautomation test package upload. + // * UIAUTOMATION_TEST_PACKAGE // - // * UIAUTOMATOR_TEST_PACKAGE: A uiautomator test package upload. + // * UIAUTOMATOR_TEST_PACKAGE // - // * XCTEST_TEST_PACKAGE: An Xcode test package upload. + // * XCTEST_TEST_PACKAGE // - // * XCTEST_UI_TEST_PACKAGE: An Xcode UI test package upload. + // * XCTEST_UI_TEST_PACKAGE // - // * APPIUM_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload. + // * APPIUM_JAVA_JUNIT_TEST_SPEC // - // * APPIUM_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload. + // * APPIUM_JAVA_TESTNG_TEST_SPEC // - // * APPIUM_PYTHON_TEST_SPEC: An Appium Python test spec upload. + // * APPIUM_PYTHON_TEST_SPEC // - // * APPIUM_NODE_TEST_SPEC: An Appium Node.js test spec upload. + // * APPIUM_NODE_TEST_SPEC // - // * APPIUM_RUBY_TEST_SPEC: An Appium Ruby test spec upload. + // * APPIUM_RUBY_TEST_SPEC // - // * APPIUM_WEB_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload - // for a web app. + // * APPIUM_WEB_JAVA_JUNIT_TEST_SPEC // - // * APPIUM_WEB_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload - // for a web app. + // * APPIUM_WEB_JAVA_TESTNG_TEST_SPEC // - // * APPIUM_WEB_PYTHON_TEST_SPEC: An Appium Python test spec upload for a - // web app. + // * APPIUM_WEB_PYTHON_TEST_SPEC // - // * APPIUM_WEB_NODE_TEST_SPEC: An Appium Node.js test spec upload for a - // web app. + // * APPIUM_WEB_NODE_TEST_SPEC // - // * APPIUM_WEB_RUBY_TEST_SPEC: An Appium Ruby test spec upload for a web - // app. + // * APPIUM_WEB_RUBY_TEST_SPEC // - // * INSTRUMENTATION_TEST_SPEC: An instrumentation test spec upload. + // * INSTRUMENTATION_TEST_SPEC // - // * XCTEST_UI_TEST_SPEC: An Xcode UI test spec upload. + // * XCTEST_UI_TEST_SPEC Type *string `locationName:"type" type:"string" enum:"UploadType"` } @@ -12806,7 +14678,7 @@ type ListUploadsOutput struct { _ struct{} `type:"structure"` // If the number of items that are returned is significantly large, this is - // an identifier that is also returned, which can be used in a subsequent call + // an identifier that is also returned. It can be used in a subsequent call // to this operation to return the next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` @@ -12839,8 +14711,8 @@ func (s *ListUploadsOutput) SetUploads(v []*Upload) *ListUploadsOutput { type ListVPCEConfigurationsInput struct { _ struct{} `type:"structure"` - // An integer specifying the maximum number of items you want to return in the - // API response. + // An integer that specifies the maximum number of items you want to return + // in the API response. MaxResults *int64 `locationName:"maxResults" type:"integer"` // An identifier that was returned from the previous call to this operation, @@ -12890,8 +14762,8 @@ type ListVPCEConfigurationsOutput struct { // which can be used to return the next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` - // An array of VPCEConfiguration objects containing information about your VPC - // endpoint configuration. + // An array of VPCEConfiguration objects that contain information about your + // VPC endpoint configuration. VpceConfigurations []*VPCEConfiguration `locationName:"vpceConfigurations" type:"list"` } @@ -12918,7 +14790,7 @@ func (s *ListVPCEConfigurationsOutput) SetVpceConfigurations(v []*VPCEConfigurat } // Represents a latitude and longitude pair, expressed in geographic coordinate -// system degrees (for example 47.6204, -122.3491). +// system degrees (for example, 47.6204, -122.3491). // // Elevation is currently not supported. type Location struct { @@ -12973,14 +14845,14 @@ func (s *Location) SetLongitude(v float64) *Location { return s } -// A number representing the monetary amount for an offering or transaction. +// A number that represents the monetary amount for an offering or transaction. type MonetaryAmount struct { _ struct{} `type:"structure"` // The numerical amount of an offering or transaction. Amount *float64 `locationName:"amount" type:"double"` - // The currency code of a monetary amount. For example, USD means "U.S. dollars." + // The currency code of a monetary amount. For example, USD means U.S. dollars. CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCode"` } @@ -13033,7 +14905,7 @@ type NetworkProfile struct { // The name of the network profile. Name *string `locationName:"name" type:"string"` - // The type of network profile. Valid values are listed below. + // The type of network profile. Valid values are listed here. Type *string `locationName:"type" type:"string" enum:"NetworkProfileType"` // The data throughput rate in bits per second, as an integer from 0 to 104857600. @@ -13137,19 +15009,19 @@ func (s *NetworkProfile) SetUplinkLossPercent(v int64) *NetworkProfile { type Offering struct { _ struct{} `type:"structure"` - // A string describing the offering. + // A string that describes the offering. Description *string `locationName:"description" type:"string"` // The ID that corresponds to a device offering. Id *string `locationName:"id" min:"32" type:"string"` - // The platform of the device (e.g., ANDROID or IOS). + // The platform of the device (for example, ANDROID or IOS). Platform *string `locationName:"platform" type:"string" enum:"DevicePlatform"` // Specifies whether there are recurring charges for the offering. RecurringCharges []*RecurringCharge `locationName:"recurringCharges" type:"list"` - // The type of offering (e.g., "RECURRING") for a device. + // The type of offering (for example, RECURRING) for a device. Type *string `locationName:"type" type:"string" enum:"OfferingType"` } @@ -13197,7 +15069,7 @@ func (s *Offering) SetType(v string) *Offering { type OfferingPromotion struct { _ struct{} `type:"structure"` - // A string describing the offering promotion. + // A string that describes the offering promotion. Description *string `locationName:"description" type:"string"` // The ID of the offering promotion. @@ -13354,19 +15226,19 @@ type Problem struct { // // Allowed values include: // - // * PENDING: A pending condition. + // * PENDING // - // * PASSED: A passing condition. + // * PASSED // - // * WARNED: A warning condition. + // * WARNED // - // * FAILED: A failed condition. + // * FAILED // - // * SKIPPED: A skipped condition. + // * SKIPPED // - // * ERRORED: An error condition. + // * ERRORED // - // * STOPPED: A stopped condition. + // * STOPPED Result *string `locationName:"result" type:"string" enum:"ExecutionResult"` // Information about the associated run. @@ -13475,7 +15347,7 @@ type Project struct { // When the project was created. Created *time.Time `locationName:"created" type:"timestamp"` - // The default number of minutes (at the project level) a test run will execute + // The default number of minutes (at the project level) a test run executes // before it times out. The default value is 150 minutes. DefaultJobTimeoutMinutes *int64 `locationName:"defaultJobTimeoutMinutes" type:"integer"` @@ -13527,7 +15399,7 @@ type PurchaseOfferingInput struct { // The ID of the offering promotion to be applied to the purchase. OfferingPromotionId *string `locationName:"offeringPromotionId" min:"4" type:"string"` - // The number of device slots you wish to purchase in an offering request. + // The number of device slots to purchase in an offering request. Quantity *int64 `locationName:"quantity" type:"integer"` } @@ -13575,7 +15447,7 @@ func (s *PurchaseOfferingInput) SetQuantity(v int64) *PurchaseOfferingInput { return s } -// The result of the purchase offering (e.g., success or failure). +// The result of the purchase offering (for example, success or failure). type PurchaseOfferingOutput struct { _ struct{} `type:"structure"` @@ -13604,16 +15476,16 @@ func (s *PurchaseOfferingOutput) SetOfferingTransaction(v *OfferingTransaction) type Radios struct { _ struct{} `type:"structure"` - // True if Bluetooth is enabled at the beginning of the test; otherwise, false. + // True if Bluetooth is enabled at the beginning of the test. Otherwise, false. Bluetooth *bool `locationName:"bluetooth" type:"boolean"` - // True if GPS is enabled at the beginning of the test; otherwise, false. + // True if GPS is enabled at the beginning of the test. Otherwise, false. Gps *bool `locationName:"gps" type:"boolean"` - // True if NFC is enabled at the beginning of the test; otherwise, false. + // True if NFC is enabled at the beginning of the test. Otherwise, false. Nfc *bool `locationName:"nfc" type:"boolean"` - // True if Wi-Fi is enabled at the beginning of the test; otherwise, false. + // True if Wi-Fi is enabled at the beginning of the test. Otherwise, false. Wifi *bool `locationName:"wifi" type:"boolean"` } @@ -13651,14 +15523,14 @@ func (s *Radios) SetWifi(v bool) *Radios { return s } -// Specifies whether charges for devices will be recurring. +// Specifies whether charges for devices are recurring. type RecurringCharge struct { _ struct{} `type:"structure"` // The cost of the recurring charge. Cost *MonetaryAmount `locationName:"cost" type:"structure"` - // The frequency in which charges will recur. + // The frequency in which charges recur. Frequency *string `locationName:"frequency" type:"string" enum:"RecurringChargeFrequency"` } @@ -13693,7 +15565,7 @@ type RemoteAccessSession struct { // The billing method of the remote access session. Possible values include // METERED or UNMETERED. For more information about metered devices, see AWS - // Device Farm terminology (https://docs.aws.amazon.com/devicefarm/latest/developerguide/welcome.html#welcome-terminology)." + // Device Farm terminology (https://docs.aws.amazon.com/devicefarm/latest/developerguide/welcome.html#welcome-terminology). BillingMethod *string `locationName:"billingMethod" type:"string" enum:"BillingMethod"` // Unique identifier of your client for the remote access session. Only returned @@ -13727,7 +15599,7 @@ type RemoteAccessSession struct { // Remote debugging is no longer supported (https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html). HostAddress *string `locationName:"hostAddress" type:"string"` - // The Amazon Resource Name (ARN) of the instance. + // The ARN of the instance. InstanceArn *string `locationName:"instanceArn" min:"32" type:"string"` // The interaction mode of the remote access session. Valid values are: @@ -13736,12 +15608,13 @@ type RemoteAccessSession struct { // and rotating the screen. You cannot run XCUITest framework-based tests // in this mode. // - // * NO_VIDEO: You are connected to the device but cannot interact with it - // or view the screen. This mode has the fastest test execution speed. You - // can run XCUITest framework-based tests in this mode. + // * NO_VIDEO: You are connected to the device, but cannot interact with + // it or view the screen. This mode has the fastest test execution speed. + // You can run XCUITest framework-based tests in this mode. // - // * VIDEO_ONLY: You can view the screen but cannot touch or rotate it. You - // can run XCUITest framework-based tests and watch the screen in this mode. + // * VIDEO_ONLY: You can view the screen, but cannot touch or rotate it. + // You can run XCUITest framework-based tests and watch the screen in this + // mode. InteractionMode *string `locationName:"interactionMode" type:"string" enum:"InteractionMode"` // A message about the remote access session. @@ -13756,8 +15629,7 @@ type RemoteAccessSession struct { // Remote debugging is no longer supported (https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html). RemoteDebugEnabled *bool `locationName:"remoteDebugEnabled" type:"boolean"` - // The Amazon Resource Name (ARN) for the app to be recorded in the remote access - // session. + // The ARN for the app to be recorded in the remote access session. RemoteRecordAppArn *string `locationName:"remoteRecordAppArn" min:"32" type:"string"` // This flag is set to true if remote recording is enabled for the remote access @@ -13766,26 +15638,25 @@ type RemoteAccessSession struct { // The result of the remote access session. Can be any of the following: // - // * PENDING: A pending condition. + // * PENDING. // - // * PASSED: A passing condition. + // * PASSED. // - // * WARNED: A warning condition. + // * WARNED. // - // * FAILED: A failed condition. + // * FAILED. // - // * SKIPPED: A skipped condition. + // * SKIPPED. // - // * ERRORED: An error condition. + // * ERRORED. // - // * STOPPED: A stopped condition. + // * STOPPED. Result *string `locationName:"result" type:"string" enum:"ExecutionResult"` - // When set to true, for private devices, Device Farm will not sign your app - // again. For public devices, Device Farm always signs your apps again and this - // parameter has no effect. + // When set to true, for private devices, Device Farm does not sign your app + // again. For public devices, Device Farm always signs your apps again. // - // For more information about how Device Farm re-signs your app(s), see Do you + // For more information about how Device Farm re-signs your apps, see Do you // modify my app? (https://aws.amazon.com/device-farm/faq/) in the AWS Device // Farm FAQs. SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` @@ -13795,23 +15666,23 @@ type RemoteAccessSession struct { // The status of the remote access session. Can be any of the following: // - // * PENDING: A pending status. + // * PENDING. // - // * PENDING_CONCURRENCY: A pending concurrency status. + // * PENDING_CONCURRENCY. // - // * PENDING_DEVICE: A pending device status. + // * PENDING_DEVICE. // - // * PROCESSING: A processing status. + // * PROCESSING. // - // * SCHEDULING: A scheduling status. + // * SCHEDULING. // - // * PREPARING: A preparing status. + // * PREPARING. // - // * RUNNING: A running status. + // * RUNNING. // - // * COMPLETED: A completed status. + // * COMPLETED. // - // * STOPPING: A stopping status. + // * STOPPING. Status *string `locationName:"status" type:"string" enum:"ExecutionStatus"` // The date and time the remote access session was stopped. @@ -13954,7 +15825,7 @@ func (s *RemoteAccessSession) SetStopped(v time.Time) *RemoteAccessSession { return s } -// A request representing an offering renewal. +// A request that represents an offering renewal. type RenewOfferingInput struct { _ struct{} `type:"structure"` @@ -14075,26 +15946,26 @@ type Rule struct { // // ARN // - // The Amazon Resource Name (ARN) of the device. For example, "arn:aws:devicefarm:us-west-2::device:12345Example". + // The Amazon Resource Name (ARN) of the device (for example, arn:aws:devicefarm:us-west-2::device:12345Example. // // Supported operators: EQUALS, IN, NOT_IN // // AVAILABILITY // - // The current availability of the device. Valid values are "AVAILABLE", "HIGHLY_AVAILABLE", - // "BUSY", or "TEMPORARY_NOT_AVAILABLE". + // The current availability of the device. Valid values are AVAILABLE, HIGHLY_AVAILABLE, + // BUSY, or TEMPORARY_NOT_AVAILABLE. // // Supported operators: EQUALS // // FLEET_TYPE // - // The fleet type. Valid values are "PUBLIC" or "PRIVATE". + // The fleet type. Valid values are PUBLIC or PRIVATE. // // Supported operators: EQUALS // // FORM_FACTOR // - // The device form factor. Valid values are "PHONE" or "TABLET". + // The device form factor. Valid values are PHONE or TABLET. // // Supported operators: EQUALS, IN, NOT_IN // @@ -14112,44 +15983,45 @@ type Rule struct { // // MANUFACTURER // - // The device manufacturer. For example, "Apple". + // The device manufacturer (for example, Apple). // // Supported operators: EQUALS, IN, NOT_IN // // MODEL // - // The device model, such as "Apple iPad Air 2" or "Google Pixel". + // The device model, such as Apple iPad Air 2 or Google Pixel. // // Supported operators: CONTAINS, EQUALS, IN, NOT_IN // // OS_VERSION // - // The operating system version. For example, "10.3.2". + // The operating system version (for example, 10.3.2). // // Supported operators: EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUALS, IN, LESS_THAN, // LESS_THAN_OR_EQUALS, NOT_IN // // PLATFORM // - // The device platform. Valid values are "ANDROID" or "IOS". + // The device platform. Valid values are ANDROID or IOS. // // Supported operators: EQUALS, IN, NOT_IN // // REMOTE_ACCESS_ENABLED // - // Whether the device is enabled for remote access. Valid values are "TRUE" - // or "FALSE". + // Whether the device is enabled for remote access. Valid values are TRUE or + // FALSE. // // Supported operators: EQUALS // // REMOTE_DEBUG_ENABLED // - // Whether the device is enabled for remote debugging. Valid values are "TRUE" - // or "FALSE". + // Whether the device is enabled for remote debugging. Valid values are TRUE + // or FALSE. // // Supported operators: EQUALS // - // This filter will be ignored, as remote debugging is no longer supported (https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html). + // Because remote debugging is no longer supported (https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html), + // this filter is ignored. Attribute *string `locationName:"attribute" type:"string" enum:"DeviceAttribute"` // Specifies how Device Farm compares the rule's attribute to the value. For @@ -14189,7 +16061,7 @@ func (s *Rule) SetValue(v string) *Rule { } // Represents a test run on a set of devices with a given app package, test -// parameters, etc. +// parameters, and so on. type Run struct { _ struct{} `type:"structure"` @@ -14201,6 +16073,9 @@ type Run struct { // Specifies the billing method for a test run: metered or unmetered. If the // parameter is not specified, the default value is metered. + // + // If you have unmetered device slots, you must set this to unmetered to use + // them. Otherwise, the run is counted toward metered device minutes. BillingMethod *string `locationName:"billingMethod" type:"string" enum:"BillingMethod"` // The total number of completed jobs. @@ -14228,7 +16103,7 @@ type Run struct { // UI fuzz test should perform. EventCount *int64 `locationName:"eventCount" type:"integer"` - // The number of minutes the job will execute before it times out. + // The number of minutes the job executes before it times out. JobTimeoutMinutes *int64 `locationName:"jobTimeoutMinutes" type:"integer"` // Information about the locale that is used for the run. @@ -14246,18 +16121,18 @@ type Run struct { // The network profile being used for a test run. NetworkProfile *NetworkProfile `locationName:"networkProfile" type:"structure"` - // Read-only URL for an object in S3 bucket where you can get the parsing results - // of the test package. If the test package doesn't parse, the reason why it - // doesn't parse appears in the file that this URL points to. + // Read-only URL for an object in an S3 bucket where you can get the parsing + // results of the test package. If the test package doesn't parse, the reason + // why it doesn't parse appears in the file that this URL points to. ParsingResultUrl *string `locationName:"parsingResultUrl" type:"string"` // The run's platform. // // Allowed values include: // - // * ANDROID: The Android platform. + // * ANDROID // - // * IOS: The iOS platform. + // * IOS Platform *string `locationName:"platform" type:"string" enum:"DevicePlatform"` // Information about the radio states for the run. @@ -14267,19 +16142,19 @@ type Run struct { // // Allowed values include: // - // * PENDING: A pending condition. + // * PENDING // - // * PASSED: A passing condition. + // * PASSED // - // * WARNED: A warning condition. + // * WARNED // - // * FAILED: A failed condition. + // * FAILED // - // * SKIPPED: A skipped condition. + // * SKIPPED // - // * ERRORED: An error condition. + // * ERRORED // - // * STOPPED: A stopped condition. + // * STOPPED Result *string `locationName:"result" type:"string" enum:"ExecutionResult"` // Supporting field for the result field. Set only if result is SKIPPED. PARSING_FAILED @@ -14290,11 +16165,10 @@ type Run struct { // the same seed value between tests ensures identical event sequences. Seed *int64 `locationName:"seed" type:"integer"` - // When set to true, for private devices, Device Farm will not sign your app - // again. For public devices, Device Farm always signs your apps again and this - // parameter has no effect. + // When set to true, for private devices, Device Farm does not sign your app + // again. For public devices, Device Farm always signs your apps again. // - // For more information about how Device Farm re-signs your app(s), see Do you + // For more information about how Device Farm re-signs your apps, see Do you // modify my app? (https://aws.amazon.com/device-farm/faq/) in the AWS Device // Farm FAQs. SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` @@ -14306,23 +16180,23 @@ type Run struct { // // Allowed values include: // - // * PENDING: A pending status. + // * PENDING // - // * PENDING_CONCURRENCY: A pending concurrency status. + // * PENDING_CONCURRENCY // - // * PENDING_DEVICE: A pending device status. + // * PENDING_DEVICE // - // * PROCESSING: A processing status. + // * PROCESSING // - // * SCHEDULING: A scheduling status. + // * SCHEDULING // - // * PREPARING: A preparing status. + // * PREPARING // - // * RUNNING: A running status. + // * RUNNING // - // * COMPLETED: A completed status. + // * COMPLETED // - // * STOPPING: A stopping status. + // * STOPPING Status *string `locationName:"status" type:"string" enum:"ExecutionStatus"` // The run's stop time. @@ -14338,43 +16212,42 @@ type Run struct { // // Must be one of the following values: // - // * BUILTIN_FUZZ: The built-in fuzz type. + // * BUILTIN_FUZZ // - // * BUILTIN_EXPLORER: For Android, an app explorer that will traverse an - // Android app, interacting with it and capturing screenshots at the same - // time. + // * BUILTIN_EXPLORER For Android, an app explorer that traverses an Android + // app, interacting with it and capturing screenshots at the same time. // - // * APPIUM_JAVA_JUNIT: The Appium Java JUnit type. + // * APPIUM_JAVA_JUNIT // - // * APPIUM_JAVA_TESTNG: The Appium Java TestNG type. + // * APPIUM_JAVA_TESTNG // - // * APPIUM_PYTHON: The Appium Python type. + // * APPIUM_PYTHON // - // * APPIUM_NODE: The Appium Node.js type. + // * APPIUM_NODE // - // * APPIUM_RUBY: The Appium Ruby type. + // * APPIUM_RUBY // - // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for web apps. + // * APPIUM_WEB_JAVA_JUNIT // - // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for web apps. + // * APPIUM_WEB_JAVA_TESTNG // - // * APPIUM_WEB_PYTHON: The Appium Python type for web apps. + // * APPIUM_WEB_PYTHON // - // * APPIUM_WEB_NODE: The Appium Node.js type for web apps. + // * APPIUM_WEB_NODE // - // * APPIUM_WEB_RUBY: The Appium Ruby type for web apps. + // * APPIUM_WEB_RUBY // - // * CALABASH: The Calabash type. + // * CALABASH // - // * INSTRUMENTATION: The Instrumentation type. + // * INSTRUMENTATION // - // * UIAUTOMATION: The uiautomation type. + // * UIAUTOMATION // - // * UIAUTOMATOR: The uiautomator type. + // * UIAUTOMATOR // - // * XCTEST: The Xcode test type. + // * XCTEST // - // * XCTEST_UI: The Xcode UI test type. + // * XCTEST_UI Type *string `locationName:"type" type:"string" enum:"TestType"` // The Device Farm console URL for the recording of the run. @@ -14628,8 +16501,8 @@ type Sample struct { // received, by app process. Type *string `locationName:"type" type:"string" enum:"SampleType"` - // The pre-signed Amazon S3 URL that can be used with a corresponding GET request - // to download the sample's file. + // The presigned Amazon S3 URL that can be used with a GET request to download + // the sample's file. Url *string `locationName:"url" type:"string"` } @@ -14666,19 +16539,22 @@ func (s *Sample) SetUrl(v string) *Sample { type ScheduleRunConfiguration struct { _ struct{} `type:"structure"` - // A list of Upload ARNs for app packages that will be installed alongside your - // app. + // A list of upload ARNs for app packages to be installed with your app. AuxiliaryApps []*string `locationName:"auxiliaryApps" type:"list"` // Specifies the billing method for a test run: metered or unmetered. If the // parameter is not specified, the default value is metered. + // + // If you have purchased unmetered device slots, you must set this parameter + // to unmetered to make use of them. Otherwise, your run counts against your + // metered time. BillingMethod *string `locationName:"billingMethod" type:"string" enum:"BillingMethod"` // Input CustomerArtifactPaths object for the scheduled run configuration. CustomerArtifactPaths *CustomerArtifactPaths `locationName:"customerArtifactPaths" type:"structure"` // The ARN of the extra data for the run. The extra data is a .zip file that - // AWS Device Farm will extract to external data for Android or the app's sandbox + // AWS Device Farm extracts to external data for Android or the app's sandbox // for iOS. ExtraDataPackageArn *string `locationName:"extraDataPackageArn" min:"32" type:"string"` @@ -14694,7 +16570,7 @@ type ScheduleRunConfiguration struct { // Information about the radio states for the run. Radios *Radios `locationName:"radios" type:"structure"` - // An array of Amazon Resource Names (ARNs) for your VPC endpoint configurations. + // An array of ARNs for your VPC endpoint configurations. VpceConfigurationArns []*string `locationName:"vpceConfigurationArns" type:"list"` } @@ -14787,7 +16663,8 @@ func (s *ScheduleRunConfiguration) SetVpceConfigurationArns(v []*string) *Schedu type ScheduleRunInput struct { _ struct{} `type:"structure"` - // The ARN of the app to schedule a run. + // The ARN of an application package to run tests against, created with CreateUpload. + // See ListUploads. AppArn *string `locationName:"appArn" min:"32" type:"string"` // Information about the settings for the run to be scheduled. @@ -14797,7 +16674,7 @@ type ScheduleRunInput struct { DevicePoolArn *string `locationName:"devicePoolArn" min:"32" type:"string"` // The filter criteria used to dynamically select a set of devices for a test - // run, as well as the maximum number of devices to be included in the run. + // run and the maximum number of devices to be included in the run. // // Either devicePoolArn or deviceSelectionConfiguration is required in a request. DeviceSelectionConfiguration *DeviceSelectionConfiguration `locationName:"deviceSelectionConfiguration" type:"structure"` @@ -14942,9 +16819,8 @@ func (s *ScheduleRunOutput) SetRun(v *Run) *ScheduleRunOutput { return s } -// Represents test settings. This data structure is passed in as the "test" -// parameter to ScheduleRun. For an example of the JSON request syntax, see -// ScheduleRun. +// Represents test settings. This data structure is passed in as the test parameter +// to ScheduleRun. For an example of the JSON request syntax, see ScheduleRun. type ScheduleRunTest struct { _ struct{} `type:"structure"` @@ -14957,25 +16833,25 @@ type ScheduleRunTest struct { // For all tests: // // * app_performance_monitoring: Performance monitoring is enabled by default. - // Set this parameter to "false" to disable it. + // Set this parameter to false to disable it. // // For Calabash tests: // - // * profile: A cucumber profile, for example, "my_profile_name". + // * profile: A cucumber profile (for example, my_profile_name). // // * tags: You can limit execution to features or scenarios that have (or - // don't have) certain tags, for example, "@smoke" or "@smoke,~@wip". + // don't have) certain tags (for example, @smoke or @smoke,~@wip). // // For Appium tests (all types): // - // * appium_version: The Appium version. Currently supported values are "1.6.5" - // (and higher), "latest", and "default". “latest” will run the latest - // Appium version supported by Device Farm (1.9.1). For “default”, Device - // Farm will choose a compatible version of Appium for the device. The current - // behavior is to run 1.7.2 on Android devices and iOS 9 and earlier, 1.7.2 - // for iOS 10 and later. This behavior is subject to change. + // * appium_version: The Appium version. Currently supported values are 1.6.5 + // (and later), latest, and default. latest runs the latest Appium version + // supported by Device Farm (1.9.1). For default, Device Farm selects a compatible + // version of Appium for the device. The current behavior is to run 1.7.2 + // on Android devices and iOS 9 and earlier and 1.7.2 for iOS 10 and later. + // This behavior is subject to change. // - // For Fuzz tests (Android only): + // For fuzz tests (Android only): // // * event_count: The number of events, between 1 and 10000, that the UI // fuzz test should perform. @@ -14988,33 +16864,32 @@ type ScheduleRunTest struct { // // For Explorer tests: // - // * username: A username to use if the Explorer encounters a login form. - // If not supplied, no username will be inserted. + // * username: A user name to use if the Explorer encounters a login form. + // If not supplied, no user name is inserted. // // * password: A password to use if the Explorer encounters a login form. - // If not supplied, no password will be inserted. + // If not supplied, no password is inserted. // // For Instrumentation: // // * filter: A test filter string. Examples: Running a single test case: - // "com.android.abc.Test1" Running a single test: "com.android.abc.Test1#smoke" - // Running multiple tests: "com.android.abc.Test1,com.android.abc.Test2" + // com.android.abc.Test1 Running a single test: com.android.abc.Test1#smoke + // Running multiple tests: com.android.abc.Test1,com.android.abc.Test2 // // For XCTest and XCTestUI: // // * filter: A test filter string. Examples: Running a single test class: - // "LoginTests" Running a multiple test classes: "LoginTests,SmokeTests" - // Running a single test: "LoginTests/testValid" Running multiple tests: - // "LoginTests/testValid,LoginTests/testInvalid" + // LoginTests Running a multiple test classes: LoginTests,SmokeTests Running + // a single test: LoginTests/testValid Running multiple tests: LoginTests/testValid,LoginTests/testInvalid // // For UIAutomator: // // * filter: A test filter string. Examples: Running a single test case: - // "com.android.abc.Test1" Running a single test: "com.android.abc.Test1#smoke" - // Running multiple tests: "com.android.abc.Test1,com.android.abc.Test2" + // com.android.abc.Test1 Running a single test: com.android.abc.Test1#smoke + // Running multiple tests: com.android.abc.Test1,com.android.abc.Test2 Parameters map[string]*string `locationName:"parameters" type:"map"` - // The ARN of the uploaded test that will be run. + // The ARN of the uploaded test to be run. TestPackageArn *string `locationName:"testPackageArn" min:"32" type:"string"` // The ARN of the YAML-formatted test specification. @@ -15024,43 +16899,42 @@ type ScheduleRunTest struct { // // Must be one of the following values: // - // * BUILTIN_FUZZ: The built-in fuzz type. + // * BUILTIN_FUZZ // - // * BUILTIN_EXPLORER: For Android, an app explorer that will traverse an - // Android app, interacting with it and capturing screenshots at the same - // time. + // * BUILTIN_EXPLORER. For Android, an app explorer that traverses an Android + // app, interacting with it and capturing screenshots at the same time. // - // * APPIUM_JAVA_JUNIT: The Appium Java JUnit type. + // * APPIUM_JAVA_JUNIT // - // * APPIUM_JAVA_TESTNG: The Appium Java TestNG type. + // * APPIUM_JAVA_TESTNG // - // * APPIUM_PYTHON: The Appium Python type. + // * APPIUM_PYTHON // - // * APPIUM_NODE: The Appium Node.js type. + // * APPIUM_NODE // - // * APPIUM_RUBY: The Appium Ruby type. + // * APPIUM_RUBY // - // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for web apps. + // * APPIUM_WEB_JAVA_JUNIT // - // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for web apps. + // * APPIUM_WEB_JAVA_TESTNG // - // * APPIUM_WEB_PYTHON: The Appium Python type for web apps. + // * APPIUM_WEB_PYTHON // - // * APPIUM_WEB_NODE: The Appium Node.js type for web apps. + // * APPIUM_WEB_NODE // - // * APPIUM_WEB_RUBY: The Appium Ruby type for web apps. + // * APPIUM_WEB_RUBY // - // * CALABASH: The Calabash type. + // * CALABASH // - // * INSTRUMENTATION: The Instrumentation type. + // * INSTRUMENTATION // - // * UIAUTOMATION: The uiautomation type. + // * UIAUTOMATION // - // * UIAUTOMATOR: The uiautomator type. + // * UIAUTOMATOR // - // * XCTEST: The Xcode test type. + // * XCTEST // - // * XCTEST_UI: The Xcode UI test type. + // * XCTEST_UI // // Type is a required field Type *string `locationName:"type" type:"string" required:"true" enum:"TestType"` @@ -15128,8 +17002,7 @@ func (s *ScheduleRunTest) SetType(v string) *ScheduleRunTest { type StopJobInput struct { _ struct{} `type:"structure"` - // Represents the Amazon Resource Name (ARN) of the Device Farm job you wish - // to stop. + // Represents the Amazon Resource Name (ARN) of the Device Farm job to stop. // // Arn is a required field Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` @@ -15194,7 +17067,7 @@ func (s *StopJobOutput) SetJob(v *Job) *StopJobOutput { type StopRemoteAccessSessionInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the remote access session you wish to stop. + // The Amazon Resource Name (ARN) of the remote access session to stop. // // Arn is a required field Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` @@ -15237,8 +17110,8 @@ func (s *StopRemoteAccessSessionInput) SetArn(v string) *StopRemoteAccessSession type StopRemoteAccessSessionOutput struct { _ struct{} `type:"structure"` - // A container representing the metadata from the service about the remote access - // session you are stopping. + // A container that represents the metadata from the service about the remote + // access session you are stopping. RemoteAccessSession *RemoteAccessSession `locationName:"remoteAccessSession" type:"structure"` } @@ -15262,8 +17135,7 @@ func (s *StopRemoteAccessSessionOutput) SetRemoteAccessSession(v *RemoteAccessSe type StopRunInput struct { _ struct{} `type:"structure"` - // Represents the Amazon Resource Name (ARN) of the Device Farm run you wish - // to stop. + // Represents the Amazon Resource Name (ARN) of the Device Farm run to stop. // // Arn is a required field Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` @@ -15351,19 +17223,19 @@ type Suite struct { // // Allowed values include: // - // * PENDING: A pending condition. + // * PENDING // - // * PASSED: A passing condition. + // * PASSED // - // * WARNED: A warning condition. + // * WARNED // - // * FAILED: A failed condition. + // * FAILED // - // * SKIPPED: A skipped condition. + // * SKIPPED // - // * ERRORED: An error condition. + // * ERRORED // - // * STOPPED: A stopped condition. + // * STOPPED Result *string `locationName:"result" type:"string" enum:"ExecutionResult"` // The suite's start time. @@ -15373,23 +17245,23 @@ type Suite struct { // // Allowed values include: // - // * PENDING: A pending status. + // * PENDING // - // * PENDING_CONCURRENCY: A pending concurrency status. + // * PENDING_CONCURRENCY // - // * PENDING_DEVICE: A pending device status. + // * PENDING_DEVICE // - // * PROCESSING: A processing status. + // * PROCESSING // - // * SCHEDULING: A scheduling status. + // * SCHEDULING // - // * PREPARING: A preparing status. + // * PREPARING // - // * RUNNING: A running status. + // * RUNNING // - // * COMPLETED: A completed status. + // * COMPLETED // - // * STOPPING: A stopping status. + // * STOPPING Status *string `locationName:"status" type:"string" enum:"ExecutionStatus"` // The suite's stop time. @@ -15399,43 +17271,43 @@ type Suite struct { // // Must be one of the following values: // - // * BUILTIN_FUZZ: The built-in fuzz type. + // * BUILTIN_FUZZ // - // * BUILTIN_EXPLORER: For Android, an app explorer that will traverse an - // Android app, interacting with it and capturing screenshots at the same + // * BUILTIN_EXPLORER Only available for Android; an app explorer that traverses + // an Android app, interacting with it and capturing screenshots at the same // time. // - // * APPIUM_JAVA_JUNIT: The Appium Java JUnit type. + // * APPIUM_JAVA_JUNIT // - // * APPIUM_JAVA_TESTNG: The Appium Java TestNG type. + // * APPIUM_JAVA_TESTNG // - // * APPIUM_PYTHON: The Appium Python type. + // * APPIUM_PYTHON // - // * APPIUM_NODE: The Appium Node.js type. + // * APPIUM_NODE // - // * APPIUM_RUBY: The Appium Ruby type. + // * APPIUM_RUBY // - // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for web apps. + // * APPIUM_WEB_JAVA_JUNIT // - // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for web apps. + // * APPIUM_WEB_JAVA_TESTNG // - // * APPIUM_WEB_PYTHON: The Appium Python type for web apps. + // * APPIUM_WEB_PYTHON // - // * APPIUM_WEB_NODE: The Appium Node.js type for web apps. + // * APPIUM_WEB_NODE // - // * APPIUM_WEB_RUBY: The Appium Ruby type for web apps. + // * APPIUM_WEB_RUBY // - // * CALABASH: The Calabash type. + // * CALABASH // - // * INSTRUMENTATION: The Instrumentation type. + // * INSTRUMENTATION // - // * UIAUTOMATION: The uiautomation type. + // * UIAUTOMATION // - // * UIAUTOMATOR: The uiautomator type. + // * UIAUTOMATOR // - // * XCTEST: The Xcode test type. + // * XCTEST // - // * XCTEST_UI: The Xcode UI test type. + // * XCTEST_UI Type *string `locationName:"type" type:"string" enum:"TestType"` } @@ -15517,19 +17389,19 @@ func (s *Suite) SetType(v string) *Suite { // The metadata that you apply to a resource to help you categorize and organize // it. Each tag consists of a key and an optional value, both of which you define. -// Tag keys can have a maximum character length of 128 characters, and tag values +// Tag keys can have a maximum character length of 128 characters. Tag values // can have a maximum length of 256 characters. type Tag struct { _ struct{} `type:"structure"` - // One part of a key-value pair that make up a tag. A key is a general label + // One part of a key-value pair that makes up a tag. A key is a general label // that acts like a category for more specific tag values. // // Key is a required field Key *string `min:"1" type:"string" required:"true"` - // The optional part of a key-value pair that make up a tag. A value acts as - // a descriptor within a tag category (key). + // The optional part of a key-value pair that makes up a tag. A value acts as + // a descriptor in a tag category (key). // // Value is a required field Value *string `type:"string" required:"true"` @@ -15579,17 +17451,17 @@ func (s *Tag) SetValue(v string) *Tag { type TagResourceInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the resource(s) to which to add tags. You - // can associate tags with the following Device Farm resources: PROJECT, RUN, - // NETWORK_PROFILE, INSTANCE_PROFILE, DEVICE_INSTANCE, SESSION, DEVICE_POOL, + // The Amazon Resource Name (ARN) of the resource or resources to which to add + // tags. You can associate tags with the following Device Farm resources: PROJECT, + // RUN, NETWORK_PROFILE, INSTANCE_PROFILE, DEVICE_INSTANCE, SESSION, DEVICE_POOL, // DEVICE, and VPCE_CONFIGURATION. // // ResourceARN is a required field ResourceARN *string `min:"32" type:"string" required:"true"` // The tags to add to the resource. A tag is an array of key-value pairs. Tag - // keys can have a maximum character length of 128 characters, and tag values - // can have a maximum length of 256 characters. + // keys can have a maximum character length of 128 characters. Tag values can + // have a maximum length of 256 characters. // // Tags is a required field Tags []*Tag `type:"list" required:"true"` @@ -15686,19 +17558,19 @@ type Test struct { // // Allowed values include: // - // * PENDING: A pending condition. + // * PENDING // - // * PASSED: A passing condition. + // * PASSED // - // * WARNED: A warning condition. + // * WARNED // - // * FAILED: A failed condition. + // * FAILED // - // * SKIPPED: A skipped condition. + // * SKIPPED // - // * ERRORED: An error condition. + // * ERRORED // - // * STOPPED: A stopped condition. + // * STOPPED Result *string `locationName:"result" type:"string" enum:"ExecutionResult"` // The test's start time. @@ -15708,23 +17580,23 @@ type Test struct { // // Allowed values include: // - // * PENDING: A pending status. + // * PENDING // - // * PENDING_CONCURRENCY: A pending concurrency status. + // * PENDING_CONCURRENCY // - // * PENDING_DEVICE: A pending device status. + // * PENDING_DEVICE // - // * PROCESSING: A processing status. + // * PROCESSING // - // * SCHEDULING: A scheduling status. + // * SCHEDULING // - // * PREPARING: A preparing status. + // * PREPARING // - // * RUNNING: A running status. + // * RUNNING // - // * COMPLETED: A completed status. + // * COMPLETED // - // * STOPPING: A stopping status. + // * STOPPING Status *string `locationName:"status" type:"string" enum:"ExecutionStatus"` // The test's stop time. @@ -15734,43 +17606,42 @@ type Test struct { // // Must be one of the following values: // - // * BUILTIN_FUZZ: The built-in fuzz type. + // * BUILTIN_FUZZ // - // * BUILTIN_EXPLORER: For Android, an app explorer that will traverse an - // Android app, interacting with it and capturing screenshots at the same - // time. + // * BUILTIN_EXPLORER For Android, an app explorer that traverses an Android + // app, interacting with it and capturing screenshots at the same time. // - // * APPIUM_JAVA_JUNIT: The Appium Java JUnit type. + // * APPIUM_JAVA_JUNIT // - // * APPIUM_JAVA_TESTNG: The Appium Java TestNG type. + // * APPIUM_JAVA_TESTNG // - // * APPIUM_PYTHON: The Appium Python type. + // * APPIUM_PYTHON // - // * APPIUM_NODE: The Appium Node.js type. + // * APPIUM_NODE // - // * APPIUM_RUBY: The Appium Ruby type. + // * APPIUM_RUBY // - // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for web apps. + // * APPIUM_WEB_JAVA_JUNIT // - // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for web apps. + // * APPIUM_WEB_JAVA_TESTNG // - // * APPIUM_WEB_PYTHON: The Appium Python type for web apps. + // * APPIUM_WEB_PYTHON // - // * APPIUM_WEB_NODE: The Appium Node.js type for web apps. + // * APPIUM_WEB_NODE // - // * APPIUM_WEB_RUBY: The Appium Ruby type for web apps. + // * APPIUM_WEB_RUBY // - // * CALABASH: The Calabash type. + // * CALABASH // - // * INSTRUMENTATION: The Instrumentation type. + // * INSTRUMENTATION // - // * UIAUTOMATION: The uiautomation type. + // * UIAUTOMATION // - // * UIAUTOMATOR: The uiautomator type. + // * UIAUTOMATOR // - // * XCTEST: The Xcode test type. + // * XCTEST // - // * XCTEST_UI: The Xcode UI test type. + // * XCTEST_UI Type *string `locationName:"type" type:"string" enum:"TestType"` } @@ -15850,6 +17721,233 @@ func (s *Test) SetType(v string) *Test { return s } +// A Selenium testing project. Projects are used to collect and collate sessions. +type TestGridProject struct { + _ struct{} `type:"structure"` + + // The ARN for the project. + Arn *string `locationName:"arn" min:"32" type:"string"` + + // When the project was created. + Created *time.Time `locationName:"created" type:"timestamp"` + + // A human-readable description for the project. + Description *string `locationName:"description" type:"string"` + + // A human-readable name for the project. + Name *string `locationName:"name" type:"string"` +} + +// String returns the string representation +func (s TestGridProject) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TestGridProject) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *TestGridProject) SetArn(v string) *TestGridProject { + s.Arn = &v + return s +} + +// SetCreated sets the Created field's value. +func (s *TestGridProject) SetCreated(v time.Time) *TestGridProject { + s.Created = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *TestGridProject) SetDescription(v string) *TestGridProject { + s.Description = &v + return s +} + +// SetName sets the Name field's value. +func (s *TestGridProject) SetName(v string) *TestGridProject { + s.Name = &v + return s +} + +// A TestGridSession is a single instance of a browser launched from the URL +// provided by a call to CreateTestGridUrl. +type TestGridSession struct { + _ struct{} `type:"structure"` + + // The ARN of the session. + Arn *string `locationName:"arn" min:"32" type:"string"` + + // The number of billed minutes that were used for this session. + BillingMinutes *float64 `locationName:"billingMinutes" type:"double"` + + // The time that the session was started. + Created *time.Time `locationName:"created" type:"timestamp"` + + // The time the session ended. + Ended *time.Time `locationName:"ended" type:"timestamp"` + + // A JSON object of options and parameters passed to the Selenium WebDriver. + SeleniumProperties *string `locationName:"seleniumProperties" type:"string"` + + // The state of the session. + Status *string `locationName:"status" type:"string" enum:"TestGridSessionStatus"` +} + +// String returns the string representation +func (s TestGridSession) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TestGridSession) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *TestGridSession) SetArn(v string) *TestGridSession { + s.Arn = &v + return s +} + +// SetBillingMinutes sets the BillingMinutes field's value. +func (s *TestGridSession) SetBillingMinutes(v float64) *TestGridSession { + s.BillingMinutes = &v + return s +} + +// SetCreated sets the Created field's value. +func (s *TestGridSession) SetCreated(v time.Time) *TestGridSession { + s.Created = &v + return s +} + +// SetEnded sets the Ended field's value. +func (s *TestGridSession) SetEnded(v time.Time) *TestGridSession { + s.Ended = &v + return s +} + +// SetSeleniumProperties sets the SeleniumProperties field's value. +func (s *TestGridSession) SetSeleniumProperties(v string) *TestGridSession { + s.SeleniumProperties = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *TestGridSession) SetStatus(v string) *TestGridSession { + s.Status = &v + return s +} + +// An action taken by a TestGridSession browser instance. +type TestGridSessionAction struct { + _ struct{} `type:"structure"` + + // The action taken by the session. + Action *string `locationName:"action" type:"string"` + + // The time, in milliseconds, that the action took to complete in the browser. + Duration *int64 `locationName:"duration" type:"long"` + + // HTTP method that the browser used to make the request. + RequestMethod *string `locationName:"requestMethod" type:"string"` + + // The time that the session invoked the action. + Started *time.Time `locationName:"started" type:"timestamp"` + + // HTTP status code returned to the browser when the action was taken. + StatusCode *string `locationName:"statusCode" type:"string"` +} + +// String returns the string representation +func (s TestGridSessionAction) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TestGridSessionAction) GoString() string { + return s.String() +} + +// SetAction sets the Action field's value. +func (s *TestGridSessionAction) SetAction(v string) *TestGridSessionAction { + s.Action = &v + return s +} + +// SetDuration sets the Duration field's value. +func (s *TestGridSessionAction) SetDuration(v int64) *TestGridSessionAction { + s.Duration = &v + return s +} + +// SetRequestMethod sets the RequestMethod field's value. +func (s *TestGridSessionAction) SetRequestMethod(v string) *TestGridSessionAction { + s.RequestMethod = &v + return s +} + +// SetStarted sets the Started field's value. +func (s *TestGridSessionAction) SetStarted(v time.Time) *TestGridSessionAction { + s.Started = &v + return s +} + +// SetStatusCode sets the StatusCode field's value. +func (s *TestGridSessionAction) SetStatusCode(v string) *TestGridSessionAction { + s.StatusCode = &v + return s +} + +// Artifacts are video and other files that are produced in the process of running +// a browser in an automated context. +// +// Video elements might be broken up into multiple artifacts as they grow in +// size during creation. +type TestGridSessionArtifact struct { + _ struct{} `type:"structure"` + + // The file name of the artifact. + Filename *string `locationName:"filename" type:"string"` + + // The kind of artifact. + Type *string `locationName:"type" type:"string" enum:"TestGridSessionArtifactType"` + + // A semi-stable URL to the content of the object. + Url *string `locationName:"url" type:"string"` +} + +// String returns the string representation +func (s TestGridSessionArtifact) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TestGridSessionArtifact) GoString() string { + return s.String() +} + +// SetFilename sets the Filename field's value. +func (s *TestGridSessionArtifact) SetFilename(v string) *TestGridSessionArtifact { + s.Filename = &v + return s +} + +// SetType sets the Type field's value. +func (s *TestGridSessionArtifact) SetType(v string) *TestGridSessionArtifact { + s.Type = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *TestGridSessionArtifact) SetUrl(v string) *TestGridSessionArtifact { + s.Url = &v + return s +} + // Represents information about free trial device minutes for an AWS account. type TrialMinutes struct { _ struct{} `type:"structure"` @@ -15919,10 +18017,10 @@ func (s *UniqueProblem) SetProblems(v []*Problem) *UniqueProblem { type UntagResourceInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the resource(s) from which to delete tags. - // You can associate tags with the following Device Farm resources: PROJECT, - // RUN, NETWORK_PROFILE, INSTANCE_PROFILE, DEVICE_INSTANCE, SESSION, DEVICE_POOL, - // DEVICE, and VPCE_CONFIGURATION. + // The Amazon Resource Name (ARN) of the resource or resources from which to + // delete tags. You can associate tags with the following Device Farm resources: + // PROJECT, RUN, NETWORK_PROFILE, INSTANCE_PROFILE, DEVICE_INSTANCE, SESSION, + // DEVICE_POOL, DEVICE, and VPCE_CONFIGURATION. // // ResourceARN is a required field ResourceARN *string `min:"32" type:"string" required:"true"` @@ -15999,8 +18097,7 @@ type UpdateDeviceInstanceInput struct { // An array of strings that you want to associate with the device instance. Labels []*string `locationName:"labels" type:"list"` - // The Amazon Resource Name (ARN) of the profile that you want to associate - // with the device instance. + // The ARN of the profile that you want to associate with the device instance. ProfileArn *string `locationName:"profileArn" min:"32" type:"string"` } @@ -16054,7 +18151,7 @@ func (s *UpdateDeviceInstanceInput) SetProfileArn(v string) *UpdateDeviceInstanc type UpdateDeviceInstanceOutput struct { _ struct{} `type:"structure"` - // An object containing information about your device instance. + // An object that contains information about your device instance. DeviceInstance *DeviceInstance `locationName:"deviceInstance" type:"structure"` } @@ -16078,8 +18175,7 @@ func (s *UpdateDeviceInstanceOutput) SetDeviceInstance(v *DeviceInstance) *Updat type UpdateDevicePoolInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the Device Farm device pool you wish to - // update. + // The Amazon Resource Name (ARN) of the Device Farm device pool to update. // // Arn is a required field Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` @@ -16088,13 +18184,13 @@ type UpdateDevicePoolInput struct { // set this parameter to true, the maxDevices parameter does not apply, and // Device Farm does not limit the number of devices that it adds to your device // pool. In this case, Device Farm adds all available devices that meet the - // criteria that are specified for the rules parameter. + // criteria specified in the rules parameter. // // If you use this parameter in your request, you cannot use the maxDevices // parameter in the same request. ClearMaxDevices *bool `locationName:"clearMaxDevices" type:"boolean"` - // A description of the device pool you wish to update. + // A description of the device pool to update. Description *string `locationName:"description" type:"string"` // The number of devices that Device Farm can add to your device pool. Device @@ -16110,12 +18206,11 @@ type UpdateDevicePoolInput struct { // parameter in the same request. MaxDevices *int64 `locationName:"maxDevices" type:"integer"` - // A string representing the name of the device pool you wish to update. + // A string that represents the name of the device pool to update. Name *string `locationName:"name" type:"string"` - // Represents the rules you wish to modify for the device pool. Updating rules - // is optional; however, if you choose to update rules for your request, the - // update will replace the existing rules. + // Represents the rules to modify for the device pool. Updating rules is optional. + // If you update rules for your request, the update replaces the existing rules. Rules []*Rule `locationName:"rules" type:"list"` } @@ -16216,8 +18311,8 @@ type UpdateInstanceProfileInput struct { // The updated description for your instance profile. Description *string `locationName:"description" type:"string"` - // An array of strings specifying the list of app packages that should not be - // cleaned up from the device after a test run is over. + // An array of strings that specifies the list of app packages that should not + // be cleaned up from the device after a test run is over. // // The list of packages is only considered if you set packageCleanup to true. ExcludeAppPackagesFromCleanup []*string `locationName:"excludeAppPackagesFromCleanup" type:"list"` @@ -16299,7 +18394,7 @@ func (s *UpdateInstanceProfileInput) SetRebootAfterUse(v bool) *UpdateInstancePr type UpdateInstanceProfileOutput struct { _ struct{} `type:"structure"` - // An object containing information about your instance profile. + // An object that contains information about your instance profile. InstanceProfile *InstanceProfile `locationName:"instanceProfile" type:"structure"` } @@ -16348,8 +18443,8 @@ type UpdateNetworkProfileInput struct { // The name of the network profile about which you are returning information. Name *string `locationName:"name" type:"string"` - // The type of network profile you wish to return information about. Valid values - // are listed below. + // The type of network profile to return information about. Valid values are + // listed here. Type *string `locationName:"type" type:"string" enum:"NetworkProfileType"` // The data throughput rate in bits per second, as an integer from 0 to 104857600. @@ -16492,16 +18587,16 @@ func (s *UpdateNetworkProfileOutput) SetNetworkProfile(v *NetworkProfile) *Updat type UpdateProjectInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the project whose name you wish to update. + // The Amazon Resource Name (ARN) of the project whose name to update. // // Arn is a required field Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` - // The number of minutes a test run in the project will execute before it times + // The number of minutes a test run in the project executes before it times // out. DefaultJobTimeoutMinutes *int64 `locationName:"defaultJobTimeoutMinutes" type:"integer"` - // A string representing the new name of the project that you are updating. + // A string that represents the new name of the project that you are updating. Name *string `locationName:"name" type:"string"` } @@ -16553,7 +18648,7 @@ func (s *UpdateProjectInput) SetName(v string) *UpdateProjectInput { type UpdateProjectOutput struct { _ struct{} `type:"structure"` - // The project you wish to update. + // The project to update. Project *Project `locationName:"project" type:"structure"` } @@ -16573,6 +18668,94 @@ func (s *UpdateProjectOutput) SetProject(v *Project) *UpdateProjectOutput { return s } +type UpdateTestGridProjectInput struct { + _ struct{} `type:"structure"` + + // Human-readable description for the project. + Description *string `locationName:"description" min:"1" type:"string"` + + // Human-readable name for the project. + Name *string `locationName:"name" min:"1" type:"string"` + + // ARN of the project to update. + // + // ProjectArn is a required field + ProjectArn *string `locationName:"projectArn" min:"32" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateTestGridProjectInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateTestGridProjectInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateTestGridProjectInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateTestGridProjectInput"} + if s.Description != nil && len(*s.Description) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Description", 1)) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.ProjectArn == nil { + invalidParams.Add(request.NewErrParamRequired("ProjectArn")) + } + if s.ProjectArn != nil && len(*s.ProjectArn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("ProjectArn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *UpdateTestGridProjectInput) SetDescription(v string) *UpdateTestGridProjectInput { + s.Description = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateTestGridProjectInput) SetName(v string) *UpdateTestGridProjectInput { + s.Name = &v + return s +} + +// SetProjectArn sets the ProjectArn field's value. +func (s *UpdateTestGridProjectInput) SetProjectArn(v string) *UpdateTestGridProjectInput { + s.ProjectArn = &v + return s +} + +type UpdateTestGridProjectOutput struct { + _ struct{} `type:"structure"` + + // The project, including updated information. + TestGridProject *TestGridProject `locationName:"testGridProject" type:"structure"` +} + +// String returns the string representation +func (s UpdateTestGridProjectOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateTestGridProjectOutput) GoString() string { + return s.String() +} + +// SetTestGridProject sets the TestGridProject field's value. +func (s *UpdateTestGridProjectOutput) SetTestGridProject(v *TestGridProject) *UpdateTestGridProjectOutput { + s.TestGridProject = v + return s +} + type UpdateUploadInput struct { _ struct{} `type:"structure"` @@ -16581,15 +18764,15 @@ type UpdateUploadInput struct { // Arn is a required field Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` - // The upload's content type (for example, "application/x-yaml"). + // The upload's content type (for example, application/x-yaml). ContentType *string `locationName:"contentType" type:"string"` - // Set to true if the YAML file has changed and needs to be updated; otherwise, + // Set to true if the YAML file has changed and must be updated. Otherwise, // set to false. EditContent *bool `locationName:"editContent" type:"boolean"` - // The upload's test spec file name. The name should not contain the '/' character. - // The test spec file name must end with the .yaml or .yml file extension. + // The upload's test spec file name. The name must not contain any forward slashes + // (/). The test spec file name must end with the .yaml or .yml file extension. Name *string `locationName:"name" type:"string"` } @@ -16675,19 +18858,19 @@ type UpdateVPCEConfigurationInput struct { // Arn is a required field Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` - // The DNS (domain) name used to connect to your private service in your Amazon - // VPC. The DNS name must not already be in use on the Internet. + // The DNS (domain) name used to connect to your private service in your VPC. + // The DNS name must not already be in use on the internet. ServiceDnsName *string `locationName:"serviceDnsName" type:"string"` - // An optional description, providing more details about your VPC endpoint configuration. + // An optional description that provides details about your VPC endpoint configuration. VpceConfigurationDescription *string `locationName:"vpceConfigurationDescription" type:"string"` - // The friendly name you give to your VPC endpoint configuration, to manage - // your configurations more easily. + // The friendly name you give to your VPC endpoint configuration to manage your + // configurations more easily. VpceConfigurationName *string `locationName:"vpceConfigurationName" type:"string"` - // The name of the VPC endpoint service running inside your AWS account that - // you want Device Farm to test. + // The name of the VPC endpoint service running in your AWS account that you + // want Device Farm to test. VpceServiceName *string `locationName:"vpceServiceName" type:"string"` } @@ -16750,7 +18933,7 @@ func (s *UpdateVPCEConfigurationInput) SetVpceServiceName(v string) *UpdateVPCEC type UpdateVPCEConfigurationOutput struct { _ struct{} `type:"structure"` - // An object containing information about your VPC endpoint configuration. + // An object that contains information about your VPC endpoint configuration. VpceConfiguration *VPCEConfiguration `locationName:"vpceConfiguration" type:"structure"` } @@ -16784,7 +18967,7 @@ type Upload struct { // * PRIVATE: An upload managed by the AWS Device Farm customer. Category *string `locationName:"category" type:"string" enum:"UploadCategory"` - // The upload's content type (for example, "application/octet-stream"). + // The upload's content type (for example, application/octet-stream). ContentType *string `locationName:"contentType" type:"string"` // When the upload was created. @@ -16805,97 +18988,85 @@ type Upload struct { // // Must be one of the following values: // - // * FAILED: A failed status. + // * FAILED // - // * INITIALIZED: An initialized status. + // * INITIALIZED // - // * PROCESSING: A processing status. + // * PROCESSING // - // * SUCCEEDED: A succeeded status. + // * SUCCEEDED Status *string `locationName:"status" type:"string" enum:"UploadStatus"` // The upload's type. // // Must be one of the following values: // - // * ANDROID_APP: An Android upload. + // * ANDROID_APP // - // * IOS_APP: An iOS upload. + // * IOS_APP // - // * WEB_APP: A web application upload. + // * WEB_APP // - // * EXTERNAL_DATA: An external data upload. + // * EXTERNAL_DATA // - // * APPIUM_JAVA_JUNIT_TEST_PACKAGE: An Appium Java JUnit test package upload. + // * APPIUM_JAVA_JUNIT_TEST_PACKAGE // - // * APPIUM_JAVA_TESTNG_TEST_PACKAGE: An Appium Java TestNG test package - // upload. + // * APPIUM_JAVA_TESTNG_TEST_PACKAGE // - // * APPIUM_PYTHON_TEST_PACKAGE: An Appium Python test package upload. + // * APPIUM_PYTHON_TEST_PACKAGE // - // * APPIUM_NODE_TEST_PACKAGE: An Appium Node.js test package upload. + // * APPIUM_NODE_TEST_PACKAGE // - // * APPIUM_RUBY_TEST_PACKAGE: An Appium Ruby test package upload. + // * APPIUM_RUBY_TEST_PACKAGE // - // * APPIUM_WEB_JAVA_JUNIT_TEST_PACKAGE: An Appium Java JUnit test package - // upload for web apps. + // * APPIUM_WEB_JAVA_JUNIT_TEST_PACKAGE // - // * APPIUM_WEB_JAVA_TESTNG_TEST_PACKAGE: An Appium Java TestNG test package - // upload for web apps. + // * APPIUM_WEB_JAVA_TESTNG_TEST_PACKAGE // - // * APPIUM_WEB_PYTHON_TEST_PACKAGE: An Appium Python test package upload - // for web apps. + // * APPIUM_WEB_PYTHON_TEST_PACKAGE // - // * APPIUM_WEB_NODE_TEST_PACKAGE: An Appium Node.js test package upload - // for web apps. + // * APPIUM_WEB_NODE_TEST_PACKAGE // - // * APPIUM_WEB_RUBY_TEST_PACKAGE: An Appium Ruby test package upload for - // web apps. + // * APPIUM_WEB_RUBY_TEST_PACKAGE // - // * CALABASH_TEST_PACKAGE: A Calabash test package upload. + // * CALABASH_TEST_PACKAGE // - // * INSTRUMENTATION_TEST_PACKAGE: An instrumentation upload. + // * INSTRUMENTATION_TEST_PACKAGE // - // * UIAUTOMATION_TEST_PACKAGE: A uiautomation test package upload. + // * UIAUTOMATION_TEST_PACKAGE // - // * UIAUTOMATOR_TEST_PACKAGE: A uiautomator test package upload. + // * UIAUTOMATOR_TEST_PACKAGE // - // * XCTEST_TEST_PACKAGE: An Xcode test package upload. + // * XCTEST_TEST_PACKAGE // - // * XCTEST_UI_TEST_PACKAGE: An Xcode UI test package upload. + // * XCTEST_UI_TEST_PACKAGE // - // * APPIUM_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload. + // * APPIUM_JAVA_JUNIT_TEST_SPEC // - // * APPIUM_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload. + // * APPIUM_JAVA_TESTNG_TEST_SPEC // - // * APPIUM_PYTHON_TEST_SPEC: An Appium Python test spec upload. + // * APPIUM_PYTHON_TEST_SPEC // - // * APPIUM_NODE_TEST_SPEC: An Appium Node.js test spec upload. + // * APPIUM_NODE_TEST_SPEC // - // * APPIUM_RUBY_TEST_SPEC: An Appium Ruby test spec upload. + // * APPIUM_RUBY_TEST_SPEC // - // * APPIUM_WEB_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload - // for a web app. + // * APPIUM_WEB_JAVA_JUNIT_TEST_SPEC // - // * APPIUM_WEB_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload - // for a web app. + // * APPIUM_WEB_JAVA_TESTNG_TEST_SPEC // - // * APPIUM_WEB_PYTHON_TEST_SPEC: An Appium Python test spec upload for a - // web app. + // * APPIUM_WEB_PYTHON_TEST_SPEC // - // * APPIUM_WEB_NODE_TEST_SPEC: An Appium Node.js test spec upload for a - // web app. + // * APPIUM_WEB_NODE_TEST_SPEC // - // * APPIUM_WEB_RUBY_TEST_SPEC: An Appium Ruby test spec upload for a web - // app. + // * APPIUM_WEB_RUBY_TEST_SPEC // - // * INSTRUMENTATION_TEST_SPEC: An instrumentation test spec upload. + // * INSTRUMENTATION_TEST_SPEC // - // * XCTEST_UI_TEST_SPEC: An Xcode UI test spec upload. + // * XCTEST_UI_TEST_SPEC Type *string `locationName:"type" type:"string" enum:"UploadType"` - // The pre-signed Amazon S3 URL that was used to store a file through a corresponding - // PUT request. + // The presigned Amazon S3 URL that was used to store a file using a PUT request. Url *string `locationName:"url" type:"string"` } @@ -16980,15 +19151,15 @@ type VPCEConfiguration struct { // to access. ServiceDnsName *string `locationName:"serviceDnsName" type:"string"` - // An optional description, providing more details about your VPC endpoint configuration. + // An optional description that provides details about your VPC endpoint configuration. VpceConfigurationDescription *string `locationName:"vpceConfigurationDescription" type:"string"` - // The friendly name you give to your VPC endpoint configuration, to manage - // your configurations more easily. + // The friendly name you give to your VPC endpoint configuration to manage your + // configurations more easily. VpceConfigurationName *string `locationName:"vpceConfigurationName" type:"string"` - // The name of the VPC endpoint service running inside your AWS account that - // you want Device Farm to test. + // The name of the VPC endpoint service running in your AWS account that you + // want Device Farm to test. VpceServiceName *string `locationName:"vpceServiceName" type:"string"` } @@ -17452,6 +19623,36 @@ const ( SampleTypeOpenglMaxDrawtime = "OPENGL_MAX_DRAWTIME" ) +const ( + // TestGridSessionArtifactCategoryVideo is a TestGridSessionArtifactCategory enum value + TestGridSessionArtifactCategoryVideo = "VIDEO" + + // TestGridSessionArtifactCategoryLog is a TestGridSessionArtifactCategory enum value + TestGridSessionArtifactCategoryLog = "LOG" +) + +const ( + // TestGridSessionArtifactTypeUnknown is a TestGridSessionArtifactType enum value + TestGridSessionArtifactTypeUnknown = "UNKNOWN" + + // TestGridSessionArtifactTypeVideo is a TestGridSessionArtifactType enum value + TestGridSessionArtifactTypeVideo = "VIDEO" + + // TestGridSessionArtifactTypeSeleniumLog is a TestGridSessionArtifactType enum value + TestGridSessionArtifactTypeSeleniumLog = "SELENIUM_LOG" +) + +const ( + // TestGridSessionStatusActive is a TestGridSessionStatus enum value + TestGridSessionStatusActive = "ACTIVE" + + // TestGridSessionStatusClosed is a TestGridSessionStatus enum value + TestGridSessionStatusClosed = "CLOSED" + + // TestGridSessionStatusErrored is a TestGridSessionStatus enum value + TestGridSessionStatusErrored = "ERRORED" +) + const ( // TestTypeBuiltinFuzz is a TestType enum value TestTypeBuiltinFuzz = "BUILTIN_FUZZ" diff --git a/service/devicefarm/devicefarmiface/interface.go b/service/devicefarm/devicefarmiface/interface.go index 3cb087ebdc7..0d531c39399 100644 --- a/service/devicefarm/devicefarmiface/interface.go +++ b/service/devicefarm/devicefarmiface/interface.go @@ -80,6 +80,14 @@ type DeviceFarmAPI interface { CreateRemoteAccessSessionWithContext(aws.Context, *devicefarm.CreateRemoteAccessSessionInput, ...request.Option) (*devicefarm.CreateRemoteAccessSessionOutput, error) CreateRemoteAccessSessionRequest(*devicefarm.CreateRemoteAccessSessionInput) (*request.Request, *devicefarm.CreateRemoteAccessSessionOutput) + CreateTestGridProject(*devicefarm.CreateTestGridProjectInput) (*devicefarm.CreateTestGridProjectOutput, error) + CreateTestGridProjectWithContext(aws.Context, *devicefarm.CreateTestGridProjectInput, ...request.Option) (*devicefarm.CreateTestGridProjectOutput, error) + CreateTestGridProjectRequest(*devicefarm.CreateTestGridProjectInput) (*request.Request, *devicefarm.CreateTestGridProjectOutput) + + CreateTestGridUrl(*devicefarm.CreateTestGridUrlInput) (*devicefarm.CreateTestGridUrlOutput, error) + CreateTestGridUrlWithContext(aws.Context, *devicefarm.CreateTestGridUrlInput, ...request.Option) (*devicefarm.CreateTestGridUrlOutput, error) + CreateTestGridUrlRequest(*devicefarm.CreateTestGridUrlInput) (*request.Request, *devicefarm.CreateTestGridUrlOutput) + CreateUpload(*devicefarm.CreateUploadInput) (*devicefarm.CreateUploadOutput, error) CreateUploadWithContext(aws.Context, *devicefarm.CreateUploadInput, ...request.Option) (*devicefarm.CreateUploadOutput, error) CreateUploadRequest(*devicefarm.CreateUploadInput) (*request.Request, *devicefarm.CreateUploadOutput) @@ -112,6 +120,10 @@ type DeviceFarmAPI interface { DeleteRunWithContext(aws.Context, *devicefarm.DeleteRunInput, ...request.Option) (*devicefarm.DeleteRunOutput, error) DeleteRunRequest(*devicefarm.DeleteRunInput) (*request.Request, *devicefarm.DeleteRunOutput) + DeleteTestGridProject(*devicefarm.DeleteTestGridProjectInput) (*devicefarm.DeleteTestGridProjectOutput, error) + DeleteTestGridProjectWithContext(aws.Context, *devicefarm.DeleteTestGridProjectInput, ...request.Option) (*devicefarm.DeleteTestGridProjectOutput, error) + DeleteTestGridProjectRequest(*devicefarm.DeleteTestGridProjectInput) (*request.Request, *devicefarm.DeleteTestGridProjectOutput) + DeleteUpload(*devicefarm.DeleteUploadInput) (*devicefarm.DeleteUploadOutput, error) DeleteUploadWithContext(aws.Context, *devicefarm.DeleteUploadInput, ...request.Option) (*devicefarm.DeleteUploadOutput, error) DeleteUploadRequest(*devicefarm.DeleteUploadInput) (*request.Request, *devicefarm.DeleteUploadOutput) @@ -179,6 +191,14 @@ type DeviceFarmAPI interface { GetTestWithContext(aws.Context, *devicefarm.GetTestInput, ...request.Option) (*devicefarm.GetTestOutput, error) GetTestRequest(*devicefarm.GetTestInput) (*request.Request, *devicefarm.GetTestOutput) + GetTestGridProject(*devicefarm.GetTestGridProjectInput) (*devicefarm.GetTestGridProjectOutput, error) + GetTestGridProjectWithContext(aws.Context, *devicefarm.GetTestGridProjectInput, ...request.Option) (*devicefarm.GetTestGridProjectOutput, error) + GetTestGridProjectRequest(*devicefarm.GetTestGridProjectInput) (*request.Request, *devicefarm.GetTestGridProjectOutput) + + GetTestGridSession(*devicefarm.GetTestGridSessionInput) (*devicefarm.GetTestGridSessionOutput, error) + GetTestGridSessionWithContext(aws.Context, *devicefarm.GetTestGridSessionInput, ...request.Option) (*devicefarm.GetTestGridSessionOutput, error) + GetTestGridSessionRequest(*devicefarm.GetTestGridSessionInput) (*request.Request, *devicefarm.GetTestGridSessionOutput) + GetUpload(*devicefarm.GetUploadInput) (*devicefarm.GetUploadOutput, error) GetUploadWithContext(aws.Context, *devicefarm.GetUploadInput, ...request.Option) (*devicefarm.GetUploadOutput, error) GetUploadRequest(*devicefarm.GetUploadInput) (*request.Request, *devicefarm.GetUploadOutput) @@ -285,6 +305,34 @@ type DeviceFarmAPI interface { ListTagsForResourceWithContext(aws.Context, *devicefarm.ListTagsForResourceInput, ...request.Option) (*devicefarm.ListTagsForResourceOutput, error) ListTagsForResourceRequest(*devicefarm.ListTagsForResourceInput) (*request.Request, *devicefarm.ListTagsForResourceOutput) + ListTestGridProjects(*devicefarm.ListTestGridProjectsInput) (*devicefarm.ListTestGridProjectsOutput, error) + ListTestGridProjectsWithContext(aws.Context, *devicefarm.ListTestGridProjectsInput, ...request.Option) (*devicefarm.ListTestGridProjectsOutput, error) + ListTestGridProjectsRequest(*devicefarm.ListTestGridProjectsInput) (*request.Request, *devicefarm.ListTestGridProjectsOutput) + + ListTestGridProjectsPages(*devicefarm.ListTestGridProjectsInput, func(*devicefarm.ListTestGridProjectsOutput, bool) bool) error + ListTestGridProjectsPagesWithContext(aws.Context, *devicefarm.ListTestGridProjectsInput, func(*devicefarm.ListTestGridProjectsOutput, bool) bool, ...request.Option) error + + ListTestGridSessionActions(*devicefarm.ListTestGridSessionActionsInput) (*devicefarm.ListTestGridSessionActionsOutput, error) + ListTestGridSessionActionsWithContext(aws.Context, *devicefarm.ListTestGridSessionActionsInput, ...request.Option) (*devicefarm.ListTestGridSessionActionsOutput, error) + ListTestGridSessionActionsRequest(*devicefarm.ListTestGridSessionActionsInput) (*request.Request, *devicefarm.ListTestGridSessionActionsOutput) + + ListTestGridSessionActionsPages(*devicefarm.ListTestGridSessionActionsInput, func(*devicefarm.ListTestGridSessionActionsOutput, bool) bool) error + ListTestGridSessionActionsPagesWithContext(aws.Context, *devicefarm.ListTestGridSessionActionsInput, func(*devicefarm.ListTestGridSessionActionsOutput, bool) bool, ...request.Option) error + + ListTestGridSessionArtifacts(*devicefarm.ListTestGridSessionArtifactsInput) (*devicefarm.ListTestGridSessionArtifactsOutput, error) + ListTestGridSessionArtifactsWithContext(aws.Context, *devicefarm.ListTestGridSessionArtifactsInput, ...request.Option) (*devicefarm.ListTestGridSessionArtifactsOutput, error) + ListTestGridSessionArtifactsRequest(*devicefarm.ListTestGridSessionArtifactsInput) (*request.Request, *devicefarm.ListTestGridSessionArtifactsOutput) + + ListTestGridSessionArtifactsPages(*devicefarm.ListTestGridSessionArtifactsInput, func(*devicefarm.ListTestGridSessionArtifactsOutput, bool) bool) error + ListTestGridSessionArtifactsPagesWithContext(aws.Context, *devicefarm.ListTestGridSessionArtifactsInput, func(*devicefarm.ListTestGridSessionArtifactsOutput, bool) bool, ...request.Option) error + + ListTestGridSessions(*devicefarm.ListTestGridSessionsInput) (*devicefarm.ListTestGridSessionsOutput, error) + ListTestGridSessionsWithContext(aws.Context, *devicefarm.ListTestGridSessionsInput, ...request.Option) (*devicefarm.ListTestGridSessionsOutput, error) + ListTestGridSessionsRequest(*devicefarm.ListTestGridSessionsInput) (*request.Request, *devicefarm.ListTestGridSessionsOutput) + + ListTestGridSessionsPages(*devicefarm.ListTestGridSessionsInput, func(*devicefarm.ListTestGridSessionsOutput, bool) bool) error + ListTestGridSessionsPagesWithContext(aws.Context, *devicefarm.ListTestGridSessionsInput, func(*devicefarm.ListTestGridSessionsOutput, bool) bool, ...request.Option) error + ListTests(*devicefarm.ListTestsInput) (*devicefarm.ListTestsOutput, error) ListTestsWithContext(aws.Context, *devicefarm.ListTestsInput, ...request.Option) (*devicefarm.ListTestsOutput, error) ListTestsRequest(*devicefarm.ListTestsInput) (*request.Request, *devicefarm.ListTestsOutput) @@ -362,6 +410,10 @@ type DeviceFarmAPI interface { UpdateProjectWithContext(aws.Context, *devicefarm.UpdateProjectInput, ...request.Option) (*devicefarm.UpdateProjectOutput, error) UpdateProjectRequest(*devicefarm.UpdateProjectInput) (*request.Request, *devicefarm.UpdateProjectOutput) + UpdateTestGridProject(*devicefarm.UpdateTestGridProjectInput) (*devicefarm.UpdateTestGridProjectOutput, error) + UpdateTestGridProjectWithContext(aws.Context, *devicefarm.UpdateTestGridProjectInput, ...request.Option) (*devicefarm.UpdateTestGridProjectOutput, error) + UpdateTestGridProjectRequest(*devicefarm.UpdateTestGridProjectInput) (*request.Request, *devicefarm.UpdateTestGridProjectOutput) + UpdateUpload(*devicefarm.UpdateUploadInput) (*devicefarm.UpdateUploadOutput, error) UpdateUploadWithContext(aws.Context, *devicefarm.UpdateUploadInput, ...request.Option) (*devicefarm.UpdateUploadOutput, error) UpdateUploadRequest(*devicefarm.UpdateUploadInput) (*request.Request, *devicefarm.UpdateUploadOutput) diff --git a/service/devicefarm/doc.go b/service/devicefarm/doc.go index 35e8d6e4d4d..3c3881342d1 100644 --- a/service/devicefarm/doc.go +++ b/service/devicefarm/doc.go @@ -3,9 +3,17 @@ // 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. +// Welcome to the AWS Device Farm API documentation, which contains APIs for: +// +// * Testing on desktop browsers Device Farm makes it possible for you to +// test your web applications on desktop browsers using Selenium. The APIs +// for desktop browser testing contain TestGrid in their names. For more +// information, see Testing Web Applications on Selenium with Device Farm +// (https://docs.aws.amazon.com/devicefarm/latest/testgrid/). +// +// * Testing on real mobile devices Device Farm makes it possible for you +// to test apps on physical phones, tablets, and other devices in the cloud. +// For more information, see the Device Farm Developer Guide (https://docs.aws.amazon.com/devicefarm/latest/developerguide/). // // See https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23 for more information on this service. // diff --git a/service/devicefarm/errors.go b/service/devicefarm/errors.go index 4a479520cbe..8046bf9f1a6 100644 --- a/service/devicefarm/errors.go +++ b/service/devicefarm/errors.go @@ -10,12 +10,25 @@ const ( // An invalid argument was specified. ErrCodeArgumentException = "ArgumentException" + // ErrCodeCannotDeleteException for service response error code + // "CannotDeleteException". + // + // The requested object could not be deleted. + ErrCodeCannotDeleteException = "CannotDeleteException" + // ErrCodeIdempotencyException for service response error code // "IdempotencyException". // // An entity with the same name already exists. ErrCodeIdempotencyException = "IdempotencyException" + // ErrCodeInternalServiceException for service response error code + // "InternalServiceException". + // + // An internal exception was raised in the service. Contact aws-devicefarm-support@amazon.com + // (mailto:aws-devicefarm-support@amazon.com) if you see this error. + ErrCodeInternalServiceException = "InternalServiceException" + // ErrCodeInvalidOperationException for service response error code // "InvalidOperationException". // diff --git a/service/dlm/api.go b/service/dlm/api.go index cf90ee96048..415373a634a 100644 --- a/service/dlm/api.go +++ b/service/dlm/api.go @@ -897,6 +897,143 @@ func (s *CreateRule) SetTimes(v []*string) *CreateRule { return s } +// Specifies the retention rule for cross-Region snapshot copies. +type CrossRegionCopyRetainRule struct { + _ struct{} `type:"structure"` + + // The amount of time to retain each snapshot. The maximum is 100 years. This + // is equivalent to 1200 months, 5200 weeks, or 36500 days. + Interval *int64 `min:"1" type:"integer"` + + // The unit of time for time-based retention. + IntervalUnit *string `type:"string" enum:"RetentionIntervalUnitValues"` +} + +// String returns the string representation +func (s CrossRegionCopyRetainRule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CrossRegionCopyRetainRule) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CrossRegionCopyRetainRule) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CrossRegionCopyRetainRule"} + if s.Interval != nil && *s.Interval < 1 { + invalidParams.Add(request.NewErrParamMinValue("Interval", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInterval sets the Interval field's value. +func (s *CrossRegionCopyRetainRule) SetInterval(v int64) *CrossRegionCopyRetainRule { + s.Interval = &v + return s +} + +// SetIntervalUnit sets the IntervalUnit field's value. +func (s *CrossRegionCopyRetainRule) SetIntervalUnit(v string) *CrossRegionCopyRetainRule { + s.IntervalUnit = &v + return s +} + +// Specifies a rule for cross-Region snapshot copies. +type CrossRegionCopyRule struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the AWS KMS customer master key (CMK) to + // use for EBS encryption. If this parameter is not specified, your AWS managed + // CMK for EBS is used. + CmkArn *string `type:"string"` + + // Copy all user-defined tags from the source snapshot to the copied snapshot. + CopyTags *bool `type:"boolean"` + + // To encrypt a copy of an unencrypted snapshot if encryption by default is + // not enabled, enable encryption using this parameter. Copies of encrypted + // snapshots are encrypted, even if this parameter is false or if encryption + // by default is not enabled. + // + // Encrypted is a required field + Encrypted *bool `type:"boolean" required:"true"` + + // The retention rule. + RetainRule *CrossRegionCopyRetainRule `type:"structure"` + + // The target Region. + // + // TargetRegion is a required field + TargetRegion *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CrossRegionCopyRule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CrossRegionCopyRule) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CrossRegionCopyRule) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CrossRegionCopyRule"} + if s.Encrypted == nil { + invalidParams.Add(request.NewErrParamRequired("Encrypted")) + } + if s.TargetRegion == nil { + invalidParams.Add(request.NewErrParamRequired("TargetRegion")) + } + if s.RetainRule != nil { + if err := s.RetainRule.Validate(); err != nil { + invalidParams.AddNested("RetainRule", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCmkArn sets the CmkArn field's value. +func (s *CrossRegionCopyRule) SetCmkArn(v string) *CrossRegionCopyRule { + s.CmkArn = &v + return s +} + +// SetCopyTags sets the CopyTags field's value. +func (s *CrossRegionCopyRule) SetCopyTags(v bool) *CrossRegionCopyRule { + s.CopyTags = &v + return s +} + +// SetEncrypted sets the Encrypted field's value. +func (s *CrossRegionCopyRule) SetEncrypted(v bool) *CrossRegionCopyRule { + s.Encrypted = &v + return s +} + +// SetRetainRule sets the RetainRule field's value. +func (s *CrossRegionCopyRule) SetRetainRule(v *CrossRegionCopyRetainRule) *CrossRegionCopyRule { + s.RetainRule = v + return s +} + +// SetTargetRegion sets the TargetRegion field's value. +func (s *CrossRegionCopyRule) SetTargetRegion(v string) *CrossRegionCopyRule { + s.TargetRegion = &v + return s +} + type DeleteLifecyclePolicyInput struct { _ struct{} `type:"structure"` @@ -1614,10 +1751,13 @@ type Schedule struct { // created by this policy. CopyTags *bool `type:"boolean"` - // The create rule. + // The creation rule. CreateRule *CreateRule `type:"structure"` - // Enable fast snapshot restore. + // The rule for cross-Region snapshot copies. + CrossRegionCopyRules []*CrossRegionCopyRule `type:"list"` + + // The rule for enabling fast snapshot restore. FastRestoreRule *FastRestoreRule `type:"structure"` // The name of the schedule. @@ -1655,6 +1795,16 @@ func (s *Schedule) Validate() error { invalidParams.AddNested("CreateRule", err.(request.ErrInvalidParams)) } } + if s.CrossRegionCopyRules != nil { + for i, v := range s.CrossRegionCopyRules { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CrossRegionCopyRules", i), err.(request.ErrInvalidParams)) + } + } + } if s.FastRestoreRule != nil { if err := s.FastRestoreRule.Validate(); err != nil { invalidParams.AddNested("FastRestoreRule", err.(request.ErrInvalidParams)) @@ -1704,6 +1854,12 @@ func (s *Schedule) SetCreateRule(v *CreateRule) *Schedule { return s } +// SetCrossRegionCopyRules sets the CrossRegionCopyRules field's value. +func (s *Schedule) SetCrossRegionCopyRules(v []*CrossRegionCopyRule) *Schedule { + s.CrossRegionCopyRules = v + return s +} + // SetFastRestoreRule sets the FastRestoreRule field's value. func (s *Schedule) SetFastRestoreRule(v *FastRestoreRule) *Schedule { s.FastRestoreRule = v diff --git a/service/ec2/api.go b/service/ec2/api.go index 480ed3ab2f9..4084db94588 100644 --- a/service/ec2/api.go +++ b/service/ec2/api.go @@ -971,6 +971,9 @@ func (c *EC2) AssociateAddressRequest(input *AssociateAddressInput) (req *reques // an Elastic IP address with an instance or network interface that has an existing // Elastic IP address. // +// You cannot associate an Elastic IP address with an interface in a different +// network border group. +// // This is an idempotent operation. If you perform the operation more than once, // Amazon EC2 doesn't return an error, and you may be charged for each time // the Elastic IP address is remapped to the same instance. For more information, @@ -28697,9 +28700,10 @@ func (c *EC2) ModifyEbsDefaultKmsKeyIdRequest(input *ModifyEbsDefaultKmsKeyIdInp // for your account in this Region. // // AWS creates a unique AWS managed CMK in each Region for use with encryption -// by default. If you change the default CMK to a customer managed CMK, it is -// used instead of the AWS managed CMK. To reset the default CMK to the AWS -// managed CMK for EBS, use ResetEbsDefaultKmsKeyId. +// by default. If you change the default CMK to a symmetric customer managed +// CMK, it is used instead of the AWS managed CMK. To reset the default CMK +// to the AWS managed CMK for EBS, use ResetEbsDefaultKmsKeyId. Amazon EBS does +// not support asymmetric CMKs. // // If you delete or disable the customer managed CMK that you specified for // use with encryption by default, your instances will fail to launch. @@ -42392,11 +42396,11 @@ type CopyImageInput struct { // in the Amazon Elastic Compute Cloud User Guide. Encrypted *bool `locationName:"encrypted" type:"boolean"` - // An identifier for the AWS Key Management Service (AWS KMS) customer master - // key (CMK) to use when creating the encrypted volume. This parameter is only - // required if you want to use a non-default CMK; if this parameter is not specified, - // the default CMK for EBS is used. If a KmsKeyId is specified, the Encrypted - // flag must also be set. + // An identifier for the symmetric AWS Key Management Service (AWS KMS) customer + // master key (CMK) to use when creating the encrypted volume. This parameter + // is only required if you want to use a non-default CMK; if this parameter + // is not specified, the default CMK for EBS is used. If a KmsKeyId is specified, + // the Encrypted flag must also be set. // // To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, // or alias ARN. When using an alias name, prefix it with "alias/". For example: @@ -42415,6 +42419,8 @@ type CopyImageInput struct { // // The specified CMK must exist in the Region that the snapshot is being copied // to. + // + // Amazon EBS does not support asymmetric CMKs. KmsKeyId *string `locationName:"kmsKeyId" type:"string"` // The name of the new AMI in the destination Region. @@ -44808,6 +44814,9 @@ type CreateKeyPairOutput struct { // The name of the key pair. KeyName *string `locationName:"keyName" type:"string"` + + // The ID of the key pair. + KeyPairId *string `locationName:"keyPairId" type:"string"` } // String returns the string representation @@ -44838,6 +44847,12 @@ func (s *CreateKeyPairOutput) SetKeyName(v string) *CreateKeyPairOutput { return s } +// SetKeyPairId sets the KeyPairId field's value. +func (s *CreateKeyPairOutput) SetKeyPairId(v string) *CreateKeyPairOutput { + s.KeyPairId = &v + return s +} + type CreateLaunchTemplateInput struct { _ struct{} `type:"structure"` @@ -53430,6 +53445,8 @@ type DescribeAddressesInput struct { // * instance-id - The ID of the instance the address is associated with, // if any. // + // * network-border-group - The location from where the IP address is advertised. + // // * network-interface-id - [EC2-VPC] The ID of the network interface that // the address is associated with, if any. // @@ -55432,6 +55449,8 @@ type DescribeExportTasksInput struct { // The export task IDs. ExportTaskIds []*string `locationName:"exportTaskId" locationNameList:"ExportTaskId" type:"list"` + + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` } // String returns the string representation @@ -55450,6 +55469,12 @@ func (s *DescribeExportTasksInput) SetExportTaskIds(v []*string) *DescribeExport return s } +// SetFilters sets the Filters field's value. +func (s *DescribeExportTasksInput) SetFilters(v []*Filter) *DescribeExportTasksInput { + s.Filters = v + return s +} + type DescribeExportTasksOutput struct { _ struct{} `type:"structure"` @@ -58923,6 +58948,9 @@ type DescribeKeyPairsInput struct { // // Default: Describes all your key pairs. KeyNames []*string `locationName:"KeyName" locationNameList:"KeyName" type:"list"` + + // The IDs of the key pairs. + KeyPairIds []*string `locationName:"KeyPairId" locationNameList:"KeyPairId" type:"list"` } // String returns the string representation @@ -58953,6 +58981,12 @@ func (s *DescribeKeyPairsInput) SetKeyNames(v []*string) *DescribeKeyPairsInput return s } +// SetKeyPairIds sets the KeyPairIds field's value. +func (s *DescribeKeyPairsInput) SetKeyPairIds(v []*string) *DescribeKeyPairsInput { + s.KeyPairIds = v + return s +} + type DescribeKeyPairsOutput struct { _ struct{} `type:"structure"` @@ -60670,7 +60704,8 @@ type DescribeNetworkInterfacesInput struct { // The maximum number of items to return for this request. The request returns // a token that you can specify in a subsequent call to get the next set of - // results. + // results. You cannot specify this parameter and the network interface IDs + // parameter in the same request. MaxResults *int64 `min:"5" type:"integer"` // One or more network interface IDs. @@ -60788,6 +60823,9 @@ type DescribePlacementGroupsInput struct { // * strategy - The strategy of the placement group (cluster | spread | partition). Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + // The IDs of the placement groups. + GroupIds []*string `locationName:"GroupId" locationNameList:"GroupId" type:"list"` + // The names of the placement groups. // // Default: Describes all your placement groups, or only those otherwise specified. @@ -60816,6 +60854,12 @@ func (s *DescribePlacementGroupsInput) SetFilters(v []*Filter) *DescribePlacemen return s } +// SetGroupIds sets the GroupIds field's value. +func (s *DescribePlacementGroupsInput) SetGroupIds(v []*string) *DescribePlacementGroupsInput { + s.GroupIds = v + return s +} + // SetGroupNames sets the GroupNames field's value. func (s *DescribePlacementGroupsInput) SetGroupNames(v []*string) *DescribePlacementGroupsInput { s.GroupNames = v @@ -69489,7 +69533,10 @@ func (s *ElasticGpuHealth) SetStatus(v string) *ElasticGpuHealth { type ElasticGpuSpecification struct { _ struct{} `type:"structure"` - // The type of Elastic Graphics accelerator. + // The type of Elastic Graphics accelerator. For more information about the + // values to specify for Type, see Elastic Graphics Basics (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html#elastic-graphics-basics), + // specifically the Elastic Graphics accelerator column, in the Amazon Elastic + // Compute Cloud User Guide for Windows Instances. // // Type is a required field Type *string `type:"string" required:"true"` @@ -69569,6 +69616,9 @@ type ElasticGpus struct { // The ID of the instance to which the Elastic Graphics accelerator is attached. InstanceId *string `locationName:"instanceId" type:"string"` + + // The tags assigned to the Elastic Graphics accelerator. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` } // String returns the string representation @@ -69617,13 +69667,19 @@ func (s *ElasticGpus) SetInstanceId(v string) *ElasticGpus { return s } +// SetTags sets the Tags field's value. +func (s *ElasticGpus) SetTags(v []*Tag) *ElasticGpus { + s.Tags = v + return s +} + // Describes an elastic inference accelerator. type ElasticInferenceAccelerator struct { _ struct{} `type:"structure"` - // The number of elastic inference accelerators of given type to be attached - // to the instance. Only positive values allowed. If not specified defaults - // to 1. + // The number of elastic inference accelerators to attach to the instance. + // + // Default: 1 Count *int64 `min:"1" type:"integer"` // The type of elastic inference accelerator. The possible values are eia1.medium, @@ -71002,6 +71058,8 @@ type ExportTask struct { // The status message related to the export task. StatusMessage *string `locationName:"statusMessage" type:"string"` + + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` } // String returns the string representation @@ -71050,6 +71108,12 @@ func (s *ExportTask) SetStatusMessage(v string) *ExportTask { return s } +// SetTags sets the Tags field's value. +func (s *ExportTask) SetTags(v []*Tag) *ExportTask { + s.Tags = v + return s +} + // Describes the destination for an export image task. type ExportTaskS3Location struct { _ struct{} `type:"structure"` @@ -75595,11 +75659,11 @@ type ImportImageInput struct { // Valid values: xen Hypervisor *string `type:"string"` - // An identifier for the AWS Key Management Service (AWS KMS) customer master - // key (CMK) to use when creating the encrypted AMI. This parameter is only - // required if you want to use a non-default CMK; if this parameter is not specified, - // the default CMK for EBS is used. If a KmsKeyId is specified, the Encrypted - // flag must also be set. + // An identifier for the symmetric AWS Key Management Service (AWS KMS) customer + // master key (CMK) to use when creating the encrypted AMI. This parameter is + // only required if you want to use a non-default CMK; if this parameter is + // not specified, the default CMK for EBS is used. If a KmsKeyId is specified, + // the Encrypted flag must also be set. // // The CMK identifier may be provided in any of the following formats: // @@ -75622,6 +75686,8 @@ type ImportImageInput struct { // will eventually report failure. // // The specified CMK must exist in the Region that the AMI is being copied to. + // + // Amazon EBS does not support asymmetric CMKs. KmsKeyId *string `type:"string"` // The ARNs of the license configurations. @@ -75761,7 +75827,7 @@ func (s *ImportImageLicenseConfigurationRequest) SetLicenseConfigurationArn(v st return s } -// The response information of license configurations. +// The response information for license configurations. type ImportImageLicenseConfigurationResponse struct { _ struct{} `type:"structure"` @@ -75806,8 +75872,8 @@ type ImportImageOutput struct { // The task ID of the import image task. ImportTaskId *string `locationName:"importTaskId" type:"string"` - // The identifier for the AWS Key Management Service (AWS KMS) customer master - // key (CMK) that was used to create the encrypted AMI. + // The identifier for the symmetric AWS Key Management Service (AWS KMS) customer + // master key (CMK) that was used to create the encrypted AMI. KmsKeyId *string `locationName:"kmsKeyId" type:"string"` // The ARNs of the license configurations. @@ -75956,7 +76022,8 @@ type ImportImageTask struct { // key (CMK) that was used to create the encrypted image. KmsKeyId *string `locationName:"kmsKeyId" type:"string"` - // The ARNs of the license configurations associated to the import image task. + // The ARNs of the license configurations that are associated with the import + // image task. LicenseSpecifications []*ImportImageLicenseConfigurationResponse `locationName:"licenseSpecifications" locationNameList:"item" type:"list"` // The license type of the virtual machine. @@ -75976,6 +76043,9 @@ type ImportImageTask struct { // A descriptive status message for the import image task. StatusMessage *string `locationName:"statusMessage" type:"string"` + + // Any tags applied to the import image task. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` } // String returns the string representation @@ -76072,6 +76142,12 @@ func (s *ImportImageTask) SetStatusMessage(v string) *ImportImageTask { return s } +// SetTags sets the Tags field's value. +func (s *ImportImageTask) SetTags(v []*Tag) *ImportImageTask { + s.Tags = v + return s +} + type ImportInstanceInput struct { _ struct{} `type:"structure"` @@ -76555,10 +76631,10 @@ type ImportSnapshotInput struct { // in the Amazon Elastic Compute Cloud User Guide. Encrypted *bool `type:"boolean"` - // An identifier for the AWS Key Management Service (AWS KMS) customer master - // key (CMK) to use when creating the encrypted snapshot. This parameter is - // only required if you want to use a non-default CMK; if this parameter is - // not specified, the default CMK for EBS is used. If a KmsKeyId is specified, + // An identifier for the symmetric AWS Key Management Service (AWS KMS) customer + // master key (CMK) to use when creating the encrypted snapshot. This parameter + // is only required if you want to use a non-default CMK; if this parameter + // is not specified, the default CMK for EBS is used. If a KmsKeyId is specified, // the Encrypted flag must also be set. // // The CMK identifier may be provided in any of the following formats: @@ -76583,6 +76659,8 @@ type ImportSnapshotInput struct { // // The specified CMK must exist in the Region that the snapshot is being copied // to. + // + // Amazon EBS does not support asymmetric CMKs. KmsKeyId *string `type:"string"` // The name of the role to use when not using the default role, 'vmimport'. @@ -76700,6 +76778,9 @@ type ImportSnapshotTask struct { // Describes an import snapshot task. SnapshotTaskDetail *SnapshotTaskDetail `locationName:"snapshotTaskDetail" type:"structure"` + + // Any tags applied to the import snapshot task. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` } // String returns the string representation @@ -76730,6 +76811,12 @@ func (s *ImportSnapshotTask) SetSnapshotTaskDetail(v *SnapshotTaskDetail) *Impor return s } +// SetTags sets the Tags field's value. +func (s *ImportSnapshotTask) SetTags(v []*Tag) *ImportSnapshotTask { + s.Tags = v + return s +} + type ImportVolumeInput struct { _ struct{} `type:"structure"` @@ -78934,8 +79021,8 @@ type InstanceTypeInfo struct { // Describes the processor. ProcessorInfo *ProcessorInfo `locationName:"processorInfo" type:"structure"` - // Indicates the supported root devices. - SupportedRootDevices []*string `locationName:"supportedRootDevices" locationNameList:"item" type:"list"` + // Indicates the supported root device types. + SupportedRootDeviceTypes []*string `locationName:"supportedRootDeviceTypes" locationNameList:"item" type:"list"` // Indicates whether the instance type is offered for spot or On-Demand. SupportedUsageClasses []*string `locationName:"supportedUsageClasses" locationNameList:"item" type:"list"` @@ -79068,9 +79155,9 @@ func (s *InstanceTypeInfo) SetProcessorInfo(v *ProcessorInfo) *InstanceTypeInfo return s } -// SetSupportedRootDevices sets the SupportedRootDevices field's value. -func (s *InstanceTypeInfo) SetSupportedRootDevices(v []*string) *InstanceTypeInfo { - s.SupportedRootDevices = v +// SetSupportedRootDeviceTypes sets the SupportedRootDeviceTypes field's value. +func (s *InstanceTypeInfo) SetSupportedRootDeviceTypes(v []*string) *InstanceTypeInfo { + s.SupportedRootDeviceTypes = v return s } @@ -79354,7 +79441,7 @@ type IpRange struct { // range. // // Constraints: Up to 255 characters in length. Allowed characters are a-z, - // A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$* + // A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$* Description *string `locationName:"description" type:"string"` } @@ -79416,7 +79503,7 @@ type Ipv6Range struct { // range. // // Constraints: Up to 255 characters in length. Allowed characters are a-z, - // A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$* + // A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$* Description *string `locationName:"description" type:"string"` } @@ -79454,6 +79541,12 @@ type KeyPairInfo struct { // The name of the key pair. KeyName *string `locationName:"keyName" type:"string"` + + // The ID of the key pair. + KeyPairId *string `locationName:"keyPairId" type:"string"` + + // Any tags applied to the key pair. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` } // String returns the string representation @@ -79478,6 +79571,18 @@ func (s *KeyPairInfo) SetKeyName(v string) *KeyPairInfo { return s } +// SetKeyPairId sets the KeyPairId field's value. +func (s *KeyPairInfo) SetKeyPairId(v string) *KeyPairInfo { + s.KeyPairId = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *KeyPairInfo) SetTags(v []*Tag) *KeyPairInfo { + s.Tags = v + return s +} + // Describes a launch permission. type LaunchPermission struct { _ struct{} `type:"structure"` @@ -80229,7 +80334,8 @@ type LaunchTemplateEbsBlockDeviceRequest struct { // it is not used in requests to create gp2, st1, sc1, or standard volumes. Iops *int64 `type:"integer"` - // The ARN of the AWS Key Management Service (AWS KMS) CMK used for encryption. + // The ARN of the symmetric AWS Key Management Service (AWS KMS) CMK used for + // encryption. KmsKeyId *string `type:"string"` // The ID of the snapshot. @@ -80301,9 +80407,9 @@ func (s *LaunchTemplateEbsBlockDeviceRequest) SetVolumeType(v string) *LaunchTem type LaunchTemplateElasticInferenceAccelerator struct { _ struct{} `type:"structure"` - // The number of elastic inference accelerators of given type to be attached - // to the instance. Only positive values allowed. If not specified defaults - // to 1. + // The number of elastic inference accelerators to attach to the instance. + // + // Default: 1 Count *int64 `min:"1" type:"integer"` // The type of elastic inference accelerator. The possible values are eia1.medium, @@ -80355,9 +80461,9 @@ func (s *LaunchTemplateElasticInferenceAccelerator) SetType(v string) *LaunchTem type LaunchTemplateElasticInferenceAcceleratorResponse struct { _ struct{} `type:"structure"` - // The number of elastic inference accelerators of given type to be attached - // to the instance. Only positive values allowed. If not specified defaults - // to 1. + // The number of elastic inference accelerators to attach to the instance. + // + // Default: 1 Count *int64 `locationName:"count" type:"integer"` // The type of elastic inference accelerator. The possible values are eia1.medium, @@ -82506,6 +82612,8 @@ type ModifyEbsDefaultKmsKeyIdInput struct { // alias, or ARN that is not valid, the action can appear to complete, but eventually // fails. // + // Amazon EBS does not support asymmetric CMKs. + // // KmsKeyId is a required field KmsKeyId *string `type:"string" required:"true"` } @@ -85010,6 +85118,8 @@ type ModifyTransitGatewayVpcAttachmentInput struct { DryRun *bool `type:"boolean"` // The new VPC attachment options. + // + // You cannot modify the IPv6 options. Options *ModifyTransitGatewayVpcAttachmentRequestOptions `type:"structure"` // The IDs of one or more subnets to remove. @@ -87838,7 +87948,7 @@ type OnDemandOptions struct { AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"FleetOnDemandAllocationStrategy"` // The strategy for using unused Capacity Reservations for fulfilling On-Demand - // capacity. Only available for fleets of type instant. + // capacity. Supported only for fleets of type instant. CapacityReservationOptions *CapacityReservationOptions `locationName:"capacityReservationOptions" type:"structure"` // The maximum amount per hour for On-Demand Instances that you're willing to @@ -87850,11 +87960,11 @@ type OnDemandOptions struct { MinTargetCapacity *int64 `locationName:"minTargetCapacity" type:"integer"` // Indicates that the fleet launches all On-Demand Instances into a single Availability - // Zone. + // Zone. Supported only for fleets of type instant. SingleAvailabilityZone *bool `locationName:"singleAvailabilityZone" type:"boolean"` // Indicates that the fleet uses a single instance type to launch all On-Demand - // Instances in the fleet. + // Instances in the fleet. Supported only for fleets of type instant. SingleInstanceType *bool `locationName:"singleInstanceType" type:"boolean"` } @@ -87917,7 +88027,7 @@ type OnDemandOptionsRequest struct { AllocationStrategy *string `type:"string" enum:"FleetOnDemandAllocationStrategy"` // The strategy for using unused Capacity Reservations for fulfilling On-Demand - // capacity. Only available for fleets of type instant. + // capacity. Supported only for fleets of type instant. CapacityReservationOptions *CapacityReservationOptionsRequest `type:"structure"` // The maximum amount per hour for On-Demand Instances that you're willing to @@ -87929,11 +88039,11 @@ type OnDemandOptionsRequest struct { MinTargetCapacity *int64 `type:"integer"` // Indicates that the fleet launches all On-Demand Instances into a single Availability - // Zone. + // Zone. Supported only for fleets of type instant. SingleAvailabilityZone *bool `type:"boolean"` // Indicates that the fleet uses a single instance type to launch all On-Demand - // Instances in the fleet. + // Instances in the fleet. Supported only for fleets of type instant. SingleInstanceType *bool `type:"boolean"` } @@ -88591,6 +88701,9 @@ func (s *Placement) SetTenancy(v string) *Placement { type PlacementGroup struct { _ struct{} `type:"structure"` + // The ID of the placement group. + GroupId *string `locationName:"groupId" type:"string"` + // The name of the placement group. GroupName *string `locationName:"groupName" type:"string"` @@ -88602,6 +88715,9 @@ type PlacementGroup struct { // The placement strategy. Strategy *string `locationName:"strategy" type:"string" enum:"PlacementStrategy"` + + // Any tags applied to the placement group. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` } // String returns the string representation @@ -88614,6 +88730,12 @@ func (s PlacementGroup) GoString() string { return s.String() } +// SetGroupId sets the GroupId field's value. +func (s *PlacementGroup) SetGroupId(v string) *PlacementGroup { + s.GroupId = &v + return s +} + // SetGroupName sets the GroupName field's value. func (s *PlacementGroup) SetGroupName(v string) *PlacementGroup { s.GroupName = &v @@ -88638,6 +88760,12 @@ func (s *PlacementGroup) SetStrategy(v string) *PlacementGroup { return s } +// SetTags sets the Tags field's value. +func (s *PlacementGroup) SetTags(v []*Tag) *PlacementGroup { + s.Tags = v + return s +} + // Describes the placement group support of the instance type. type PlacementGroupInfo struct { _ struct{} `type:"structure"` @@ -99143,11 +99271,11 @@ type SpotOptions struct { MinTargetCapacity *int64 `locationName:"minTargetCapacity" type:"integer"` // Indicates that the fleet launches all Spot Instances into a single Availability - // Zone. + // Zone. Supported only for fleets of type instant. SingleAvailabilityZone *bool `locationName:"singleAvailabilityZone" type:"boolean"` // Indicates that the fleet uses a single instance type to launch all Spot Instances - // in the fleet. + // in the fleet. Supported only for fleets of type instant. SingleInstanceType *bool `locationName:"singleInstanceType" type:"boolean"` } @@ -99239,11 +99367,11 @@ type SpotOptionsRequest struct { MinTargetCapacity *int64 `type:"integer"` // Indicates that the fleet launches all Spot Instances into a single Availability - // Zone. + // Zone. Supported only for fleets of type instant. SingleAvailabilityZone *bool `type:"boolean"` // Indicates that the fleet uses a single instance type to launch all Spot Instances - // in the fleet. + // in the fleet. Supported only for fleets of type instant. SingleInstanceType *bool `type:"boolean"` } @@ -100267,9 +100395,10 @@ type TagSpecification struct { // The type of resource to tag. Currently, the resource types that support tagging // on creation are: capacity-reservation | client-vpn-endpoint | dedicated-host - // | fleet | fpga-image | instance | launch-template | snapshot | traffic-mirror-filter - // | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment - // | transit-gateway-route-table | volume. + // | fleet | fpga-image | instance | key-pair | launch-template | placement-group + // | snapshot | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target + // | transit-gateway | transit-gateway-attachment | transit-gateway-route-table + // | volume. // // To tag a resource after it has been created, see CreateTags (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html). ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` @@ -108284,6 +108413,9 @@ const ( // ResourceTypeInternetGateway is a ResourceType enum value ResourceTypeInternetGateway = "internet-gateway" + // ResourceTypeKeyPair is a ResourceType enum value + ResourceTypeKeyPair = "key-pair" + // ResourceTypeLaunchTemplate is a ResourceType enum value ResourceTypeLaunchTemplate = "launch-template" @@ -108296,6 +108428,9 @@ const ( // ResourceTypeNetworkInterface is a ResourceType enum value ResourceTypeNetworkInterface = "network-interface" + // ResourceTypePlacementGroup is a ResourceType enum value + ResourceTypePlacementGroup = "placement-group" + // ResourceTypeReservedInstances is a ResourceType enum value ResourceTypeReservedInstances = "reserved-instances" diff --git a/service/ecr/ecriface/interface.go b/service/ecr/ecriface/interface.go index 56ef985d421..b0163a22ce9 100644 --- a/service/ecr/ecriface/interface.go +++ b/service/ecr/ecriface/interface.go @@ -190,6 +190,12 @@ type ECRAPI interface { UploadLayerPart(*ecr.UploadLayerPartInput) (*ecr.UploadLayerPartOutput, error) UploadLayerPartWithContext(aws.Context, *ecr.UploadLayerPartInput, ...request.Option) (*ecr.UploadLayerPartOutput, error) UploadLayerPartRequest(*ecr.UploadLayerPartInput) (*request.Request, *ecr.UploadLayerPartOutput) + + WaitUntilImageScanComplete(*ecr.DescribeImageScanFindingsInput) error + WaitUntilImageScanCompleteWithContext(aws.Context, *ecr.DescribeImageScanFindingsInput, ...request.WaiterOption) error + + WaitUntilLifecyclePolicyPreviewComplete(*ecr.GetLifecyclePolicyPreviewInput) error + WaitUntilLifecyclePolicyPreviewCompleteWithContext(aws.Context, *ecr.GetLifecyclePolicyPreviewInput, ...request.WaiterOption) error } var _ ECRAPI = (*ecr.ECR)(nil) diff --git a/service/ecr/waiters.go b/service/ecr/waiters.go new file mode 100644 index 00000000000..4b6f88e4e15 --- /dev/null +++ b/service/ecr/waiters.go @@ -0,0 +1,112 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package ecr + +import ( + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" +) + +// WaitUntilImageScanComplete uses the Amazon ECR API operation +// DescribeImageScanFindings to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *ECR) WaitUntilImageScanComplete(input *DescribeImageScanFindingsInput) error { + return c.WaitUntilImageScanCompleteWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilImageScanCompleteWithContext is an extended version of WaitUntilImageScanComplete. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ECR) WaitUntilImageScanCompleteWithContext(ctx aws.Context, input *DescribeImageScanFindingsInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilImageScanComplete", + MaxAttempts: 60, + Delay: request.ConstantWaiterDelay(5 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.PathWaiterMatch, Argument: "imageScanStatus.status", + Expected: "COMPLETE", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathWaiterMatch, Argument: "imageScanStatus.status", + Expected: "FAILED", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeImageScanFindingsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeImageScanFindingsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} + +// WaitUntilLifecyclePolicyPreviewComplete uses the Amazon ECR API operation +// GetLifecyclePolicyPreview to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *ECR) WaitUntilLifecyclePolicyPreviewComplete(input *GetLifecyclePolicyPreviewInput) error { + return c.WaitUntilLifecyclePolicyPreviewCompleteWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilLifecyclePolicyPreviewCompleteWithContext is an extended version of WaitUntilLifecyclePolicyPreviewComplete. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ECR) WaitUntilLifecyclePolicyPreviewCompleteWithContext(ctx aws.Context, input *GetLifecyclePolicyPreviewInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilLifecyclePolicyPreviewComplete", + MaxAttempts: 20, + Delay: request.ConstantWaiterDelay(5 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.PathWaiterMatch, Argument: "status", + Expected: "COMPLETE", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathWaiterMatch, Argument: "status", + Expected: "FAILED", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *GetLifecyclePolicyPreviewInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetLifecyclePolicyPreviewRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} diff --git a/service/eks/api.go b/service/eks/api.go index 3ebb723b48d..2f7c262e920 100644 --- a/service/eks/api.go +++ b/service/eks/api.go @@ -200,27 +200,25 @@ func (c *EKS) CreateFargateProfileRequest(input *CreateFargateProfileInput) (req // CreateFargateProfile API operation for Amazon Elastic Kubernetes Service. // // Creates an AWS Fargate profile for your Amazon EKS cluster. You must have -// at least one Fargate profile in a cluster to be able to schedule pods on -// Fargate infrastructure. +// at least one Fargate profile in a cluster to be able to run pods on Fargate. // // The Fargate profile allows an administrator to declare which pods run on -// Fargate infrastructure and specify which pods run on which Fargate profile. -// This declaration is done through the profile’s selectors. Each profile -// can have up to five selectors that contain a namespace and labels. A namespace -// is required for every selector. The label field consists of multiple optional -// key-value pairs. Pods that match the selectors are scheduled on Fargate infrastructure. -// If a to-be-scheduled pod matches any of the selectors in the Fargate profile, -// then that pod is scheduled on Fargate infrastructure. +// Fargate and specify which pods run on which Fargate profile. This declaration +// is done through the profile’s selectors. Each profile can have up to five +// selectors that contain a namespace and labels. A namespace is required for +// every selector. The label field consists of multiple optional key-value pairs. +// Pods that match the selectors are scheduled on Fargate. If a to-be-scheduled +// pod matches any of the selectors in the Fargate profile, then that pod is +// run on Fargate. // // When you create a Fargate profile, you must specify a pod execution role // to use with the pods that are scheduled with the profile. This role is added // to the cluster's Kubernetes Role Based Access Control (https://kubernetes.io/docs/admin/authorization/rbac/) // (RBAC) for authorization so that the kubelet that is running on the Fargate -// infrastructure can register with your Amazon EKS cluster. This role is what -// allows Fargate infrastructure to appear in your cluster as nodes. The pod -// execution role also provides IAM permissions to the Fargate infrastructure -// to allow read access to Amazon ECR image repositories. For more information, -// see Pod Execution Role (https://docs.aws.amazon.com/eks/latest/userguide/pod-execution-role.html) +// infrastructure can register with your Amazon EKS cluster so that it can appear +// in your cluster as a node. The pod execution role also provides IAM permissions +// to the Fargate infrastructure to allow read access to Amazon ECR image repositories. +// For more information, see Pod Execution Role (https://docs.aws.amazon.com/eks/latest/userguide/pod-execution-role.html) // in the Amazon EKS User Guide. // // Fargate profiles are immutable. However, you can create a new updated profile @@ -550,11 +548,11 @@ func (c *EKS) DeleteFargateProfileRequest(input *DeleteFargateProfileInput) (req // // Deletes an AWS Fargate profile. // -// When you delete a Fargate profile, any pods that were scheduled onto Fargate -// infrastructure with the profile are deleted. If those pods match another -// Fargate profile, then they are scheduled on Fargate infrastructure with that -// profile. If they no longer match any Fargate profiles, then they are not -// scheduled on Fargate infrastructure. +// When you delete a Fargate profile, any pods running on Fargate that were +// created with the profile are deleted. If those pods match another Fargate +// profile, then they are scheduled on Fargate with that profile. If they no +// longer match any Fargate profiles, then they are not scheduled on Fargate +// and they may remain in a pending state. // // Only one Fargate profile in a cluster can be in the DELETING status at a // time. You must wait for a Fargate profile to finish deleting before you can @@ -2809,9 +2807,9 @@ type CreateFargateProfileInput struct { // for a namespace. You may specify up to five selectors in a Fargate profile. Selectors []*FargateProfileSelector `locationName:"selectors" type:"list"` - // The IDs of subnets to launch Fargate pods into. At this time, Fargate pods - // are not assigned public IP addresses, so only private subnets (with no direct - // route to an Internet Gateway) are accepted for this parameter. + // The IDs of subnets to launch your pods into. At this time, pods running on + // Fargate are not assigned public IP addresses, so only private subnets (with + // no direct route to an Internet Gateway) are accepted for this parameter. Subnets []*string `locationName:"subnets" type:"list"` // The metadata to apply to the Fargate profile to assist with categorization @@ -3775,8 +3773,8 @@ type FargateProfile struct { // The Amazon Resource Name (ARN) of the pod execution role to use for pods // that match the selectors in the Fargate profile. For more information, see - // Pod Execution Role (eks/latest/userguide/pod-execution-role.html) in the - // Amazon EKS User Guide. + // Pod Execution Role (https://docs.aws.amazon.com/eks/latest/userguide/pod-execution-role.html) + // in the Amazon EKS User Guide. PodExecutionRoleArn *string `locationName:"podExecutionRoleArn" type:"string"` // The selectors to match for pods to use this Fargate profile. @@ -3785,7 +3783,7 @@ type FargateProfile struct { // The current status of the Fargate profile. Status *string `locationName:"status" type:"string" enum:"FargateProfileStatus"` - // The IDs of subnets to launch Fargate pods into. + // The IDs of subnets to launch pods into. Subnets []*string `locationName:"subnets" type:"list"` // The metadata applied to the Fargate profile to assist with categorization @@ -5682,20 +5680,33 @@ type VpcConfigRequest struct { // API server endpoint. If you enable private access, Kubernetes API requests // from within your cluster's VPC use the private VPC endpoint. The default // value for this parameter is false, which disables private access for your - // Kubernetes API server. For more information, see Amazon EKS Cluster Endpoint - // Access Control (https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html) + // Kubernetes API server. If you disable private access and you have worker + // nodes or AWS Fargate pods in the cluster, then ensure that publicAccessCidrs + // includes the necessary CIDR blocks for communication with the worker nodes + // or Fargate pods. For more information, see Amazon EKS Cluster Endpoint Access + // Control (https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html) // in the Amazon EKS User Guide . EndpointPrivateAccess *bool `locationName:"endpointPrivateAccess" type:"boolean"` - // Set this value to false to disable public access for your cluster's Kubernetes + // Set this value to false to disable public access to your cluster's Kubernetes // API server endpoint. If you disable public access, your cluster's Kubernetes - // API server can receive only requests from within the cluster VPC. The default + // API server can only receive requests from within the cluster VPC. The default // value for this parameter is true, which enables public access for your Kubernetes // API server. For more information, see Amazon EKS Cluster Endpoint Access // Control (https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html) // in the Amazon EKS User Guide . EndpointPublicAccess *bool `locationName:"endpointPublicAccess" type:"boolean"` + // The CIDR blocks that are allowed access to your cluster's public Kubernetes + // API server endpoint. Communication to the endpoint from addresses outside + // of the CIDR blocks that you specify is denied. The default value is 0.0.0.0/0. + // If you've disabled private endpoint access and you have worker nodes or AWS + // Fargate pods in the cluster, then ensure that you specify the necessary CIDR + // blocks. For more information, see Amazon EKS Cluster Endpoint Access Control + // (https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html) + // in the Amazon EKS User Guide . + PublicAccessCidrs []*string `locationName:"publicAccessCidrs" type:"list"` + // Specify one or more security groups for the cross-account elastic network // interfaces that Amazon EKS creates to use to allow communication between // your worker nodes and the Kubernetes control plane. If you don't specify @@ -5730,6 +5741,12 @@ func (s *VpcConfigRequest) SetEndpointPublicAccess(v bool) *VpcConfigRequest { return s } +// SetPublicAccessCidrs sets the PublicAccessCidrs field's value. +func (s *VpcConfigRequest) SetPublicAccessCidrs(v []*string) *VpcConfigRequest { + s.PublicAccessCidrs = v + return s +} + // SetSecurityGroupIds sets the SecurityGroupIds field's value. func (s *VpcConfigRequest) SetSecurityGroupIds(v []*string) *VpcConfigRequest { s.SecurityGroupIds = v @@ -5754,15 +5771,29 @@ type VpcConfigResponse struct { // This parameter indicates whether the Amazon EKS private API server endpoint // is enabled. If the Amazon EKS private API server endpoint is enabled, Kubernetes // API requests that originate from within your cluster's VPC use the private - // VPC endpoint instead of traversing the internet. + // VPC endpoint instead of traversing the internet. If this value is disabled + // and you have worker nodes or AWS Fargate pods in the cluster, then ensure + // that publicAccessCidrs includes the necessary CIDR blocks for communication + // with the worker nodes or Fargate pods. For more information, see Amazon EKS + // Cluster Endpoint Access Control (https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html) + // in the Amazon EKS User Guide . EndpointPrivateAccess *bool `locationName:"endpointPrivateAccess" type:"boolean"` // This parameter indicates whether the Amazon EKS public API server endpoint // is enabled. If the Amazon EKS public API server endpoint is disabled, your - // cluster's Kubernetes API server can receive only requests that originate + // cluster's Kubernetes API server can only receive requests that originate // from within the cluster VPC. EndpointPublicAccess *bool `locationName:"endpointPublicAccess" type:"boolean"` + // The CIDR blocks that are allowed access to your cluster's public Kubernetes + // API server endpoint. Communication to the endpoint from addresses outside + // of the listed CIDR blocks is denied. The default value is 0.0.0.0/0. If you've + // disabled private endpoint access and you have worker nodes or AWS Fargate + // pods in the cluster, then ensure that the necessary CIDR blocks are listed. + // For more information, see Amazon EKS Cluster Endpoint Access Control (https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html) + // in the Amazon EKS User Guide . + PublicAccessCidrs []*string `locationName:"publicAccessCidrs" type:"list"` + // The security groups associated with the cross-account elastic network interfaces // that are used to allow communication between your worker nodes and the Kubernetes // control plane. @@ -5803,6 +5834,12 @@ func (s *VpcConfigResponse) SetEndpointPublicAccess(v bool) *VpcConfigResponse { return s } +// SetPublicAccessCidrs sets the PublicAccessCidrs field's value. +func (s *VpcConfigResponse) SetPublicAccessCidrs(v []*string) *VpcConfigResponse { + s.PublicAccessCidrs = v + return s +} + // SetSecurityGroupIds sets the SecurityGroupIds field's value. func (s *VpcConfigResponse) SetSecurityGroupIds(v []*string) *VpcConfigResponse { s.SecurityGroupIds = v @@ -6009,6 +6046,9 @@ const ( // UpdateParamTypeReleaseVersion is a UpdateParamType enum value UpdateParamTypeReleaseVersion = "ReleaseVersion" + + // UpdateParamTypePublicAccessCidrs is a UpdateParamType enum value + UpdateParamTypePublicAccessCidrs = "PublicAccessCidrs" ) const ( diff --git a/service/fsx/api.go b/service/fsx/api.go index 38830502d15..b86115c95fe 100644 --- a/service/fsx/api.go +++ b/service/fsx/api.go @@ -13,6 +13,107 @@ import ( "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) +const opCancelDataRepositoryTask = "CancelDataRepositoryTask" + +// CancelDataRepositoryTaskRequest generates a "aws/request.Request" representing the +// client's request for the CancelDataRepositoryTask operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CancelDataRepositoryTask for more information on using the CancelDataRepositoryTask +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CancelDataRepositoryTaskRequest method. +// req, resp := client.CancelDataRepositoryTaskRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/CancelDataRepositoryTask +func (c *FSx) CancelDataRepositoryTaskRequest(input *CancelDataRepositoryTaskInput) (req *request.Request, output *CancelDataRepositoryTaskOutput) { + op := &request.Operation{ + Name: opCancelDataRepositoryTask, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CancelDataRepositoryTaskInput{} + } + + output = &CancelDataRepositoryTaskOutput{} + req = c.newRequest(op, input, output) + return +} + +// CancelDataRepositoryTask API operation for Amazon FSx. +// +// Cancels an existing Amazon FSx for Lustre data repository task if that task +// is in either the PENDING or EXECUTING state. When you cancel a task, Amazon +// FSx does the following. +// +// * Any files that FSx has already exported are not reverted. +// +// * FSx continues to export any files that are "in-flight" when the cancel +// operation is received. +// +// * FSx does not export any files that have not yet been exported. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon FSx's +// API operation CancelDataRepositoryTask for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequest "BadRequest" +// A generic error indicating a failure with a client request. +// +// * ErrCodeUnsupportedOperation "UnsupportedOperation" +// The requested operation is not supported for this resource or API. +// +// * ErrCodeDataRepositoryTaskNotFound "DataRepositoryTaskNotFound" +// The data repository task or tasks you specified could not be found. +// +// * ErrCodeDataRepositoryTaskEnded "DataRepositoryTaskEnded" +// The data repository task could not be canceled because the task has already +// ended. +// +// * ErrCodeInternalServerError "InternalServerError" +// A generic error indicating a server-side failure. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/CancelDataRepositoryTask +func (c *FSx) CancelDataRepositoryTask(input *CancelDataRepositoryTaskInput) (*CancelDataRepositoryTaskOutput, error) { + req, out := c.CancelDataRepositoryTaskRequest(input) + return out, req.Send() +} + +// CancelDataRepositoryTaskWithContext is the same as CancelDataRepositoryTask with the addition of +// the ability to pass a context and additional request options. +// +// See CancelDataRepositoryTask for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FSx) CancelDataRepositoryTaskWithContext(ctx aws.Context, input *CancelDataRepositoryTaskInput, opts ...request.Option) (*CancelDataRepositoryTaskOutput, error) { + req, out := c.CancelDataRepositoryTaskRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateBackup = "CreateBackup" // CreateBackupRequest generates a "aws/request.Request" representing the @@ -97,7 +198,7 @@ func (c *FSx) CreateBackupRequest(input *CreateBackupInput) (req *request.Reques // A generic error indicating a failure with a client request. // // * ErrCodeUnsupportedOperation "UnsupportedOperation" -// An error occured. +// The requested operation is not supported for this resource or API. // // * ErrCodeFileSystemNotFound "FileSystemNotFound" // No Amazon FSx file systems were found based upon supplied parameters. @@ -140,6 +241,116 @@ func (c *FSx) CreateBackupWithContext(ctx aws.Context, input *CreateBackupInput, return out, req.Send() } +const opCreateDataRepositoryTask = "CreateDataRepositoryTask" + +// CreateDataRepositoryTaskRequest generates a "aws/request.Request" representing the +// client's request for the CreateDataRepositoryTask operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateDataRepositoryTask for more information on using the CreateDataRepositoryTask +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateDataRepositoryTaskRequest method. +// req, resp := client.CreateDataRepositoryTaskRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/CreateDataRepositoryTask +func (c *FSx) CreateDataRepositoryTaskRequest(input *CreateDataRepositoryTaskInput) (req *request.Request, output *CreateDataRepositoryTaskOutput) { + op := &request.Operation{ + Name: opCreateDataRepositoryTask, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateDataRepositoryTaskInput{} + } + + output = &CreateDataRepositoryTaskOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDataRepositoryTask API operation for Amazon FSx. +// +// Creates an Amazon FSx for Lustre data repository task. You use data repository +// tasks to perform bulk operations between your Amazon FSx file system and +// its linked data repository. An example of a data repository task is exporting +// any data and metadata changes, including POSIX metadata, to files, directories, +// and symbolic links (symlinks) from your FSx file system to its linked data +// repository. A CreateDataRepositoryTask operation will fail if a data repository +// is not linked to the FSx file system. To learn more about data repository +// tasks, see Using Data Repository Tasks (https://docs.aws.amazon.com/fsx/latest/LustreGuide/data-repository-tasks.html). +// To learn more about linking a data repository to your file system, see Step +// 1: Create Your Amazon FSx for Lustre File System (https://docs.aws.amazon.com/fsx/latest/LustreGuide/getting-started-step1.html). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon FSx's +// API operation CreateDataRepositoryTask for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequest "BadRequest" +// A generic error indicating a failure with a client request. +// +// * ErrCodeUnsupportedOperation "UnsupportedOperation" +// The requested operation is not supported for this resource or API. +// +// * ErrCodeFileSystemNotFound "FileSystemNotFound" +// No Amazon FSx file systems were found based upon supplied parameters. +// +// * ErrCodeIncompatibleParameterError "IncompatibleParameterError" +// The error returned when a second request is received with the same client +// request token but different parameters settings. A client request token should +// always uniquely identify a single request. +// +// * ErrCodeServiceLimitExceeded "ServiceLimitExceeded" +// An error indicating that a particular service limit was exceeded. You can +// increase some service limits by contacting AWS Support. +// +// * ErrCodeInternalServerError "InternalServerError" +// A generic error indicating a server-side failure. +// +// * ErrCodeDataRepositoryTaskExecuting "DataRepositoryTaskExecuting" +// An existing data repository task is currently executing on the file system. +// Wait until the existing task has completed, then create the new task. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/CreateDataRepositoryTask +func (c *FSx) CreateDataRepositoryTask(input *CreateDataRepositoryTaskInput) (*CreateDataRepositoryTaskOutput, error) { + req, out := c.CreateDataRepositoryTaskRequest(input) + return out, req.Send() +} + +// CreateDataRepositoryTaskWithContext is the same as CreateDataRepositoryTask with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDataRepositoryTask for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FSx) CreateDataRepositoryTaskWithContext(ctx aws.Context, input *CreateDataRepositoryTaskInput, opts ...request.Option) (*CreateDataRepositoryTaskOutput, error) { + req, out := c.CreateDataRepositoryTaskRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateFileSystem = "CreateFileSystem" // CreateFileSystemRequest generates a "aws/request.Request" representing the @@ -579,6 +790,9 @@ func (c *FSx) DeleteFileSystemRequest(input *DeleteFileSystemInput) (req *reques // the file system ID for a deleted file system, the DescribeFileSystems returns // a FileSystemNotFound error. // +// Deleting an Amazon FSx for Lustre file system will fail with a 400 BadRequest +// if a data repository task is in a PENDING or EXECUTING state. +// // The data in a deleted file system is also deleted and can't be recovered // by any means. // @@ -799,35 +1013,35 @@ func (c *FSx) DescribeBackupsPagesWithContext(ctx aws.Context, input *DescribeBa return p.Err() } -const opDescribeFileSystems = "DescribeFileSystems" +const opDescribeDataRepositoryTasks = "DescribeDataRepositoryTasks" -// DescribeFileSystemsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeFileSystems operation. The "output" return +// DescribeDataRepositoryTasksRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDataRepositoryTasks operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeFileSystems for more information on using the DescribeFileSystems +// See DescribeDataRepositoryTasks for more information on using the DescribeDataRepositoryTasks // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the DescribeFileSystemsRequest method. -// req, resp := client.DescribeFileSystemsRequest(params) +// // Example sending a request using the DescribeDataRepositoryTasksRequest method. +// req, resp := client.DescribeDataRepositoryTasksRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/DescribeFileSystems -func (c *FSx) DescribeFileSystemsRequest(input *DescribeFileSystemsInput) (req *request.Request, output *DescribeFileSystemsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/DescribeDataRepositoryTasks +func (c *FSx) DescribeDataRepositoryTasksRequest(input *DescribeDataRepositoryTasksInput) (req *request.Request, output *DescribeDataRepositoryTasksOutput) { op := &request.Operation{ - Name: opDescribeFileSystems, + Name: opDescribeDataRepositoryTasks, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ @@ -839,47 +1053,35 @@ func (c *FSx) DescribeFileSystemsRequest(input *DescribeFileSystemsInput) (req * } if input == nil { - input = &DescribeFileSystemsInput{} + input = &DescribeDataRepositoryTasksInput{} } - output = &DescribeFileSystemsOutput{} + output = &DescribeDataRepositoryTasksOutput{} req = c.newRequest(op, input, output) return } -// DescribeFileSystems API operation for Amazon FSx. -// -// Returns the description of specific Amazon FSx file systems, if a FileSystemIds -// value is provided for that file system. Otherwise, it returns descriptions -// of all file systems owned by your AWS account in the AWS Region of the endpoint -// that you're calling. -// -// When retrieving all file system descriptions, you can optionally specify -// the MaxResults parameter to limit the number of descriptions in a response. -// If more file system descriptions remain, Amazon FSx returns a NextToken value -// in the response. In this case, send a later request with the NextToken request -// parameter set to the value of NextToken from the last response. +// DescribeDataRepositoryTasks API operation for Amazon FSx. // -// This action is used in an iterative process to retrieve a list of your file -// system descriptions. DescribeFileSystems is called first without a NextTokenvalue. -// Then the action continues to be called with the NextToken parameter set to -// the value of the last NextToken value until a response has no NextToken. -// -// When using this action, keep the following in mind: -// -// * The implementation might return fewer than MaxResults file system descriptions -// while still including a NextToken value. +// Returns the description of specific Amazon FSx for Lustre data repository +// tasks, if one or more TaskIds values are provided in the request, or if filters +// are used in the request. You can use filters to narrow the response to include +// just tasks for specific file systems, or tasks in a specific lifecycle state. +// Otherwise, it returns all data repository tasks owned by your AWS account +// in the AWS Region of the endpoint that you're calling. // -// * The order of file systems returned in the response of one DescribeFileSystems -// call and the order of file systems returned across the responses of a -// multicall iteration is unspecified. +// When retrieving all tasks, you can paginate the response by using the optional +// MaxResults parameter to limit the number of tasks returned in a response. +// If more tasks remain, Amazon FSx returns a NextToken value in the response. +// In this case, send a later request with the NextToken request parameter set +// to the value of NextToken from the last response. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon FSx's -// API operation DescribeFileSystems for usage and error information. +// API operation DescribeDataRepositoryTasks for usage and error information. // // Returned Error Codes: // * ErrCodeBadRequest "BadRequest" @@ -888,68 +1090,71 @@ func (c *FSx) DescribeFileSystemsRequest(input *DescribeFileSystemsInput) (req * // * ErrCodeFileSystemNotFound "FileSystemNotFound" // No Amazon FSx file systems were found based upon supplied parameters. // +// * ErrCodeDataRepositoryTaskNotFound "DataRepositoryTaskNotFound" +// The data repository task or tasks you specified could not be found. +// // * ErrCodeInternalServerError "InternalServerError" // A generic error indicating a server-side failure. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/DescribeFileSystems -func (c *FSx) DescribeFileSystems(input *DescribeFileSystemsInput) (*DescribeFileSystemsOutput, error) { - req, out := c.DescribeFileSystemsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/DescribeDataRepositoryTasks +func (c *FSx) DescribeDataRepositoryTasks(input *DescribeDataRepositoryTasksInput) (*DescribeDataRepositoryTasksOutput, error) { + req, out := c.DescribeDataRepositoryTasksRequest(input) return out, req.Send() } -// DescribeFileSystemsWithContext is the same as DescribeFileSystems with the addition of +// DescribeDataRepositoryTasksWithContext is the same as DescribeDataRepositoryTasks with the addition of // the ability to pass a context and additional request options. // -// See DescribeFileSystems for details on how to use this API operation. +// See DescribeDataRepositoryTasks for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *FSx) DescribeFileSystemsWithContext(ctx aws.Context, input *DescribeFileSystemsInput, opts ...request.Option) (*DescribeFileSystemsOutput, error) { - req, out := c.DescribeFileSystemsRequest(input) +func (c *FSx) DescribeDataRepositoryTasksWithContext(ctx aws.Context, input *DescribeDataRepositoryTasksInput, opts ...request.Option) (*DescribeDataRepositoryTasksOutput, error) { + req, out := c.DescribeDataRepositoryTasksRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// DescribeFileSystemsPages iterates over the pages of a DescribeFileSystems operation, +// DescribeDataRepositoryTasksPages iterates over the pages of a DescribeDataRepositoryTasks operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // -// See DescribeFileSystems method for more information on how to use this operation. +// See DescribeDataRepositoryTasks method for more information on how to use this operation. // // Note: This operation can generate multiple requests to a service. // -// // Example iterating over at most 3 pages of a DescribeFileSystems operation. +// // Example iterating over at most 3 pages of a DescribeDataRepositoryTasks operation. // pageNum := 0 -// err := client.DescribeFileSystemsPages(params, -// func(page *fsx.DescribeFileSystemsOutput, lastPage bool) bool { +// err := client.DescribeDataRepositoryTasksPages(params, +// func(page *fsx.DescribeDataRepositoryTasksOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) // -func (c *FSx) DescribeFileSystemsPages(input *DescribeFileSystemsInput, fn func(*DescribeFileSystemsOutput, bool) bool) error { - return c.DescribeFileSystemsPagesWithContext(aws.BackgroundContext(), input, fn) +func (c *FSx) DescribeDataRepositoryTasksPages(input *DescribeDataRepositoryTasksInput, fn func(*DescribeDataRepositoryTasksOutput, bool) bool) error { + return c.DescribeDataRepositoryTasksPagesWithContext(aws.BackgroundContext(), input, fn) } -// DescribeFileSystemsPagesWithContext same as DescribeFileSystemsPages except +// DescribeDataRepositoryTasksPagesWithContext same as DescribeDataRepositoryTasksPages except // it takes a Context and allows setting request options on the pages. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *FSx) DescribeFileSystemsPagesWithContext(ctx aws.Context, input *DescribeFileSystemsInput, fn func(*DescribeFileSystemsOutput, bool) bool, opts ...request.Option) error { +func (c *FSx) DescribeDataRepositoryTasksPagesWithContext(ctx aws.Context, input *DescribeDataRepositoryTasksInput, fn func(*DescribeDataRepositoryTasksOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { - var inCpy *DescribeFileSystemsInput + var inCpy *DescribeDataRepositoryTasksInput if input != nil { tmp := *input inCpy = &tmp } - req, _ := c.DescribeFileSystemsRequest(inCpy) + req, _ := c.DescribeDataRepositoryTasksRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil @@ -957,7 +1162,7 @@ func (c *FSx) DescribeFileSystemsPagesWithContext(ctx aws.Context, input *Descri } for p.Next() { - if !fn(p.Page().(*DescribeFileSystemsOutput), !p.HasNextPage()) { + if !fn(p.Page().(*DescribeDataRepositoryTasksOutput), !p.HasNextPage()) { break } } @@ -965,70 +1170,236 @@ func (c *FSx) DescribeFileSystemsPagesWithContext(ctx aws.Context, input *Descri return p.Err() } -const opListTagsForResource = "ListTagsForResource" +const opDescribeFileSystems = "DescribeFileSystems" -// ListTagsForResourceRequest generates a "aws/request.Request" representing the -// client's request for the ListTagsForResource operation. The "output" return +// DescribeFileSystemsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeFileSystems operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ListTagsForResource for more information on using the ListTagsForResource +// See DescribeFileSystems for more information on using the DescribeFileSystems // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ListTagsForResourceRequest method. -// req, resp := client.ListTagsForResourceRequest(params) +// // Example sending a request using the DescribeFileSystemsRequest method. +// req, resp := client.DescribeFileSystemsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/ListTagsForResource -func (c *FSx) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/DescribeFileSystems +func (c *FSx) DescribeFileSystemsRequest(input *DescribeFileSystemsInput) (req *request.Request, output *DescribeFileSystemsOutput) { op := &request.Operation{ - Name: opListTagsForResource, + Name: opDescribeFileSystems, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { - input = &ListTagsForResourceInput{} + input = &DescribeFileSystemsInput{} } - output = &ListTagsForResourceOutput{} + output = &DescribeFileSystemsOutput{} req = c.newRequest(op, input, output) return } -// ListTagsForResource API operation for Amazon FSx. +// DescribeFileSystems API operation for Amazon FSx. // -// Lists tags for an Amazon FSx file systems and backups in the case of Amazon -// FSx for Windows File Server. +// Returns the description of specific Amazon FSx file systems, if a FileSystemIds +// value is provided for that file system. Otherwise, it returns descriptions +// of all file systems owned by your AWS account in the AWS Region of the endpoint +// that you're calling. // -// When retrieving all tags, you can optionally specify the MaxResults parameter -// to limit the number of tags in a response. If more tags remain, Amazon FSx -// returns a NextToken value in the response. In this case, send a later request -// with the NextToken request parameter set to the value of NextToken from the -// last response. +// When retrieving all file system descriptions, you can optionally specify +// the MaxResults parameter to limit the number of descriptions in a response. +// If more file system descriptions remain, Amazon FSx returns a NextToken value +// in the response. In this case, send a later request with the NextToken request +// parameter set to the value of NextToken from the last response. // -// This action is used in an iterative process to retrieve a list of your tags. -// ListTagsForResource is called first without a NextTokenvalue. Then the action -// continues to be called with the NextToken parameter set to the value of the -// last NextToken value until a response has no NextToken. +// This action is used in an iterative process to retrieve a list of your file +// system descriptions. DescribeFileSystems is called first without a NextTokenvalue. +// Then the action continues to be called with the NextToken parameter set to +// the value of the last NextToken value until a response has no NextToken. // // When using this action, keep the following in mind: // // * The implementation might return fewer than MaxResults file system descriptions // while still including a NextToken value. // -// * The order of tags returned in the response of one ListTagsForResource +// * The order of file systems returned in the response of one DescribeFileSystems +// call and the order of file systems returned across the responses of a +// multicall iteration is unspecified. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon FSx's +// API operation DescribeFileSystems for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequest "BadRequest" +// A generic error indicating a failure with a client request. +// +// * ErrCodeFileSystemNotFound "FileSystemNotFound" +// No Amazon FSx file systems were found based upon supplied parameters. +// +// * ErrCodeInternalServerError "InternalServerError" +// A generic error indicating a server-side failure. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/DescribeFileSystems +func (c *FSx) DescribeFileSystems(input *DescribeFileSystemsInput) (*DescribeFileSystemsOutput, error) { + req, out := c.DescribeFileSystemsRequest(input) + return out, req.Send() +} + +// DescribeFileSystemsWithContext is the same as DescribeFileSystems with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeFileSystems for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FSx) DescribeFileSystemsWithContext(ctx aws.Context, input *DescribeFileSystemsInput, opts ...request.Option) (*DescribeFileSystemsOutput, error) { + req, out := c.DescribeFileSystemsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeFileSystemsPages iterates over the pages of a DescribeFileSystems operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeFileSystems method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeFileSystems operation. +// pageNum := 0 +// err := client.DescribeFileSystemsPages(params, +// func(page *fsx.DescribeFileSystemsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *FSx) DescribeFileSystemsPages(input *DescribeFileSystemsInput, fn func(*DescribeFileSystemsOutput, bool) bool) error { + return c.DescribeFileSystemsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeFileSystemsPagesWithContext same as DescribeFileSystemsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FSx) DescribeFileSystemsPagesWithContext(ctx aws.Context, input *DescribeFileSystemsInput, fn func(*DescribeFileSystemsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeFileSystemsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeFileSystemsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeFileSystemsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opListTagsForResource = "ListTagsForResource" + +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTagsForResource for more information on using the ListTagsForResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTagsForResourceRequest method. +// req, resp := client.ListTagsForResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/ListTagsForResource +func (c *FSx) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for Amazon FSx. +// +// Lists tags for an Amazon FSx file systems and backups in the case of Amazon +// FSx for Windows File Server. +// +// When retrieving all tags, you can optionally specify the MaxResults parameter +// to limit the number of tags in a response. If more tags remain, Amazon FSx +// returns a NextToken value in the response. In this case, send a later request +// with the NextToken request parameter set to the value of NextToken from the +// last response. +// +// This action is used in an iterative process to retrieve a list of your tags. +// ListTagsForResource is called first without a NextTokenvalue. Then the action +// continues to be called with the NextToken parameter set to the value of the +// last NextToken value until a response has no NextToken. +// +// When using this action, keep the following in mind: +// +// * The implementation might return fewer than MaxResults file system descriptions +// while still including a NextToken value. +// +// * The order of tags returned in the response of one ListTagsForResource // call and the order of tags returned across the responses of a multi-call // iteration is unspecified. // @@ -1322,7 +1693,7 @@ func (c *FSx) UpdateFileSystemRequest(input *UpdateFileSystemInput) (req *reques // A generic error indicating a failure with a client request. // // * ErrCodeUnsupportedOperation "UnsupportedOperation" -// An error occured. +// The requested operation is not supported for this resource or API. // // * ErrCodeIncompatibleParameterError "IncompatibleParameterError" // The error returned when a second request is received with the same client @@ -1370,7 +1741,7 @@ type ActiveDirectoryBackupAttributes struct { ActiveDirectoryId *string `min:"12" type:"string"` // The fully qualified domain name of the self-managed AD directory. - DomainName *string `type:"string"` + DomainName *string `min:"1" type:"string"` } // String returns the string representation @@ -1424,7 +1795,8 @@ type Backup struct { FileSystem *FileSystem `type:"structure" required:"true"` // The ID of the AWS Key Management Service (AWS KMS) key used to encrypt this - // backup's data. + // backup of the Amazon FSx for Windows file system's data at rest. Amazon FSx + // for Lustre does not support KMS encryption. KmsKeyId *string `min:"1" type:"string"` // The lifecycle status of the backup. @@ -1547,6 +1919,183 @@ func (s *BackupFailureDetails) SetMessage(v string) *BackupFailureDetails { return s } +// Cancels a data repository task. +type CancelDataRepositoryTaskInput struct { + _ struct{} `type:"structure"` + + // Specifies the data repository task to cancel. + // + // TaskId is a required field + TaskId *string `min:"12" type:"string" required:"true"` +} + +// String returns the string representation +func (s CancelDataRepositoryTaskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelDataRepositoryTaskInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelDataRepositoryTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelDataRepositoryTaskInput"} + if s.TaskId == nil { + invalidParams.Add(request.NewErrParamRequired("TaskId")) + } + if s.TaskId != nil && len(*s.TaskId) < 12 { + invalidParams.Add(request.NewErrParamMinLen("TaskId", 12)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTaskId sets the TaskId field's value. +func (s *CancelDataRepositoryTaskInput) SetTaskId(v string) *CancelDataRepositoryTaskInput { + s.TaskId = &v + return s +} + +type CancelDataRepositoryTaskOutput struct { + _ struct{} `type:"structure"` + + // The lifecycle status of the data repository task, as follows: + // + // * PENDING - Amazon FSx has not started the task. + // + // * EXECUTING - Amazon FSx is processing the task. + // + // * FAILED - Amazon FSx was not able to complete the task. For example, + // there may be files the task failed to process. The DataRepositoryTaskFailureDetails + // property provides more information about task failures. + // + // * SUCCEEDED - FSx completed the task successfully. + // + // * CANCELED - Amazon FSx canceled the task and it did not complete. + // + // * CANCELING - FSx is in process of canceling the task. + Lifecycle *string `type:"string" enum:"DataRepositoryTaskLifecycle"` + + // The ID of the task being canceled. + TaskId *string `min:"12" type:"string"` +} + +// String returns the string representation +func (s CancelDataRepositoryTaskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelDataRepositoryTaskOutput) GoString() string { + return s.String() +} + +// SetLifecycle sets the Lifecycle field's value. +func (s *CancelDataRepositoryTaskOutput) SetLifecycle(v string) *CancelDataRepositoryTaskOutput { + s.Lifecycle = &v + return s +} + +// SetTaskId sets the TaskId field's value. +func (s *CancelDataRepositoryTaskOutput) SetTaskId(v string) *CancelDataRepositoryTaskOutput { + s.TaskId = &v + return s +} + +// Provides a report detailing the data repository task results of the files +// processed that match the criteria specified in the report Scope parameter. +// FSx delivers the report to the file system's linked data repository in Amazon +// S3, using the path specified in the report Path parameter. You can specify +// whether or not a report gets generated for a task using the Enabled parameter. +type CompletionReport struct { + _ struct{} `type:"structure"` + + // Set Enabled to True to generate a CompletionReport when the task completes. + // If set to true, then you need to provide a report Scope, Path, and Format. + // Set Enabled to False if you do not want a CompletionReport generated when + // the task completes. + // + // Enabled is a required field + Enabled *bool `type:"boolean" required:"true"` + + // Required if Enabled is set to true. Specifies the format of the CompletionReport. + // REPORT_CSV_20191124 is the only format currently supported. When Format is + // set to REPORT_CSV_20191124, the CompletionReport is provided in CSV format, + // and is delivered to {path}/task-{id}/failures.csv. + Format *string `type:"string" enum:"ReportFormat"` + + // Required if Enabled is set to true. Specifies the location of the report + // on the file system's linked S3 data repository. An absolute path that defines + // where the completion report will be stored in the destination location. The + // Path you provide must be located within the file system’s ExportPath. An + // example Path value is "s3://myBucket/myExportPath/optionalPrefix". The report + // provides the following information for each file in the report: FilePath, + // FileStatus, and ErrorCode. To learn more about a file system's ExportPath, + // see . + Path *string `min:"3" type:"string"` + + // Required if Enabled is set to true. Specifies the scope of the CompletionReport; + // FAILED_FILES_ONLY is the only scope currently supported. When Scope is set + // to FAILED_FILES_ONLY, the CompletionReport only contains information about + // files that the data repository task failed to process. + Scope *string `type:"string" enum:"ReportScope"` +} + +// String returns the string representation +func (s CompletionReport) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CompletionReport) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CompletionReport) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CompletionReport"} + if s.Enabled == nil { + invalidParams.Add(request.NewErrParamRequired("Enabled")) + } + if s.Path != nil && len(*s.Path) < 3 { + invalidParams.Add(request.NewErrParamMinLen("Path", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEnabled sets the Enabled field's value. +func (s *CompletionReport) SetEnabled(v bool) *CompletionReport { + s.Enabled = &v + return s +} + +// SetFormat sets the Format field's value. +func (s *CompletionReport) SetFormat(v string) *CompletionReport { + s.Format = &v + return s +} + +// SetPath sets the Path field's value. +func (s *CompletionReport) SetPath(v string) *CompletionReport { + s.Path = &v + return s +} + +// SetScope sets the Scope field's value. +func (s *CompletionReport) SetScope(v string) *CompletionReport { + s.Scope = &v + return s +} + // The request object for the CreateBackup operation. type CreateBackupInput struct { _ struct{} `type:"structure"` @@ -1650,15 +2199,161 @@ func (s *CreateBackupOutput) SetBackup(v *Backup) *CreateBackupOutput { return s } -// The request object for the CreateFileSystemFromBackup operation. -type CreateFileSystemFromBackupInput struct { +type CreateDataRepositoryTaskInput struct { _ struct{} `type:"structure"` - // The ID of the backup. Specifies the backup to use if you're creating a file - // system from an existing backup. - // - // BackupId is a required field - BackupId *string `min:"12" type:"string" required:"true"` + // (Optional) An idempotency token for resource creation, in a string of up + // to 64 ASCII characters. This token is automatically filled on your behalf + // when you use the AWS Command Line Interface (AWS CLI) or an AWS SDK. + ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` + + // The globally unique ID of the file system, assigned by Amazon FSx. + // + // FileSystemId is a required field + FileSystemId *string `min:"11" type:"string" required:"true"` + + // (Optional) The path or paths on the Amazon FSx file system to use when the + // data repository task is processed. The default path is the file system root + // directory. + Paths []*string `type:"list"` + + // Defines whether or not Amazon FSx provides a CompletionReport once the task + // has completed. A CompletionReport provides a detailed report on the files + // that Amazon FSx processed that meet the criteria specified by the Scope parameter. + // + // Report is a required field + Report *CompletionReport `type:"structure" required:"true"` + + // A list of Tag values, with a maximum of 50 elements. + Tags []*Tag `min:"1" type:"list"` + + // Specifies the type of data repository task to create. + // + // Type is a required field + Type *string `type:"string" required:"true" enum:"DataRepositoryTaskType"` +} + +// String returns the string representation +func (s CreateDataRepositoryTaskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDataRepositoryTaskInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDataRepositoryTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDataRepositoryTaskInput"} + if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) + } + if s.FileSystemId == nil { + invalidParams.Add(request.NewErrParamRequired("FileSystemId")) + } + if s.FileSystemId != nil && len(*s.FileSystemId) < 11 { + invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 11)) + } + if s.Report == nil { + invalidParams.Add(request.NewErrParamRequired("Report")) + } + if s.Tags != nil && len(s.Tags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + if s.Report != nil { + if err := s.Report.Validate(); err != nil { + invalidParams.AddNested("Report", err.(request.ErrInvalidParams)) + } + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientRequestToken sets the ClientRequestToken field's value. +func (s *CreateDataRepositoryTaskInput) SetClientRequestToken(v string) *CreateDataRepositoryTaskInput { + s.ClientRequestToken = &v + return s +} + +// SetFileSystemId sets the FileSystemId field's value. +func (s *CreateDataRepositoryTaskInput) SetFileSystemId(v string) *CreateDataRepositoryTaskInput { + s.FileSystemId = &v + return s +} + +// SetPaths sets the Paths field's value. +func (s *CreateDataRepositoryTaskInput) SetPaths(v []*string) *CreateDataRepositoryTaskInput { + s.Paths = v + return s +} + +// SetReport sets the Report field's value. +func (s *CreateDataRepositoryTaskInput) SetReport(v *CompletionReport) *CreateDataRepositoryTaskInput { + s.Report = v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateDataRepositoryTaskInput) SetTags(v []*Tag) *CreateDataRepositoryTaskInput { + s.Tags = v + return s +} + +// SetType sets the Type field's value. +func (s *CreateDataRepositoryTaskInput) SetType(v string) *CreateDataRepositoryTaskInput { + s.Type = &v + return s +} + +type CreateDataRepositoryTaskOutput struct { + _ struct{} `type:"structure"` + + // The description of the data repository task that you just created. + DataRepositoryTask *DataRepositoryTask `type:"structure"` +} + +// String returns the string representation +func (s CreateDataRepositoryTaskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDataRepositoryTaskOutput) GoString() string { + return s.String() +} + +// SetDataRepositoryTask sets the DataRepositoryTask field's value. +func (s *CreateDataRepositoryTaskOutput) SetDataRepositoryTask(v *DataRepositoryTask) *CreateDataRepositoryTaskOutput { + s.DataRepositoryTask = v + return s +} + +// The request object for the CreateFileSystemFromBackup operation. +type CreateFileSystemFromBackupInput struct { + _ struct{} `type:"structure"` + + // The ID of the backup. Specifies the backup to use if you're creating a file + // system from an existing backup. + // + // BackupId is a required field + BackupId *string `min:"12" type:"string" required:"true"` // (Optional) A string of up to 64 ASCII characters that Amazon FSx uses to // ensure idempotent creation. This string is automatically filled on your behalf @@ -1809,9 +2504,10 @@ type CreateFileSystemInput struct { // FileSystemType is a required field FileSystemType *string `type:"string" required:"true" enum:"FileSystemType"` - // The ID of your AWS Key Management Service (AWS KMS) key. This ID is used - // to encrypt the data in your file system at rest. For more information, see - // Encrypt (https://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html) + // The ID of the AWS Key Management Service (AWS KMS) key used to encrypt the + // file system's data for an Amazon FSx for Windows File Server file system + // at rest. Amazon FSx for Lustre does not support KMS encryption. For more + // information, see Encrypt (https://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html) // in the AWS Key Management Service API Reference. KmsKeyId *string `min:"1" type:"string"` @@ -1832,7 +2528,7 @@ type CreateFileSystemInput struct { // in increments of 3600 GiB. // // StorageCapacity is a required field - StorageCapacity *int64 `min:"1" type:"integer" required:"true"` + StorageCapacity *int64 `type:"integer" required:"true"` // Specifies the IDs of the subnets that the file system will be accessible // from. For Windows MULTI_AZ_1 file system deployment types, provide exactly @@ -1881,9 +2577,6 @@ func (s *CreateFileSystemInput) Validate() error { if s.StorageCapacity == nil { invalidParams.Add(request.NewErrParamRequired("StorageCapacity")) } - if s.StorageCapacity != nil && *s.StorageCapacity < 1 { - invalidParams.Add(request.NewErrParamMinValue("StorageCapacity", 1)) - } if s.SubnetIds == nil { invalidParams.Add(request.NewErrParamRequired("SubnetIds")) } @@ -2157,153 +2850,461 @@ type CreateFileSystemWindowsConfiguration struct { } // String returns the string representation -func (s CreateFileSystemWindowsConfiguration) String() string { +func (s CreateFileSystemWindowsConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFileSystemWindowsConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateFileSystemWindowsConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateFileSystemWindowsConfiguration"} + if s.ActiveDirectoryId != nil && len(*s.ActiveDirectoryId) < 12 { + invalidParams.Add(request.NewErrParamMinLen("ActiveDirectoryId", 12)) + } + if s.DailyAutomaticBackupStartTime != nil && len(*s.DailyAutomaticBackupStartTime) < 5 { + invalidParams.Add(request.NewErrParamMinLen("DailyAutomaticBackupStartTime", 5)) + } + if s.PreferredSubnetId != nil && len(*s.PreferredSubnetId) < 15 { + invalidParams.Add(request.NewErrParamMinLen("PreferredSubnetId", 15)) + } + if s.ThroughputCapacity == nil { + invalidParams.Add(request.NewErrParamRequired("ThroughputCapacity")) + } + if s.ThroughputCapacity != nil && *s.ThroughputCapacity < 8 { + invalidParams.Add(request.NewErrParamMinValue("ThroughputCapacity", 8)) + } + if s.WeeklyMaintenanceStartTime != nil && len(*s.WeeklyMaintenanceStartTime) < 7 { + invalidParams.Add(request.NewErrParamMinLen("WeeklyMaintenanceStartTime", 7)) + } + if s.SelfManagedActiveDirectoryConfiguration != nil { + if err := s.SelfManagedActiveDirectoryConfiguration.Validate(); err != nil { + invalidParams.AddNested("SelfManagedActiveDirectoryConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetActiveDirectoryId sets the ActiveDirectoryId field's value. +func (s *CreateFileSystemWindowsConfiguration) SetActiveDirectoryId(v string) *CreateFileSystemWindowsConfiguration { + s.ActiveDirectoryId = &v + return s +} + +// SetAutomaticBackupRetentionDays sets the AutomaticBackupRetentionDays field's value. +func (s *CreateFileSystemWindowsConfiguration) SetAutomaticBackupRetentionDays(v int64) *CreateFileSystemWindowsConfiguration { + s.AutomaticBackupRetentionDays = &v + return s +} + +// SetCopyTagsToBackups sets the CopyTagsToBackups field's value. +func (s *CreateFileSystemWindowsConfiguration) SetCopyTagsToBackups(v bool) *CreateFileSystemWindowsConfiguration { + s.CopyTagsToBackups = &v + return s +} + +// SetDailyAutomaticBackupStartTime sets the DailyAutomaticBackupStartTime field's value. +func (s *CreateFileSystemWindowsConfiguration) SetDailyAutomaticBackupStartTime(v string) *CreateFileSystemWindowsConfiguration { + s.DailyAutomaticBackupStartTime = &v + return s +} + +// SetDeploymentType sets the DeploymentType field's value. +func (s *CreateFileSystemWindowsConfiguration) SetDeploymentType(v string) *CreateFileSystemWindowsConfiguration { + s.DeploymentType = &v + return s +} + +// SetPreferredSubnetId sets the PreferredSubnetId field's value. +func (s *CreateFileSystemWindowsConfiguration) SetPreferredSubnetId(v string) *CreateFileSystemWindowsConfiguration { + s.PreferredSubnetId = &v + return s +} + +// SetSelfManagedActiveDirectoryConfiguration sets the SelfManagedActiveDirectoryConfiguration field's value. +func (s *CreateFileSystemWindowsConfiguration) SetSelfManagedActiveDirectoryConfiguration(v *SelfManagedActiveDirectoryConfiguration) *CreateFileSystemWindowsConfiguration { + s.SelfManagedActiveDirectoryConfiguration = v + return s +} + +// SetThroughputCapacity sets the ThroughputCapacity field's value. +func (s *CreateFileSystemWindowsConfiguration) SetThroughputCapacity(v int64) *CreateFileSystemWindowsConfiguration { + s.ThroughputCapacity = &v + return s +} + +// SetWeeklyMaintenanceStartTime sets the WeeklyMaintenanceStartTime field's value. +func (s *CreateFileSystemWindowsConfiguration) SetWeeklyMaintenanceStartTime(v string) *CreateFileSystemWindowsConfiguration { + s.WeeklyMaintenanceStartTime = &v + return s +} + +// The data repository configuration object for Lustre file systems returned +// in the response of the CreateFileSystem operation. +type DataRepositoryConfiguration struct { + _ struct{} `type:"structure"` + + // The export path to the Amazon S3 bucket (and prefix) that you are using to + // store new and changed Lustre file system files in S3. + ExportPath *string `min:"3" type:"string"` + + // The import path to the Amazon S3 bucket (and optional prefix) that you're + // using as the data repository for your FSx for Lustre file system, for example + // s3://import-bucket/optional-prefix. If a prefix is specified after the Amazon + // S3 bucket name, only object keys with that prefix are loaded into the file + // system. + ImportPath *string `min:"3" type:"string"` + + // For files imported from a data repository, this value determines the stripe + // count and maximum amount of data per file (in MiB) stored on a single physical + // disk. The maximum number of disks that a single file can be striped across + // is limited by the total number of disks that make up the file system. + // + // The default chunk size is 1,024 MiB (1 GiB) and can go as high as 512,000 + // MiB (500 GiB). Amazon S3 objects have a maximum size of 5 TB. + ImportedFileChunkSize *int64 `min:"1" type:"integer"` +} + +// String returns the string representation +func (s DataRepositoryConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DataRepositoryConfiguration) GoString() string { + return s.String() +} + +// SetExportPath sets the ExportPath field's value. +func (s *DataRepositoryConfiguration) SetExportPath(v string) *DataRepositoryConfiguration { + s.ExportPath = &v + return s +} + +// SetImportPath sets the ImportPath field's value. +func (s *DataRepositoryConfiguration) SetImportPath(v string) *DataRepositoryConfiguration { + s.ImportPath = &v + return s +} + +// SetImportedFileChunkSize sets the ImportedFileChunkSize field's value. +func (s *DataRepositoryConfiguration) SetImportedFileChunkSize(v int64) *DataRepositoryConfiguration { + s.ImportedFileChunkSize = &v + return s +} + +// A description of the data repository task. You use data repository tasks +// to perform bulk transfer operations between your Amazon FSx file system and +// its linked data repository. +type DataRepositoryTask struct { + _ struct{} `type:"structure"` + + // The time that the resource was created, in seconds (since 1970-01-01T00:00:00Z), + // also known as Unix time. + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` + + // The time that Amazon FSx completed processing the task, populated after the + // task is complete. + EndTime *time.Time `type:"timestamp"` + + // Failure message describing why the task failed, it is populated only when + // Lifecycle is set to FAILED. + FailureDetails *DataRepositoryTaskFailureDetails `type:"structure"` + + // The globally unique ID of the file system, assigned by Amazon FSx. + // + // FileSystemId is a required field + FileSystemId *string `min:"11" type:"string" required:"true"` + + // The lifecycle status of the data repository task, as follows: + // + // * PENDING - Amazon FSx has not started the task. + // + // * EXECUTING - Amazon FSx is processing the task. + // + // * FAILED - Amazon FSx was not able to complete the task. For example, + // there may be files the task failed to process. The DataRepositoryTaskFailureDetails + // property provides more information about task failures. + // + // * SUCCEEDED - FSx completed the task successfully. + // + // * CANCELED - Amazon FSx canceled the task and it did not complete. + // + // * CANCELING - FSx is in process of canceling the task. + // + // You cannot delete an FSx for Lustre file system if there are data repository + // tasks for the file system in the PENDING or EXECUTING states. Please retry + // when the data repository task is finished (with a status of CANCELED, SUCCEEDED, + // or FAILED). You can use the DescribeDataRepositoryTask action to monitor + // the task status. Contact the FSx team if you need to delete your file system + // immediately. + // + // Lifecycle is a required field + Lifecycle *string `type:"string" required:"true" enum:"DataRepositoryTaskLifecycle"` + + // An array of paths on the Amazon FSx for Lustre file system that specify the + // data for the data repository task to process. For example, in an EXPORT_TO_REPOSITORY + // task, the paths specify which data to export to the linked data repository. + // + // (Default) If Paths is not specified, Amazon FSx uses the file system root + // directory. + Paths []*string `type:"list"` + + // Provides a report detailing the data repository task results of the files + // processed that match the criteria specified in the report Scope parameter. + // FSx delivers the report to the file system's linked data repository in Amazon + // S3, using the path specified in the report Path parameter. You can specify + // whether or not a report gets generated for a task using the Enabled parameter. + Report *CompletionReport `type:"structure"` + + // The Amazon Resource Name (ARN) for a given resource. ARNs uniquely identify + // AWS resources. We require an ARN when you need to specify a resource unambiguously + // across all of AWS. For more information, see Amazon Resource Names (ARNs) + // and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the AWS General Reference. + ResourceARN *string `min:"8" type:"string"` + + // The time that Amazon FSx began processing the task. + StartTime *time.Time `type:"timestamp"` + + // Provides the status of the number of files that the task has processed successfully + // and failed to process. + Status *DataRepositoryTaskStatus `type:"structure"` + + // A list of Tag values, with a maximum of 50 elements. + Tags []*Tag `min:"1" type:"list"` + + // The system-generated, unique 17-digit ID of the data repository task. + // + // TaskId is a required field + TaskId *string `min:"12" type:"string" required:"true"` + + // The type of data repository task; EXPORT_TO_REPOSITORY is the only type currently + // supported. + // + // Type is a required field + Type *string `type:"string" required:"true" enum:"DataRepositoryTaskType"` +} + +// String returns the string representation +func (s DataRepositoryTask) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateFileSystemWindowsConfiguration) GoString() string { +func (s DataRepositoryTask) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateFileSystemWindowsConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateFileSystemWindowsConfiguration"} - if s.ActiveDirectoryId != nil && len(*s.ActiveDirectoryId) < 12 { - invalidParams.Add(request.NewErrParamMinLen("ActiveDirectoryId", 12)) - } - if s.DailyAutomaticBackupStartTime != nil && len(*s.DailyAutomaticBackupStartTime) < 5 { - invalidParams.Add(request.NewErrParamMinLen("DailyAutomaticBackupStartTime", 5)) - } - if s.PreferredSubnetId != nil && len(*s.PreferredSubnetId) < 15 { - invalidParams.Add(request.NewErrParamMinLen("PreferredSubnetId", 15)) - } - if s.ThroughputCapacity == nil { - invalidParams.Add(request.NewErrParamRequired("ThroughputCapacity")) - } - if s.ThroughputCapacity != nil && *s.ThroughputCapacity < 8 { - invalidParams.Add(request.NewErrParamMinValue("ThroughputCapacity", 8)) - } - if s.WeeklyMaintenanceStartTime != nil && len(*s.WeeklyMaintenanceStartTime) < 7 { - invalidParams.Add(request.NewErrParamMinLen("WeeklyMaintenanceStartTime", 7)) - } - if s.SelfManagedActiveDirectoryConfiguration != nil { - if err := s.SelfManagedActiveDirectoryConfiguration.Validate(); err != nil { - invalidParams.AddNested("SelfManagedActiveDirectoryConfiguration", err.(request.ErrInvalidParams)) - } - } +// SetCreationTime sets the CreationTime field's value. +func (s *DataRepositoryTask) SetCreationTime(v time.Time) *DataRepositoryTask { + s.CreationTime = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetEndTime sets the EndTime field's value. +func (s *DataRepositoryTask) SetEndTime(v time.Time) *DataRepositoryTask { + s.EndTime = &v + return s } -// SetActiveDirectoryId sets the ActiveDirectoryId field's value. -func (s *CreateFileSystemWindowsConfiguration) SetActiveDirectoryId(v string) *CreateFileSystemWindowsConfiguration { - s.ActiveDirectoryId = &v +// SetFailureDetails sets the FailureDetails field's value. +func (s *DataRepositoryTask) SetFailureDetails(v *DataRepositoryTaskFailureDetails) *DataRepositoryTask { + s.FailureDetails = v return s } -// SetAutomaticBackupRetentionDays sets the AutomaticBackupRetentionDays field's value. -func (s *CreateFileSystemWindowsConfiguration) SetAutomaticBackupRetentionDays(v int64) *CreateFileSystemWindowsConfiguration { - s.AutomaticBackupRetentionDays = &v +// SetFileSystemId sets the FileSystemId field's value. +func (s *DataRepositoryTask) SetFileSystemId(v string) *DataRepositoryTask { + s.FileSystemId = &v return s } -// SetCopyTagsToBackups sets the CopyTagsToBackups field's value. -func (s *CreateFileSystemWindowsConfiguration) SetCopyTagsToBackups(v bool) *CreateFileSystemWindowsConfiguration { - s.CopyTagsToBackups = &v +// SetLifecycle sets the Lifecycle field's value. +func (s *DataRepositoryTask) SetLifecycle(v string) *DataRepositoryTask { + s.Lifecycle = &v return s } -// SetDailyAutomaticBackupStartTime sets the DailyAutomaticBackupStartTime field's value. -func (s *CreateFileSystemWindowsConfiguration) SetDailyAutomaticBackupStartTime(v string) *CreateFileSystemWindowsConfiguration { - s.DailyAutomaticBackupStartTime = &v +// SetPaths sets the Paths field's value. +func (s *DataRepositoryTask) SetPaths(v []*string) *DataRepositoryTask { + s.Paths = v return s } -// SetDeploymentType sets the DeploymentType field's value. -func (s *CreateFileSystemWindowsConfiguration) SetDeploymentType(v string) *CreateFileSystemWindowsConfiguration { - s.DeploymentType = &v +// SetReport sets the Report field's value. +func (s *DataRepositoryTask) SetReport(v *CompletionReport) *DataRepositoryTask { + s.Report = v return s } -// SetPreferredSubnetId sets the PreferredSubnetId field's value. -func (s *CreateFileSystemWindowsConfiguration) SetPreferredSubnetId(v string) *CreateFileSystemWindowsConfiguration { - s.PreferredSubnetId = &v +// SetResourceARN sets the ResourceARN field's value. +func (s *DataRepositoryTask) SetResourceARN(v string) *DataRepositoryTask { + s.ResourceARN = &v return s } -// SetSelfManagedActiveDirectoryConfiguration sets the SelfManagedActiveDirectoryConfiguration field's value. -func (s *CreateFileSystemWindowsConfiguration) SetSelfManagedActiveDirectoryConfiguration(v *SelfManagedActiveDirectoryConfiguration) *CreateFileSystemWindowsConfiguration { - s.SelfManagedActiveDirectoryConfiguration = v +// SetStartTime sets the StartTime field's value. +func (s *DataRepositoryTask) SetStartTime(v time.Time) *DataRepositoryTask { + s.StartTime = &v return s } -// SetThroughputCapacity sets the ThroughputCapacity field's value. -func (s *CreateFileSystemWindowsConfiguration) SetThroughputCapacity(v int64) *CreateFileSystemWindowsConfiguration { - s.ThroughputCapacity = &v +// SetStatus sets the Status field's value. +func (s *DataRepositoryTask) SetStatus(v *DataRepositoryTaskStatus) *DataRepositoryTask { + s.Status = v return s } -// SetWeeklyMaintenanceStartTime sets the WeeklyMaintenanceStartTime field's value. -func (s *CreateFileSystemWindowsConfiguration) SetWeeklyMaintenanceStartTime(v string) *CreateFileSystemWindowsConfiguration { - s.WeeklyMaintenanceStartTime = &v +// SetTags sets the Tags field's value. +func (s *DataRepositoryTask) SetTags(v []*Tag) *DataRepositoryTask { + s.Tags = v return s } -// The data repository configuration object for Lustre file systems returned -// in the response of the CreateFileSystem operation. -type DataRepositoryConfiguration struct { +// SetTaskId sets the TaskId field's value. +func (s *DataRepositoryTask) SetTaskId(v string) *DataRepositoryTask { + s.TaskId = &v + return s +} + +// SetType sets the Type field's value. +func (s *DataRepositoryTask) SetType(v string) *DataRepositoryTask { + s.Type = &v + return s +} + +// Provides information about why a data repository task failed. Only populated +// when the task Lifecycle is set to FAILED. +type DataRepositoryTaskFailureDetails struct { _ struct{} `type:"structure"` - // The export path to the Amazon S3 bucket (and prefix) that you are using to - // store new and changed Lustre file system files in S3. - ExportPath *string `min:"3" type:"string"` + // A detailed error message. + Message *string `min:"1" type:"string"` +} - // The import path to the Amazon S3 bucket (and optional prefix) that you're - // using as the data repository for your FSx for Lustre file system, for example - // s3://import-bucket/optional-prefix. If a prefix is specified after the Amazon - // S3 bucket name, only object keys with that prefix are loaded into the file - // system. - ImportPath *string `min:"3" type:"string"` +// String returns the string representation +func (s DataRepositoryTaskFailureDetails) String() string { + return awsutil.Prettify(s) +} - // For files imported from a data repository, this value determines the stripe - // count and maximum amount of data per file (in MiB) stored on a single physical - // disk. The maximum number of disks that a single file can be striped across - // is limited by the total number of disks that make up the file system. +// GoString returns the string representation +func (s DataRepositoryTaskFailureDetails) GoString() string { + return s.String() +} + +// SetMessage sets the Message field's value. +func (s *DataRepositoryTaskFailureDetails) SetMessage(v string) *DataRepositoryTaskFailureDetails { + s.Message = &v + return s +} + +// (Optional) An array of filter objects you can use to filter the response +// of data repository tasks you will see in the the response. You can filter +// the tasks returned in the response by one or more file system IDs, task lifecycles, +// and by task type. A filter object consists of a filter Name, and one or more +// Values for the filter. +type DataRepositoryTaskFilter struct { + _ struct{} `type:"structure"` + + // Name of the task property to use in filtering the tasks returned in the response. // - // The default chunk size is 1,024 MiB (1 GiB) and can go as high as 512,000 - // MiB (500 GiB). Amazon S3 objects have a maximum size of 5 TB. - ImportedFileChunkSize *int64 `min:"1" type:"integer"` + // * Use file-system-id to retrieve data repository tasks for specific file + // systems. + // + // * Use task-lifecycle to retrieve data repository tasks with one or more + // specific lifecycle states, as follows: CANCELED, EXECUTING, FAILED, PENDING, + // and SUCCEEDED. + Name *string `type:"string" enum:"DataRepositoryTaskFilterName"` + + // Use Values to include the specific file system IDs and task lifecycle states + // for the filters you are using. + Values []*string `type:"list"` } // String returns the string representation -func (s DataRepositoryConfiguration) String() string { +func (s DataRepositoryTaskFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DataRepositoryConfiguration) GoString() string { +func (s DataRepositoryTaskFilter) GoString() string { return s.String() } -// SetExportPath sets the ExportPath field's value. -func (s *DataRepositoryConfiguration) SetExportPath(v string) *DataRepositoryConfiguration { - s.ExportPath = &v +// SetName sets the Name field's value. +func (s *DataRepositoryTaskFilter) SetName(v string) *DataRepositoryTaskFilter { + s.Name = &v return s } -// SetImportPath sets the ImportPath field's value. -func (s *DataRepositoryConfiguration) SetImportPath(v string) *DataRepositoryConfiguration { - s.ImportPath = &v +// SetValues sets the Values field's value. +func (s *DataRepositoryTaskFilter) SetValues(v []*string) *DataRepositoryTaskFilter { + s.Values = v return s } -// SetImportedFileChunkSize sets the ImportedFileChunkSize field's value. -func (s *DataRepositoryConfiguration) SetImportedFileChunkSize(v int64) *DataRepositoryConfiguration { - s.ImportedFileChunkSize = &v +// Provides the task status showing a running total of the total number of files +// to be processed, the number successfully processed, and the number of files +// the task failed to process. +type DataRepositoryTaskStatus struct { + _ struct{} `type:"structure"` + + // A running total of the number of files that the task failed to process. + FailedCount *int64 `type:"long"` + + // The time at which the task status was last updated. + LastUpdatedTime *time.Time `type:"timestamp"` + + // A running total of the number of files that the task has successfully processed. + SucceededCount *int64 `type:"long"` + + // The total number of files that the task will process. While a task is executing, + // the sum of SucceededCount plus FailedCount may not equal TotalCount. When + // the task is complete, TotalCount equals the sum of SucceededCount plus FailedCount. + TotalCount *int64 `type:"long"` +} + +// String returns the string representation +func (s DataRepositoryTaskStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DataRepositoryTaskStatus) GoString() string { + return s.String() +} + +// SetFailedCount sets the FailedCount field's value. +func (s *DataRepositoryTaskStatus) SetFailedCount(v int64) *DataRepositoryTaskStatus { + s.FailedCount = &v + return s +} + +// SetLastUpdatedTime sets the LastUpdatedTime field's value. +func (s *DataRepositoryTaskStatus) SetLastUpdatedTime(v time.Time) *DataRepositoryTaskStatus { + s.LastUpdatedTime = &v + return s +} + +// SetSucceededCount sets the SucceededCount field's value. +func (s *DataRepositoryTaskStatus) SetSucceededCount(v int64) *DataRepositoryTaskStatus { + s.SucceededCount = &v + return s +} + +// SetTotalCount sets the TotalCount field's value. +func (s *DataRepositoryTaskStatus) SetTotalCount(v int64) *DataRepositoryTaskStatus { + s.TotalCount = &v return s } @@ -2711,6 +3712,111 @@ func (s *DescribeBackupsOutput) SetNextToken(v string) *DescribeBackupsOutput { return s } +type DescribeDataRepositoryTasksInput struct { + _ struct{} `type:"structure"` + + // (Optional) You can use filters to narrow the DescribeDataRepositoryTasks + // response to include just tasks for specific file systems, or tasks in a specific + // lifecycle state. + Filters []*DataRepositoryTaskFilter `type:"list"` + + // The maximum number of resources to return in the response. This value must + // be an integer greater than zero. + MaxResults *int64 `min:"1" type:"integer"` + + // (Optional) Opaque pagination token returned from a previous operation (String). + // If present, this token indicates from what point you can continue processing + // the request, where the previous NextToken value left off. + NextToken *string `min:"1" type:"string"` + + // (Optional) IDs of the tasks whose descriptions you want to retrieve (String). + TaskIds []*string `type:"list"` +} + +// String returns the string representation +func (s DescribeDataRepositoryTasksInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDataRepositoryTasksInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDataRepositoryTasksInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDataRepositoryTasksInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *DescribeDataRepositoryTasksInput) SetFilters(v []*DataRepositoryTaskFilter) *DescribeDataRepositoryTasksInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeDataRepositoryTasksInput) SetMaxResults(v int64) *DescribeDataRepositoryTasksInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeDataRepositoryTasksInput) SetNextToken(v string) *DescribeDataRepositoryTasksInput { + s.NextToken = &v + return s +} + +// SetTaskIds sets the TaskIds field's value. +func (s *DescribeDataRepositoryTasksInput) SetTaskIds(v []*string) *DescribeDataRepositoryTasksInput { + s.TaskIds = v + return s +} + +type DescribeDataRepositoryTasksOutput struct { + _ struct{} `type:"structure"` + + // The collection of data repository task descriptions returned. + DataRepositoryTasks []*DataRepositoryTask `type:"list"` + + // (Optional) Opaque pagination token returned from a previous operation (String). + // If present, this token indicates from what point you can continue processing + // the request, where the previous NextToken value left off. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeDataRepositoryTasksOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDataRepositoryTasksOutput) GoString() string { + return s.String() +} + +// SetDataRepositoryTasks sets the DataRepositoryTasks field's value. +func (s *DescribeDataRepositoryTasksOutput) SetDataRepositoryTasks(v []*DataRepositoryTask) *DescribeDataRepositoryTasksOutput { + s.DataRepositoryTasks = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeDataRepositoryTasksOutput) SetNextToken(v string) *DescribeDataRepositoryTasksOutput { + s.NextToken = &v + return s +} + // The request object for DescribeFileSystems operation. type DescribeFileSystemsInput struct { _ struct{} `type:"structure"` @@ -2832,6 +3938,7 @@ type FileSystem struct { // The ID of the AWS Key Management Service (AWS KMS) key used to encrypt the // file system's data for an Amazon FSx for Windows File Server file system. + // Amazon FSx for Lustre does not support KMS encryption. KmsKeyId *string `min:"1" type:"string"` // The lifecycle status of the file system, following are the possible values @@ -2878,7 +3985,7 @@ type FileSystem struct { ResourceARN *string `min:"8" type:"string"` // The storage capacity of the file system in gigabytes (GB). - StorageCapacity *int64 `min:"1" type:"integer"` + StorageCapacity *int64 `type:"integer"` // The ID of the subnet to contain the endpoint for the file system. One and // only one is supported. The file system is launched in the Availability Zone @@ -3212,7 +4319,7 @@ type SelfManagedActiveDirectoryAttributes struct { DnsIps []*string `min:"1" type:"list"` // The fully qualified domain name of the self-managed AD directory. - DomainName *string `type:"string"` + DomainName *string `min:"1" type:"string"` // The name of the domain group whose members have administrative privileges // for the FSx file system. @@ -3277,7 +4384,7 @@ type SelfManagedActiveDirectoryConfiguration struct { // A list of up to two IP addresses of DNS servers or domain controllers in // the self-managed AD directory. The IP addresses need to be either in the // same VPC CIDR range as the one in which your Amazon FSx file system is being - // created, or in the private IP version 4 (Iv4) address ranges, as specified + // created, or in the private IP version 4 (IPv4) address ranges, as specified // in RFC 1918 (http://www.faqs.org/rfcs/rfc1918.html): // // * 10.0.0.0 - 10.255.255.255 (10/8 prefix) @@ -3293,7 +4400,7 @@ type SelfManagedActiveDirectoryConfiguration struct { // corp.example.com. // // DomainName is a required field - DomainName *string `type:"string" required:"true"` + DomainName *string `min:"1" type:"string" required:"true"` // (Optional) The name of the domain group whose members are granted administrative // privileges for the file system. Administrative privileges include taking @@ -3353,6 +4460,9 @@ func (s *SelfManagedActiveDirectoryConfiguration) Validate() error { if s.DomainName == nil { invalidParams.Add(request.NewErrParamRequired("DomainName")) } + if s.DomainName != nil && len(*s.DomainName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) + } if s.FileSystemAdministratorsGroup != nil && len(*s.FileSystemAdministratorsGroup) < 1 { invalidParams.Add(request.NewErrParamMinLen("FileSystemAdministratorsGroup", 1)) } @@ -3963,7 +5073,7 @@ type WindowsFileSystemConfiguration struct { // use the file system's DNSName instead. For more information and instruction // on mapping and mounting file shares, see https://docs.aws.amazon.com/fsx/latest/WindowsGuide/accessing-file-shares.html // (https://docs.aws.amazon.com/fsx/latest/WindowsGuide/accessing-file-shares.html). - PreferredFileServerIp *string `type:"string"` + PreferredFileServerIp *string `min:"7" type:"string"` // For MULTI_AZ_1 deployment types, it specifies the ID of the subnet where // the preferred file server is located. Must be one of the two subnet IDs specified @@ -4119,6 +5229,39 @@ const ( BackupTypeUserInitiated = "USER_INITIATED" ) +const ( + // DataRepositoryTaskFilterNameFileSystemId is a DataRepositoryTaskFilterName enum value + DataRepositoryTaskFilterNameFileSystemId = "file-system-id" + + // DataRepositoryTaskFilterNameTaskLifecycle is a DataRepositoryTaskFilterName enum value + DataRepositoryTaskFilterNameTaskLifecycle = "task-lifecycle" +) + +const ( + // DataRepositoryTaskLifecyclePending is a DataRepositoryTaskLifecycle enum value + DataRepositoryTaskLifecyclePending = "PENDING" + + // DataRepositoryTaskLifecycleExecuting is a DataRepositoryTaskLifecycle enum value + DataRepositoryTaskLifecycleExecuting = "EXECUTING" + + // DataRepositoryTaskLifecycleFailed is a DataRepositoryTaskLifecycle enum value + DataRepositoryTaskLifecycleFailed = "FAILED" + + // DataRepositoryTaskLifecycleSucceeded is a DataRepositoryTaskLifecycle enum value + DataRepositoryTaskLifecycleSucceeded = "SUCCEEDED" + + // DataRepositoryTaskLifecycleCanceled is a DataRepositoryTaskLifecycle enum value + DataRepositoryTaskLifecycleCanceled = "CANCELED" + + // DataRepositoryTaskLifecycleCanceling is a DataRepositoryTaskLifecycle enum value + DataRepositoryTaskLifecycleCanceling = "CANCELING" +) + +const ( + // DataRepositoryTaskTypeExportToRepository is a DataRepositoryTaskType enum value + DataRepositoryTaskTypeExportToRepository = "EXPORT_TO_REPOSITORY" +) + // The lifecycle status of the file system. const ( // FileSystemLifecycleAvailable is a FileSystemLifecycle enum value @@ -4167,6 +5310,16 @@ const ( FilterNameBackupType = "backup-type" ) +const ( + // ReportFormatReportCsv20191124 is a ReportFormat enum value + ReportFormatReportCsv20191124 = "REPORT_CSV_20191124" +) + +const ( + // ReportScopeFailedFilesOnly is a ReportScope enum value + ReportScopeFailedFilesOnly = "FAILED_FILES_ONLY" +) + // The types of limits on your service utilization. Limits include file system // count, total throughput capacity, total storage, and total user-initiated // backups. These limits apply for a specific account in a specific AWS Region. diff --git a/service/fsx/errors.go b/service/fsx/errors.go index 42a1e80601b..8b7c8f6aefc 100644 --- a/service/fsx/errors.go +++ b/service/fsx/errors.go @@ -35,6 +35,26 @@ const ( // A generic error indicating a failure with a client request. ErrCodeBadRequest = "BadRequest" + // ErrCodeDataRepositoryTaskEnded for service response error code + // "DataRepositoryTaskEnded". + // + // The data repository task could not be canceled because the task has already + // ended. + ErrCodeDataRepositoryTaskEnded = "DataRepositoryTaskEnded" + + // ErrCodeDataRepositoryTaskExecuting for service response error code + // "DataRepositoryTaskExecuting". + // + // An existing data repository task is currently executing on the file system. + // Wait until the existing task has completed, then create the new task. + ErrCodeDataRepositoryTaskExecuting = "DataRepositoryTaskExecuting" + + // ErrCodeDataRepositoryTaskNotFound for service response error code + // "DataRepositoryTaskNotFound". + // + // The data repository task or tasks you specified could not be found. + ErrCodeDataRepositoryTaskNotFound = "DataRepositoryTaskNotFound" + // ErrCodeFileSystemNotFound for service response error code // "FileSystemNotFound". // @@ -113,6 +133,6 @@ const ( // ErrCodeUnsupportedOperation for service response error code // "UnsupportedOperation". // - // An error occured. + // The requested operation is not supported for this resource or API. ErrCodeUnsupportedOperation = "UnsupportedOperation" ) diff --git a/service/fsx/fsxiface/interface.go b/service/fsx/fsxiface/interface.go index 69d500e6d37..0cd98a2526b 100644 --- a/service/fsx/fsxiface/interface.go +++ b/service/fsx/fsxiface/interface.go @@ -26,7 +26,7 @@ import ( // // myFunc uses an SDK service client to make a request to // // Amazon FSx. // func myFunc(svc fsxiface.FSxAPI) bool { -// // Make svc.CreateBackup request +// // Make svc.CancelDataRepositoryTask request // } // // func main() { @@ -42,7 +42,7 @@ import ( // type mockFSxClient struct { // fsxiface.FSxAPI // } -// func (m *mockFSxClient) CreateBackup(input *fsx.CreateBackupInput) (*fsx.CreateBackupOutput, error) { +// func (m *mockFSxClient) CancelDataRepositoryTask(input *fsx.CancelDataRepositoryTaskInput) (*fsx.CancelDataRepositoryTaskOutput, error) { // // mock response/functionality // } // @@ -60,10 +60,18 @@ import ( // and waiters. Its suggested to use the pattern above for testing, or using // tooling to generate mocks to satisfy the interfaces. type FSxAPI interface { + CancelDataRepositoryTask(*fsx.CancelDataRepositoryTaskInput) (*fsx.CancelDataRepositoryTaskOutput, error) + CancelDataRepositoryTaskWithContext(aws.Context, *fsx.CancelDataRepositoryTaskInput, ...request.Option) (*fsx.CancelDataRepositoryTaskOutput, error) + CancelDataRepositoryTaskRequest(*fsx.CancelDataRepositoryTaskInput) (*request.Request, *fsx.CancelDataRepositoryTaskOutput) + CreateBackup(*fsx.CreateBackupInput) (*fsx.CreateBackupOutput, error) CreateBackupWithContext(aws.Context, *fsx.CreateBackupInput, ...request.Option) (*fsx.CreateBackupOutput, error) CreateBackupRequest(*fsx.CreateBackupInput) (*request.Request, *fsx.CreateBackupOutput) + CreateDataRepositoryTask(*fsx.CreateDataRepositoryTaskInput) (*fsx.CreateDataRepositoryTaskOutput, error) + CreateDataRepositoryTaskWithContext(aws.Context, *fsx.CreateDataRepositoryTaskInput, ...request.Option) (*fsx.CreateDataRepositoryTaskOutput, error) + CreateDataRepositoryTaskRequest(*fsx.CreateDataRepositoryTaskInput) (*request.Request, *fsx.CreateDataRepositoryTaskOutput) + CreateFileSystem(*fsx.CreateFileSystemInput) (*fsx.CreateFileSystemOutput, error) CreateFileSystemWithContext(aws.Context, *fsx.CreateFileSystemInput, ...request.Option) (*fsx.CreateFileSystemOutput, error) CreateFileSystemRequest(*fsx.CreateFileSystemInput) (*request.Request, *fsx.CreateFileSystemOutput) @@ -87,6 +95,13 @@ type FSxAPI interface { DescribeBackupsPages(*fsx.DescribeBackupsInput, func(*fsx.DescribeBackupsOutput, bool) bool) error DescribeBackupsPagesWithContext(aws.Context, *fsx.DescribeBackupsInput, func(*fsx.DescribeBackupsOutput, bool) bool, ...request.Option) error + DescribeDataRepositoryTasks(*fsx.DescribeDataRepositoryTasksInput) (*fsx.DescribeDataRepositoryTasksOutput, error) + DescribeDataRepositoryTasksWithContext(aws.Context, *fsx.DescribeDataRepositoryTasksInput, ...request.Option) (*fsx.DescribeDataRepositoryTasksOutput, error) + DescribeDataRepositoryTasksRequest(*fsx.DescribeDataRepositoryTasksInput) (*request.Request, *fsx.DescribeDataRepositoryTasksOutput) + + DescribeDataRepositoryTasksPages(*fsx.DescribeDataRepositoryTasksInput, func(*fsx.DescribeDataRepositoryTasksOutput, bool) bool) error + DescribeDataRepositoryTasksPagesWithContext(aws.Context, *fsx.DescribeDataRepositoryTasksInput, func(*fsx.DescribeDataRepositoryTasksOutput, bool) bool, ...request.Option) error + DescribeFileSystems(*fsx.DescribeFileSystemsInput) (*fsx.DescribeFileSystemsOutput, error) DescribeFileSystemsWithContext(aws.Context, *fsx.DescribeFileSystemsInput, ...request.Option) (*fsx.DescribeFileSystemsOutput, error) DescribeFileSystemsRequest(*fsx.DescribeFileSystemsInput) (*request.Request, *fsx.DescribeFileSystemsOutput) diff --git a/service/gamelift/api.go b/service/gamelift/api.go index c29096f3f1b..c3881ffcb91 100644 --- a/service/gamelift/api.go +++ b/service/gamelift/api.go @@ -121,7 +121,7 @@ func (c *GameLift) AcceptMatchRequest(input *AcceptMatchInput) (req *request.Req // period. // // * ErrCodeUnsupportedRegionException "UnsupportedRegionException" -// The requested operation is not supported in the region specified. +// The requested operation is not supported in the Region specified. // // See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/AcceptMatch func (c *GameLift) AcceptMatch(input *AcceptMatchInput) (*AcceptMatchOutput, error) { @@ -190,11 +190,9 @@ func (c *GameLift) CreateAliasRequest(input *CreateAliasInput) (req *request.Req // CreateAlias API operation for Amazon GameLift. // // Creates an alias for a fleet. In most situations, you can use an alias ID -// in place of a fleet ID. By using a fleet alias instead of a specific fleet -// ID, you can switch gameplay and players to a new fleet without changing your -// game client or other game components. For example, for games in production, -// using an alias allows you to seamlessly redirect your player base to a new -// game server update. +// in place of a fleet ID. An alias provides a level of abstraction for a fleet +// that is useful when redirecting player traffic from one fleet to another, +// such as when updating your game build. // // Amazon GameLift supports two types of routing strategies for aliases: simple // and terminal. A simple alias points to an active fleet. A terminal alias @@ -206,8 +204,8 @@ func (c *GameLift) CreateAliasRequest(input *CreateAliasInput) (req *request.Req // To create a fleet alias, specify an alias name, routing strategy, and optional // description. Each simple alias can point to only one fleet, but a fleet can // have multiple aliases. If successful, a new alias record is returned, including -// an alias ID, which you can reference when creating a game session. You can -// reassign an alias to another fleet by calling UpdateAlias. +// an alias ID and an ARN. You can reassign an alias to another fleet by calling +// UpdateAlias. // // * CreateAlias // @@ -250,6 +248,11 @@ func (c *GameLift) CreateAliasRequest(input *CreateAliasInput) (req *request.Req // The requested operation would cause the resource to exceed the allowed service // limit. Resolve the issue before retrying. // +// * ErrCodeTaggingFailedException "TaggingFailedException" +// The requested tagging operation did not succeed. This may be due to invalid +// tag format or the maximum tag limit may have been exceeded. Resolve the issue +// before retrying. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateAlias func (c *GameLift) CreateAlias(input *CreateAliasInput) (*CreateAliasOutput, error) { req, out := c.CreateAliasRequest(input) @@ -320,30 +323,30 @@ func (c *GameLift) CreateBuildRequest(input *CreateBuildInput) (req *request.Req // and points to the location of your game server build files in an Amazon Simple // Storage Service (Amazon S3) location. // -// Game server binaries must be combined into a .zip file for use with Amazon +// Game server binaries must be combined into a zip file for use with Amazon // GameLift. // -// To create new builds quickly and easily, use the AWS CLI command upload-build -// (https://docs.aws.amazon.com/cli/latest/reference/gamelift/upload-build.html) -// . This helper command uploads your build and creates a new build record in -// one step, and automatically handles the necessary permissions. +// To create new builds directly from a file directory, use the AWS CLI command +// upload-build (https://docs.aws.amazon.com/cli/latest/reference/gamelift/upload-build.html) +// . This helper command uploads build files and creates a new build record +// in one step, and automatically handles the necessary permissions. // -// The CreateBuild operation should be used only when you need to manually upload -// your build files, as in the following scenarios: +// The CreateBuild operation should be used only in the following scenarios: // -// * Store a build file in an Amazon S3 bucket under your own AWS account. -// To use this option, you must first give Amazon GameLift access to that -// Amazon S3 bucket. To create a new build record using files in your Amazon -// S3 bucket, call CreateBuild and specify a build name, operating system, -// and the storage location of your game build. +// * To create a new game build with build files that are in an Amazon S3 +// bucket under your own AWS account. To use this option, you must first +// give Amazon GameLift access to that Amazon S3 bucket. Then call CreateBuild +// and specify a build name, operating system, and the Amazon S3 storage +// location of your game build. // -// * Upload a build file directly to Amazon GameLift's Amazon S3 account. -// To use this option, you first call CreateBuild with a build name and operating -// system. This action creates a new build record and returns an Amazon S3 -// storage location (bucket and key only) and temporary access credentials. -// Use the credentials to manually upload your build file to the storage -// location (see the Amazon S3 topic Uploading Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/UploadingObjects.html)). -// You can upload files to a location only once. +// * To upload build files directly to Amazon GameLift's Amazon S3 account. +// To use this option, first call CreateBuild and specify a build name and +// operating system. This action creates a new build record and returns an +// Amazon S3 storage location (bucket and key only) and temporary access +// credentials. Use the credentials to manually upload your build file to +// the provided storage location (see the Amazon S3 topic Uploading Objects +// (https://docs.aws.amazon.com/AmazonS3/latest/dev/UploadingObjects.html)). +// You can upload build files to the GameLift Amazon S3 location only once. // // If successful, this operation creates a new build record with a unique build // ID and places it in INITIALIZED status. You can use DescribeBuild to check @@ -353,6 +356,8 @@ func (c *GameLift) CreateBuildRequest(input *CreateBuildInput) (req *request.Req // Learn more // // Uploading Your Game (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-intro.html) +// https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html +// (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // // Create a Build with Files in Amazon S3 (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-cli-uploading.html#gamelift-build-cli-uploading-create-build) // @@ -388,6 +393,11 @@ func (c *GameLift) CreateBuildRequest(input *CreateBuildInput) (req *request.Req // a service resource associated with the request. Resolve the conflict before // retrying this request. // +// * ErrCodeTaggingFailedException "TaggingFailedException" +// The requested tagging operation did not succeed. This may be due to invalid +// tag format or the maximum tag limit may have been exceeded. Resolve the issue +// before retrying. +// // * ErrCodeInternalServiceException "InternalServiceException" // The service encountered an unrecoverable internal failure while processing // the request. Clients can retry such requests immediately or after a waiting @@ -469,14 +479,9 @@ func (c *GameLift) CreateFleetRequest(input *CreateFleetInput) (req *request.Req // To create a new fleet, you must provide the following: (1) a fleet name, // (2) an EC2 instance type and fleet type (spot or on-demand), (3) the build // ID for your game build or script ID if using Realtime Servers, and (4) a -// run-time configuration, which determines how game servers will run on each +// runtime configuration, which determines how game servers will run on each // instance in the fleet. // -// When creating a Realtime Servers fleet, we recommend using a minimal version -// of the Realtime script (see this working code example (https://docs.aws.amazon.com/gamelift/latest/developerguide/realtime-script.html#realtime-script-examples)). -// This will make it much easier to troubleshoot any fleet creation issues. -// Once the fleet is active, you can update your Realtime script as needed. -// // If the CreateFleet call is successful, Amazon GameLift performs the following // tasks. You can track the process of a fleet by checking the fleet status // or by monitoring fleet creation events: @@ -484,25 +489,26 @@ func (c *GameLift) CreateFleetRequest(input *CreateFleetInput) (req *request.Req // * Creates a fleet record. Status: NEW. // // * Begins writing events to the fleet event log, which can be accessed -// in the Amazon GameLift console. Sets the fleet's target capacity to 1 -// (desired instances), which triggers Amazon GameLift to start one new EC2 -// instance. +// in the Amazon GameLift console. +// +// * Sets the fleet's target capacity to 1 (desired instances), which triggers +// Amazon GameLift to start one new EC2 instance. // // * Downloads the game build or Realtime script to the new instance and // installs it. Statuses: DOWNLOADING, VALIDATING, BUILDING. // // * Starts launching server processes on the instance. If the fleet is configured // to run multiple server processes per instance, Amazon GameLift staggers -// each launch by a few seconds. Status: ACTIVATING. +// each process launch by a few seconds. Status: ACTIVATING. // // * Sets the fleet's status to ACTIVE as soon as one server process is ready // to host a game session. // // Learn more // -// Working with Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) +// Setting Up Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) // -// Debug Fleet Creation Issues (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-creating-debug.html) +// Debug Fleet Creation Issues (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-creating-debug.html#fleets-creating-debug-creation) // // Related operations // @@ -512,12 +518,9 @@ func (c *GameLift) CreateFleetRequest(input *CreateFleetInput) (req *request.Req // // * DeleteFleet // -// * Describe fleets: DescribeFleetAttributes DescribeFleetCapacity DescribeFleetPortSettings -// DescribeFleetUtilization DescribeRuntimeConfiguration DescribeEC2InstanceLimits -// DescribeFleetEvents +// * DescribeFleetAttributes // -// * Update fleets: UpdateFleetAttributes UpdateFleetCapacity UpdateFleetPortSettings -// UpdateRuntimeConfiguration +// * UpdateFleetAttributes // // * Manage fleet actions: StartFleetActions StopFleetActions // @@ -554,6 +557,11 @@ func (c *GameLift) CreateFleetRequest(input *CreateFleetInput) (req *request.Req // * ErrCodeUnauthorizedException "UnauthorizedException" // The client failed authentication. Clients should not retry such requests. // +// * ErrCodeTaggingFailedException "TaggingFailedException" +// The requested tagging operation did not succeed. This may be due to invalid +// tag format or the maximum tag limit may have been exceeded. Resolve the issue +// before retrying. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateFleet func (c *GameLift) CreateFleet(input *CreateFleetInput) (*CreateFleetOutput, error) { req, out := c.CreateFleetRequest(input) @@ -789,7 +797,7 @@ func (c *GameLift) CreateGameSessionQueueRequest(input *CreateGameSessionQueueIn // A queue identifies where new game sessions can be hosted -- by specifying // a list of destinations (fleets or aliases) -- and how long requests can wait // in the queue before timing out. You can set up a queue to try to place game -// sessions on fleets in multiple regions. To add placement requests to a queue, +// sessions on fleets in multiple Regions. To add placement requests to a queue, // call StartGameSessionPlacement and reference the queue name. // // Destination order. When processing a request for a game session, Amazon GameLift @@ -848,6 +856,11 @@ func (c *GameLift) CreateGameSessionQueueRequest(input *CreateGameSessionQueueIn // The requested operation would cause the resource to exceed the allowed service // limit. Resolve the issue before retrying. // +// * ErrCodeTaggingFailedException "TaggingFailedException" +// The requested tagging operation did not succeed. This may be due to invalid +// tag format or the maximum tag limit may have been exceeded. Resolve the issue +// before retrying. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateGameSessionQueue func (c *GameLift) CreateGameSessionQueue(input *CreateGameSessionQueueInput) (*CreateGameSessionQueueOutput, error) { req, out := c.CreateGameSessionQueueRequest(input) @@ -985,7 +998,12 @@ func (c *GameLift) CreateMatchmakingConfigurationRequest(input *CreateMatchmakin // period. // // * ErrCodeUnsupportedRegionException "UnsupportedRegionException" -// The requested operation is not supported in the region specified. +// The requested operation is not supported in the Region specified. +// +// * ErrCodeTaggingFailedException "TaggingFailedException" +// The requested tagging operation did not succeed. This may be due to invalid +// tag format or the maximum tag limit may have been exceeded. Resolve the issue +// before retrying. // // See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateMatchmakingConfiguration func (c *GameLift) CreateMatchmakingConfiguration(input *CreateMatchmakingConfigurationInput) (*CreateMatchmakingConfigurationOutput, error) { @@ -1054,12 +1072,12 @@ func (c *GameLift) CreateMatchmakingRuleSetRequest(input *CreateMatchmakingRuleS // CreateMatchmakingRuleSet API operation for Amazon GameLift. // // Creates a new rule set for FlexMatch matchmaking. A rule set describes the -// type of match to create, such as the number and size of teams, and sets the -// parameters for acceptable player matches, such as minimum skill level or -// character type. A rule set is used by a MatchmakingConfiguration. +// type of match to create, such as the number and size of teams. It also sets +// the parameters for acceptable player matches, such as minimum skill level +// or character type. A rule set is used by a MatchmakingConfiguration. // // To create a matchmaking rule set, provide unique rule set name and the rule -// set body in JSON format. Rule sets must be defined in the same region as +// set body in JSON format. Rule sets must be defined in the same Region as // the matchmaking configuration they are used with. // // Since matchmaking rule sets cannot be edited, it is a good idea to check @@ -1110,7 +1128,12 @@ func (c *GameLift) CreateMatchmakingRuleSetRequest(input *CreateMatchmakingRuleS // period. // // * ErrCodeUnsupportedRegionException "UnsupportedRegionException" -// The requested operation is not supported in the region specified. +// The requested operation is not supported in the Region specified. +// +// * ErrCodeTaggingFailedException "TaggingFailedException" +// The requested tagging operation did not succeed. This may be due to invalid +// tag format or the maximum tag limit may have been exceeded. Resolve the issue +// before retrying. // // See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateMatchmakingRuleSet func (c *GameLift) CreateMatchmakingRuleSet(input *CreateMatchmakingRuleSetInput) (*CreateMatchmakingRuleSetOutput, error) { @@ -1499,6 +1522,11 @@ func (c *GameLift) CreateScriptRequest(input *CreateScriptInput) (req *request.R // a service resource associated with the request. Resolve the conflict before // retrying this request. // +// * ErrCodeTaggingFailedException "TaggingFailedException" +// The requested tagging operation did not succeed. This may be due to invalid +// tag format or the maximum tag limit may have been exceeded. Resolve the issue +// before retrying. +// // * ErrCodeInternalServiceException "InternalServiceException" // The service encountered an unrecoverable internal failure while processing // the request. Clients can retry such requests immediately or after a waiting @@ -1579,7 +1607,7 @@ func (c *GameLift) CreateVpcPeeringAuthorizationRequest(input *CreateVpcPeeringA // // You can peer with VPCs that are owned by any AWS account you have access // to, including the account that you use to manage your Amazon GameLift fleets. -// You cannot peer with VPCs that are in different regions. +// You cannot peer with VPCs that are in different Regions. // // To request authorization to create a connection, call this operation from // the AWS account with the VPC that you want to peer to your Amazon GameLift @@ -1707,7 +1735,7 @@ func (c *GameLift) CreateVpcPeeringConnectionRequest(input *CreateVpcPeeringConn // enables the game servers on your fleet to communicate directly with other // AWS resources. You can peer with VPCs in any AWS account that you have access // to, including the account that you use to manage your Amazon GameLift fleets. -// You cannot peer with VPCs that are in different regions. For more information, +// You cannot peer with VPCs that are in different Regions. For more information, // see VPC Peering with Amazon GameLift Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/vpc-peering.html). // // Before calling this operation to establish the peering connection, you first @@ -1864,6 +1892,11 @@ func (c *GameLift) DeleteAliasRequest(input *DeleteAliasInput) (req *request.Req // One or more parameter values in the request are invalid. Correct the invalid // parameter values before retrying. // +// * ErrCodeTaggingFailedException "TaggingFailedException" +// The requested tagging operation did not succeed. This may be due to invalid +// tag format or the maximum tag limit may have been exceeded. Resolve the issue +// before retrying. +// // * ErrCodeInternalServiceException "InternalServiceException" // The service encountered an unrecoverable internal failure while processing // the request. Clients can retry such requests immediately or after a waiting @@ -1979,6 +2012,11 @@ func (c *GameLift) DeleteBuildRequest(input *DeleteBuildInput) (req *request.Req // the request. Clients can retry such requests immediately or after a waiting // period. // +// * ErrCodeTaggingFailedException "TaggingFailedException" +// The requested tagging operation did not succeed. This may be due to invalid +// tag format or the maximum tag limit may have been exceeded. Resolve the issue +// before retrying. +// // * ErrCodeInvalidRequestException "InvalidRequestException" // One or more parameter values in the request are invalid. Correct the invalid // parameter values before retrying. @@ -2073,12 +2111,9 @@ func (c *GameLift) DeleteFleetRequest(input *DeleteFleetInput) (req *request.Req // // * DeleteFleet // -// * Describe fleets: DescribeFleetAttributes DescribeFleetCapacity DescribeFleetPortSettings -// DescribeFleetUtilization DescribeRuntimeConfiguration DescribeEC2InstanceLimits -// DescribeFleetEvents +// * DescribeFleetAttributes // -// * Update fleets: UpdateFleetAttributes UpdateFleetCapacity UpdateFleetPortSettings -// UpdateRuntimeConfiguration +// * UpdateFleetAttributes // // * Manage fleet actions: StartFleetActions StopFleetActions // @@ -2111,6 +2146,11 @@ func (c *GameLift) DeleteFleetRequest(input *DeleteFleetInput) (req *request.Req // One or more parameter values in the request are invalid. Correct the invalid // parameter values before retrying. // +// * ErrCodeTaggingFailedException "TaggingFailedException" +// The requested tagging operation did not succeed. This may be due to invalid +// tag format or the maximum tag limit may have been exceeded. Resolve the issue +// before retrying. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeleteFleet func (c *GameLift) DeleteFleet(input *DeleteFleetInput) (*DeleteFleetOutput, error) { req, out := c.DeleteFleetRequest(input) @@ -2214,6 +2254,11 @@ func (c *GameLift) DeleteGameSessionQueueRequest(input *DeleteGameSessionQueueIn // * ErrCodeUnauthorizedException "UnauthorizedException" // The client failed authentication. Clients should not retry such requests. // +// * ErrCodeTaggingFailedException "TaggingFailedException" +// The requested tagging operation did not succeed. This may be due to invalid +// tag format or the maximum tag limit may have been exceeded. Resolve the issue +// before retrying. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeleteGameSessionQueue func (c *GameLift) DeleteGameSessionQueue(input *DeleteGameSessionQueueInput) (*DeleteGameSessionQueueOutput, error) { req, out := c.DeleteGameSessionQueueRequest(input) @@ -2325,7 +2370,12 @@ func (c *GameLift) DeleteMatchmakingConfigurationRequest(input *DeleteMatchmakin // period. // // * ErrCodeUnsupportedRegionException "UnsupportedRegionException" -// The requested operation is not supported in the region specified. +// The requested operation is not supported in the Region specified. +// +// * ErrCodeTaggingFailedException "TaggingFailedException" +// The requested tagging operation did not succeed. This may be due to invalid +// tag format or the maximum tag limit may have been exceeded. Resolve the issue +// before retrying. // // See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeleteMatchmakingConfiguration func (c *GameLift) DeleteMatchmakingConfiguration(input *DeleteMatchmakingConfigurationInput) (*DeleteMatchmakingConfigurationOutput, error) { @@ -2438,12 +2488,17 @@ func (c *GameLift) DeleteMatchmakingRuleSetRequest(input *DeleteMatchmakingRuleS // period. // // * ErrCodeUnsupportedRegionException "UnsupportedRegionException" -// The requested operation is not supported in the region specified. +// The requested operation is not supported in the Region specified. // // * ErrCodeNotFoundException "NotFoundException" // A service resource associated with the request could not be found. Clients // should not retry such requests. // +// * ErrCodeTaggingFailedException "TaggingFailedException" +// The requested tagging operation did not succeed. This may be due to invalid +// tag format or the maximum tag limit may have been exceeded. Resolve the issue +// before retrying. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DeleteMatchmakingRuleSet func (c *GameLift) DeleteMatchmakingRuleSet(input *DeleteMatchmakingRuleSetInput) (*DeleteMatchmakingRuleSetOutput, error) { req, out := c.DeleteMatchmakingRuleSetRequest(input) @@ -2665,6 +2720,11 @@ func (c *GameLift) DeleteScriptRequest(input *DeleteScriptInput) (req *request.R // A service resource associated with the request could not be found. Clients // should not retry such requests. // +// * ErrCodeTaggingFailedException "TaggingFailedException" +// The requested tagging operation did not succeed. This may be due to invalid +// tag format or the maximum tag limit may have been exceeded. Resolve the issue +// before retrying. +// // * ErrCodeInternalServiceException "InternalServiceException" // The service encountered an unrecoverable internal failure while processing // the request. Clients can retry such requests immediately or after a waiting @@ -3178,7 +3238,7 @@ func (c *GameLift) DescribeEC2InstanceLimitsRequest(input *DescribeEC2InstanceLi // // * current usage level for the AWS account // -// Service limits vary depending on region. Available regions for Amazon GameLift +// Service limits vary depending on Region. Available Regions for Amazon GameLift // can be found in the AWS Management Console for Amazon GameLift (see the drop-down // list in the upper right corner). // @@ -3317,8 +3377,7 @@ func (c *GameLift) DescribeFleetAttributesRequest(input *DescribeFleetAttributes // DescribeFleetUtilization DescribeRuntimeConfiguration DescribeEC2InstanceLimits // DescribeFleetEvents // -// * Update fleets: UpdateFleetAttributes UpdateFleetCapacity UpdateFleetPortSettings -// UpdateRuntimeConfiguration +// * UpdateFleetAttributes // // * Manage fleet actions: StartFleetActions StopFleetActions // @@ -3441,8 +3500,7 @@ func (c *GameLift) DescribeFleetCapacityRequest(input *DescribeFleetCapacityInpu // DescribeFleetUtilization DescribeRuntimeConfiguration DescribeEC2InstanceLimits // DescribeFleetEvents // -// * Update fleets: UpdateFleetAttributes UpdateFleetCapacity UpdateFleetPortSettings -// UpdateRuntimeConfiguration +// * UpdateFleetAttributes // // * Manage fleet actions: StartFleetActions StopFleetActions // @@ -3557,8 +3615,7 @@ func (c *GameLift) DescribeFleetEventsRequest(input *DescribeFleetEventsInput) ( // DescribeFleetUtilization DescribeRuntimeConfiguration DescribeEC2InstanceLimits // DescribeFleetEvents // -// * Update fleets: UpdateFleetAttributes UpdateFleetCapacity UpdateFleetPortSettings -// UpdateRuntimeConfiguration +// * UpdateFleetAttributes // // * Manage fleet actions: StartFleetActions StopFleetActions // @@ -3675,8 +3732,7 @@ func (c *GameLift) DescribeFleetPortSettingsRequest(input *DescribeFleetPortSett // DescribeFleetUtilization DescribeRuntimeConfiguration DescribeEC2InstanceLimits // DescribeFleetEvents // -// * Update fleets: UpdateFleetAttributes UpdateFleetCapacity UpdateFleetPortSettings -// UpdateRuntimeConfiguration +// * UpdateFleetAttributes // // * Manage fleet actions: StartFleetActions StopFleetActions // @@ -3797,8 +3853,7 @@ func (c *GameLift) DescribeFleetUtilizationRequest(input *DescribeFleetUtilizati // DescribeFleetUtilization DescribeRuntimeConfiguration DescribeEC2InstanceLimits // DescribeFleetEvents // -// * Update fleets: UpdateFleetAttributes UpdateFleetCapacity UpdateFleetPortSettings -// UpdateRuntimeConfiguration +// * UpdateFleetAttributes // // * Manage fleet actions: StartFleetActions StopFleetActions // @@ -4129,7 +4184,7 @@ func (c *GameLift) DescribeGameSessionQueuesRequest(input *DescribeGameSessionQu // multiple queues, use the pagination parameters to retrieve results as a set // of sequential pages. If successful, a GameSessionQueue object is returned // for each requested queue. When specifying a list of queues, objects are returned -// only for queues that currently exist in the region. +// only for queues that currently exist in the Region. // // * CreateGameSessionQueue // @@ -4470,7 +4525,7 @@ func (c *GameLift) DescribeMatchmakingRequest(input *DescribeMatchmakingInput) ( // // Add FlexMatch to a Game Client (https://docs.aws.amazon.com/gamelift/latest/developerguide/match-client.html) // -// Set Up FlexMatch Event Notification (https://docs.aws.amazon.com/gamelift/latest/developerguidematch-notification.html) +// Set Up FlexMatch Event Notification (https://docs.aws.amazon.com/gamelift/latest/developerguide/match-notification.html) // // Related operations // @@ -4502,7 +4557,7 @@ func (c *GameLift) DescribeMatchmakingRequest(input *DescribeMatchmakingInput) ( // period. // // * ErrCodeUnsupportedRegionException "UnsupportedRegionException" -// The requested operation is not supported in the region specified. +// The requested operation is not supported in the Region specified. // // See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeMatchmaking func (c *GameLift) DescribeMatchmaking(input *DescribeMatchmakingInput) (*DescribeMatchmakingOutput, error) { @@ -4619,7 +4674,7 @@ func (c *GameLift) DescribeMatchmakingConfigurationsRequest(input *DescribeMatch // period. // // * ErrCodeUnsupportedRegionException "UnsupportedRegionException" -// The requested operation is not supported in the region specified. +// The requested operation is not supported in the Region specified. // // See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeMatchmakingConfigurations func (c *GameLift) DescribeMatchmakingConfigurations(input *DescribeMatchmakingConfigurationsInput) (*DescribeMatchmakingConfigurationsOutput, error) { @@ -4688,7 +4743,7 @@ func (c *GameLift) DescribeMatchmakingRuleSetsRequest(input *DescribeMatchmaking // DescribeMatchmakingRuleSets API operation for Amazon GameLift. // // Retrieves the details for FlexMatch matchmaking rule sets. You can request -// all existing rule sets for the region, or provide a list of one or more rule +// all existing rule sets for the Region, or provide a list of one or more rule // set names. When requesting multiple items, use the pagination parameters // to retrieve results as a set of sequential pages. If successful, a rule set // is returned for each requested name. @@ -4737,7 +4792,7 @@ func (c *GameLift) DescribeMatchmakingRuleSetsRequest(input *DescribeMatchmaking // should not retry such requests. // // * ErrCodeUnsupportedRegionException "UnsupportedRegionException" -// The requested operation is not supported in the region specified. +// The requested operation is not supported in the Region specified. // // See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/DescribeMatchmakingRuleSets func (c *GameLift) DescribeMatchmakingRuleSets(input *DescribeMatchmakingRuleSetsInput) (*DescribeMatchmakingRuleSetsOutput, error) { @@ -4918,8 +4973,8 @@ func (c *GameLift) DescribeRuntimeConfigurationRequest(input *DescribeRuntimeCon // DescribeRuntimeConfiguration API operation for Amazon GameLift. // -// Retrieves the current run-time configuration for the specified fleet. The -// run-time configuration tells Amazon GameLift how to launch server processes +// Retrieves the current runtime configuration for the specified fleet. The +// runtime configuration tells Amazon GameLift how to launch server processes // on instances in the fleet. // // Learn more @@ -4938,8 +4993,7 @@ func (c *GameLift) DescribeRuntimeConfigurationRequest(input *DescribeRuntimeCon // DescribeFleetUtilization DescribeRuntimeConfiguration DescribeEC2InstanceLimits // DescribeFleetEvents // -// * Update fleets: UpdateFleetAttributes UpdateFleetCapacity UpdateFleetPortSettings -// UpdateRuntimeConfiguration +// * UpdateFleetAttributes // // * Manage fleet actions: StartFleetActions StopFleetActions // @@ -5924,12 +5978,9 @@ func (c *GameLift) ListFleetsRequest(input *ListFleetsInput) (req *request.Reque // // * DeleteFleet // -// * Describe fleets: DescribeFleetAttributes DescribeFleetCapacity DescribeFleetPortSettings -// DescribeFleetUtilization DescribeRuntimeConfiguration DescribeEC2InstanceLimits -// DescribeFleetEvents +// * DescribeFleetAttributes // -// * Update fleets: UpdateFleetAttributes UpdateFleetCapacity UpdateFleetPortSettings -// UpdateRuntimeConfiguration +// * UpdateFleetAttributes // // * Manage fleet actions: StartFleetActions StopFleetActions // @@ -6084,6 +6135,134 @@ func (c *GameLift) ListScriptsWithContext(ctx aws.Context, input *ListScriptsInp return out, req.Send() } +const opListTagsForResource = "ListTagsForResource" + +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTagsForResource for more information on using the ListTagsForResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTagsForResourceRequest method. +// req, resp := client.ListTagsForResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/ListTagsForResource +func (c *GameLift) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for Amazon GameLift. +// +// Retrieves all tags that are assigned to a GameLift resource. Resource tags +// are used to organize AWS resources for a range of purposes. This action handles +// the permissions necessary to manage tags for the following GameLift resource +// types: +// +// * Build +// +// * Script +// +// * Fleet +// +// * Alias +// +// * GameSessionQueue +// +// * MatchmakingConfiguration +// +// * MatchmakingRuleSet +// +// To list tags for a resource, specify the unique ARN value for the resource. +// +// Learn more +// +// Tagging AWS Resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) +// in the AWS General Reference +// +// AWS Tagging Strategies (http://aws.amazon.com/answers/account-management/aws-tagging-strategies/) +// +// Related operations +// +// * TagResource +// +// * UntagResource +// +// * ListTagsForResource +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon GameLift's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// A service resource associated with the request could not be found. Clients +// should not retry such requests. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// One or more parameter values in the request are invalid. Correct the invalid +// parameter values before retrying. +// +// * ErrCodeTaggingFailedException "TaggingFailedException" +// The requested tagging operation did not succeed. This may be due to invalid +// tag format or the maximum tag limit may have been exceeded. Resolve the issue +// before retrying. +// +// * ErrCodeInternalServiceException "InternalServiceException" +// The service encountered an unrecoverable internal failure while processing +// the request. Clients can retry such requests immediately or after a waiting +// period. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/ListTagsForResource +func (c *GameLift) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + return out, req.Send() +} + +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GameLift) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutScalingPolicy = "PutScalingPolicy" // PutScalingPolicyRequest generates a "aws/request.Request" representing the @@ -6418,7 +6597,7 @@ func (c *GameLift) ResolveAliasRequest(input *ResolveAliasInput) (req *request.R // ResolveAlias API operation for Amazon GameLift. // -// Retrieves the fleet ID that a specified alias is currently pointing to. +// Retrieves the fleet ID that an alias is currently pointing to. // // * CreateAlias // @@ -6533,7 +6712,7 @@ func (c *GameLift) SearchGameSessionsRequest(input *SearchGameSessionsInput) (re // sorts them in a specified order. You can search or sort by the following // game session attributes: // -// * gameSessionId -- Unique identifier for the game session. You can use +// * gameSessionId -- A unique identifier for the game session. You can use // either a GameSessionId or GameSessionArn value. // // * gameSessionName -- Name assigned to a game session. This value is set @@ -6826,11 +7005,11 @@ func (c *GameLift) StartGameSessionPlacementRequest(input *StartGameSessionPlace // destinations are listed in preference order. // // Alternatively, when requesting a game session with players, you can also -// provide latency data for each player in relevant regions. Latency data indicates +// provide latency data for each player in relevant Regions. Latency data indicates // the performance lag a player experiences when connected to a fleet in the -// region. Amazon GameLift uses latency data to reorder the list of destinations -// to place the game session in a region with minimal lag. If latency data is -// provided for multiple players, Amazon GameLift calculates each region's average +// Region. Amazon GameLift uses latency data to reorder the list of destinations +// to place the game session in a Region with minimal lag. If latency data is +// provided for multiple players, Amazon GameLift calculates each Region's average // lag for all players and reorders to get the best game play across all players. // // To place a new game session request, specify the following: @@ -6851,7 +7030,7 @@ func (c *GameLift) StartGameSessionPlacementRequest(input *StartGameSessionPlace // // To track the status of a placement request, call DescribeGameSessionPlacement // and check the request's status. If the status is FULFILLED, a new game session -// has been created and a game session ARN and region are referenced. If the +// has been created and a game session ARN and Region are referenced. If the // placement request times out, you can resubmit the request or retry it with // a different queue. // @@ -7025,7 +7204,7 @@ func (c *GameLift) StartMatchBackfillRequest(input *StartMatchBackfillInput) (re // period. // // * ErrCodeUnsupportedRegionException "UnsupportedRegionException" -// The requested operation is not supported in the region specified. +// The requested operation is not supported in the Region specified. // // See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/StartMatchBackfill func (c *GameLift) StartMatchBackfill(input *StartMatchBackfillInput) (*StartMatchBackfillOutput, error) { @@ -7197,7 +7376,7 @@ func (c *GameLift) StartMatchmakingRequest(input *StartMatchmakingInput) (req *r // period. // // * ErrCodeUnsupportedRegionException "UnsupportedRegionException" -// The requested operation is not supported in the region specified. +// The requested operation is not supported in the Region specified. // // See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/StartMatchmaking func (c *GameLift) StartMatchmaking(input *StartMatchmakingInput) (*StartMatchmakingOutput, error) { @@ -7548,7 +7727,7 @@ func (c *GameLift) StopMatchmakingRequest(input *StopMatchmakingInput) (req *req // period. // // * ErrCodeUnsupportedRegionException "UnsupportedRegionException" -// The requested operation is not supported in the region specified. +// The requested operation is not supported in the Region specified. // // See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/StopMatchmaking func (c *GameLift) StopMatchmaking(input *StopMatchmakingInput) (*StopMatchmakingOutput, error) { @@ -7572,242 +7751,507 @@ func (c *GameLift) StopMatchmakingWithContext(ctx aws.Context, input *StopMatchm return out, req.Send() } -const opUpdateAlias = "UpdateAlias" +const opTagResource = "TagResource" -// UpdateAliasRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAlias operation. The "output" return +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UpdateAlias for more information on using the UpdateAlias +// See TagResource for more information on using the TagResource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the UpdateAliasRequest method. -// req, resp := client.UpdateAliasRequest(params) +// // Example sending a request using the TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateAlias -func (c *GameLift) UpdateAliasRequest(input *UpdateAliasInput) (req *request.Request, output *UpdateAliasOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/TagResource +func (c *GameLift) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { op := &request.Operation{ - Name: opUpdateAlias, + Name: opTagResource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &UpdateAliasInput{} + input = &TagResourceInput{} } - output = &UpdateAliasOutput{} + output = &TagResourceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// UpdateAlias API operation for Amazon GameLift. +// TagResource API operation for Amazon GameLift. // -// Updates properties for an alias. To update properties, specify the alias -// ID to be updated and provide the information to be changed. To reassign an -// alias to another fleet, provide an updated routing strategy. If successful, -// the updated alias record is returned. +// Assigns a tag to a GameLift resource. AWS resource tags provide an additional +// management tool set. You can use tags to organize resources, create IAM permissions +// policies to manage access to groups of resources, customize AWS cost breakdowns, +// etc. This action handles the permissions necessary to manage tags for the +// following GameLift resource types: // -// * CreateAlias +// * Build // -// * ListAliases +// * Script // -// * DescribeAlias +// * Fleet // -// * UpdateAlias +// * Alias // -// * DeleteAlias +// * GameSessionQueue // -// * ResolveAlias +// * MatchmakingConfiguration +// +// * MatchmakingRuleSet +// +// To add a tag to a resource, specify the unique ARN value for the resource +// and provide a trig list containing one or more tags. The operation succeeds +// even if the list includes tags that are already assigned to the specified +// resource. +// +// Learn more +// +// Tagging AWS Resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) +// in the AWS General Reference +// +// AWS Tagging Strategies (http://aws.amazon.com/answers/account-management/aws-tagging-strategies/) +// +// Related operations +// +// * TagResource +// +// * UntagResource +// +// * ListTagsForResource // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon GameLift's -// API operation UpdateAlias for usage and error information. +// API operation TagResource for usage and error information. // // Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. +// * ErrCodeNotFoundException "NotFoundException" +// A service resource associated with the request could not be found. Clients +// should not retry such requests. // // * ErrCodeInvalidRequestException "InvalidRequestException" // One or more parameter values in the request are invalid. Correct the invalid // parameter values before retrying. // -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. +// * ErrCodeTaggingFailedException "TaggingFailedException" +// The requested tagging operation did not succeed. This may be due to invalid +// tag format or the maximum tag limit may have been exceeded. Resolve the issue +// before retrying. // // * ErrCodeInternalServiceException "InternalServiceException" // The service encountered an unrecoverable internal failure while processing // the request. Clients can retry such requests immediately or after a waiting // period. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateAlias -func (c *GameLift) UpdateAlias(input *UpdateAliasInput) (*UpdateAliasOutput, error) { - req, out := c.UpdateAliasRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/TagResource +func (c *GameLift) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) return out, req.Send() } -// UpdateAliasWithContext is the same as UpdateAlias with the addition of +// TagResourceWithContext is the same as TagResource with the addition of // the ability to pass a context and additional request options. // -// See UpdateAlias for details on how to use this API operation. +// See TagResource for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *GameLift) UpdateAliasWithContext(ctx aws.Context, input *UpdateAliasInput, opts ...request.Option) (*UpdateAliasOutput, error) { - req, out := c.UpdateAliasRequest(input) +func (c *GameLift) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUpdateBuild = "UpdateBuild" +const opUntagResource = "UntagResource" -// UpdateBuildRequest generates a "aws/request.Request" representing the -// client's request for the UpdateBuild operation. The "output" return +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UpdateBuild for more information on using the UpdateBuild +// See UntagResource for more information on using the UntagResource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the UpdateBuildRequest method. -// req, resp := client.UpdateBuildRequest(params) +// // Example sending a request using the UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateBuild -func (c *GameLift) UpdateBuildRequest(input *UpdateBuildInput) (req *request.Request, output *UpdateBuildOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UntagResource +func (c *GameLift) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { op := &request.Operation{ - Name: opUpdateBuild, + Name: opUntagResource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &UpdateBuildInput{} + input = &UntagResourceInput{} } - output = &UpdateBuildOutput{} + output = &UntagResourceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// UpdateBuild API operation for Amazon GameLift. +// UntagResource API operation for Amazon GameLift. // -// Updates metadata in a build record, including the build name and version. -// To update the metadata, specify the build ID to update and provide the new -// values. If successful, a build object containing the updated metadata is -// returned. +// Removes a tag that is assigned to a GameLift resource. Resource tags are +// used to organize AWS resources for a range of purposes. This action handles +// the permissions necessary to manage tags for the following GameLift resource +// types: // -// Learn more +// * Build // -// Working with Builds (https://docs.aws.amazon.com/gamelift/latest/developerguide/build-intro.html) +// * Script // -// Related operations +// * Fleet // -// * CreateBuild +// * Alias // -// * ListBuilds +// * GameSessionQueue // -// * DescribeBuild +// * MatchmakingConfiguration // -// * UpdateBuild +// * MatchmakingRuleSet // -// * DeleteBuild +// To remove a tag from a resource, specify the unique ARN value for the resource +// and provide a string list containing one or more tags to be removed. This +// action succeeds even if the list includes tags that are not currently assigned +// to the specified resource. +// +// Learn more +// +// Tagging AWS Resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) +// in the AWS General Reference +// +// AWS Tagging Strategies (http://aws.amazon.com/answers/account-management/aws-tagging-strategies/) +// +// Related operations +// +// * TagResource +// +// * UntagResource +// +// * ListTagsForResource // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon GameLift's -// API operation UpdateBuild for usage and error information. +// API operation UntagResource for usage and error information. // // Returned Error Codes: -// * ErrCodeUnauthorizedException "UnauthorizedException" -// The client failed authentication. Clients should not retry such requests. +// * ErrCodeNotFoundException "NotFoundException" +// A service resource associated with the request could not be found. Clients +// should not retry such requests. // // * ErrCodeInvalidRequestException "InvalidRequestException" // One or more parameter values in the request are invalid. Correct the invalid // parameter values before retrying. // -// * ErrCodeNotFoundException "NotFoundException" -// A service resource associated with the request could not be found. Clients -// should not retry such requests. +// * ErrCodeTaggingFailedException "TaggingFailedException" +// The requested tagging operation did not succeed. This may be due to invalid +// tag format or the maximum tag limit may have been exceeded. Resolve the issue +// before retrying. // // * ErrCodeInternalServiceException "InternalServiceException" // The service encountered an unrecoverable internal failure while processing // the request. Clients can retry such requests immediately or after a waiting // period. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateBuild -func (c *GameLift) UpdateBuild(input *UpdateBuildInput) (*UpdateBuildOutput, error) { - req, out := c.UpdateBuildRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UntagResource +func (c *GameLift) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) return out, req.Send() } -// UpdateBuildWithContext is the same as UpdateBuild with the addition of +// UntagResourceWithContext is the same as UntagResource with the addition of // the ability to pass a context and additional request options. // -// See UpdateBuild for details on how to use this API operation. +// See UntagResource for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *GameLift) UpdateBuildWithContext(ctx aws.Context, input *UpdateBuildInput, opts ...request.Option) (*UpdateBuildOutput, error) { - req, out := c.UpdateBuildRequest(input) +func (c *GameLift) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUpdateFleetAttributes = "UpdateFleetAttributes" +const opUpdateAlias = "UpdateAlias" -// UpdateFleetAttributesRequest generates a "aws/request.Request" representing the -// client's request for the UpdateFleetAttributes operation. The "output" return +// UpdateAliasRequest generates a "aws/request.Request" representing the +// client's request for the UpdateAlias operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UpdateFleetAttributes for more information on using the UpdateFleetAttributes +// See UpdateAlias for more information on using the UpdateAlias // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the UpdateFleetAttributesRequest method. +// // Example sending a request using the UpdateAliasRequest method. +// req, resp := client.UpdateAliasRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateAlias +func (c *GameLift) UpdateAliasRequest(input *UpdateAliasInput) (req *request.Request, output *UpdateAliasOutput) { + op := &request.Operation{ + Name: opUpdateAlias, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateAliasInput{} + } + + output = &UpdateAliasOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateAlias API operation for Amazon GameLift. +// +// Updates properties for an alias. To update properties, specify the alias +// ID to be updated and provide the information to be changed. To reassign an +// alias to another fleet, provide an updated routing strategy. If successful, +// the updated alias record is returned. +// +// * CreateAlias +// +// * ListAliases +// +// * DescribeAlias +// +// * UpdateAlias +// +// * DeleteAlias +// +// * ResolveAlias +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon GameLift's +// API operation UpdateAlias for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnauthorizedException "UnauthorizedException" +// The client failed authentication. Clients should not retry such requests. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// One or more parameter values in the request are invalid. Correct the invalid +// parameter values before retrying. +// +// * ErrCodeNotFoundException "NotFoundException" +// A service resource associated with the request could not be found. Clients +// should not retry such requests. +// +// * ErrCodeInternalServiceException "InternalServiceException" +// The service encountered an unrecoverable internal failure while processing +// the request. Clients can retry such requests immediately or after a waiting +// period. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateAlias +func (c *GameLift) UpdateAlias(input *UpdateAliasInput) (*UpdateAliasOutput, error) { + req, out := c.UpdateAliasRequest(input) + return out, req.Send() +} + +// UpdateAliasWithContext is the same as UpdateAlias with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateAlias for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GameLift) UpdateAliasWithContext(ctx aws.Context, input *UpdateAliasInput, opts ...request.Option) (*UpdateAliasOutput, error) { + req, out := c.UpdateAliasRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateBuild = "UpdateBuild" + +// UpdateBuildRequest generates a "aws/request.Request" representing the +// client's request for the UpdateBuild operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateBuild for more information on using the UpdateBuild +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateBuildRequest method. +// req, resp := client.UpdateBuildRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateBuild +func (c *GameLift) UpdateBuildRequest(input *UpdateBuildInput) (req *request.Request, output *UpdateBuildOutput) { + op := &request.Operation{ + Name: opUpdateBuild, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateBuildInput{} + } + + output = &UpdateBuildOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateBuild API operation for Amazon GameLift. +// +// Updates metadata in a build record, including the build name and version. +// To update the metadata, specify the build ID to update and provide the new +// values. If successful, a build object containing the updated metadata is +// returned. +// +// Learn more +// +// Working with Builds (https://docs.aws.amazon.com/gamelift/latest/developerguide/build-intro.html) +// +// Related operations +// +// * CreateBuild +// +// * ListBuilds +// +// * DescribeBuild +// +// * UpdateBuild +// +// * DeleteBuild +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon GameLift's +// API operation UpdateBuild for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnauthorizedException "UnauthorizedException" +// The client failed authentication. Clients should not retry such requests. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// One or more parameter values in the request are invalid. Correct the invalid +// parameter values before retrying. +// +// * ErrCodeNotFoundException "NotFoundException" +// A service resource associated with the request could not be found. Clients +// should not retry such requests. +// +// * ErrCodeInternalServiceException "InternalServiceException" +// The service encountered an unrecoverable internal failure while processing +// the request. Clients can retry such requests immediately or after a waiting +// period. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateBuild +func (c *GameLift) UpdateBuild(input *UpdateBuildInput) (*UpdateBuildOutput, error) { + req, out := c.UpdateBuildRequest(input) + return out, req.Send() +} + +// UpdateBuildWithContext is the same as UpdateBuild with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateBuild for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GameLift) UpdateBuildWithContext(ctx aws.Context, input *UpdateBuildInput, opts ...request.Option) (*UpdateBuildOutput, error) { + req, out := c.UpdateBuildRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateFleetAttributes = "UpdateFleetAttributes" + +// UpdateFleetAttributesRequest generates a "aws/request.Request" representing the +// client's request for the UpdateFleetAttributes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateFleetAttributes for more information on using the UpdateFleetAttributes +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateFleetAttributesRequest method. // req, resp := client.UpdateFleetAttributesRequest(params) // // err := req.Send() @@ -7850,9 +8294,7 @@ func (c *GameLift) UpdateFleetAttributesRequest(input *UpdateFleetAttributesInpu // // * DeleteFleet // -// * Describe fleets: DescribeFleetAttributes DescribeFleetCapacity DescribeFleetPortSettings -// DescribeFleetUtilization DescribeRuntimeConfiguration DescribeEC2InstanceLimits -// DescribeFleetEvents +// * DescribeFleetAttributes // // * Update fleets: UpdateFleetAttributes UpdateFleetCapacity UpdateFleetPortSettings // UpdateRuntimeConfiguration @@ -7992,9 +8434,7 @@ func (c *GameLift) UpdateFleetCapacityRequest(input *UpdateFleetCapacityInput) ( // // * DeleteFleet // -// * Describe fleets: DescribeFleetAttributes DescribeFleetCapacity DescribeFleetPortSettings -// DescribeFleetUtilization DescribeRuntimeConfiguration DescribeEC2InstanceLimits -// DescribeFleetEvents +// * DescribeFleetAttributes // // * Update fleets: UpdateFleetAttributes UpdateFleetCapacity UpdateFleetPortSettings // UpdateRuntimeConfiguration @@ -8124,9 +8564,7 @@ func (c *GameLift) UpdateFleetPortSettingsRequest(input *UpdateFleetPortSettings // // * DeleteFleet // -// * Describe fleets: DescribeFleetAttributes DescribeFleetCapacity DescribeFleetPortSettings -// DescribeFleetUtilization DescribeRuntimeConfiguration DescribeEC2InstanceLimits -// DescribeFleetEvents +// * DescribeFleetAttributes // // * Update fleets: UpdateFleetAttributes UpdateFleetCapacity UpdateFleetPortSettings // UpdateRuntimeConfiguration @@ -8512,7 +8950,7 @@ func (c *GameLift) UpdateMatchmakingConfigurationRequest(input *UpdateMatchmakin // period. // // * ErrCodeUnsupportedRegionException "UnsupportedRegionException" -// The requested operation is not supported in the region specified. +// The requested operation is not supported in the Region specified. // // See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateMatchmakingConfiguration func (c *GameLift) UpdateMatchmakingConfiguration(input *UpdateMatchmakingConfigurationInput) (*UpdateMatchmakingConfigurationOutput, error) { @@ -8580,20 +9018,20 @@ func (c *GameLift) UpdateRuntimeConfigurationRequest(input *UpdateRuntimeConfigu // UpdateRuntimeConfiguration API operation for Amazon GameLift. // -// Updates the current run-time configuration for the specified fleet, which +// Updates the current runtime configuration for the specified fleet, which // tells Amazon GameLift how to launch server processes on instances in the -// fleet. You can update a fleet's run-time configuration at any time after -// the fleet is created; it does not need to be in an ACTIVE status. +// fleet. You can update a fleet's runtime configuration at any time after the +// fleet is created; it does not need to be in an ACTIVE status. // -// To update run-time configuration, specify the fleet ID and provide a RuntimeConfiguration +// To update runtime configuration, specify the fleet ID and provide a RuntimeConfiguration // object with an updated set of server process configurations. // // Each instance in a Amazon GameLift fleet checks regularly for an updated -// run-time configuration and changes how it launches server processes to comply +// runtime configuration and changes how it launches server processes to comply // with the latest version. Existing server processes are not affected by the -// update; run-time configuration changes are applied gradually as existing -// processes shut down and new processes are launched during Amazon GameLift's -// normal process recycling activity. +// update; runtime configuration changes are applied gradually as existing processes +// shut down and new processes are launched during Amazon GameLift's normal +// process recycling activity. // // Learn more // @@ -8607,9 +9045,7 @@ func (c *GameLift) UpdateRuntimeConfigurationRequest(input *UpdateRuntimeConfigu // // * DeleteFleet // -// * Describe fleets: DescribeFleetAttributes DescribeFleetCapacity DescribeFleetPortSettings -// DescribeFleetUtilization DescribeRuntimeConfiguration DescribeEC2InstanceLimits -// DescribeFleetEvents +// * DescribeFleetAttributes // // * Update fleets: UpdateFleetAttributes UpdateFleetCapacity UpdateFleetPortSettings // UpdateRuntimeConfiguration @@ -8873,7 +9309,7 @@ func (c *GameLift) ValidateMatchmakingRuleSetRequest(input *ValidateMatchmakingR // period. // // * ErrCodeUnsupportedRegionException "UnsupportedRegionException" -// The requested operation is not supported in the region specified. +// The requested operation is not supported in the Region specified. // // * ErrCodeInvalidRequestException "InvalidRequestException" // One or more parameter values in the request are invalid. Correct the invalid @@ -8910,13 +9346,13 @@ type AcceptMatchInput struct { // AcceptanceType is a required field AcceptanceType *string `type:"string" required:"true" enum:"AcceptanceType"` - // Unique identifier for a player delivering the response. This parameter can - // include one or multiple player IDs. + // A unique identifier for a player delivering the response. This parameter + // can include one or multiple player IDs. // // PlayerIds is a required field PlayerIds []*string `type:"list" required:"true"` - // Unique identifier for a matchmaking ticket. The ticket must be in status + // A unique identifier for a matchmaking ticket. The ticket must be in status // REQUIRES_ACCEPTANCE; otherwise this request will fail. // // TicketId is a required field @@ -8984,7 +9420,7 @@ func (s AcceptMatchOutput) GoString() string { return s.String() } -// Properties describing a fleet alias. +// Properties that describe an alias resource. // // * CreateAlias // @@ -9000,28 +9436,32 @@ func (s AcceptMatchOutput) GoString() string { type Alias struct { _ struct{} `type:"structure"` - // Unique identifier for an alias; alias ARNs are unique across all regions. + // Amazon Resource Name (ARN (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)) + // that is assigned to a GameLift alias resource and uniquely identifies it. + // ARNs are unique across all Regions.. In a GameLift alias ARN, the resource + // ID matches the alias ID value. AliasArn *string `min:"1" type:"string"` - // Unique identifier for an alias; alias IDs are unique within a region. + // A unique identifier for an alias. Alias IDs are unique within a Region. AliasId *string `type:"string"` - // Time stamp indicating when this data object was created. Format is a number + // A time stamp indicating when this data object was created. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057"). CreationTime *time.Time `type:"timestamp"` - // Human-readable description of an alias. + // A human-readable description of an alias. Description *string `type:"string"` - // Time stamp indicating when this data object was last modified. Format is - // a number expressed in Unix time as milliseconds (for example "1469498468.057"). + // The time that this data object was last modified. Format is a number expressed + // in Unix time as milliseconds (for example "1469498468.057"). LastUpdatedTime *time.Time `type:"timestamp"` - // Descriptive label that is associated with an alias. Alias names do not need - // to be unique. + // A descriptive label that is associated with an alias. Alias names do not + // need to be unique. Name *string `min:"1" type:"string"` - // Alias configuration for the alias, including routing type and settings. + // The routing configuration, including routing type and fleet target, for the + // alias. RoutingStrategy *RoutingStrategy `type:"structure"` } @@ -9077,7 +9517,7 @@ func (s *Alias) SetRoutingStrategy(v *RoutingStrategy) *Alias { return s } -// Values for use in Player attribute key:value pairs. This object lets you +// Values for use in Player attribute key-value pairs. This object lets you // specify an attribute value using any of the valid data types: string, number, // string array, or data map. Each AttributeValue object can use only one of // the available properties. @@ -9208,14 +9648,20 @@ func (s *AwsCredentials) SetSessionToken(v string) *AwsCredentials { type Build struct { _ struct{} `type:"structure"` - // Unique identifier for a build. + // Amazon Resource Name (ARN (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)) + // that is assigned to a GameLift build resource and uniquely identifies it. + // ARNs are unique across all Regions. In a GameLift build ARN, the resource + // ID matches the BuildId value. + BuildArn *string `type:"string"` + + // A unique identifier for a build. BuildId *string `type:"string"` // Time stamp indicating when this data object was created. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057"). CreationTime *time.Time `type:"timestamp"` - // Descriptive label that is associated with a build. Build names do not need + // A descriptive label that is associated with a build. Build names do not need // to be unique. It can be set using CreateBuild or UpdateBuild. Name *string `type:"string"` @@ -9243,8 +9689,8 @@ type Build struct { // for this build. Status *string `type:"string" enum:"BuildStatus"` - // Version that is associated with a build or script. Version strings do not - // need to be unique. This value can be set using CreateBuild or UpdateBuild. + // Version information that is associated with a build or script. Version strings + // do not need to be unique. This value can be set using CreateBuild or UpdateBuild. Version *string `type:"string"` } @@ -9258,6 +9704,12 @@ func (s Build) GoString() string { return s.String() } +// SetBuildArn sets the BuildArn field's value. +func (s *Build) SetBuildArn(v string) *Build { + s.BuildArn = &v + return s +} + // SetBuildId sets the BuildId field's value. func (s *Build) SetBuildId(v string) *Build { s.BuildId = &v @@ -9300,9 +9752,16 @@ func (s *Build) SetVersion(v string) *Build { return s } +// Information about the use of a TLS/SSL certificate for a fleet. TLS certificate +// generation is enabled at the fleet level, with one certificate generated +// for the fleet. When this feature is enabled, the certificate can be retrieved +// using the GameLift Server SDK (https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-serversdk.html) +// call GetInstanceCertificate. All instances in a fleet share the same certificate. type CertificateConfiguration struct { _ struct{} `type:"structure"` + // Indicates whether a TLS/SSL certificate was generated for a fleet. + // // CertificateType is a required field CertificateType *string `type:"string" required:"true" enum:"CertificateType"` } @@ -9340,19 +9799,30 @@ func (s *CertificateConfiguration) SetCertificateType(v string) *CertificateConf type CreateAliasInput struct { _ struct{} `type:"structure"` - // Human-readable description of an alias. + // A human-readable description of the alias. Description *string `min:"1" type:"string"` - // Descriptive label that is associated with an alias. Alias names do not need - // to be unique. + // A descriptive label that is associated with an alias. Alias names do not + // need to be unique. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` - // Object that specifies the fleet and routing type to use for the alias. + // The routing configuration, including routing type and fleet target, for the + // alias. // // RoutingStrategy is a required field RoutingStrategy *RoutingStrategy `type:"structure" required:"true"` + + // A list of labels to assign to the new alias resource. Tags are developer-defined + // key-value pairs. Tagging AWS resources are useful for resource management, + // access management and cost allocation. For more information, see Tagging + // AWS Resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) + // in the AWS General Reference. Once the resource is created, you can use TagResource, + // UntagResource, and ListTagsForResource to add, remove, and view tags. The + // maximum tag limit may be lower than stated. See the AWS General Reference + // for actual tagging limits. + Tags []*Tag `type:"list"` } // String returns the string representation @@ -9380,6 +9850,16 @@ func (s *CreateAliasInput) Validate() error { if s.RoutingStrategy == nil { invalidParams.Add(request.NewErrParamRequired("RoutingStrategy")) } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -9405,11 +9885,17 @@ func (s *CreateAliasInput) SetRoutingStrategy(v *RoutingStrategy) *CreateAliasIn return s } +// SetTags sets the Tags field's value. +func (s *CreateAliasInput) SetTags(v []*Tag) *CreateAliasInput { + s.Tags = v + return s +} + // Represents the returned data in response to a request action. type CreateAliasOutput struct { _ struct{} `type:"structure"` - // Object that describes the newly created alias record. + // The newly created alias resource. Alias *Alias `type:"structure"` } @@ -9433,11 +9919,11 @@ func (s *CreateAliasOutput) SetAlias(v *Alias) *CreateAliasOutput { type CreateBuildInput struct { _ struct{} `type:"structure"` - // Descriptive label that is associated with a build. Build names do not need + // A descriptive label that is associated with a build. Build names do not need // to be unique. You can use UpdateBuild to change this value later. Name *string `min:"1" type:"string"` - // Operating system that the game server binaries are built to run on. This + // The operating system that the game server binaries are built to run on. This // value determines the type of fleet resources that you can use for this build. // If your game build contains multiple executables, they all must run on the // same operating system. If an operating system is not specified when creating @@ -9447,14 +9933,24 @@ type CreateBuildInput struct { // Information indicating where your game build files are stored. Use this parameter // only when creating a build with files stored in an Amazon S3 bucket that - // you own. The storage location must specify an Amazon S3 bucket name and key, - // as well as a the ARN for a role that you set up to allow Amazon GameLift - // to access your Amazon S3 bucket. The S3 bucket must be in the same region - // that you want to create a new build in. + // you own. The storage location must specify an Amazon S3 bucket name and key. + // The location must also specify a role ARN that you set up to allow Amazon + // GameLift to access your Amazon S3 bucket. The S3 bucket and your new build + // must be in the same Region. StorageLocation *S3Location `type:"structure"` - // Version that is associated with a build or script. Version strings do not - // need to be unique. You can use UpdateBuild to change this value later. + // A list of labels to assign to the new build resource. Tags are developer-defined + // key-value pairs. Tagging AWS resources are useful for resource management, + // access management and cost allocation. For more information, see Tagging + // AWS Resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) + // in the AWS General Reference. Once the resource is created, you can use TagResource, + // UntagResource, and ListTagsForResource to add, remove, and view tags. The + // maximum tag limit may be lower than stated. See the AWS General Reference + // for actual tagging limits. + Tags []*Tag `type:"list"` + + // Version information that is associated with a build or script. Version strings + // do not need to be unique. You can use UpdateBuild to change this value later. Version *string `min:"1" type:"string"` } @@ -9482,6 +9978,16 @@ func (s *CreateBuildInput) Validate() error { invalidParams.AddNested("StorageLocation", err.(request.ErrInvalidParams)) } } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -9507,6 +10013,12 @@ func (s *CreateBuildInput) SetStorageLocation(v *S3Location) *CreateBuildInput { return s } +// SetTags sets the Tags field's value. +func (s *CreateBuildInput) SetTags(v []*Tag) *CreateBuildInput { + s.Tags = v + return s +} + // SetVersion sets the Version field's value. func (s *CreateBuildInput) SetVersion(v string) *CreateBuildInput { s.Version = &v @@ -9517,7 +10029,7 @@ func (s *CreateBuildInput) SetVersion(v string) *CreateBuildInput { type CreateBuildOutput struct { _ struct{} `type:"structure"` - // The newly created build record, including a unique build ID and status. + // The newly created build record, including a unique build IDs and status. Build *Build `type:"structure"` // Amazon S3 location for your game build file, including bucket name and key. @@ -9562,45 +10074,63 @@ func (s *CreateBuildOutput) SetUploadCredentials(v *AwsCredentials) *CreateBuild type CreateFleetInput struct { _ struct{} `type:"structure"` - // Unique identifier for a build to be deployed on the new fleet. The custom - // game server build must have been successfully uploaded to Amazon GameLift - // and be in a READY status. This fleet setting cannot be changed once the fleet - // is created. + // A unique identifier for a build to be deployed on the new fleet. You can + // use either the build ID or ARN value. The custom game server build must have + // been successfully uploaded to Amazon GameLift and be in a READY status. This + // fleet setting cannot be changed once the fleet is created. BuildId *string `type:"string"` + // Indicates whether to generate a TLS/SSL certificate for the new fleet. TLS + // certificates are used for encrypting traffic between game clients and game + // servers running on GameLift. If this parameter is not specified, the default + // value, DISABLED, is used. This fleet setting cannot be changed once the fleet + // is created. Learn more at Securing Client/Server Communication (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-howitworks.html#gamelift-howitworks-security). + // + // Note: This feature requires the AWS Certificate Manager (ACM) service, which + // is available in the AWS global partition but not in all other partitions. + // When working in a partition that does not support this feature, a request + // for a new fleet with certificate generation results fails with a 4xx unsupported + // Region error. + // + // Valid values include: + // + // * GENERATED - Generate a TLS/SSL certificate for this fleet. + // + // * DISABLED - (default) Do not generate a TLS/SSL certificate for this + // fleet. CertificateConfiguration *CertificateConfiguration `type:"structure"` - // Human-readable description of a fleet. + // A human-readable description of a fleet. Description *string `min:"1" type:"string"` // Range of IP addresses and port settings that permit inbound traffic to access - // game sessions that running on the fleet. For fleets using a custom game build, - // this parameter is required before game sessions running on the fleet can - // accept connections. For Realtime Servers fleets, Amazon GameLift automatically + // game sessions that are running on the fleet. For fleets using a custom game + // build, this parameter is required before game sessions running on the fleet + // can accept connections. For Realtime Servers fleets, Amazon GameLift automatically // sets TCP and UDP ranges for use by the Realtime servers. You can specify // multiple permission settings or add more by updating the fleet. EC2InboundPermissions []*IpPermission `type:"list"` - // Name of an EC2 instance type that is supported in Amazon GameLift. A fleet - // instance type determines the computing resources of each instance in the - // fleet, including CPU, memory, storage, and networking capacity. Amazon GameLift - // supports the following EC2 instance types. See Amazon EC2 Instance Types - // (http://aws.amazon.com/ec2/instance-types/) for detailed descriptions. + // The name of an EC2 instance type that is supported in Amazon GameLift. A + // fleet instance type determines the computing resources of each instance in + // the fleet, including CPU, memory, storage, and networking capacity. Amazon + // GameLift supports the following EC2 instance types. See Amazon EC2 Instance + // Types (http://aws.amazon.com/ec2/instance-types/) for detailed descriptions. // // EC2InstanceType is a required field EC2InstanceType *string `type:"string" required:"true" enum:"EC2InstanceType"` - // Indicates whether to use on-demand instances or spot instances for this fleet. + // Indicates whether to use On-Demand instances or Spot instances for this fleet. // If empty, the default is ON_DEMAND. Both categories of instances use identical // hardware and configurations based on the instance type selected for this // fleet. Learn more about On-Demand versus Spot Instances (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-ec2-instances.html#gamelift-ec2-instances-spot). FleetType *string `type:"string" enum:"FleetType"` - // Unique identifier for an AWS IAM role that manages access to your AWS services. + // A unique identifier for an AWS IAM role that manages access to your AWS services. // With an instance role ARN set, any application that runs on an instance in // this fleet can assume the role, including install scripts, server processes, - // daemons (background processes). Create a role or look up a role's ARN using - // the IAM dashboard (https://console.aws.amazon.com/iam/) in the AWS Management + // and daemons (background processes). Create a role or look up a role's ARN + // from the IAM dashboard (https://console.aws.amazon.com/iam/) in the AWS Management // Console. Learn more about using on-box credentials for your game servers // at Access external resources from a game server (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-resources.html). InstanceRoleArn *string `min:"1" type:"string"` @@ -9611,72 +10141,88 @@ type CreateFleetInput struct { // See more information in the Server API Reference (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api-ref.html#gamelift-sdk-server-api-ref-dataypes-process). LogPaths []*string `type:"list"` - // Name of an Amazon CloudWatch metric group to add this fleet to. A metric + // The name of an Amazon CloudWatch metric group to add this fleet to. A metric // group aggregates the metrics for all fleets in the group. Specify an existing // metric group name, or provide a new name to create a new metric group. A // fleet can only be included in one metric group at a time. MetricGroups []*string `type:"list"` - // Descriptive label that is associated with a fleet. Fleet names do not need + // A descriptive label that is associated with a fleet. Fleet names do not need // to be unique. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` - // Game session protection policy to apply to all instances in this fleet. If - // this parameter is not set, instances in this fleet default to no protection. + // A game session protection policy to apply to all instances in this fleet. + // If this parameter is not set, instances in this fleet default to no protection. // You can change a fleet's protection policy using UpdateFleetAttributes, but // this change will only affect sessions created after the policy change. You // can also set protection for individual instances using UpdateGameSession. // - // * NoProtection -- The game session can be terminated during a scale-down + // * NoProtection - The game session can be terminated during a scale-down // event. // - // * FullProtection -- If the game session is in an ACTIVE status, it cannot + // * FullProtection - If the game session is in an ACTIVE status, it cannot // be terminated during a scale-down event. NewGameSessionProtectionPolicy *string `type:"string" enum:"ProtectionPolicy"` - // Unique identifier for the AWS account with the VPC that you want to peer - // your Amazon GameLift fleet with. You can find your Account ID in the AWS + // A unique identifier for the AWS account with the VPC that you want to peer + // your Amazon GameLift fleet with. You can find your account ID in the AWS // Management Console under account settings. PeerVpcAwsAccountId *string `min:"1" type:"string"` - // Unique identifier for a VPC with resources to be accessed by your Amazon - // GameLift fleet. The VPC must be in the same region where your fleet is deployed. - // Look up a VPC ID using the VPC Dashboard (https://console.aws.amazon.com/vpc/) + // A unique identifier for a VPC with resources to be accessed by your Amazon + // GameLift fleet. The VPC must be in the same Region as your fleet. To look + // up a VPC ID, use the VPC Dashboard (https://console.aws.amazon.com/vpc/) // in the AWS Management Console. Learn more about VPC peering in VPC Peering // with Amazon GameLift Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/vpc-peering.html). PeerVpcId *string `min:"1" type:"string"` - // Policy that limits the number of game sessions an individual player can create - // over a span of time for this fleet. + // A policy that limits the number of game sessions an individual player can + // create over a span of time for this fleet. ResourceCreationLimitPolicy *ResourceCreationLimitPolicy `type:"structure"` // Instructions for launching server processes on each instance in the fleet. // Server processes run either a custom game build executable or a Realtime - // Servers script. The run-time configuration lists the types of server processes - // to run on an instance and includes the following configuration settings: - // the server executable or launch script file, launch parameters, and the number - // of processes to run concurrently on each instance. A CreateFleet request - // must include a run-time configuration with at least one server process configuration. + // script. The runtime configuration defines the server executables or launch + // script file, launch parameters, and the number of processes to run concurrently + // on each instance. When creating a fleet, the runtime configuration must have + // at least one server process configuration; otherwise the request fails with + // an invalid request exception. (This parameter replaces the parameters ServerLaunchPath + // and ServerLaunchParameters, although requests that contain values for these + // parameters instead of a runtime configuration will continue to work.) This + // parameter is required unless the parameters ServerLaunchPath and ServerLaunchParameters + // are defined. Runtime configuration replaced these parameters, but fleets + // that use them will continue to work. RuntimeConfiguration *RuntimeConfiguration `type:"structure"` - // Unique identifier for a Realtime script to be deployed on the new fleet. - // The Realtime script must have been successfully uploaded to Amazon GameLift. - // This fleet setting cannot be changed once the fleet is created. + // A unique identifier for a Realtime script to be deployed on the new fleet. + // You can use either the script ID or ARN value. The Realtime script must have + // been successfully uploaded to Amazon GameLift. This fleet setting cannot + // be changed once the fleet is created. ScriptId *string `type:"string"` // This parameter is no longer used. Instead, specify server launch parameters // in the RuntimeConfiguration parameter. (Requests that specify a server launch - // path and launch parameters instead of a run-time configuration will continue + // path and launch parameters instead of a runtime configuration will continue // to work.) ServerLaunchParameters *string `min:"1" type:"string"` // This parameter is no longer used. Instead, specify a server launch path using - // the RuntimeConfiguration parameter. (Requests that specify a server launch - // path and launch parameters instead of a run-time configuration will continue - // to work.) + // the RuntimeConfiguration parameter. Requests that specify a server launch + // path and launch parameters instead of a runtime configuration will continue + // to work. ServerLaunchPath *string `min:"1" type:"string"` + + // A list of labels to assign to the new fleet resource. Tags are developer-defined + // key-value pairs. Tagging AWS resources are useful for resource management, + // access management and cost allocation. For more information, see Tagging + // AWS Resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) + // in the AWS General Reference. Once the resource is created, you can use TagResource, + // UntagResource, and ListTagsForResource to add, remove, and view tags. The + // maximum tag limit may be lower than stated. See the AWS General Reference + // for actual tagging limits. + Tags []*Tag `type:"list"` } // String returns the string representation @@ -9739,6 +10285,16 @@ func (s *CreateFleetInput) Validate() error { invalidParams.AddNested("RuntimeConfiguration", err.(request.ErrInvalidParams)) } } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -9854,6 +10410,12 @@ func (s *CreateFleetInput) SetServerLaunchPath(v string) *CreateFleetInput { return s } +// SetTags sets the Tags field's value. +func (s *CreateFleetInput) SetTags(v []*Tag) *CreateFleetInput { + s.Tags = v + return s +} + // Represents the returned data in response to a request action. type CreateFleetOutput struct { _ struct{} `type:"structure"` @@ -9882,18 +10444,19 @@ func (s *CreateFleetOutput) SetFleetAttributes(v *FleetAttributes) *CreateFleetO type CreateGameSessionInput struct { _ struct{} `type:"structure"` - // Unique identifier for an alias associated with the fleet to create a game - // session in. Each request must reference either a fleet ID or alias ID, but - // not both. + // A unique identifier for an alias associated with the fleet to create a game + // session in. You can use either the alias ID or ARN value. Each request must + // reference either a fleet ID or alias ID, but not both. AliasId *string `type:"string"` - // Unique identifier for a player or entity creating the game session. This + // A unique identifier for a player or entity creating the game session. This // ID is used to enforce a resource protection policy (if one exists) that limits // the number of concurrent active game sessions one player can have. CreatorId *string `min:"1" type:"string"` - // Unique identifier for a fleet to create a game session in. Each request must - // reference either a fleet ID or alias ID, but not both. + // A unique identifier for a fleet to create a game session in. You can use + // either the fleet ID or ARN value. Each request must reference either a fleet + // ID or alias ID, but not both. FleetId *string `type:"string"` // Set of custom properties for a game session, formatted as key:value pairs. @@ -9923,14 +10486,14 @@ type CreateGameSessionInput struct { // deleted. IdempotencyToken *string `min:"1" type:"string"` - // Maximum number of players that can be connected simultaneously to the game - // session. + // The maximum number of players that can be connected simultaneously to the + // game session. // // MaximumPlayerSessionCount is a required field MaximumPlayerSessionCount *int64 `type:"integer" required:"true"` - // Descriptive label that is associated with a game session. Session names do - // not need to be unique. + // A descriptive label that is associated with a game session. Session names + // do not need to be unique. Name *string `min:"1" type:"string"` } @@ -10064,30 +10627,40 @@ func (s *CreateGameSessionOutput) SetGameSession(v *GameSession) *CreateGameSess type CreateGameSessionQueueInput struct { _ struct{} `type:"structure"` - // List of fleets that can be used to fulfill game session placement requests + // A list of fleets that can be used to fulfill game session placement requests // in the queue. Fleets are identified by either a fleet ARN or a fleet alias // ARN. Destinations are listed in default preference order. Destinations []*GameSessionQueueDestination `type:"list"` - // Descriptive label that is associated with game session queue. Queue names - // must be unique within each region. + // A descriptive label that is associated with game session queue. Queue names + // must be unique within each Region. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` - // Collection of latency policies to apply when processing game sessions placement + // A collection of latency policies to apply when processing game sessions placement // requests with player latency information. Multiple policies are evaluated // in order of the maximum latency value, starting with the lowest latency values. - // With just one policy, it is enforced at the start of the game session placement - // for the duration period. With multiple policies, each policy is enforced - // consecutively for its duration period. For example, a queue might enforce - // a 60-second policy followed by a 120-second policy, and then no policy for - // the remainder of the placement. A player latency policy must set a value - // for MaximumIndividualPlayerLatencyMilliseconds; if none is set, this API - // requests will fail. + // With just one policy, the policy is enforced at the start of the game session + // placement for the duration period. With multiple policies, each policy is + // enforced consecutively for its duration period. For example, a queue might + // enforce a 60-second policy followed by a 120-second policy, and then no policy + // for the remainder of the placement. A player latency policy must set a value + // for MaximumIndividualPlayerLatencyMilliseconds. If none is set, this API + // request fails. PlayerLatencyPolicies []*PlayerLatencyPolicy `type:"list"` - // Maximum time, in seconds, that a new game session placement request remains + // A list of labels to assign to the new game session queue resource. Tags are + // developer-defined key-value pairs. Tagging AWS resources are useful for resource + // management, access management and cost allocation. For more information, + // see Tagging AWS Resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) + // in the AWS General Reference. Once the resource is created, you can use TagResource, + // UntagResource, and ListTagsForResource to add, remove, and view tags. The + // maximum tag limit may be lower than stated. See the AWS General Reference + // for actual tagging limits. + Tags []*Tag `type:"list"` + + // The maximum time, in seconds, that a new game session placement request remains // in the queue. When a request exceeds this time, the game session placement // changes to a TIMED_OUT status. TimeoutInSeconds *int64 `type:"integer"` @@ -10122,6 +10695,16 @@ func (s *CreateGameSessionQueueInput) Validate() error { } } } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -10147,6 +10730,12 @@ func (s *CreateGameSessionQueueInput) SetPlayerLatencyPolicies(v []*PlayerLatenc return s } +// SetTags sets the Tags field's value. +func (s *CreateGameSessionQueueInput) SetTags(v []*Tag) *CreateGameSessionQueueInput { + s.Tags = v + return s +} + // SetTimeoutInSeconds sets the TimeoutInSeconds field's value. func (s *CreateGameSessionQueueInput) SetTimeoutInSeconds(v int64) *CreateGameSessionQueueInput { s.TimeoutInSeconds = &v @@ -10157,7 +10746,7 @@ func (s *CreateGameSessionQueueInput) SetTimeoutInSeconds(v int64) *CreateGameSe type CreateGameSessionQueueOutput struct { _ struct{} `type:"structure"` - // Object that describes the newly created game session queue. + // An object that describes the newly created game session queue. GameSessionQueue *GameSessionQueue `type:"structure"` } @@ -10181,82 +10770,92 @@ func (s *CreateGameSessionQueueOutput) SetGameSessionQueue(v *GameSessionQueue) type CreateMatchmakingConfigurationInput struct { _ struct{} `type:"structure"` - // Flag that determines whether a match that was created with this configuration + // A flag that determines whether a match that was created with this configuration // must be accepted by the matched players. To require acceptance, set to TRUE. // // AcceptanceRequired is a required field AcceptanceRequired *bool `type:"boolean" required:"true"` - // Length of time (in seconds) to wait for players to accept a proposed match. - // If any player rejects the match or fails to accept before the timeout, the - // ticket continues to look for an acceptable match. + // The length of time (in seconds) to wait for players to accept a proposed + // match. If any player rejects the match or fails to accept before the timeout, + // the ticket continues to look for an acceptable match. AcceptanceTimeoutSeconds *int64 `min:"1" type:"integer"` - // Number of player slots in a match to keep open for future players. For example, - // if the configuration's rule set specifies a match for a single 12-person - // team, and the additional player count is set to 2, only 10 players are selected - // for the match. + // The number of player slots in a match to keep open for future players. For + // example, assume that the configuration's rule set specifies a match for a + // single 12-person team. If the additional player count is set to 2, only 10 + // players are initially selected for the match. AdditionalPlayerCount *int64 `type:"integer"` - // Method used to backfill game sessions created with this matchmaking configuration. - // Specify MANUAL when your game manages backfill requests manually or does - // not use the match backfill feature. Specify AUTOMATIC to have GameLift create - // a StartMatchBackfill request whenever a game session has one or more open - // slots. Learn more about manual and automatic backfill in Backfill Existing + // The method used to backfill game sessions that are created with this matchmaking + // configuration. Specify MANUAL when your game manages backfill requests manually + // or does not use the match backfill feature. Specify AUTOMATIC to have GameLift + // create a StartMatchBackfill request whenever a game session has one or more + // open slots. Learn more about manual and automatic backfill in Backfill Existing // Games with FlexMatch (https://docs.aws.amazon.com/gamelift/latest/developerguide/match-backfill.html). BackfillMode *string `type:"string" enum:"BackfillMode"` // Information to be added to all events related to this matchmaking configuration. CustomEventData *string `type:"string"` - // Meaningful description of the matchmaking configuration. + // A human-readable description of the matchmaking configuration. Description *string `min:"1" type:"string"` - // Set of custom properties for a game session, formatted as key:value pairs. + // A set of custom properties for a game session, formatted as key-value pairs. // These properties are passed to a game server process in the GameSession object // with a request to start a new game session (see Start a Game Session (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession)). // This information is added to the new GameSession object that is created for // a successful match. GameProperties []*GameProperty `type:"list"` - // Set of custom game session properties, formatted as a single string value. + // A set of custom game session properties, formatted as a single string value. // This data is passed to a game server process in the GameSession object with // a request to start a new game session (see Start a Game Session (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession)). // This information is added to the new GameSession object that is created for // a successful match. GameSessionData *string `min:"1" type:"string"` - // Amazon Resource Name (ARN (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html)) - // that is assigned to a game session queue and uniquely identifies it. Format - // is arn:aws:gamelift:::gamesessionqueue/. - // These queues are used when placing game sessions for matches that are created - // with this matchmaking configuration. Queues can be located in any region. + // Amazon Resource Name (ARN (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)) + // that is assigned to a GameLift game session queue resource and uniquely identifies + // it. ARNs are unique across all Regions. These queues are used when placing + // game sessions for matches that are created with this matchmaking configuration. + // Queues can be located in any Region. // // GameSessionQueueArns is a required field GameSessionQueueArns []*string `type:"list" required:"true"` - // Unique identifier for a matchmaking configuration. This name is used to identify - // the configuration associated with a matchmaking request or ticket. + // A unique identifier for a matchmaking configuration. This name is used to + // identify the configuration associated with a matchmaking request or ticket. // // Name is a required field Name *string `type:"string" required:"true"` - // SNS topic ARN that is set up to receive matchmaking notifications. + // An SNS topic ARN that is set up to receive matchmaking notifications. NotificationTarget *string `type:"string"` - // Maximum duration, in seconds, that a matchmaking ticket can remain in process - // before timing out. Requests that fail due to timing out can be resubmitted + // The maximum duration, in seconds, that a matchmaking ticket can remain in + // process before timing out. Requests that fail due to timing out can be resubmitted // as needed. // // RequestTimeoutSeconds is a required field RequestTimeoutSeconds *int64 `min:"1" type:"integer" required:"true"` - // Unique identifier for a matchmaking rule set to use with this configuration. - // A matchmaking configuration can only use rule sets that are defined in the - // same region. + // A unique identifier for a matchmaking rule set to use with this configuration. + // You can use either the rule set name or ARN value. A matchmaking configuration + // can only use rule sets that are defined in the same Region. // // RuleSetName is a required field - RuleSetName *string `type:"string" required:"true"` + RuleSetName *string `min:"1" type:"string" required:"true"` + + // A list of labels to assign to the new matchmaking configuration resource. + // Tags are developer-defined key-value pairs. Tagging AWS resources are useful + // for resource management, access management and cost allocation. For more + // information, see Tagging AWS Resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) + // in the AWS General Reference. Once the resource is created, you can use TagResource, + // UntagResource, and ListTagsForResource to add, remove, and view tags. The + // maximum tag limit may be lower than stated. See the AWS General Reference + // for actual tagging limits. + Tags []*Tag `type:"list"` } // String returns the string representation @@ -10299,6 +10898,9 @@ func (s *CreateMatchmakingConfigurationInput) Validate() error { if s.RuleSetName == nil { invalidParams.Add(request.NewErrParamRequired("RuleSetName")) } + if s.RuleSetName != nil && len(*s.RuleSetName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RuleSetName", 1)) + } if s.GameProperties != nil { for i, v := range s.GameProperties { if v == nil { @@ -10309,6 +10911,16 @@ func (s *CreateMatchmakingConfigurationInput) Validate() error { } } } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -10394,6 +11006,12 @@ func (s *CreateMatchmakingConfigurationInput) SetRuleSetName(v string) *CreateMa return s } +// SetTags sets the Tags field's value. +func (s *CreateMatchmakingConfigurationInput) SetTags(v []*Tag) *CreateMatchmakingConfigurationInput { + s.Tags = v + return s +} + // Represents the returned data in response to a request action. type CreateMatchmakingConfigurationOutput struct { _ struct{} `type:"structure"` @@ -10422,18 +11040,28 @@ func (s *CreateMatchmakingConfigurationOutput) SetConfiguration(v *MatchmakingCo type CreateMatchmakingRuleSetInput struct { _ struct{} `type:"structure"` - // Unique identifier for a matchmaking rule set. A matchmaking configuration - // identifies the rule set it uses by this name value. (Note: The rule set name - // is different from the optional "name" field in the rule set body.) + // A unique identifier for a matchmaking rule set. A matchmaking configuration + // identifies the rule set it uses by this name value. Note that the rule set + // name is different from the optional name field in the rule set body. // // Name is a required field Name *string `type:"string" required:"true"` - // Collection of matchmaking rules, formatted as a JSON string. Comments are + // A collection of matchmaking rules, formatted as a JSON string. Comments are // not allowed in JSON, but most elements support a description field. // // RuleSetBody is a required field RuleSetBody *string `min:"1" type:"string" required:"true"` + + // A list of labels to assign to the new matchmaking rule set resource. Tags + // are developer-defined key-value pairs. Tagging AWS resources are useful for + // resource management, access management and cost allocation. For more information, + // see Tagging AWS Resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) + // in the AWS General Reference. Once the resource is created, you can use TagResource, + // UntagResource, and ListTagsForResource to add, remove, and view tags. The + // maximum tag limit may be lower than stated. See the AWS General Reference + // for actual tagging limits. + Tags []*Tag `type:"list"` } // String returns the string representation @@ -10458,6 +11086,16 @@ func (s *CreateMatchmakingRuleSetInput) Validate() error { if s.RuleSetBody != nil && len(*s.RuleSetBody) < 1 { invalidParams.Add(request.NewErrParamMinLen("RuleSetBody", 1)) } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -10477,11 +11115,17 @@ func (s *CreateMatchmakingRuleSetInput) SetRuleSetBody(v string) *CreateMatchmak return s } +// SetTags sets the Tags field's value. +func (s *CreateMatchmakingRuleSetInput) SetTags(v []*Tag) *CreateMatchmakingRuleSetInput { + s.Tags = v + return s +} + // Represents the returned data in response to a request action. type CreateMatchmakingRuleSetOutput struct { _ struct{} `type:"structure"` - // Object that describes the newly created matchmaking rule set. + // The newly created matchmaking rule set. // // RuleSet is a required field RuleSet *MatchmakingRuleSet `type:"structure" required:"true"` @@ -10507,7 +11151,7 @@ func (s *CreateMatchmakingRuleSetOutput) SetRuleSet(v *MatchmakingRuleSet) *Crea type CreatePlayerSessionInput struct { _ struct{} `type:"structure"` - // Unique identifier for the game session to add a player to. + // A unique identifier for the game session to add a player to. // // GameSessionId is a required field GameSessionId *string `min:"1" type:"string" required:"true"` @@ -10516,7 +11160,7 @@ type CreatePlayerSessionInput struct { // use this data, so it can be formatted as needed for use in the game. PlayerData *string `min:"1" type:"string"` - // Unique identifier for a player. Player IDs are developer-defined. + // A unique identifier for a player. Player IDs are developer-defined. // // PlayerId is a required field PlayerId *string `min:"1" type:"string" required:"true"` @@ -10603,7 +11247,7 @@ func (s *CreatePlayerSessionOutput) SetPlayerSession(v *PlayerSession) *CreatePl type CreatePlayerSessionsInput struct { _ struct{} `type:"structure"` - // Unique identifier for the game session to add players to. + // A unique identifier for the game session to add players to. // // GameSessionId is a required field GameSessionId *string `min:"1" type:"string" required:"true"` @@ -10674,7 +11318,7 @@ func (s *CreatePlayerSessionsInput) SetPlayerIds(v []*string) *CreatePlayerSessi type CreatePlayerSessionsOutput struct { _ struct{} `type:"structure"` - // Collection of player session objects created for the added players. + // A collection of player session objects created for the added players. PlayerSessions []*PlayerSession `type:"list"` } @@ -10697,27 +11341,37 @@ func (s *CreatePlayerSessionsOutput) SetPlayerSessions(v []*PlayerSession) *Crea type CreateScriptInput struct { _ struct{} `type:"structure"` - // Descriptive label that is associated with a script. Script names do not need - // to be unique. You can use UpdateScript to change this value later. + // A descriptive label that is associated with a script. Script names do not + // need to be unique. You can use UpdateScript to change this value later. Name *string `min:"1" type:"string"` - // Location of the Amazon S3 bucket where a zipped file containing your Realtime - // scripts is stored. The storage location must specify the Amazon S3 bucket - // name, the zip file name (the "key"), and a role ARN that allows Amazon GameLift - // to access the Amazon S3 storage location. The S3 bucket must be in the same - // region where you want to create a new script. By default, Amazon GameLift - // uploads the latest version of the zip file; if you have S3 object versioning - // turned on, you can use the ObjectVersion parameter to specify an earlier - // version. + // The location of the Amazon S3 bucket where a zipped file containing your + // Realtime scripts is stored. The storage location must specify the Amazon + // S3 bucket name, the zip file name (the "key"), and a role ARN that allows + // Amazon GameLift to access the Amazon S3 storage location. The S3 bucket must + // be in the same Region where you want to create a new script. By default, + // Amazon GameLift uploads the latest version of the zip file; if you have S3 + // object versioning turned on, you can use the ObjectVersion parameter to specify + // an earlier version. StorageLocation *S3Location `type:"structure"` - // Version that is associated with a build or script. Version strings do not - // need to be unique. You can use UpdateScript to change this value later. + // A list of labels to assign to the new script resource. Tags are developer-defined + // key-value pairs. Tagging AWS resources are useful for resource management, + // access management and cost allocation. For more information, see Tagging + // AWS Resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) + // in the AWS General Reference. Once the resource is created, you can use TagResource, + // UntagResource, and ListTagsForResource to add, remove, and view tags. The + // maximum tag limit may be lower than stated. See the AWS General Reference + // for actual tagging limits. + Tags []*Tag `type:"list"` + + // The version that is associated with a build or script. Version strings do + // not need to be unique. You can use UpdateScript to change this value later. Version *string `min:"1" type:"string"` - // Data object containing your Realtime scripts and dependencies as a zip file. - // The zip file can have one or multiple files. Maximum size of a zip file is - // 5 MB. + // A data object containing your Realtime scripts and dependencies as a zip + // file. The zip file can have one or multiple files. Maximum size of a zip + // file is 5 MB. // // When using the AWS CLI tool to create a script, this parameter is set to // the zip file name. It must be prepended with the string "fileb://" to indicate @@ -10751,6 +11405,16 @@ func (s *CreateScriptInput) Validate() error { invalidParams.AddNested("StorageLocation", err.(request.ErrInvalidParams)) } } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -10770,6 +11434,12 @@ func (s *CreateScriptInput) SetStorageLocation(v *S3Location) *CreateScriptInput return s } +// SetTags sets the Tags field's value. +func (s *CreateScriptInput) SetTags(v []*Tag) *CreateScriptInput { + s.Tags = v + return s +} + // SetVersion sets the Version field's value. func (s *CreateScriptInput) SetVersion(v string) *CreateScriptInput { s.Version = &v @@ -10785,12 +11455,12 @@ func (s *CreateScriptInput) SetZipFile(v []byte) *CreateScriptInput { type CreateScriptOutput struct { _ struct{} `type:"structure"` - // The newly created script record with a unique script ID. The new script's - // storage location reflects an Amazon S3 location: (1) If the script was uploaded - // from an S3 bucket under your account, the storage location reflects the information - // that was provided in the CreateScript request; (2) If the script file was - // uploaded from a local zip file, the storage location reflects an S3 location - // controls by the Amazon GameLift service. + // The newly created script record with a unique script ID and ARN. The new + // script's storage location reflects an Amazon S3 location: (1) If the script + // was uploaded from an S3 bucket under your account, the storage location reflects + // the information that was provided in the CreateScript request; (2) If the + // script file was uploaded from a local zip file, the storage location reflects + // an S3 location controls by the Amazon GameLift service. Script *Script `type:"structure"` } @@ -10814,15 +11484,15 @@ func (s *CreateScriptOutput) SetScript(v *Script) *CreateScriptOutput { type CreateVpcPeeringAuthorizationInput struct { _ struct{} `type:"structure"` - // Unique identifier for the AWS account that you use to manage your Amazon + // A unique identifier for the AWS account that you use to manage your Amazon // GameLift fleet. You can find your Account ID in the AWS Management Console // under account settings. // // GameLiftAwsAccountId is a required field GameLiftAwsAccountId *string `min:"1" type:"string" required:"true"` - // Unique identifier for a VPC with resources to be accessed by your Amazon - // GameLift fleet. The VPC must be in the same region where your fleet is deployed. + // A unique identifier for a VPC with resources to be accessed by your Amazon + // GameLift fleet. The VPC must be in the same Region where your fleet is deployed. // Look up a VPC ID using the VPC Dashboard (https://console.aws.amazon.com/vpc/) // in the AWS Management Console. Learn more about VPC peering in VPC Peering // with Amazon GameLift Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/vpc-peering.html). @@ -10903,21 +11573,21 @@ func (s *CreateVpcPeeringAuthorizationOutput) SetVpcPeeringAuthorization(v *VpcP type CreateVpcPeeringConnectionInput struct { _ struct{} `type:"structure"` - // Unique identifier for a fleet. This tells Amazon GameLift which GameLift - // VPC to peer with. + // A unique identifier for a fleet. You can use either the fleet ID or ARN value. + // This tells Amazon GameLift which GameLift VPC to peer with. // // FleetId is a required field FleetId *string `type:"string" required:"true"` - // Unique identifier for the AWS account with the VPC that you want to peer + // A unique identifier for the AWS account with the VPC that you want to peer // your Amazon GameLift fleet with. You can find your Account ID in the AWS // Management Console under account settings. // // PeerVpcAwsAccountId is a required field PeerVpcAwsAccountId *string `min:"1" type:"string" required:"true"` - // Unique identifier for a VPC with resources to be accessed by your Amazon - // GameLift fleet. The VPC must be in the same region where your fleet is deployed. + // A unique identifier for a VPC with resources to be accessed by your Amazon + // GameLift fleet. The VPC must be in the same Region where your fleet is deployed. // Look up a VPC ID using the VPC Dashboard (https://console.aws.amazon.com/vpc/) // in the AWS Management Console. Learn more about VPC peering in VPC Peering // with Amazon GameLift Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/vpc-peering.html). @@ -10997,7 +11667,8 @@ func (s CreateVpcPeeringConnectionOutput) GoString() string { type DeleteAliasInput struct { _ struct{} `type:"structure"` - // Unique identifier for a fleet alias. Specify the alias you want to delete. + // A unique identifier of the alias that you want to delete. You can use either + // the alias ID or ARN value. // // AliasId is a required field AliasId *string `type:"string" required:"true"` @@ -11050,7 +11721,8 @@ func (s DeleteAliasOutput) GoString() string { type DeleteBuildInput struct { _ struct{} `type:"structure"` - // Unique identifier for a build to delete. + // A unique identifier for a build to delete. You can use either the build ID + // or ARN value. // // BuildId is a required field BuildId *string `type:"string" required:"true"` @@ -11103,7 +11775,8 @@ func (s DeleteBuildOutput) GoString() string { type DeleteFleetInput struct { _ struct{} `type:"structure"` - // Unique identifier for a fleet to be deleted. + // A unique identifier for a fleet to be deleted. You can use either the fleet + // ID or ARN value. // // FleetId is a required field FleetId *string `type:"string" required:"true"` @@ -11156,8 +11829,9 @@ func (s DeleteFleetOutput) GoString() string { type DeleteGameSessionQueueInput struct { _ struct{} `type:"structure"` - // Descriptive label that is associated with game session queue. Queue names - // must be unique within each region. + // A descriptive label that is associated with game session queue. Queue names + // must be unique within each Region. You can use either the queue ID or ARN + // value. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` @@ -11213,10 +11887,11 @@ func (s DeleteGameSessionQueueOutput) GoString() string { type DeleteMatchmakingConfigurationInput struct { _ struct{} `type:"structure"` - // Unique identifier for a matchmaking configuration + // A unique identifier for a matchmaking configuration. You can use either the + // configuration name or ARN value. // // Name is a required field - Name *string `type:"string" required:"true"` + Name *string `min:"1" type:"string" required:"true"` } // String returns the string representation @@ -11235,6 +11910,9 @@ func (s *DeleteMatchmakingConfigurationInput) Validate() error { if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -11266,11 +11944,12 @@ func (s DeleteMatchmakingConfigurationOutput) GoString() string { type DeleteMatchmakingRuleSetInput struct { _ struct{} `type:"structure"` - // Unique identifier for a matchmaking rule set to be deleted. (Note: The rule - // set name is different from the optional "name" field in the rule set body.) + // A unique identifier for a matchmaking rule set to be deleted. (Note: The + // rule set name is different from the optional "name" field in the rule set + // body.) You can use either the rule set name or ARN value. // // Name is a required field - Name *string `type:"string" required:"true"` + Name *string `min:"1" type:"string" required:"true"` } // String returns the string representation @@ -11289,6 +11968,9 @@ func (s *DeleteMatchmakingRuleSetInput) Validate() error { if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -11321,12 +12003,13 @@ func (s DeleteMatchmakingRuleSetOutput) GoString() string { type DeleteScalingPolicyInput struct { _ struct{} `type:"structure"` - // Unique identifier for a fleet to be deleted. + // A unique identifier for a fleet to be deleted. You can use either the fleet + // ID or ARN value. // // FleetId is a required field FleetId *string `type:"string" required:"true"` - // Descriptive label that is associated with a scaling policy. Policy names + // A descriptive label that is associated with a scaling policy. Policy names // do not need to be unique. // // Name is a required field @@ -11391,7 +12074,8 @@ func (s DeleteScalingPolicyOutput) GoString() string { type DeleteScriptInput struct { _ struct{} `type:"structure"` - // Unique identifier for a Realtime script to delete. + // A unique identifier for a Realtime script to delete. You can use either the + // script ID or ARN value. // // ScriptId is a required field ScriptId *string `type:"string" required:"true"` @@ -11444,15 +12128,15 @@ func (s DeleteScriptOutput) GoString() string { type DeleteVpcPeeringAuthorizationInput struct { _ struct{} `type:"structure"` - // Unique identifier for the AWS account that you use to manage your Amazon + // A unique identifier for the AWS account that you use to manage your Amazon // GameLift fleet. You can find your Account ID in the AWS Management Console // under account settings. // // GameLiftAwsAccountId is a required field GameLiftAwsAccountId *string `min:"1" type:"string" required:"true"` - // Unique identifier for a VPC with resources to be accessed by your Amazon - // GameLift fleet. The VPC must be in the same region where your fleet is deployed. + // A unique identifier for a VPC with resources to be accessed by your Amazon + // GameLift fleet. The VPC must be in the same Region where your fleet is deployed. // Look up a VPC ID using the VPC Dashboard (https://console.aws.amazon.com/vpc/) // in the AWS Management Console. Learn more about VPC peering in VPC Peering // with Amazon GameLift Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/vpc-peering.html). @@ -11523,14 +12207,15 @@ func (s DeleteVpcPeeringAuthorizationOutput) GoString() string { type DeleteVpcPeeringConnectionInput struct { _ struct{} `type:"structure"` - // Unique identifier for a fleet. This value must match the fleet ID referenced - // in the VPC peering connection record. + // A unique identifier for a fleet. This fleet specified must match the fleet + // referenced in the VPC peering connection record. You can use either the fleet + // ID or ARN value. // // FleetId is a required field FleetId *string `type:"string" required:"true"` - // Unique identifier for a VPC peering connection. This value is included in - // the VpcPeeringConnection object, which can be retrieved by calling DescribeVpcPeeringConnections. + // A unique identifier for a VPC peering connection. This value is included + // in the VpcPeeringConnection object, which can be retrieved by calling DescribeVpcPeeringConnections. // // VpcPeeringConnectionId is a required field VpcPeeringConnectionId *string `min:"1" type:"string" required:"true"` @@ -11595,7 +12280,8 @@ func (s DeleteVpcPeeringConnectionOutput) GoString() string { type DescribeAliasInput struct { _ struct{} `type:"structure"` - // Unique identifier for a fleet alias. Specify the alias you want to retrieve. + // The unique identifier for the fleet alias that you want to retrieve. You + // can use either the alias ID or ARN value. // // AliasId is a required field AliasId *string `type:"string" required:"true"` @@ -11634,7 +12320,7 @@ func (s *DescribeAliasInput) SetAliasId(v string) *DescribeAliasInput { type DescribeAliasOutput struct { _ struct{} `type:"structure"` - // Object that contains the requested alias. + // The requested alias resource. Alias *Alias `type:"structure"` } @@ -11658,7 +12344,8 @@ func (s *DescribeAliasOutput) SetAlias(v *Alias) *DescribeAliasOutput { type DescribeBuildInput struct { _ struct{} `type:"structure"` - // Unique identifier for a build to retrieve properties for. + // A unique identifier for a build to retrieve properties for. You can use either + // the build ID or ARN value. // // BuildId is a required field BuildId *string `type:"string" required:"true"` @@ -11750,8 +12437,7 @@ func (s *DescribeEC2InstanceLimitsInput) SetEC2InstanceType(v string) *DescribeE type DescribeEC2InstanceLimitsOutput struct { _ struct{} `type:"structure"` - // Object that contains the maximum number of instances for the specified instance - // type. + // The maximum number of instances for the specified instance type. EC2InstanceLimits []*EC2InstanceLimit `type:"list"` } @@ -11775,12 +12461,12 @@ func (s *DescribeEC2InstanceLimitsOutput) SetEC2InstanceLimits(v []*EC2InstanceL type DescribeFleetAttributesInput struct { _ struct{} `type:"structure"` - // Unique identifier for a fleet(s) to retrieve attributes for. To request attributes - // for all fleets, leave this parameter empty. + // A unique identifier for a fleet(s) to retrieve attributes for. You can use + // either the fleet ID or ARN value. FleetIds []*string `min:"1" type:"list"` - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. This parameter is ignored when + // The maximum number of results to return. Use this parameter with NextToken + // to get results as a set of sequential pages. This parameter is ignored when // the request specifies one or a list of fleet IDs. Limit *int64 `min:"1" type:"integer"` @@ -11842,8 +12528,8 @@ func (s *DescribeFleetAttributesInput) SetNextToken(v string) *DescribeFleetAttr type DescribeFleetAttributesOutput struct { _ struct{} `type:"structure"` - // Collection of objects containing attribute metadata for each requested fleet - // ID. + // A collection of objects containing attribute metadata for each requested + // fleet ID. FleetAttributes []*FleetAttributes `type:"list"` // Token that indicates where to resume retrieving results on the next call @@ -11878,12 +12564,12 @@ func (s *DescribeFleetAttributesOutput) SetNextToken(v string) *DescribeFleetAtt type DescribeFleetCapacityInput struct { _ struct{} `type:"structure"` - // Unique identifier for a fleet(s) to retrieve capacity information for. To - // request capacity information for all fleets, leave this parameter empty. + // A unique identifier for a fleet(s) to retrieve capacity information for. + // You can use either the fleet ID or ARN value. FleetIds []*string `min:"1" type:"list"` - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. This parameter is ignored when + // The maximum number of results to return. Use this parameter with NextToken + // to get results as a set of sequential pages. This parameter is ignored when // the request specifies one or a list of fleet IDs. Limit *int64 `min:"1" type:"integer"` @@ -11945,7 +12631,7 @@ func (s *DescribeFleetCapacityInput) SetNextToken(v string) *DescribeFleetCapaci type DescribeFleetCapacityOutput struct { _ struct{} `type:"structure"` - // Collection of objects containing capacity information for each requested + // A collection of objects containing capacity information for each requested // fleet ID. Leave this parameter empty to retrieve capacity information for // all fleets. FleetCapacity []*FleetCapacity `type:"list"` @@ -11987,13 +12673,14 @@ type DescribeFleetEventsInput struct { // Format is a number expressed in Unix time as milliseconds (ex: "1469498468.057"). EndTime *time.Time `type:"timestamp"` - // Unique identifier for a fleet to get event logs for. + // A unique identifier for a fleet to get event logs for. You can use either + // the fleet ID or ARN value. // // FleetId is a required field FleetId *string `type:"string" required:"true"` - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. + // The maximum number of results to return. Use this parameter with NextToken + // to get results as a set of sequential pages. Limit *int64 `min:"1" type:"integer"` // Token that indicates the start of the next sequential page of results. Use @@ -12071,7 +12758,7 @@ func (s *DescribeFleetEventsInput) SetStartTime(v time.Time) *DescribeFleetEvent type DescribeFleetEventsOutput struct { _ struct{} `type:"structure"` - // Collection of objects containing event log entries for the specified fleet. + // A collection of objects containing event log entries for the specified fleet. Events []*Event `type:"list"` // Token that indicates where to resume retrieving results on the next call @@ -12106,7 +12793,8 @@ func (s *DescribeFleetEventsOutput) SetNextToken(v string) *DescribeFleetEventsO type DescribeFleetPortSettingsInput struct { _ struct{} `type:"structure"` - // Unique identifier for a fleet to retrieve port settings for. + // A unique identifier for a fleet to retrieve port settings for. You can use + // either the fleet ID or ARN value. // // FleetId is a required field FleetId *string `type:"string" required:"true"` @@ -12145,7 +12833,7 @@ func (s *DescribeFleetPortSettingsInput) SetFleetId(v string) *DescribeFleetPort type DescribeFleetPortSettingsOutput struct { _ struct{} `type:"structure"` - // Object that contains port settings for the requested fleet ID. + // The port settings for the requested fleet ID. InboundPermissions []*IpPermission `type:"list"` } @@ -12169,12 +12857,12 @@ func (s *DescribeFleetPortSettingsOutput) SetInboundPermissions(v []*IpPermissio type DescribeFleetUtilizationInput struct { _ struct{} `type:"structure"` - // Unique identifier for a fleet(s) to retrieve utilization data for. To request - // utilization data for all fleets, leave this parameter empty. + // A unique identifier for a fleet(s) to retrieve utilization data for. You + // can use either the fleet ID or ARN value. FleetIds []*string `min:"1" type:"list"` - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. This parameter is ignored when + // The maximum number of results to return. Use this parameter with NextToken + // to get results as a set of sequential pages. This parameter is ignored when // the request specifies one or a list of fleet IDs. Limit *int64 `min:"1" type:"integer"` @@ -12236,7 +12924,7 @@ func (s *DescribeFleetUtilizationInput) SetNextToken(v string) *DescribeFleetUti type DescribeFleetUtilizationOutput struct { _ struct{} `type:"structure"` - // Collection of objects containing utilization information for each requested + // A collection of objects containing utilization information for each requested // fleet ID. FleetUtilization []*FleetUtilization `type:"list"` @@ -12272,19 +12960,19 @@ func (s *DescribeFleetUtilizationOutput) SetNextToken(v string) *DescribeFleetUt type DescribeGameSessionDetailsInput struct { _ struct{} `type:"structure"` - // Unique identifier for an alias associated with the fleet to retrieve all - // game sessions for. + // A unique identifier for an alias associated with the fleet to retrieve all + // game sessions for. You can use either the alias ID or ARN value. AliasId *string `type:"string"` - // Unique identifier for a fleet to retrieve all game sessions active on the - // fleet. + // A unique identifier for a fleet to retrieve all game sessions active on the + // fleet. You can use either the fleet ID or ARN value. FleetId *string `type:"string"` - // Unique identifier for the game session to retrieve. + // A unique identifier for the game session to retrieve. GameSessionId *string `min:"1" type:"string"` - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. + // The maximum number of results to return. Use this parameter with NextToken + // to get results as a set of sequential pages. Limit *int64 `min:"1" type:"integer"` // Token that indicates the start of the next sequential page of results. Use @@ -12370,7 +13058,7 @@ func (s *DescribeGameSessionDetailsInput) SetStatusFilter(v string) *DescribeGam type DescribeGameSessionDetailsOutput struct { _ struct{} `type:"structure"` - // Collection of objects containing game session properties and the protection + // A collection of objects containing game session properties and the protection // policy currently in force for each session matching the request. GameSessionDetails []*GameSessionDetail `type:"list"` @@ -12406,7 +13094,7 @@ func (s *DescribeGameSessionDetailsOutput) SetNextToken(v string) *DescribeGameS type DescribeGameSessionPlacementInput struct { _ struct{} `type:"structure"` - // Unique identifier for a game session placement to retrieve. + // A unique identifier for a game session placement to retrieve. // // PlacementId is a required field PlacementId *string `min:"1" type:"string" required:"true"` @@ -12472,16 +13160,17 @@ func (s *DescribeGameSessionPlacementOutput) SetGameSessionPlacement(v *GameSess type DescribeGameSessionQueuesInput struct { _ struct{} `type:"structure"` - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. + // The maximum number of results to return. Use this parameter with NextToken + // to get results as a set of sequential pages. Limit *int64 `min:"1" type:"integer"` - // List of queue names to retrieve information for. To request settings for - // all queues, leave this parameter empty. + // A list of queue names to retrieve information for. You can use either the + // queue ID or ARN value. To request settings for all queues, leave this parameter + // empty. Names []*string `type:"list"` - // Token that indicates the start of the next sequential page of results. Use - // the token that is returned with a previous call to this action. To start + // A token that indicates the start of the next sequential page of results. + // Use the token that is returned with a previous call to this action. To start // at the beginning of the result set, do not specify a value. NextToken *string `min:"1" type:"string"` } @@ -12534,10 +13223,10 @@ func (s *DescribeGameSessionQueuesInput) SetNextToken(v string) *DescribeGameSes type DescribeGameSessionQueuesOutput struct { _ struct{} `type:"structure"` - // Collection of objects that describes the requested game session queues. + // A collection of objects that describe the requested game session queues. GameSessionQueues []*GameSessionQueue `type:"list"` - // Token that indicates where to resume retrieving results on the next call + // A token that indicates where to resume retrieving results on the next call // to this action. If no token is returned, these results represent the end // of the list. NextToken *string `min:"1" type:"string"` @@ -12569,19 +13258,19 @@ func (s *DescribeGameSessionQueuesOutput) SetNextToken(v string) *DescribeGameSe type DescribeGameSessionsInput struct { _ struct{} `type:"structure"` - // Unique identifier for an alias associated with the fleet to retrieve all - // game sessions for. + // A unique identifier for an alias associated with the fleet to retrieve all + // game sessions for. You can use either the alias ID or ARN value. AliasId *string `type:"string"` - // Unique identifier for a fleet to retrieve all game sessions for. + // A unique identifier for a fleet to retrieve all game sessions for. You can + // use either the fleet ID or ARN value. FleetId *string `type:"string"` - // Unique identifier for the game session to retrieve. You can use either a - // GameSessionId or GameSessionArn value. + // A unique identifier for the game session to retrieve. GameSessionId *string `min:"1" type:"string"` - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. + // The maximum number of results to return. Use this parameter with NextToken + // to get results as a set of sequential pages. Limit *int64 `min:"1" type:"integer"` // Token that indicates the start of the next sequential page of results. Use @@ -12667,7 +13356,7 @@ func (s *DescribeGameSessionsInput) SetStatusFilter(v string) *DescribeGameSessi type DescribeGameSessionsOutput struct { _ struct{} `type:"structure"` - // Collection of objects containing game session properties for each session + // A collection of objects containing game session properties for each session // matching the request. GameSessions []*GameSession `type:"list"` @@ -12703,17 +13392,18 @@ func (s *DescribeGameSessionsOutput) SetNextToken(v string) *DescribeGameSession type DescribeInstancesInput struct { _ struct{} `type:"structure"` - // Unique identifier for a fleet to retrieve instance information for. + // A unique identifier for a fleet to retrieve instance information for. You + // can use either the fleet ID or ARN value. // // FleetId is a required field FleetId *string `type:"string" required:"true"` - // Unique identifier for an instance to retrieve. Specify an instance ID or + // A unique identifier for an instance to retrieve. Specify an instance ID or // leave blank to retrieve all instances in the fleet. InstanceId *string `type:"string"` - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. + // The maximum number of results to return. Use this parameter with NextToken + // to get results as a set of sequential pages. Limit *int64 `min:"1" type:"integer"` // Token that indicates the start of the next sequential page of results. Use @@ -12779,7 +13469,7 @@ func (s *DescribeInstancesInput) SetNextToken(v string) *DescribeInstancesInput type DescribeInstancesOutput struct { _ struct{} `type:"structure"` - // Collection of objects containing properties for each instance returned. + // A collection of objects containing properties for each instance returned. Instances []*Instance `type:"list"` // Token that indicates where to resume retrieving results on the next call @@ -12814,22 +13504,25 @@ func (s *DescribeInstancesOutput) SetNextToken(v string) *DescribeInstancesOutpu type DescribeMatchmakingConfigurationsInput struct { _ struct{} `type:"structure"` - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. This parameter is limited to 10. + // The maximum number of results to return. Use this parameter with NextToken + // to get results as a set of sequential pages. This parameter is limited to + // 10. Limit *int64 `min:"1" type:"integer"` - // Unique identifier for a matchmaking configuration(s) to retrieve. To request - // all existing configurations, leave this parameter empty. + // A unique identifier for a matchmaking configuration(s) to retrieve. You can + // use either the configuration name or ARN value. To request all existing configurations, + // leave this parameter empty. Names []*string `type:"list"` - // Token that indicates the start of the next sequential page of results. Use - // the token that is returned with a previous call to this action. To start + // A token that indicates the start of the next sequential page of results. + // Use the token that is returned with a previous call to this action. To start // at the beginning of the result set, do not specify a value. NextToken *string `min:"1" type:"string"` - // Unique identifier for a matchmaking rule set. Use this parameter to retrieve - // all matchmaking configurations that use this rule set. - RuleSetName *string `type:"string"` + // A unique identifier for a matchmaking rule set. You can use either the rule + // set name or ARN value. Use this parameter to retrieve all matchmaking configurations + // that use this rule set. + RuleSetName *string `min:"1" type:"string"` } // String returns the string representation @@ -12851,6 +13544,9 @@ func (s *DescribeMatchmakingConfigurationsInput) Validate() error { if s.NextToken != nil && len(*s.NextToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) } + if s.RuleSetName != nil && len(*s.RuleSetName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RuleSetName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -12886,10 +13582,10 @@ func (s *DescribeMatchmakingConfigurationsInput) SetRuleSetName(v string) *Descr type DescribeMatchmakingConfigurationsOutput struct { _ struct{} `type:"structure"` - // Collection of requested matchmaking configuration objects. + // A collection of requested matchmaking configurations. Configurations []*MatchmakingConfiguration `type:"list"` - // Token that indicates where to resume retrieving results on the next call + // A token that indicates where to resume retrieving results on the next call // to this action. If no token is returned, these results represent the end // of the list. NextToken *string `min:"1" type:"string"` @@ -12921,7 +13617,8 @@ func (s *DescribeMatchmakingConfigurationsOutput) SetNextToken(v string) *Descri type DescribeMatchmakingInput struct { _ struct{} `type:"structure"` - // Unique identifier for a matchmaking ticket. You can include up to 10 ID values. + // A unique identifier for a matchmaking ticket. You can include up to 10 ID + // values. // // TicketIds is a required field TicketIds []*string `type:"list" required:"true"` @@ -12960,7 +13657,7 @@ func (s *DescribeMatchmakingInput) SetTicketIds(v []*string) *DescribeMatchmakin type DescribeMatchmakingOutput struct { _ struct{} `type:"structure"` - // Collection of existing matchmaking ticket objects matching the request. + // A collection of existing matchmaking ticket objects matching the request. TicketList []*MatchmakingTicket `type:"list"` } @@ -12984,17 +13681,17 @@ func (s *DescribeMatchmakingOutput) SetTicketList(v []*MatchmakingTicket) *Descr type DescribeMatchmakingRuleSetsInput struct { _ struct{} `type:"structure"` - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. + // The maximum number of results to return. Use this parameter with NextToken + // to get results as a set of sequential pages. Limit *int64 `min:"1" type:"integer"` - // List of one or more matchmaking rule set names to retrieve details for. (Note: - // The rule set name is different from the optional "name" field in the rule - // set body.) + // A list of one or more matchmaking rule set names to retrieve details for. + // (Note: The rule set name is different from the optional "name" field in the + // rule set body.) You can use either the rule set name or ARN value. Names []*string `min:"1" type:"list"` - // Token that indicates the start of the next sequential page of results. Use - // the token that is returned with a previous call to this action. To start + // A token that indicates the start of the next sequential page of results. + // Use the token that is returned with a previous call to this action. To start // at the beginning of the result set, do not specify a value. NextToken *string `min:"1" type:"string"` } @@ -13050,12 +13747,12 @@ func (s *DescribeMatchmakingRuleSetsInput) SetNextToken(v string) *DescribeMatch type DescribeMatchmakingRuleSetsOutput struct { _ struct{} `type:"structure"` - // Token that indicates where to resume retrieving results on the next call + // A token that indicates where to resume retrieving results on the next call // to this action. If no token is returned, these results represent the end // of the list. NextToken *string `min:"1" type:"string"` - // Collection of requested matchmaking rule set objects. + // A collection of requested matchmaking rule set objects. // // RuleSets is a required field RuleSets []*MatchmakingRuleSet `type:"list" required:"true"` @@ -13087,11 +13784,11 @@ func (s *DescribeMatchmakingRuleSetsOutput) SetRuleSets(v []*MatchmakingRuleSet) type DescribePlayerSessionsInput struct { _ struct{} `type:"structure"` - // Unique identifier for the game session to retrieve player sessions for. + // A unique identifier for the game session to retrieve player sessions for. GameSessionId *string `min:"1" type:"string"` - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. If a player session ID is specified, + // The maximum number of results to return. Use this parameter with NextToken + // to get results as a set of sequential pages. If a player session ID is specified, // this parameter is ignored. Limit *int64 `min:"1" type:"integer"` @@ -13101,10 +13798,10 @@ type DescribePlayerSessionsInput struct { // ID is specified, this parameter is ignored. NextToken *string `min:"1" type:"string"` - // Unique identifier for a player to retrieve player sessions for. + // A unique identifier for a player to retrieve player sessions for. PlayerId *string `min:"1" type:"string"` - // Unique identifier for a player session to retrieve. + // A unique identifier for a player session to retrieve. PlayerSessionId *string `type:"string"` // Player session status to filter results on. @@ -13204,7 +13901,7 @@ type DescribePlayerSessionsOutput struct { // of the list. NextToken *string `min:"1" type:"string"` - // Collection of objects containing properties for each player session that + // A collection of objects containing properties for each player session that // matches the request. PlayerSessions []*PlayerSession `type:"list"` } @@ -13235,7 +13932,8 @@ func (s *DescribePlayerSessionsOutput) SetPlayerSessions(v []*PlayerSession) *De type DescribeRuntimeConfigurationInput struct { _ struct{} `type:"structure"` - // Unique identifier for a fleet to get the run-time configuration for. + // A unique identifier for a fleet to get the runtime configuration for. You + // can use either the fleet ID or ARN value. // // FleetId is a required field FleetId *string `type:"string" required:"true"` @@ -13299,13 +13997,14 @@ func (s *DescribeRuntimeConfigurationOutput) SetRuntimeConfiguration(v *RuntimeC type DescribeScalingPoliciesInput struct { _ struct{} `type:"structure"` - // Unique identifier for a fleet to retrieve scaling policies for. + // A unique identifier for a fleet to retrieve scaling policies for. You can + // use either the fleet ID or ARN value. // // FleetId is a required field FleetId *string `type:"string" required:"true"` - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. + // The maximum number of results to return. Use this parameter with NextToken + // to get results as a set of sequential pages. Limit *int64 `min:"1" type:"integer"` // Token that indicates the start of the next sequential page of results. Use @@ -13395,7 +14094,7 @@ type DescribeScalingPoliciesOutput struct { // of the list. NextToken *string `min:"1" type:"string"` - // Collection of objects containing the scaling policies matching the request. + // A collection of objects containing the scaling policies matching the request. ScalingPolicies []*ScalingPolicy `type:"list"` } @@ -13424,7 +14123,8 @@ func (s *DescribeScalingPoliciesOutput) SetScalingPolicies(v []*ScalingPolicy) * type DescribeScriptInput struct { _ struct{} `type:"structure"` - // Unique identifier for a Realtime script to retrieve properties for. + // A unique identifier for a Realtime script to retrieve properties for. You + // can use either the script ID or ARN value. // // ScriptId is a required field ScriptId *string `type:"string" required:"true"` @@ -13462,7 +14162,7 @@ func (s *DescribeScriptInput) SetScriptId(v string) *DescribeScriptInput { type DescribeScriptOutput struct { _ struct{} `type:"structure"` - // Set of properties describing the requested script. + // A set of properties describing the requested script. Script *Script `type:"structure"` } @@ -13499,7 +14199,7 @@ func (s DescribeVpcPeeringAuthorizationsInput) GoString() string { type DescribeVpcPeeringAuthorizationsOutput struct { _ struct{} `type:"structure"` - // Collection of objects that describe all valid VPC peering operations for + // A collection of objects that describe all valid VPC peering operations for // the current AWS account. VpcPeeringAuthorizations []*VpcPeeringAuthorization `type:"list"` } @@ -13524,7 +14224,7 @@ func (s *DescribeVpcPeeringAuthorizationsOutput) SetVpcPeeringAuthorizations(v [ type DescribeVpcPeeringConnectionsInput struct { _ struct{} `type:"structure"` - // Unique identifier for a fleet. + // A unique identifier for a fleet. You can use either the fleet ID or ARN value. FleetId *string `type:"string"` } @@ -13548,7 +14248,7 @@ func (s *DescribeVpcPeeringConnectionsInput) SetFleetId(v string) *DescribeVpcPe type DescribeVpcPeeringConnectionsOutput struct { _ struct{} `type:"structure"` - // Collection of VPC peering connection records that match the request. + // A collection of VPC peering connection records that match the request. VpcPeeringConnections []*VpcPeeringConnection `type:"list"` } @@ -13577,7 +14277,7 @@ type DesiredPlayerSession struct { // use this data, so it can be formatted as needed for use in the game. PlayerData *string `min:"1" type:"string"` - // Unique identifier for a player to associate with the player session. + // A unique identifier for a player to associate with the player session. PlayerId *string `min:"1" type:"string"` } @@ -13631,12 +14331,9 @@ func (s *DesiredPlayerSession) SetPlayerId(v string) *DesiredPlayerSession { // // * DeleteFleet // -// * Describe fleets: DescribeFleetAttributes DescribeFleetCapacity DescribeFleetPortSettings -// DescribeFleetUtilization DescribeRuntimeConfiguration DescribeEC2InstanceLimits -// DescribeFleetEvents +// * DescribeFleetAttributes // -// * Update fleets: UpdateFleetAttributes UpdateFleetCapacity UpdateFleetPortSettings -// UpdateRuntimeConfiguration +// * UpdateFleetAttributes // // * Manage fleet actions: StartFleetActions StopFleetActions type EC2InstanceCounts struct { @@ -13652,10 +14349,10 @@ type EC2InstanceCounts struct { // game session. IDLE *int64 `type:"integer"` - // Maximum value allowed for the fleet's instance count. + // The maximum value allowed for the fleet's instance count. MAXIMUM *int64 `type:"integer"` - // Minimum value allowed for the fleet's instance count. + // The minimum value allowed for the fleet's instance count. MINIMUM *int64 `type:"integer"` // Number of instances in the fleet that are starting but not yet active. @@ -13718,8 +14415,9 @@ func (s *EC2InstanceCounts) SetTERMINATING(v int64) *EC2InstanceCounts { return s } -// Maximum number of instances allowed based on the Amazon Elastic Compute Cloud -// (Amazon EC2) instance type. Instance limits can be retrieved by calling DescribeEC2InstanceLimits. +// The maximum number of instances allowed based on the Amazon Elastic Compute +// Cloud (Amazon EC2) instance type. Instance limits can be retrieved by calling +// DescribeEC2InstanceLimits. type EC2InstanceLimit struct { _ struct{} `type:"structure"` @@ -13772,9 +14470,9 @@ func (s *EC2InstanceLimit) SetInstanceLimit(v int64) *EC2InstanceLimit { type Event struct { _ struct{} `type:"structure"` - // Type of event being logged. The following events are currently in use: + // The type of event being logged. // - // Fleet creation events: + // Fleet creation events (ordered by fleet creation activity): // // * FLEET_CREATED -- A fleet record was successfully created with a status // of NEW. Event messaging includes the fleet ID. @@ -13801,22 +14499,22 @@ type Event struct { // // * FLEET_CREATION_VALIDATING_RUNTIME_CONFIG -- The build process was successful, // and the Amazon GameLift is now verifying that the game server launch paths, - // which are specified in the fleet's run-time configuration, exist. If any + // which are specified in the fleet's runtime configuration, exist. If any // listed launch path exists, Amazon GameLift tries to launch a game server // process and waits for the process to report ready. Failures in this stage // prevent a fleet from moving to ACTIVE status. Logs for this stage list - // the launch paths in the run-time configuration and indicate whether each + // the launch paths in the runtime configuration and indicate whether each // is found. Access the logs by using the URL in PreSignedLogUrl. // // * FLEET_STATE_VALIDATING -- Fleet status changed from DOWNLOADING to VALIDATING. // - // * FLEET_VALIDATION_LAUNCH_PATH_NOT_FOUND -- Validation of the run-time + // * FLEET_VALIDATION_LAUNCH_PATH_NOT_FOUND -- Validation of the runtime // configuration failed because the executable specified in a launch path // does not exist on the instance. // // * FLEET_STATE_BUILDING -- Fleet status changed from VALIDATING to BUILDING. // - // * FLEET_VALIDATION_EXECUTABLE_RUNTIME_FAILURE -- Validation of the run-time + // * FLEET_VALIDATION_EXECUTABLE_RUNTIME_FAILURE -- Validation of the runtime // configuration failed because the executable specified in a launch path // failed to run on the fleet instance. // @@ -13825,9 +14523,8 @@ type Event struct { // * FLEET_ACTIVATION_FAILED - The fleet failed to successfully complete // one of the steps in the fleet activation process. This event code indicates // that the game build was successfully downloaded to a fleet instance, built, - // and validated, but was not able to start a server process. A possible - // reason for failure is that the game server is not reporting "process ready" - // to the Amazon GameLift service. + // and validated, but was not able to start a server process. Learn more + // at Debug Fleet Creation Issues (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-creating-debug.html#fleets-creating-debug-creation) // // * FLEET_STATE_ACTIVE -- The fleet's status changed from ACTIVATING to // ACTIVE. The fleet is now ready to host game sessions. @@ -13868,7 +14565,7 @@ type Event struct { // * GENERIC_EVENT -- An unspecified event has occurred. EventCode *string `type:"string" enum:"EventCode"` - // Unique identifier for a fleet event. + // A unique identifier for a fleet event. EventId *string `min:"1" type:"string"` // Time stamp indicating when this event occurred. Format is a number expressed @@ -13883,7 +14580,7 @@ type Event struct { // can also access fleet creation logs through the Amazon GameLift console. PreSignedLogUrl *string `min:"1" type:"string"` - // Unique identifier for an event resource, such as a fleet ID. + // A unique identifier for an event resource, such as a fleet ID. ResourceId *string `min:"1" type:"string"` } @@ -13941,20 +14638,24 @@ func (s *Event) SetResourceId(v string) *Event { // // * DeleteFleet // -// * Describe fleets: DescribeFleetAttributes DescribeFleetCapacity DescribeFleetPortSettings -// DescribeFleetUtilization DescribeRuntimeConfiguration DescribeEC2InstanceLimits -// DescribeFleetEvents +// * DescribeFleetAttributes // -// * Update fleets: UpdateFleetAttributes UpdateFleetCapacity UpdateFleetPortSettings -// UpdateRuntimeConfiguration +// * UpdateFleetAttributes // // * Manage fleet actions: StartFleetActions StopFleetActions type FleetAttributes struct { _ struct{} `type:"structure"` - // Unique identifier for a build. + // The Amazon Resource Name (ARN (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)) + // associated with the GameLift build resource that is deployed on instances + // in this fleet. In a GameLift build ARN, the resource ID matches the BuildId + // value. + BuildArn *string `type:"string"` + + // A unique identifier for a build. BuildId *string `type:"string"` + // Indicates whether a TLS/SSL certificate was generated for the fleet. CertificateConfiguration *CertificateConfiguration `type:"structure"` // Time stamp indicating when this data object was created. Format is a number @@ -13964,21 +14665,24 @@ type FleetAttributes struct { // Human-readable description of the fleet. Description *string `min:"1" type:"string"` - // Identifier for a fleet that is unique across all regions. + // The Amazon Resource Name (ARN (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)) + // that is assigned to a GameLift fleet resource and uniquely identifies it. + // ARNs are unique across all Regions. In a GameLift fleet ARN, the resource + // ID matches the FleetId value. FleetArn *string `min:"1" type:"string"` - // Unique identifier for a fleet. + // A unique identifier for a fleet. FleetId *string `type:"string"` // Indicates whether the fleet uses on-demand or spot instances. A spot instance // in use may be interrupted with a two-minute notification. FleetType *string `type:"string" enum:"FleetType"` - // Unique identifier for an AWS IAM role that manages access to your AWS services. + // A unique identifier for an AWS IAM role that manages access to your AWS services. // With an instance role ARN set, any application that runs on an instance in // this fleet can assume the role, including install scripts, server processes, - // daemons (background processes). Create a role or look up a role's ARN using - // the IAM dashboard (https://console.aws.amazon.com/iam/) in the AWS Management + // and daemons (background processes). Create a role or look up a role's ARN + // from the IAM dashboard (https://console.aws.amazon.com/iam/) in the AWS Management // Console. Learn more about using on-box credentials for your game servers // at Access external resources from a game server (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-resources.html). InstanceRoleArn *string `min:"1" type:"string"` @@ -14005,12 +14709,12 @@ type FleetAttributes struct { // group at a time. MetricGroups []*string `type:"list"` - // Descriptive label that is associated with a fleet. Fleet names do not need + // A descriptive label that is associated with a fleet. Fleet names do not need // to be unique. Name *string `min:"1" type:"string"` - // Type of game session protection to set for all new instances started in the - // fleet. + // The type of game session protection to set for all new instances started + // in the fleet. // // * NoProtection -- The game session can be terminated during a scale-down // event. @@ -14028,7 +14732,13 @@ type FleetAttributes struct { // create over a span of time. ResourceCreationLimitPolicy *ResourceCreationLimitPolicy `type:"structure"` - // Unique identifier for a Realtime script. + // The Amazon Resource Name (ARN (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)) + // associated with the GameLift script resource that is deployed on instances + // in this fleet. In a GameLift script ARN, the resource ID matches the ScriptId + // value. + ScriptArn *string `type:"string"` + + // A unique identifier for a Realtime script. ScriptId *string `type:"string"` // Game server launch parameters specified for fleets created before 2016-08-04 @@ -14081,6 +14791,12 @@ func (s FleetAttributes) GoString() string { return s.String() } +// SetBuildArn sets the BuildArn field's value. +func (s *FleetAttributes) SetBuildArn(v string) *FleetAttributes { + s.BuildArn = &v + return s +} + // SetBuildId sets the BuildId field's value. func (s *FleetAttributes) SetBuildId(v string) *FleetAttributes { s.BuildId = &v @@ -14171,6 +14887,12 @@ func (s *FleetAttributes) SetResourceCreationLimitPolicy(v *ResourceCreationLimi return s } +// SetScriptArn sets the ScriptArn field's value. +func (s *FleetAttributes) SetScriptArn(v string) *FleetAttributes { + s.ScriptArn = &v + return s +} + // SetScriptId sets the ScriptId field's value. func (s *FleetAttributes) SetScriptId(v string) *FleetAttributes { s.ScriptId = &v @@ -14218,18 +14940,15 @@ func (s *FleetAttributes) SetTerminationTime(v time.Time) *FleetAttributes { // // * DeleteFleet // -// * Describe fleets: DescribeFleetAttributes DescribeFleetCapacity DescribeFleetPortSettings -// DescribeFleetUtilization DescribeRuntimeConfiguration DescribeEC2InstanceLimits -// DescribeFleetEvents +// * DescribeFleetAttributes // -// * Update fleets: UpdateFleetAttributes UpdateFleetCapacity UpdateFleetPortSettings -// UpdateRuntimeConfiguration +// * UpdateFleetAttributes // // * Manage fleet actions: StartFleetActions StopFleetActions type FleetCapacity struct { _ struct{} `type:"structure"` - // Unique identifier for a fleet. + // A unique identifier for a fleet. FleetId *string `type:"string"` // Current status of fleet capacity. @@ -14280,12 +14999,9 @@ func (s *FleetCapacity) SetInstanceType(v string) *FleetCapacity { // // * DeleteFleet // -// * Describe fleets: DescribeFleetAttributes DescribeFleetCapacity DescribeFleetPortSettings -// DescribeFleetUtilization DescribeRuntimeConfiguration DescribeEC2InstanceLimits -// DescribeFleetEvents +// * DescribeFleetAttributes // -// * Update fleets: UpdateFleetAttributes UpdateFleetCapacity UpdateFleetPortSettings -// UpdateRuntimeConfiguration +// * UpdateFleetAttributes // // * Manage fleet actions: StartFleetActions StopFleetActions type FleetUtilization struct { @@ -14303,11 +15019,11 @@ type FleetUtilization struct { // in the fleet. CurrentPlayerSessionCount *int64 `type:"integer"` - // Unique identifier for a fleet. + // A unique identifier for a fleet. FleetId *string `type:"string"` - // Maximum players allowed across all game sessions currently being hosted on - // all instances in the fleet. + // The maximum number of players allowed across all game sessions currently + // being hosted on all instances in the fleet. MaximumPlayerSessionCount *int64 `type:"integer"` } @@ -14353,20 +15069,19 @@ func (s *FleetUtilization) SetMaximumPlayerSessionCount(v int64) *FleetUtilizati // Set of key-value pairs that contain information about a game session. When // included in a game session request, these properties communicate details -// to be used when setting up the new game session, such as to specify a game -// mode, level, or map. Game properties are passed to the game server process -// when initiating a new game session; the server process uses the properties -// as appropriate. For more information, see the Amazon GameLift Developer Guide -// (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-client-api.html#gamelift-sdk-client-api-create). +// to be used when setting up the new game session. For example, a game property +// might specify a game mode, level, or map. Game properties are passed to the +// game server process when initiating a new game session. For more information, +// see the Amazon GameLift Developer Guide (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-client-api.html#gamelift-sdk-client-api-create). type GameProperty struct { _ struct{} `type:"structure"` - // Game property identifier. + // The game property identifier. // // Key is a required field Key *string `type:"string" required:"true"` - // Game property value. + // The game property value. // // Value is a required field Value *string `type:"string" required:"true"` @@ -14440,7 +15155,7 @@ type GameSession struct { // expressed in Unix time as milliseconds (for example "1469498468.057"). CreationTime *time.Time `type:"timestamp"` - // Unique identifier for a player. This ID is used to enforce a resource protection + // A unique identifier for a player. This ID is used to enforce a resource protection // policy (if one exists), that limits the number of game sessions a player // can create. CreatorId *string `min:"1" type:"string"` @@ -14448,9 +15163,23 @@ type GameSession struct { // Number of players currently in the game session. CurrentPlayerSessionCount *int64 `type:"integer"` + // DNS identifier assigned to the instance that is running the game session. + // Values have the following format: + // + // * TLS-enabled fleets: ..amazongamelift.com. + // + // * Non-TLS-enabled fleets: ec2-.compute.amazonaws.com. + // (See Amazon EC2 Instance IP Addressing (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html#concepts-public-addresses).) + // + // When connecting to a game session that is running on a TLS-enabled fleet, + // you must use the DNS name, not the IP address. DnsName *string `type:"string"` - // Unique identifier for a fleet that the game session is running on. + // The Amazon Resource Name (ARN (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)) + // associated with the GameLift fleet that this game session is running on. + FleetArn *string `min:"1" type:"string"` + + // A unique identifier for a fleet that the game session is running on. FleetId *string `type:"string"` // Set of custom properties for a game session, formatted as key:value pairs. @@ -14464,13 +15193,14 @@ type GameSession struct { // a request to start a new game session (see Start a Game Session (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession)). GameSessionData *string `min:"1" type:"string"` - // Unique identifier for the game session. A game session ARN has the following + // A unique identifier for the game session. A game session ARN has the following // format: arn:aws:gamelift:::gamesession//. GameSessionId *string `min:"1" type:"string"` - // IP address of the game session. To connect to a Amazon GameLift game server, - // an app needs both the IP address and port number. + // IP address of the instance that is running the game session. When connecting + // to a Amazon GameLift game server, a client needs to reference an IP address + // (or DNS name) and port number. IpAddress *string `type:"string"` // Information about the matchmaking process that was used to create the game @@ -14482,12 +15212,12 @@ type GameSession struct { // whenever new players are added during a successful backfill (see StartMatchBackfill). MatchmakerData *string `min:"1" type:"string"` - // Maximum number of players that can be connected simultaneously to the game - // session. + // The maximum number of players that can be connected simultaneously to the + // game session. MaximumPlayerSessionCount *int64 `type:"integer"` - // Descriptive label that is associated with a game session. Session names do - // not need to be unique. + // A descriptive label that is associated with a game session. Session names + // do not need to be unique. Name *string `min:"1" type:"string"` // Indicates whether or not the game session is accepting new players. @@ -14545,6 +15275,12 @@ func (s *GameSession) SetDnsName(v string) *GameSession { return s } +// SetFleetArn sets the FleetArn field's value. +func (s *GameSession) SetFleetArn(v string) *GameSession { + s.FleetArn = &v + return s +} + // SetFleetId sets the FleetId field's value. func (s *GameSession) SetFleetId(v string) *GameSession { s.FleetId = &v @@ -14632,17 +15368,28 @@ func (s *GameSession) SetTerminationTime(v time.Time) *GameSession { type GameSessionConnectionInfo struct { _ struct{} `type:"structure"` + // DNS identifier assigned to the instance that is running the game session. + // Values have the following format: + // + // * TLS-enabled fleets: ..amazongamelift.com. + // + // * Non-TLS-enabled fleets: ec2-.compute.amazonaws.com. + // (See Amazon EC2 Instance IP Addressing (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html#concepts-public-addresses).) + // + // When connecting to a game session that is running on a TLS-enabled fleet, + // you must use the DNS name, not the IP address. DnsName *string `type:"string"` - // Amazon Resource Name (ARN (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html)) + // Amazon Resource Name (ARN (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)) // that is assigned to a game session and uniquely identifies it. GameSessionArn *string `min:"1" type:"string"` - // IP address of the game session. To connect to a Amazon GameLift game server, - // an app needs both the IP address and port number. + // IP address of the instance that is running the game session. When connecting + // to a Amazon GameLift game server, a client needs to reference an IP address + // (or DNS name) and port number. IpAddress *string `type:"string"` - // Collection of player session IDs, one for each player ID that was included + // A collection of player session IDs, one for each player ID that was included // in the original matchmaking request. MatchedPlayerSessions []*MatchedPlayerSession `type:"list"` @@ -14744,6 +15491,16 @@ func (s *GameSessionDetail) SetProtectionPolicy(v string) *GameSessionDetail { type GameSessionPlacement struct { _ struct{} `type:"structure"` + // DNS identifier assigned to the instance that is running the game session. + // Values have the following format: + // + // * TLS-enabled fleets: ..amazongamelift.com. + // + // * Non-TLS-enabled fleets: ec2-.compute.amazonaws.com. + // (See Amazon EC2 Instance IP Addressing (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html#concepts-public-addresses).) + // + // When connecting to a game session that is running on a TLS-enabled fleet, + // you must use the DNS name, not the IP address. DnsName *string `type:"string"` // Time stamp indicating when this request was completed, canceled, or timed @@ -14757,7 +15514,7 @@ type GameSessionPlacement struct { // Identifier for the game session created by this placement request. This value // is set once the new game session is placed (placement status is FULFILLED). - // This identifier is unique across all regions. You can use this value as a + // This identifier is unique across all Regions. You can use this value as a // GameSessionId value as needed. GameSessionArn *string `min:"1" type:"string"` @@ -14766,26 +15523,27 @@ type GameSessionPlacement struct { // a request to start a new game session (see Start a Game Session (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession)). GameSessionData *string `min:"1" type:"string"` - // Unique identifier for the game session. This value is set once the new game - // session is placed (placement status is FULFILLED). + // A unique identifier for the game session. This value is set once the new + // game session is placed (placement status is FULFILLED). GameSessionId *string `min:"1" type:"string"` - // Descriptive label that is associated with a game session. Session names do - // not need to be unique. + // A descriptive label that is associated with a game session. Session names + // do not need to be unique. GameSessionName *string `min:"1" type:"string"` - // Descriptive label that is associated with game session queue. Queue names - // must be unique within each region. + // A descriptive label that is associated with game session queue. Queue names + // must be unique within each Region. GameSessionQueueName *string `min:"1" type:"string"` - // Name of the region where the game session created by this placement request + // Name of the Region where the game session created by this placement request // is running. This value is set once the new game session is placed (placement // status is FULFILLED). GameSessionRegion *string `min:"1" type:"string"` - // IP address of the game session. To connect to a Amazon GameLift game server, - // an app needs both the IP address and port number. This value is set once - // the new game session is placed (placement status is FULFILLED). + // IP address of the instance that is running the game session. When connecting + // to a Amazon GameLift game server, a client needs to reference an IP address + // (or DNS name) and port number. This value is set once the new game session + // is placed (placement status is FULFILLED). IpAddress *string `type:"string"` // Information on the matchmaking process for this game. Data is in JSON syntax, @@ -14795,23 +15553,23 @@ type GameSessionPlacement struct { // data, see Match Data (https://docs.aws.amazon.com/gamelift/latest/developerguide/match-server.html#match-server-data). MatchmakerData *string `min:"1" type:"string"` - // Maximum number of players that can be connected simultaneously to the game - // session. + // The maximum number of players that can be connected simultaneously to the + // game session. MaximumPlayerSessionCount *int64 `type:"integer"` - // Collection of information on player sessions created in response to the game - // session placement request. These player sessions are created only once a - // new game session is successfully placed (placement status is FULFILLED). + // A collection of information on player sessions created in response to the + // game session placement request. These player sessions are created only once + // a new game session is successfully placed (placement status is FULFILLED). // This information includes the player ID (as provided in the placement request) // and the corresponding player session ID. Retrieve full player sessions by // calling DescribePlayerSessions with the player session ID. PlacedPlayerSessions []*PlacedPlayerSession `type:"list"` - // Unique identifier for a game session placement. + // A unique identifier for a game session placement. PlacementId *string `min:"1" type:"string"` // Set of values, expressed in milliseconds, indicating the amount of latency - // that a player experiences when connected to AWS regions. + // that a player experiences when connected to AWS Regions. PlayerLatencies []*PlayerLatency `type:"list"` // Port number for the game session. To connect to a Amazon GameLift game server, @@ -14836,6 +15594,10 @@ type GameSessionPlacement struct { // // * TIMED_OUT -- A new game session was not successfully created before // the time limit expired. You can resubmit the placement request as needed. + // + // * FAILED -- GameLift is not able to complete the process of placing the + // game session. Common reasons are the game session terminated before the + // placement process was completed, or an unexpected internal error. Status *string `type:"string" enum:"GameSessionPlacementState"` } @@ -14984,31 +15746,32 @@ func (s *GameSessionPlacement) SetStatus(v string) *GameSessionPlacement { type GameSessionQueue struct { _ struct{} `type:"structure"` - // List of fleets that can be used to fulfill game session placement requests + // A list of fleets that can be used to fulfill game session placement requests // in the queue. Fleets are identified by either a fleet ARN or a fleet alias // ARN. Destinations are listed in default preference order. Destinations []*GameSessionQueueDestination `type:"list"` - // Amazon Resource Name (ARN (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html)) - // that is assigned to a game session queue and uniquely identifies it. Format - // is arn:aws:gamelift:::gamesessionqueue/. + // Amazon Resource Name (ARN (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)) + // that is assigned to a GameLift game session queue resource and uniquely identifies + // it. ARNs are unique across all Regions. In a GameLift game session queue + // ARN, the resource ID matches the Name value. GameSessionQueueArn *string `min:"1" type:"string"` - // Descriptive label that is associated with game session queue. Queue names - // must be unique within each region. + // A descriptive label that is associated with game session queue. Queue names + // must be unique within each Region. Name *string `min:"1" type:"string"` - // Collection of latency policies to apply when processing game sessions placement + // A collection of latency policies to apply when processing game sessions placement // requests with player latency information. Multiple policies are evaluated // in order of the maximum latency value, starting with the lowest latency values. - // With just one policy, it is enforced at the start of the game session placement - // for the duration period. With multiple policies, each policy is enforced - // consecutively for its duration period. For example, a queue might enforce - // a 60-second policy followed by a 120-second policy, and then no policy for - // the remainder of the placement. + // With just one policy, the policy is enforced at the start of the game session + // placement for the duration period. With multiple policies, each policy is + // enforced consecutively for its duration period. For example, a queue might + // enforce a 60-second policy followed by a 120-second policy, and then no policy + // for the remainder of the placement. PlayerLatencyPolicies []*PlayerLatencyPolicy `type:"list"` - // Maximum time, in seconds, that a new game session placement request remains + // The maximum time, in seconds, that a new game session placement request remains // in the queue. When a request exceeds this time, the game session placement // changes to a TIMED_OUT status. TimeoutInSeconds *int64 `type:"integer"` @@ -15056,7 +15819,7 @@ func (s *GameSessionQueue) SetTimeoutInSeconds(v int64) *GameSessionQueue { // Fleet designated in a game session queue. Requests for new game sessions // in the queue are fulfilled by starting a new game session on any destination -// configured for a queue. +// that is configured for a queue. // // * CreateGameSessionQueue // @@ -15068,9 +15831,9 @@ func (s *GameSessionQueue) SetTimeoutInSeconds(v int64) *GameSessionQueue { type GameSessionQueueDestination struct { _ struct{} `type:"structure"` - // Amazon Resource Name (ARN) assigned to fleet or fleet alias. ARNs, which - // include a fleet ID or alias ID and a region name, provide a unique identifier - // across all regions. + // The Amazon Resource Name (ARN) that is assigned to fleet or fleet alias. + // ARNs, which include a fleet ID or alias ID and a Region name, provide a unique + // identifier across all Regions. DestinationArn *string `min:"1" type:"string"` } @@ -15107,7 +15870,7 @@ func (s *GameSessionQueueDestination) SetDestinationArn(v string) *GameSessionQu type GetGameSessionLogUrlInput struct { _ struct{} `type:"structure"` - // Unique identifier for the game session to get logs for. + // A unique identifier for the game session to get logs for. // // GameSessionId is a required field GameSessionId *string `min:"1" type:"string" required:"true"` @@ -15176,15 +15939,15 @@ func (s *GetGameSessionLogUrlOutput) SetPreSignedUrl(v string) *GetGameSessionLo type GetInstanceAccessInput struct { _ struct{} `type:"structure"` - // Unique identifier for a fleet that contains the instance you want access - // to. The fleet can be in any of the following statuses: ACTIVATING, ACTIVE, - // or ERROR. Fleets with an ERROR status may be accessible for a short time - // before they are deleted. + // A unique identifier for a fleet that contains the instance you want access + // to. You can use either the fleet ID or ARN value. The fleet can be in any + // of the following statuses: ACTIVATING, ACTIVE, or ERROR. Fleets with an ERROR + // status may be accessible for a short time before they are deleted. // // FleetId is a required field FleetId *string `type:"string" required:"true"` - // Unique identifier for an instance you want to get access to. You can access + // A unique identifier for an instance you want to get access to. You can access // an instance in any status. // // InstanceId is a required field @@ -15233,8 +15996,8 @@ func (s *GetInstanceAccessInput) SetInstanceId(v string) *GetInstanceAccessInput type GetInstanceAccessOutput struct { _ struct{} `type:"structure"` - // Object that contains connection information for a fleet instance, including - // IP address and access credentials. + // The connection information for a fleet instance, including IP address and + // access credentials. InstanceAccess *InstanceAccess `type:"structure"` } @@ -15263,15 +16026,25 @@ type Instance struct { // expressed in Unix time as milliseconds (for example "1469498468.057"). CreationTime *time.Time `type:"timestamp"` + // DNS identifier assigned to the instance that is running the game session. + // Values have the following format: + // + // * TLS-enabled fleets: ..amazongamelift.com. + // + // * Non-TLS-enabled fleets: ec2-.compute.amazonaws.com. + // (See Amazon EC2 Instance IP Addressing (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html#concepts-public-addresses).) + // + // When connecting to a game session that is running on a TLS-enabled fleet, + // you must use the DNS name, not the IP address. DnsName *string `type:"string"` - // Unique identifier for a fleet that the instance is in. + // A unique identifier for a fleet that the instance is in. FleetId *string `type:"string"` - // Unique identifier for an instance. + // A unique identifier for an instance. InstanceId *string `type:"string"` - // IP address assigned to the instance. + // IP address that is assigned to the instance. IpAddress *string `type:"string"` // Operating system that is running on this instance. @@ -15362,13 +16135,13 @@ type InstanceAccess struct { // Credentials required to access the instance. Credentials *InstanceCredentials `type:"structure" sensitive:"true"` - // Unique identifier for a fleet containing the instance being accessed. + // A unique identifier for a fleet containing the instance being accessed. FleetId *string `type:"string"` - // Unique identifier for an instance being accessed. + // A unique identifier for an instance being accessed. InstanceId *string `type:"string"` - // IP address assigned to the instance. + // IP address that is assigned to the instance. IpAddress *string `type:"string"` // Operating system that is running on the instance. @@ -15453,33 +16226,33 @@ func (s *InstanceCredentials) SetUserName(v string) *InstanceCredentials { } // A range of IP addresses and port settings that allow inbound traffic to connect -// to server processes on an Amazon GameLift. New game sessions that are started -// on the fleet are assigned an IP address/port number combination, which must -// fall into the fleet's allowed ranges. For fleets created with a custom game -// server, the ranges reflect the server's game session assignments. For Realtime -// Servers fleets, Amazon GameLift automatically opens two port ranges, one -// for TCP messaging and one for UDP for use by the Realtime servers. +// to server processes on an Amazon GameLift hosting resource. New game sessions +// that are started on the fleet are assigned an IP address/port number combination, +// which must fall into the fleet's allowed ranges. For fleets created with +// a custom game server, the ranges reflect the server's game session assignments. +// For Realtime Servers fleets, Amazon GameLift automatically opens two port +// ranges, one for TCP messaging and one for UDP for use by the Realtime servers. type IpPermission struct { _ struct{} `type:"structure"` - // Starting value for a range of allowed port numbers. + // A starting value for a range of allowed port numbers. // // FromPort is a required field FromPort *int64 `min:"1" type:"integer" required:"true"` - // Range of allowed IP addresses. This value must be expressed in CIDR notation. + // A range of allowed IP addresses. This value must be expressed in CIDR notation. // Example: "000.000.000.000/[subnet mask]" or optionally the shortened version // "0.0.0.0/[subnet mask]". // // IpRange is a required field IpRange *string `type:"string" required:"true"` - // Network communication protocol used by the fleet. + // The network communication protocol used by the fleet. // // Protocol is a required field Protocol *string `type:"string" required:"true" enum:"IpProtocol"` - // Ending value for a range of allowed port numbers. Port numbers are end-inclusive. + // An ending value for a range of allowed port numbers. Port numbers are end-inclusive. // This value must be higher than FromPort. // // ToPort is a required field @@ -15552,22 +16325,22 @@ func (s *IpPermission) SetToPort(v int64) *IpPermission { type ListAliasesInput struct { _ struct{} `type:"structure"` - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. + // The maximum number of results to return. Use this parameter with NextToken + // to get results as a set of sequential pages. Limit *int64 `min:"1" type:"integer"` - // Descriptive label that is associated with an alias. Alias names do not need - // to be unique. + // A descriptive label that is associated with an alias. Alias names do not + // need to be unique. Name *string `min:"1" type:"string"` - // Token that indicates the start of the next sequential page of results. Use - // the token that is returned with a previous call to this action. To start + // A token that indicates the start of the next sequential page of results. + // Use the token that is returned with a previous call to this action. To start // at the beginning of the result set, do not specify a value. NextToken *string `min:"1" type:"string"` - // Type of routing to filter results on. Use this parameter to retrieve only - // aliases of a certain type. To retrieve all aliases, leave this parameter - // empty. + // The routing type to filter results on. Use this parameter to retrieve only + // aliases with a certain routing type. To retrieve all aliases, leave this + // parameter empty. // // Possible routing types include the following: // @@ -15637,10 +16410,10 @@ func (s *ListAliasesInput) SetRoutingStrategyType(v string) *ListAliasesInput { type ListAliasesOutput struct { _ struct{} `type:"structure"` - // Collection of alias records that match the list request. + // A collection of alias resources that match the request parameters. Aliases []*Alias `type:"list"` - // Token that indicates where to resume retrieving results on the next call + // A token that indicates where to resume retrieving results on the next call // to this action. If no token is returned, these results represent the end // of the list. NextToken *string `min:"1" type:"string"` @@ -15672,8 +16445,8 @@ func (s *ListAliasesOutput) SetNextToken(v string) *ListAliasesOutput { type ListBuildsInput struct { _ struct{} `type:"structure"` - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. + // The maximum number of results to return. Use this parameter with NextToken + // to get results as a set of sequential pages. Limit *int64 `min:"1" type:"integer"` // Token that indicates the start of the next sequential page of results. Use @@ -15747,7 +16520,7 @@ func (s *ListBuildsInput) SetStatus(v string) *ListBuildsInput { type ListBuildsOutput struct { _ struct{} `type:"structure"` - // Collection of build records that match the request. + // A collection of build records that match the request. Builds []*Build `type:"list"` // Token that indicates where to resume retrieving results on the next call @@ -15782,13 +16555,13 @@ func (s *ListBuildsOutput) SetNextToken(v string) *ListBuildsOutput { type ListFleetsInput struct { _ struct{} `type:"structure"` - // Unique identifier for a build to return fleets for. Use this parameter to - // return only fleets using the specified build. To retrieve all fleets, leave - // this parameter empty. + // A unique identifier for a build to return fleets for. Use this parameter + // to return only fleets using the specified build. Use either the build ID + // or ARN value.To retrieve all fleets, leave this parameter empty. BuildId *string `type:"string"` - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. + // The maximum number of results to return. Use this parameter with NextToken + // to get results as a set of sequential pages. Limit *int64 `min:"1" type:"integer"` // Token that indicates the start of the next sequential page of results. Use @@ -15796,9 +16569,9 @@ type ListFleetsInput struct { // at the beginning of the result set, do not specify a value. NextToken *string `min:"1" type:"string"` - // Unique identifier for a Realtime script to return fleets for. Use this parameter - // to return only fleets using the specified script. To retrieve all fleets, - // leave this parameter empty. + // A unique identifier for a Realtime script to return fleets for. Use this + // parameter to return only fleets using the specified script. Use either the + // script ID or ARN value.To retrieve all fleets, leave this parameter empty. ScriptId *string `type:"string"` } @@ -15892,12 +16665,12 @@ func (s *ListFleetsOutput) SetNextToken(v string) *ListFleetsOutput { type ListScriptsInput struct { _ struct{} `type:"structure"` - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. + // The maximum number of results to return. Use this parameter with NextToken + // to get results as a set of sequential pages. Limit *int64 `min:"1" type:"integer"` - // Token that indicates the start of the next sequential page of results. Use - // the token that is returned with a previous call to this action. To start + // A token that indicates the start of the next sequential page of results. + // Use the token that is returned with a previous call to this action. To start // at the beginning of the result set, do not specify a value. NextToken *string `min:"1" type:"string"` } @@ -15943,34 +16716,102 @@ func (s *ListScriptsInput) SetNextToken(v string) *ListScriptsInput { type ListScriptsOutput struct { _ struct{} `type:"structure"` - // Token that indicates where to resume retrieving results on the next call + // A token that indicates where to resume retrieving results on the next call // to this action. If no token is returned, these results represent the end // of the list. NextToken *string `min:"1" type:"string"` - // Set of properties describing the requested script. - Scripts []*Script `type:"list"` + // A set of properties describing the requested script. + Scripts []*Script `type:"list"` +} + +// String returns the string representation +func (s ListScriptsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListScriptsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListScriptsOutput) SetNextToken(v string) *ListScriptsOutput { + s.NextToken = &v + return s +} + +// SetScripts sets the Scripts field's value. +func (s *ListScriptsOutput) SetScripts(v []*Script) *ListScriptsOutput { + s.Scripts = v + return s +} + +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html)) + // that is assigned to and uniquely identifies the GameLift resource that you + // want to retrieve tags for. GameLift resource ARNs are included in the data + // object for the resource, which can be retrieved by calling a List or Describe + // action for the resource type. + // + // ResourceARN is a required field + ResourceARN *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} + if s.ResourceARN == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceARN")) + } + if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *ListTagsForResourceInput) SetResourceARN(v string) *ListTagsForResourceInput { + s.ResourceARN = &v + return s +} + +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // The collection of tags that have been assigned to the specified resource. + Tags []*Tag `type:"list"` } // String returns the string representation -func (s ListScriptsOutput) String() string { +func (s ListTagsForResourceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListScriptsOutput) GoString() string { +func (s ListTagsForResourceOutput) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *ListScriptsOutput) SetNextToken(v string) *ListScriptsOutput { - s.NextToken = &v - return s -} - -// SetScripts sets the Scripts field's value. -func (s *ListScriptsOutput) SetScripts(v []*Script) *ListScriptsOutput { - s.Scripts = v +// SetTags sets the Tags field's value. +func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { + s.Tags = v return s } @@ -15983,10 +16824,10 @@ func (s *ListScriptsOutput) SetScripts(v []*Script) *ListScriptsOutput { type MatchedPlayerSession struct { _ struct{} `type:"structure"` - // Unique identifier for a player + // A unique identifier for a player PlayerId *string `min:"1" type:"string"` - // Unique identifier for a player session + // A unique identifier for a player session PlayerSessionId *string `type:"string"` } @@ -16017,74 +16858,85 @@ func (s *MatchedPlayerSession) SetPlayerSessionId(v string) *MatchedPlayerSessio type MatchmakingConfiguration struct { _ struct{} `type:"structure"` - // Flag that determines whether a match that was created with this configuration + // A flag that indicates whether a match that was created with this configuration // must be accepted by the matched players. To require acceptance, set to TRUE. AcceptanceRequired *bool `type:"boolean"` - // Length of time (in seconds) to wait for players to accept a proposed match. - // If any player rejects the match or fails to accept before the timeout, the - // ticket continues to look for an acceptable match. + // The length of time (in seconds) to wait for players to accept a proposed + // match. If any player rejects the match or fails to accept before the timeout, + // the ticket continues to look for an acceptable match. AcceptanceTimeoutSeconds *int64 `min:"1" type:"integer"` - // Number of player slots in a match to keep open for future players. For example, - // if the configuration's rule set specifies a match for a single 12-person - // team, and the additional player count is set to 2, only 10 players are selected - // for the match. + // The number of player slots in a match to keep open for future players. For + // example, assume that the configuration's rule set specifies a match for a + // single 12-person team. If the additional player count is set to 2, only 10 + // players are initially selected for the match. AdditionalPlayerCount *int64 `type:"integer"` - // Method used to backfill game sessions created with this matchmaking configuration. + // The method used to backfill game sessions created with this matchmaking configuration. // MANUAL indicates that the game makes backfill requests or does not use the // match backfill feature. AUTOMATIC indicates that GameLift creates StartMatchBackfill // requests whenever a game session has one or more open slots. Learn more about // manual and automatic backfill in Backfill Existing Games with FlexMatch (https://docs.aws.amazon.com/gamelift/latest/developerguide/match-backfill.html). BackfillMode *string `type:"string" enum:"BackfillMode"` - // Time stamp indicating when this data object was created. Format is a number - // expressed in Unix time as milliseconds (for example "1469498468.057"). + // Amazon Resource Name (ARN (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)) + // that is assigned to a GameLift matchmaking configuration resource and uniquely + // identifies it. ARNs are unique across all Regions. In a GameLift configuration + // ARN, the resource ID matches the Name value. + ConfigurationArn *string `type:"string"` + + // The time stamp indicating when this data object was created. The format is + // a number expressed in Unix time as milliseconds (for example "1469498468.057"). CreationTime *time.Time `type:"timestamp"` // Information to attach to all events related to the matchmaking configuration. CustomEventData *string `type:"string"` - // Descriptive label that is associated with matchmaking configuration. + // A descriptive label that is associated with matchmaking configuration. Description *string `min:"1" type:"string"` - // Set of custom properties for a game session, formatted as key:value pairs. + // A set of custom properties for a game session, formatted as key-value pairs. // These properties are passed to a game server process in the GameSession object // with a request to start a new game session (see Start a Game Session (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession)). // This information is added to the new GameSession object that is created for // a successful match. GameProperties []*GameProperty `type:"list"` - // Set of custom game session properties, formatted as a single string value. + // A set of custom game session properties, formatted as a single string value. // This data is passed to a game server process in the GameSession object with // a request to start a new game session (see Start a Game Session (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession)). // This information is added to the new GameSession object that is created for // a successful match. GameSessionData *string `min:"1" type:"string"` - // Amazon Resource Name (ARN (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html)) - // that is assigned to a game session queue and uniquely identifies it. Format - // is arn:aws:gamelift:::gamesessionqueue/. - // These queues are used when placing game sessions for matches that are created - // with this matchmaking configuration. Queues can be located in any region. + // Amazon Resource Name (ARN (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)) + // that is assigned to a GameLift game session queue resource and uniquely identifies + // it. ARNs are unique across all Regions. GameLift uses the listed queues when + // placing game sessions for matches that are created with this matchmaking + // configuration. Queues can be located in any Region. GameSessionQueueArns []*string `type:"list"` - // Unique identifier for a matchmaking configuration. This name is used to identify - // the configuration associated with a matchmaking request or ticket. + // A unique identifier for a matchmaking configuration. This name is used to + // identify the configuration associated with a matchmaking request or ticket. Name *string `type:"string"` - // SNS topic ARN that is set up to receive matchmaking notifications. + // An SNS topic ARN that is set up to receive matchmaking notifications. NotificationTarget *string `type:"string"` - // Maximum duration, in seconds, that a matchmaking ticket can remain in process - // before timing out. Requests that fail due to timing out can be resubmitted + // The maximum duration, in seconds, that a matchmaking ticket can remain in + // process before timing out. Requests that fail due to timing out can be resubmitted // as needed. RequestTimeoutSeconds *int64 `min:"1" type:"integer"` - // Unique identifier for a matchmaking rule set to use with this configuration. + // The Amazon Resource Name (ARN (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)) + // associated with the GameLift matchmaking rule set resource that this configuration + // uses. + RuleSetArn *string `type:"string"` + + // A unique identifier for a matchmaking rule set to use with this configuration. // A matchmaking configuration can only use rule sets that are defined in the - // same region. + // same Region. RuleSetName *string `type:"string"` } @@ -16122,6 +16974,12 @@ func (s *MatchmakingConfiguration) SetBackfillMode(v string) *MatchmakingConfigu return s } +// SetConfigurationArn sets the ConfigurationArn field's value. +func (s *MatchmakingConfiguration) SetConfigurationArn(v string) *MatchmakingConfiguration { + s.ConfigurationArn = &v + return s +} + // SetCreationTime sets the CreationTime field's value. func (s *MatchmakingConfiguration) SetCreationTime(v time.Time) *MatchmakingConfiguration { s.CreationTime = &v @@ -16176,6 +17034,12 @@ func (s *MatchmakingConfiguration) SetRequestTimeoutSeconds(v int64) *Matchmakin return s } +// SetRuleSetArn sets the RuleSetArn field's value. +func (s *MatchmakingConfiguration) SetRuleSetArn(v string) *MatchmakingConfiguration { + s.RuleSetArn = &v + return s +} + // SetRuleSetName sets the RuleSetName field's value. func (s *MatchmakingConfiguration) SetRuleSetName(v string) *MatchmakingConfiguration { s.RuleSetName = &v @@ -16218,17 +17082,23 @@ func (s *MatchmakingConfiguration) SetRuleSetName(v string) *MatchmakingConfigur type MatchmakingRuleSet struct { _ struct{} `type:"structure"` - // Time stamp indicating when this data object was created. Format is a number - // expressed in Unix time as milliseconds (for example "1469498468.057"). + // The time stamp indicating when this data object was created. The format is + // a number expressed in Unix time as milliseconds (for example "1469498468.057"). CreationTime *time.Time `type:"timestamp"` - // Collection of matchmaking rules, formatted as a JSON string. Comments are + // Amazon Resource Name (ARN (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)) + // that is assigned to a GameLift matchmaking rule set resource and uniquely + // identifies it. ARNs are unique across all Regions. In a GameLift rule set + // ARN, the resource ID matches the RuleSetName value. + RuleSetArn *string `type:"string"` + + // A collection of matchmaking rules, formatted as a JSON string. Comments are // not allowed in JSON, but most elements support a description field. // // RuleSetBody is a required field RuleSetBody *string `min:"1" type:"string" required:"true"` - // Unique identifier for a matchmaking rule set + // A unique identifier for a matchmaking rule set RuleSetName *string `type:"string"` } @@ -16248,6 +17118,12 @@ func (s *MatchmakingRuleSet) SetCreationTime(v time.Time) *MatchmakingRuleSet { return s } +// SetRuleSetArn sets the RuleSetArn field's value. +func (s *MatchmakingRuleSet) SetRuleSetArn(v string) *MatchmakingRuleSet { + s.RuleSetArn = &v + return s +} + // SetRuleSetBody sets the RuleSetBody field's value. func (s *MatchmakingRuleSet) SetRuleSetBody(v string) *MatchmakingRuleSet { s.RuleSetBody = &v @@ -16267,6 +17143,11 @@ func (s *MatchmakingRuleSet) SetRuleSetName(v string) *MatchmakingRuleSet { type MatchmakingTicket struct { _ struct{} `type:"structure"` + // The Amazon Resource Name (ARN (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)) + // associated with the GameLift matchmaking configuration resource that is used + // with this ticket. + ConfigurationArn *string `type:"string"` + // Name of the MatchmakingConfiguration that is used with this ticket. Matchmaking // configurations determine how players are grouped into a match and how a new // game session is created for the match. @@ -16336,7 +17217,7 @@ type MatchmakingTicket struct { // to receive player acceptances. StatusReason *string `type:"string"` - // Unique identifier for a matchmaking ticket. + // A unique identifier for a matchmaking ticket. TicketId *string `type:"string"` } @@ -16350,6 +17231,12 @@ func (s MatchmakingTicket) GoString() string { return s.String() } +// SetConfigurationArn sets the ConfigurationArn field's value. +func (s *MatchmakingTicket) SetConfigurationArn(v string) *MatchmakingTicket { + s.ConfigurationArn = &v + return s +} + // SetConfigurationName sets the ConfigurationName field's value. func (s *MatchmakingTicket) SetConfigurationName(v string) *MatchmakingTicket { s.ConfigurationName = &v @@ -16426,10 +17313,10 @@ func (s *MatchmakingTicket) SetTicketId(v string) *MatchmakingTicket { type PlacedPlayerSession struct { _ struct{} `type:"structure"` - // Unique identifier for a player that is associated with this player session. + // A unique identifier for a player that is associated with this player session. PlayerId *string `min:"1" type:"string"` - // Unique identifier for a player session. + // A unique identifier for a player session. PlayerSessionId *string `type:"string"` } @@ -16462,23 +17349,23 @@ type Player struct { _ struct{} `type:"structure"` // Set of values, expressed in milliseconds, indicating the amount of latency - // that a player experiences when connected to AWS regions. If this property - // is present, FlexMatch considers placing the match only in regions for which + // that a player experiences when connected to AWS Regions. If this property + // is present, FlexMatch considers placing the match only in Regions for which // latency is reported. // // If a matchmaker has a rule that evaluates player latency, players must report // latency in order to be matched. If no latency is reported in this scenario, - // FlexMatch assumes that no regions are available to the player and the ticket + // FlexMatch assumes that no Regions are available to the player and the ticket // is not matchable. LatencyInMs map[string]*int64 `type:"map"` - // Collection of key:value pairs containing player information for use in matchmaking. - // Player attribute keys must match the playerAttributes used in a matchmaking - // rule set. Example: "PlayerAttributes": {"skill": {"N": "23"}, "gameMode": - // {"S": "deathmatch"}}. + // A collection of key:value pairs containing player information for use in + // matchmaking. Player attribute keys must match the playerAttributes used in + // a matchmaking rule set. Example: "PlayerAttributes": {"skill": {"N": "23"}, + // "gameMode": {"S": "deathmatch"}}. PlayerAttributes map[string]*AttributeValue `type:"map"` - // Unique identifier for a player + // A unique identifier for a player PlayerId *string `min:"1" type:"string"` // Name of the team that the player is assigned to in a match. Team names are @@ -16549,20 +17436,20 @@ func (s *Player) SetTeam(v string) *Player { // Regional latency information for a player, used when requesting a new game // session with StartGameSessionPlacement. This value indicates the amount of // time lag that exists when the player is connected to a fleet in the specified -// region. The relative difference between a player's latency values for multiple -// regions are used to determine which fleets are best suited to place a new +// Region. The relative difference between a player's latency values for multiple +// Regions are used to determine which fleets are best suited to place a new // game session for the player. type PlayerLatency struct { _ struct{} `type:"structure"` // Amount of time that represents the time lag experienced by the player when - // connected to the specified region. + // connected to the specified Region. LatencyInMilliseconds *float64 `type:"float"` - // Unique identifier for a player associated with the latency data. + // A unique identifier for a player associated with the latency data. PlayerId *string `min:"1" type:"string"` - // Name of the region that is associated with the latency value. + // Name of the Region that is associated with the latency value. RegionIdentifier *string `min:"1" type:"string"` } @@ -16612,9 +17499,9 @@ func (s *PlayerLatency) SetRegionIdentifier(v string) *PlayerLatency { // Queue setting that determines the highest latency allowed for individual // players when placing a game session. When a latency policy is in force, a -// game session cannot be placed at any destination in a region where a player -// is reporting latency higher than the cap. Latency policies are only enforced -// when the placement request contains player latency information. +// game session cannot be placed with any fleet in a Region where a player reports +// latency higher than the cap. Latency policies are only enforced when the +// placement request contains player latency information. // // * CreateGameSessionQueue // @@ -16685,27 +17572,44 @@ type PlayerSession struct { // expressed in Unix time as milliseconds (for example "1469498468.057"). CreationTime *time.Time `type:"timestamp"` + // DNS identifier assigned to the instance that is running the game session. + // Values have the following format: + // + // * TLS-enabled fleets: ..amazongamelift.com. + // + // * Non-TLS-enabled fleets: ec2-.compute.amazonaws.com. + // (See Amazon EC2 Instance IP Addressing (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html#concepts-public-addresses).) + // + // When connecting to a game session that is running on a TLS-enabled fleet, + // you must use the DNS name, not the IP address. DnsName *string `type:"string"` - // Unique identifier for a fleet that the player's game session is running on. + // The Amazon Resource Name (ARN (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)) + // associated with the GameLift fleet that the player's game session is running + // on. + FleetArn *string `min:"1" type:"string"` + + // A unique identifier for a fleet that the player's game session is running + // on. FleetId *string `type:"string"` - // Unique identifier for the game session that the player session is connected + // A unique identifier for the game session that the player session is connected // to. GameSessionId *string `min:"1" type:"string"` - // IP address of the game session. To connect to a Amazon GameLift game server, - // an app needs both the IP address and port number. + // IP address of the instance that is running the game session. When connecting + // to a Amazon GameLift game server, a client needs to reference an IP address + // (or DNS name) and port number. IpAddress *string `type:"string"` // Developer-defined information related to a player. Amazon GameLift does not // use this data, so it can be formatted as needed for use in the game. PlayerData *string `min:"1" type:"string"` - // Unique identifier for a player that is associated with this player session. + // A unique identifier for a player that is associated with this player session. PlayerId *string `min:"1" type:"string"` - // Unique identifier for a player session. + // A unique identifier for a player session. PlayerSessionId *string `type:"string"` // Port number for the game session. To connect to a Amazon GameLift server @@ -16755,6 +17659,12 @@ func (s *PlayerSession) SetDnsName(v string) *PlayerSession { return s } +// SetFleetArn sets the FleetArn field's value. +func (s *PlayerSession) SetFleetArn(v string) *PlayerSession { + s.FleetArn = &v + return s +} + // SetFleetId sets the FleetId field's value. func (s *PlayerSession) SetFleetId(v string) *PlayerSession { s.FleetId = &v @@ -16821,8 +17731,9 @@ type PutScalingPolicyInput struct { // before a scaling event is triggered. EvaluationPeriods *int64 `min:"1" type:"integer"` - // Unique identifier for a fleet to apply this policy to. The fleet cannot be - // in any of the following statuses: ERROR or DELETING. + // A unique identifier for a fleet to apply this policy to. You can use either + // the fleet ID or ARN value. The fleet cannot be in any of the following statuses: + // ERROR or DELETING. // // FleetId is a required field FleetId *string `type:"string" required:"true"` @@ -16867,15 +17778,15 @@ type PutScalingPolicyInput struct { // MetricName is a required field MetricName *string `type:"string" required:"true" enum:"MetricName"` - // Descriptive label that is associated with a scaling policy. Policy names + // A descriptive label that is associated with a scaling policy. Policy names // do not need to be unique. A fleet can have only one scaling policy with the // same name. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` - // Type of scaling policy to create. For a target-based policy, set the parameter - // MetricName to 'PercentAvailableGameSessions' and specify a TargetConfiguration. + // The type of scaling policy to create. For a target-based policy, set the + // parameter MetricName to 'PercentAvailableGameSessions' and specify a TargetConfiguration. // For a rule-based policy set the following parameters: MetricName, ComparisonOperator, // Threshold, EvaluationPeriods, ScalingAdjustmentType, and ScalingAdjustment. PolicyType *string `type:"string" enum:"PolicyType"` @@ -16883,7 +17794,7 @@ type PutScalingPolicyInput struct { // Amount of adjustment to make, based on the scaling adjustment type. ScalingAdjustment *int64 `type:"integer"` - // Type of adjustment to make to a fleet's instance count (see FleetCapacity): + // The type of adjustment to make to a fleet's instance count (see FleetCapacity): // // * ChangeInCapacity -- add (or subtract) the scaling adjustment value from // the current instance count. Positive values scale up while negative values @@ -16897,7 +17808,7 @@ type PutScalingPolicyInput struct { // the fleet down by 10%. ScalingAdjustmentType *string `type:"string" enum:"ScalingAdjustmentType"` - // Object that contains settings for a target-based scaling policy. + // The settings for a target-based scaling policy. TargetConfiguration *TargetConfiguration `type:"structure"` // Metric value used to trigger a scaling event. @@ -17008,7 +17919,7 @@ func (s *PutScalingPolicyInput) SetThreshold(v float64) *PutScalingPolicyInput { type PutScalingPolicyOutput struct { _ struct{} `type:"structure"` - // Descriptive label that is associated with a scaling policy. Policy names + // A descriptive label that is associated with a scaling policy. Policy names // do not need to be unique. Name *string `min:"1" type:"string"` } @@ -17033,7 +17944,8 @@ func (s *PutScalingPolicyOutput) SetName(v string) *PutScalingPolicyOutput { type RequestUploadCredentialsInput struct { _ struct{} `type:"structure"` - // Unique identifier for a build to get credentials for. + // A unique identifier for a build to get credentials for. You can use either + // the build ID or ARN value. // // BuildId is a required field BuildId *string `type:"string" required:"true"` @@ -17107,7 +18019,8 @@ func (s *RequestUploadCredentialsOutput) SetUploadCredentials(v *AwsCredentials) type ResolveAliasInput struct { _ struct{} `type:"structure"` - // Unique identifier for the alias you want to resolve. + // The unique identifier of the alias that you want to retrieve a fleet ID for. + // You can use either the alias ID or ARN value. // // AliasId is a required field AliasId *string `type:"string" required:"true"` @@ -17146,7 +18059,11 @@ func (s *ResolveAliasInput) SetAliasId(v string) *ResolveAliasInput { type ResolveAliasOutput struct { _ struct{} `type:"structure"` - // Fleet identifier that is associated with the requested alias. + // The Amazon Resource Name (ARN (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)) + // associated with the GameLift fleet resource that this alias points to. + FleetArn *string `min:"1" type:"string"` + + // The fleet identifier that the alias is pointing to. FleetId *string `type:"string"` } @@ -17160,31 +18077,37 @@ func (s ResolveAliasOutput) GoString() string { return s.String() } +// SetFleetArn sets the FleetArn field's value. +func (s *ResolveAliasOutput) SetFleetArn(v string) *ResolveAliasOutput { + s.FleetArn = &v + return s +} + // SetFleetId sets the FleetId field's value. func (s *ResolveAliasOutput) SetFleetId(v string) *ResolveAliasOutput { s.FleetId = &v return s } -// Policy that limits the number of game sessions a player can create on the +// A policy that limits the number of game sessions a player can create on the // same fleet. This optional policy gives game owners control over how players // can consume available game server resources. A resource creation policy makes // the following statement: "An individual player can create a maximum number // of new game sessions within a specified time period". // // The policy is evaluated when a player tries to create a new game session. -// For example, with a policy of 10 new game sessions and a time period of 60 -// minutes, on receiving a CreateGameSession request, Amazon GameLift checks -// that the player (identified by CreatorId) has created fewer than 10 game -// sessions in the past 60 minutes. +// For example: Assume you have a policy of 10 new game sessions and a time +// period of 60 minutes. On receiving a CreateGameSession request, Amazon GameLift +// checks that the player (identified by CreatorId) has created fewer than 10 +// game sessions in the past 60 minutes. type ResourceCreationLimitPolicy struct { _ struct{} `type:"structure"` - // Maximum number of game sessions that an individual can create during the - // policy period. + // The maximum number of game sessions that an individual can create during + // the policy period. NewGameSessionsPerCreator *int64 `type:"integer"` - // Time span used in evaluating the resource creation limit policy. + // The time span used in evaluating the resource creation limit policy. PolicyPeriodInMinutes *int64 `type:"integer"` } @@ -17210,7 +18133,7 @@ func (s *ResourceCreationLimitPolicy) SetPolicyPeriodInMinutes(v int64) *Resourc return s } -// Routing configuration for a fleet alias. +// The routing configuration for a fleet alias. // // * CreateAlias // @@ -17226,20 +18149,21 @@ func (s *ResourceCreationLimitPolicy) SetPolicyPeriodInMinutes(v int64) *Resourc type RoutingStrategy struct { _ struct{} `type:"structure"` - // Unique identifier for a fleet that the alias points to. + // The unique identifier for a fleet that the alias points to. This value is + // the fleet ID, not the fleet ARN. FleetId *string `type:"string"` - // Message text to be used with a terminal routing strategy. + // The message text to be used with a terminal routing strategy. Message *string `type:"string"` - // Type of routing strategy. + // The type of routing strategy for the alias. // // Possible routing types include the following: // - // * SIMPLE -- The alias resolves to one specific fleet. Use this type when + // * SIMPLE - The alias resolves to one specific fleet. Use this type when // routing to active fleets. // - // * TERMINAL -- The alias does not resolve to a fleet but instead can be + // * TERMINAL - The alias does not resolve to a fleet but instead can be // used to display a message to the user. A terminal alias throws a TerminalRoutingStrategyException // with the RoutingStrategy message embedded. Type *string `type:"string" enum:"RoutingStrategyType"` @@ -17277,15 +18201,15 @@ func (s *RoutingStrategy) SetType(v string) *RoutingStrategy { // to run on each instance in a fleet. Server processes run either a custom // game build executable or a Realtime Servers script. Each instance in the // fleet starts the specified server processes and continues to start new processes -// as existing processes end. An instance regularly checks for an updated run-time -// configuration. +// as existing processes end. Each instance regularly checks for an updated +// runtime configuration. // -// The run-time configuration enables the instances in a fleet to run multiple +// The runtime configuration enables the instances in a fleet to run multiple // processes simultaneously. Learn more about Running Multiple Processes on // a Fleet (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-multiprocess.html). // // A Amazon GameLift instance is limited to 50 processes running simultaneously. -// To calculate the total number of processes in a run-time configuration, add +// To calculate the total number of processes in a runtime configuration, add // the values of the ConcurrentExecutions parameter for each ServerProcess object. // // * CreateFleet @@ -17294,29 +18218,26 @@ func (s *RoutingStrategy) SetType(v string) *RoutingStrategy { // // * DeleteFleet // -// * Describe fleets: DescribeFleetAttributes DescribeFleetCapacity DescribeFleetPortSettings -// DescribeFleetUtilization DescribeRuntimeConfiguration DescribeEC2InstanceLimits -// DescribeFleetEvents +// * DescribeFleetAttributes // -// * Update fleets: UpdateFleetAttributes UpdateFleetCapacity UpdateFleetPortSettings -// UpdateRuntimeConfiguration +// * UpdateFleetAttributes // // * Manage fleet actions: StartFleetActions StopFleetActions type RuntimeConfiguration struct { _ struct{} `type:"structure"` - // Maximum amount of time (in seconds) that a game session can remain in status - // ACTIVATING. If the game session is not active before the timeout, activation - // is terminated and the game session status is changed to TERMINATED. + // The maximum amount of time (in seconds) that a game session can remain in + // status ACTIVATING. If the game session is not active before the timeout, + // activation is terminated and the game session status is changed to TERMINATED. GameSessionActivationTimeoutSeconds *int64 `min:"1" type:"integer"` - // Maximum number of game sessions with status ACTIVATING to allow on an instance - // simultaneously. This setting limits the amount of instance resources that - // can be used for new game activations at any one time. + // The maximum number of game sessions with status ACTIVATING to allow on an + // instance simultaneously. This setting limits the amount of instance resources + // that can be used for new game activations at any one time. MaxConcurrentGameSessionActivations *int64 `min:"1" type:"integer"` - // Collection of server process configurations that describe which server processes - // to run on each instance in a fleet. + // A collection of server process configurations that describe which server + // processes to run on each instance in a fleet. ServerProcesses []*ServerProcess `min:"1" type:"list"` } @@ -17377,25 +18298,25 @@ func (s *RuntimeConfiguration) SetServerProcesses(v []*ServerProcess) *RuntimeCo return s } -// Location in Amazon Simple Storage Service (Amazon S3) where build or script -// files are stored for access by Amazon GameLift. This location is specified -// in CreateBuild, CreateScript, and UpdateScript requests. +// The location in Amazon S3 where build or script files are stored for access +// by Amazon GameLift. This location is specified in CreateBuild, CreateScript, +// and UpdateScript requests. type S3Location struct { _ struct{} `type:"structure"` - // Amazon S3 bucket identifier. This is the name of the S3 bucket. + // An Amazon S3 bucket identifier. This is the name of the S3 bucket. Bucket *string `min:"1" type:"string"` - // Name of the zip file containing the build files or script files. + // The name of the zip file that contains the build files or script files. Key *string `min:"1" type:"string"` - // Version of the file, if object versioning is turned on for the bucket. Amazon - // GameLift uses this information when retrieving files from an S3 bucket that - // you own. Use this parameter to specify a specific version of the file; if - // not set, the latest version of the file is retrieved. + // The version of the file, if object versioning is turned on for the bucket. + // Amazon GameLift uses this information when retrieving files from an S3 bucket + // that you own. Use this parameter to specify a specific version of the file. + // If not set, the latest version of the file is retrieved. ObjectVersion *string `min:"1" type:"string"` - // Amazon Resource Name (ARN (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html)) + // The Amazon Resource Name (ARN (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html)) // for an IAM role that allows Amazon GameLift to access the S3 bucket. RoleArn *string `min:"1" type:"string"` } @@ -17480,7 +18401,7 @@ type ScalingPolicy struct { // before a scaling event is triggered. EvaluationPeriods *int64 `min:"1" type:"integer"` - // Unique identifier for a fleet that is associated with this scaling policy. + // A unique identifier for a fleet that is associated with this scaling policy. FleetId *string `type:"string"` // Name of the Amazon GameLift-defined metric that is used to trigger a scaling @@ -17521,12 +18442,12 @@ type ScalingPolicy struct { // in any queue, where the current fleet is the top-priority destination. MetricName *string `type:"string" enum:"MetricName"` - // Descriptive label that is associated with a scaling policy. Policy names + // A descriptive label that is associated with a scaling policy. Policy names // do not need to be unique. Name *string `min:"1" type:"string"` - // Type of scaling policy to create. For a target-based policy, set the parameter - // MetricName to 'PercentAvailableGameSessions' and specify a TargetConfiguration. + // The type of scaling policy to create. For a target-based policy, set the + // parameter MetricName to 'PercentAvailableGameSessions' and specify a TargetConfiguration. // For a rule-based policy set the following parameters: MetricName, ComparisonOperator, // Threshold, EvaluationPeriods, ScalingAdjustmentType, and ScalingAdjustment. PolicyType *string `type:"string" enum:"PolicyType"` @@ -17534,7 +18455,7 @@ type ScalingPolicy struct { // Amount of adjustment to make, based on the scaling adjustment type. ScalingAdjustment *int64 `type:"integer"` - // Type of adjustment to make to a fleet's instance count (see FleetCapacity): + // The type of adjustment to make to a fleet's instance count (see FleetCapacity): // // * ChangeInCapacity -- add (or subtract) the scaling adjustment value from // the current instance count. Positive values scale up while negative values @@ -17570,7 +18491,7 @@ type ScalingPolicy struct { // and recreated. Status *string `type:"string" enum:"ScalingStatusType"` - // Object that contains settings for a target-based scaling policy. + // The settings for a target-based scaling policy. TargetConfiguration *TargetConfiguration `type:"structure"` // Metric value used to trigger a scaling event. @@ -17669,28 +18590,34 @@ func (s *ScalingPolicy) SetThreshold(v float64) *ScalingPolicy { type Script struct { _ struct{} `type:"structure"` - // Time stamp indicating when this data object was created. Format is a number - // expressed in Unix time as milliseconds (for example "1469498468.057"). + // A time stamp indicating when this data object was created. The format is + // a number expressed in Unix time as milliseconds (for example "1469498468.057"). CreationTime *time.Time `type:"timestamp"` - // Descriptive label that is associated with a script. Script names do not need - // to be unique. + // A descriptive label that is associated with a script. Script names do not + // need to be unique. Name *string `min:"1" type:"string"` - // Unique identifier for a Realtime script + // Amazon Resource Name (ARN (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)) + // that is assigned to a GameLift script resource and uniquely identifies it. + // ARNs are unique across all Regions. In a GameLift script ARN, the resource + // ID matches the ScriptId value. + ScriptArn *string `type:"string"` + + // A unique identifier for a Realtime script ScriptId *string `type:"string"` - // File size of the uploaded Realtime script, expressed in bytes. When files + // The file size of the uploaded Realtime script, expressed in bytes. When files // are uploaded from an S3 location, this value remains at "0". SizeOnDisk *int64 `min:"1" type:"long"` - // Location in Amazon Simple Storage Service (Amazon S3) where build or script - // files are stored for access by Amazon GameLift. This location is specified - // in CreateBuild, CreateScript, and UpdateScript requests. + // The location in Amazon S3 where build or script files are stored for access + // by Amazon GameLift. This location is specified in CreateBuild, CreateScript, + // and UpdateScript requests. StorageLocation *S3Location `type:"structure"` - // Version that is associated with a build or script. Version strings do not - // need to be unique. + // The version that is associated with a build or script. Version strings do + // not need to be unique. Version *string `min:"1" type:"string"` } @@ -17716,6 +18643,12 @@ func (s *Script) SetName(v string) *Script { return s } +// SetScriptArn sets the ScriptArn field's value. +func (s *Script) SetScriptArn(v string) *Script { + s.ScriptArn = &v + return s +} + // SetScriptId sets the ScriptId field's value. func (s *Script) SetScriptId(v string) *Script { s.ScriptId = &v @@ -17744,9 +18677,9 @@ func (s *Script) SetVersion(v string) *Script { type SearchGameSessionsInput struct { _ struct{} `type:"structure"` - // Unique identifier for an alias associated with the fleet to search for active - // game sessions. Each request must reference either a fleet ID or alias ID, - // but not both. + // A unique identifier for an alias associated with the fleet to search for + // active game sessions. You can use either the alias ID or ARN value. Each + // request must reference either a fleet ID or alias ID, but not both. AliasId *string `type:"string"` // String containing the search criteria for the session search. If no filter @@ -17790,13 +18723,14 @@ type SearchGameSessionsInput struct { // ten players that have an open player slot: "maximumSessions>=10 AND hasAvailablePlayerSessions=true". FilterExpression *string `min:"1" type:"string"` - // Unique identifier for a fleet to search for active game sessions. Each request - // must reference either a fleet ID or alias ID, but not both. + // A unique identifier for a fleet to search for active game sessions. You can + // use either the fleet ID or ARN value. Each request must reference either + // a fleet ID or alias ID, but not both. FleetId *string `type:"string"` - // Maximum number of results to return. Use this parameter with NextToken to - // get results as a set of sequential pages. The maximum number of results returned - // is 20, even if this value is not set or is set higher than 20. + // The maximum number of results to return. Use this parameter with NextToken + // to get results as a set of sequential pages. The maximum number of results + // returned is 20, even if this value is not set or is set higher than 20. Limit *int64 `min:"1" type:"integer"` // Token that indicates the start of the next sequential page of results. Use @@ -17892,7 +18826,7 @@ func (s *SearchGameSessionsInput) SetSortExpression(v string) *SearchGameSession type SearchGameSessionsOutput struct { _ struct{} `type:"structure"` - // Collection of objects containing game session properties for each session + // A collection of objects containing game session properties for each session // matching the request. GameSessions []*GameSession `type:"list"` @@ -17934,15 +18868,15 @@ func (s *SearchGameSessionsOutput) SetNextToken(v string) *SearchGameSessionsOut type ServerProcess struct { _ struct{} `type:"structure"` - // Number of server processes using this configuration to run concurrently on - // an instance. + // The number of server processes that use this configuration to run concurrently + // on an instance. // // ConcurrentExecutions is a required field ConcurrentExecutions *int64 `min:"1" type:"integer" required:"true"` - // Location of the server executable in a custom game build or the name of the - // Realtime script file that contains the Init() function. Game builds and Realtime - // scripts are installed on instances at the root: + // The location of the server executable in a custom game build or the name + // of the Realtime script file that contains the Init() function. Game builds + // and Realtime scripts are installed on instances at the root: // // * Windows (for custom game builds only): C:\game. Example: "C:\game\MyGame\server.exe" // @@ -17951,7 +18885,7 @@ type ServerProcess struct { // LaunchPath is a required field LaunchPath *string `min:"1" type:"string" required:"true"` - // Optional list of parameters to pass to the server executable or Realtime + // An optional list of parameters to pass to the server executable or Realtime // script on launch. Parameters *string `min:"1" type:"string"` } @@ -18017,7 +18951,8 @@ type StartFleetActionsInput struct { // Actions is a required field Actions []*string `min:"1" type:"list" required:"true"` - // Unique identifier for a fleet + // A unique identifier for a fleet to start actions on. You can use either the + // fleet ID or ARN value. // // FleetId is a required field FleetId *string `type:"string" required:"true"` @@ -18095,30 +19030,31 @@ type StartGameSessionPlacementInput struct { // a request to start a new game session (see Start a Game Session (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession)). GameSessionData *string `min:"1" type:"string"` - // Descriptive label that is associated with a game session. Session names do - // not need to be unique. + // A descriptive label that is associated with a game session. Session names + // do not need to be unique. GameSessionName *string `min:"1" type:"string"` - // Name of the queue to use to place the new game session. + // Name of the queue to use to place the new game session. You can use either + // the qieue name or ARN value. // // GameSessionQueueName is a required field GameSessionQueueName *string `min:"1" type:"string" required:"true"` - // Maximum number of players that can be connected simultaneously to the game - // session. + // The maximum number of players that can be connected simultaneously to the + // game session. // // MaximumPlayerSessionCount is a required field MaximumPlayerSessionCount *int64 `type:"integer" required:"true"` - // Unique identifier to assign to the new game session placement. This value - // is developer-defined. The value must be unique across all regions and cannot + // A unique identifier to assign to the new game session placement. This value + // is developer-defined. The value must be unique across all Regions and cannot // be reused unless you are resubmitting a canceled or timed-out placement request. // // PlacementId is a required field PlacementId *string `min:"1" type:"string" required:"true"` // Set of values, expressed in milliseconds, indicating the amount of latency - // that a player experiences when connected to AWS regions. This information + // that a player experiences when connected to AWS Regions. This information // is used to try to place the new game session where it can offer the best // possible gameplay experience for the players. PlayerLatencies []*PlayerLatency `type:"list"` @@ -18273,18 +19209,16 @@ func (s *StartGameSessionPlacementOutput) SetGameSessionPlacement(v *GameSession type StartMatchBackfillInput struct { _ struct{} `type:"structure"` - // Name of the matchmaker to use for this request. The name of the matchmaker - // that was used with the original game session is listed in the GameSession - // object, MatchmakerData property. This property contains a matchmaking configuration - // ARN value, which includes the matchmaker name. (In the ARN value "arn:aws:gamelift:us-west-2:111122223333:matchmakingconfiguration/MM-4v4", - // the matchmaking configuration name is "MM-4v4".) Use only the name for this - // parameter. + // Name of the matchmaker to use for this request. You can use either the configuration + // name or ARN value. The ARN of the matchmaker that was used with the original + // game session is listed in the GameSession object, MatchmakerData property. // // ConfigurationName is a required field - ConfigurationName *string `type:"string" required:"true"` + ConfigurationName *string `min:"1" type:"string" required:"true"` - // Amazon Resource Name (ARN (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html)) - // that is assigned to a game session and uniquely identifies it. + // Amazon Resource Name (ARN (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)) + // that is assigned to a game session and uniquely identifies it. This is the + // same as the game session ID. // // GameSessionArn is a required field GameSessionArn *string `min:"1" type:"string" required:"true"` @@ -18299,13 +19233,13 @@ type StartMatchBackfillInput struct { // JSON syntax, formatted as a string. For more details, see Match Data (https://docs.aws.amazon.com/gamelift/latest/developerguide/match-server.html#match-server-data). // // * LatencyInMs -\\- If the matchmaker uses player latency, include a latency - // value, in milliseconds, for the region that the game session is currently - // in. Do not include latency values for any other region. + // value, in milliseconds, for the Region that the game session is currently + // in. Do not include latency values for any other Region. // // Players is a required field Players []*Player `type:"list" required:"true"` - // Unique identifier for a matchmaking ticket. If no ticket ID is specified + // A unique identifier for a matchmaking ticket. If no ticket ID is specified // here, Amazon GameLift will generate one in the form of a UUID. Use this identifier // to track the match backfill ticket status and retrieve match results. TicketId *string `type:"string"` @@ -18327,6 +19261,9 @@ func (s *StartMatchBackfillInput) Validate() error { if s.ConfigurationName == nil { invalidParams.Add(request.NewErrParamRequired("ConfigurationName")) } + if s.ConfigurationName != nil && len(*s.ConfigurationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConfigurationName", 1)) + } if s.GameSessionArn == nil { invalidParams.Add(request.NewErrParamRequired("GameSessionArn")) } @@ -18408,10 +19345,11 @@ type StartMatchmakingInput struct { _ struct{} `type:"structure"` // Name of the matchmaking configuration to use for this request. Matchmaking - // configurations must exist in the same region as this request. + // configurations must exist in the same Region as this request. You can use + // either the configuration name or ARN value. // // ConfigurationName is a required field - ConfigurationName *string `type:"string" required:"true"` + ConfigurationName *string `min:"1" type:"string" required:"true"` // Information on each player to be matched. This information must include a // player ID, and may contain player attributes and latency data to be used @@ -18421,7 +19359,7 @@ type StartMatchmakingInput struct { // Players is a required field Players []*Player `type:"list" required:"true"` - // Unique identifier for a matchmaking ticket. If no ticket ID is specified + // A unique identifier for a matchmaking ticket. If no ticket ID is specified // here, Amazon GameLift will generate one in the form of a UUID. Use this identifier // to track the matchmaking ticket status and retrieve match results. TicketId *string `type:"string"` @@ -18443,6 +19381,9 @@ func (s *StartMatchmakingInput) Validate() error { if s.ConfigurationName == nil { invalidParams.Add(request.NewErrParamRequired("ConfigurationName")) } + if s.ConfigurationName != nil && len(*s.ConfigurationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConfigurationName", 1)) + } if s.Players == nil { invalidParams.Add(request.NewErrParamRequired("Players")) } @@ -18515,7 +19456,8 @@ type StopFleetActionsInput struct { // Actions is a required field Actions []*string `min:"1" type:"list" required:"true"` - // Unique identifier for a fleet + // A unique identifier for a fleet to stop actions on. You can use either the + // fleet ID or ARN value. // // FleetId is a required field FleetId *string `type:"string" required:"true"` @@ -18580,7 +19522,7 @@ func (s StopFleetActionsOutput) GoString() string { type StopGameSessionPlacementInput struct { _ struct{} `type:"structure"` - // Unique identifier for a game session placement to cancel. + // A unique identifier for a game session placement to cancel. // // PlacementId is a required field PlacementId *string `min:"1" type:"string" required:"true"` @@ -18647,7 +19589,7 @@ func (s *StopGameSessionPlacementOutput) SetGameSessionPlacement(v *GameSessionP type StopMatchmakingInput struct { _ struct{} `type:"structure"` - // Unique identifier for a matchmaking ticket. + // A unique identifier for a matchmaking ticket. // // TicketId is a required field TicketId *string `type:"string" required:"true"` @@ -18696,6 +19638,163 @@ func (s StopMatchmakingOutput) GoString() string { return s.String() } +// A label that can be assigned to a GameLift resource. +// +// Learn more +// +// Tagging AWS Resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) +// in the AWS General Reference +// +// AWS Tagging Strategies (http://aws.amazon.com/answers/account-management/aws-tagging-strategies/) +// +// Related operations +// +// * TagResource +// +// * UntagResource +// +// * ListTagsForResource +type Tag struct { + _ struct{} `type:"structure"` + + // The key for a developer-defined key:value pair for tagging an AWS resource. + // + // Key is a required field + Key *string `min:"1" type:"string" required:"true"` + + // The value for a developer-defined key:value pair for tagging an AWS resource. + // + // Value is a required field + Value *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Tag) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Tag"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html)) + // that is assigned to and uniquely identifies the GameLift resource that you + // want to assign tags to. GameLift resource ARNs are included in the data object + // for the resource, which can be retrieved by calling a List or Describe action + // for the resource type. + // + // ResourceARN is a required field + ResourceARN *string `min:"1" type:"string" required:"true"` + + // A list of one or more tags to assign to the specified GameLift resource. + // Tags are developer-defined and structured as key-value pairs. The maximum + // tag limit may be lower than stated. See Tagging AWS Resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) + // for actual tagging limits. + // + // Tags is a required field + Tags []*Tag `type:"list" required:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.ResourceARN == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceARN")) + } + if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *TagResourceInput) SetResourceARN(v string) *TagResourceInput { + s.ResourceARN = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { + s.Tags = v + return s +} + +type TagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceOutput) GoString() string { + return s.String() +} + // Settings for a target-based scaling policy (see ScalingPolicy. A target-based // policy tracks a particular fleet metric specifies a target value for the // metric. As player usage changes, the policy triggers Amazon GameLift to adjust @@ -18755,23 +19854,99 @@ func (s *TargetConfiguration) SetTargetValue(v float64) *TargetConfiguration { return s } +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html)) + // that is assigned to and uniquely identifies the GameLift resource that you + // want to remove tags from. GameLift resource ARNs are included in the data + // object for the resource, which can be retrieved by calling a List or Describe + // action for the resource type. + // + // ResourceARN is a required field + ResourceARN *string `min:"1" type:"string" required:"true"` + + // A list of one or more tags to remove from the specified GameLift resource. + // Tags are developer-defined and structured as key-value pairs. + // + // TagKeys is a required field + TagKeys []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s UntagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} + if s.ResourceARN == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceARN")) + } + if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *UntagResourceInput) SetResourceARN(v string) *UntagResourceInput { + s.ResourceARN = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { + s.TagKeys = v + return s +} + +type UntagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceOutput) GoString() string { + return s.String() +} + // Represents the input for a request action. type UpdateAliasInput struct { _ struct{} `type:"structure"` - // Unique identifier for a fleet alias. Specify the alias you want to update. + // A unique identifier for the alias that you want to update. You can use either + // the alias ID or ARN value. // // AliasId is a required field AliasId *string `type:"string" required:"true"` - // Human-readable description of an alias. + // A human-readable description of the alias. Description *string `min:"1" type:"string"` - // Descriptive label that is associated with an alias. Alias names do not need - // to be unique. + // A descriptive label that is associated with an alias. Alias names do not + // need to be unique. Name *string `min:"1" type:"string"` - // Object that specifies the fleet and routing type to use for the alias. + // The routing configuration, including routing type and fleet target, for the + // alias. RoutingStrategy *RoutingStrategy `type:"structure"` } @@ -18832,7 +20007,7 @@ func (s *UpdateAliasInput) SetRoutingStrategy(v *RoutingStrategy) *UpdateAliasIn type UpdateAliasOutput struct { _ struct{} `type:"structure"` - // Object that contains the updated alias configuration. + // The updated alias resource. Alias *Alias `type:"structure"` } @@ -18856,17 +20031,18 @@ func (s *UpdateAliasOutput) SetAlias(v *Alias) *UpdateAliasOutput { type UpdateBuildInput struct { _ struct{} `type:"structure"` - // Unique identifier for a build to update. + // A unique identifier for a build to update. You can use either the build ID + // or ARN value. // // BuildId is a required field BuildId *string `type:"string" required:"true"` - // Descriptive label that is associated with a build. Build names do not need + // A descriptive label that is associated with a build. Build names do not need // to be unique. Name *string `min:"1" type:"string"` - // Version that is associated with a build or script. Version strings do not - // need to be unique. + // Version information that is associated with a build or script. Version strings + // do not need to be unique. Version *string `min:"1" type:"string"` } @@ -18921,7 +20097,7 @@ func (s *UpdateBuildInput) SetVersion(v string) *UpdateBuildInput { type UpdateBuildOutput struct { _ struct{} `type:"structure"` - // Object that contains the updated build record. + // The updated build record. Build *Build `type:"structure"` } @@ -18948,7 +20124,8 @@ type UpdateFleetAttributesInput struct { // Human-readable description of a fleet. Description *string `min:"1" type:"string"` - // Unique identifier for a fleet to update attribute metadata for. + // A unique identifier for a fleet to update attribute metadata for. You can + // use either the fleet ID or ARN value. // // FleetId is a required field FleetId *string `type:"string" required:"true"` @@ -18960,7 +20137,7 @@ type UpdateFleetAttributesInput struct { // time. MetricGroups []*string `type:"list"` - // Descriptive label that is associated with a fleet. Fleet names do not need + // A descriptive label that is associated with a fleet. Fleet names do not need // to be unique. Name *string `min:"1" type:"string"` @@ -19049,7 +20226,8 @@ func (s *UpdateFleetAttributesInput) SetResourceCreationLimitPolicy(v *ResourceC type UpdateFleetAttributesOutput struct { _ struct{} `type:"structure"` - // Unique identifier for a fleet that was updated. + // A unique identifier for a fleet that was updated. Use either the fleet ID + // or ARN value. FleetId *string `type:"string"` } @@ -19076,17 +20254,18 @@ type UpdateFleetCapacityInput struct { // Number of EC2 instances you want this fleet to host. DesiredInstances *int64 `type:"integer"` - // Unique identifier for a fleet to update capacity for. + // A unique identifier for a fleet to update capacity for. You can use either + // the fleet ID or ARN value. // // FleetId is a required field FleetId *string `type:"string" required:"true"` - // Maximum value allowed for the fleet's instance count. Default if not set - // is 1. + // The maximum value allowed for the fleet's instance count. Default if not + // set is 1. MaxSize *int64 `type:"integer"` - // Minimum value allowed for the fleet's instance count. Default if not set - // is 0. + // The minimum value allowed for the fleet's instance count. Default if not + // set is 0. MinSize *int64 `type:"integer"` } @@ -19141,7 +20320,7 @@ func (s *UpdateFleetCapacityInput) SetMinSize(v int64) *UpdateFleetCapacityInput type UpdateFleetCapacityOutput struct { _ struct{} `type:"structure"` - // Unique identifier for a fleet that was updated. + // A unique identifier for a fleet that was updated. FleetId *string `type:"string"` } @@ -19165,15 +20344,16 @@ func (s *UpdateFleetCapacityOutput) SetFleetId(v string) *UpdateFleetCapacityOut type UpdateFleetPortSettingsInput struct { _ struct{} `type:"structure"` - // Unique identifier for a fleet to update port settings for. + // A unique identifier for a fleet to update port settings for. You can use + // either the fleet ID or ARN value. // // FleetId is a required field FleetId *string `type:"string" required:"true"` - // Collection of port settings to be added to the fleet record. + // A collection of port settings to be added to the fleet record. InboundPermissionAuthorizations []*IpPermission `type:"list"` - // Collection of port settings to be removed from the fleet record. + // A collection of port settings to be removed from the fleet record. InboundPermissionRevocations []*IpPermission `type:"list"` } @@ -19242,7 +20422,7 @@ func (s *UpdateFleetPortSettingsInput) SetInboundPermissionRevocations(v []*IpPe type UpdateFleetPortSettingsOutput struct { _ struct{} `type:"structure"` - // Unique identifier for a fleet that was updated. + // A unique identifier for a fleet that was updated. FleetId *string `type:"string"` } @@ -19266,17 +20446,17 @@ func (s *UpdateFleetPortSettingsOutput) SetFleetId(v string) *UpdateFleetPortSet type UpdateGameSessionInput struct { _ struct{} `type:"structure"` - // Unique identifier for the game session to update. + // A unique identifier for the game session to update. // // GameSessionId is a required field GameSessionId *string `min:"1" type:"string" required:"true"` - // Maximum number of players that can be connected simultaneously to the game - // session. + // The maximum number of players that can be connected simultaneously to the + // game session. MaximumPlayerSessionCount *int64 `type:"integer"` - // Descriptive label that is associated with a game session. Session names do - // not need to be unique. + // A descriptive label that is associated with a game session. Session names + // do not need to be unique. Name *string `min:"1" type:"string"` // Policy determining whether or not the game session accepts new players. @@ -19355,7 +20535,7 @@ func (s *UpdateGameSessionInput) SetProtectionPolicy(v string) *UpdateGameSessio type UpdateGameSessionOutput struct { _ struct{} `type:"structure"` - // Object that contains the updated game session metadata. + // The updated game session metadata. GameSession *GameSession `type:"structure"` } @@ -19379,30 +20559,31 @@ func (s *UpdateGameSessionOutput) SetGameSession(v *GameSession) *UpdateGameSess type UpdateGameSessionQueueInput struct { _ struct{} `type:"structure"` - // List of fleets that can be used to fulfill game session placement requests + // A list of fleets that can be used to fulfill game session placement requests // in the queue. Fleets are identified by either a fleet ARN or a fleet alias // ARN. Destinations are listed in default preference order. When updating this // list, provide a complete list of destinations. Destinations []*GameSessionQueueDestination `type:"list"` - // Descriptive label that is associated with game session queue. Queue names - // must be unique within each region. + // A descriptive label that is associated with game session queue. Queue names + // must be unique within each Region. You can use either the queue ID or ARN + // value. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` - // Collection of latency policies to apply when processing game sessions placement + // A collection of latency policies to apply when processing game sessions placement // requests with player latency information. Multiple policies are evaluated // in order of the maximum latency value, starting with the lowest latency values. - // With just one policy, it is enforced at the start of the game session placement - // for the duration period. With multiple policies, each policy is enforced - // consecutively for its duration period. For example, a queue might enforce - // a 60-second policy followed by a 120-second policy, and then no policy for - // the remainder of the placement. When updating policies, provide a complete + // With just one policy, the policy is enforced at the start of the game session + // placement for the duration period. With multiple policies, each policy is + // enforced consecutively for its duration period. For example, a queue might + // enforce a 60-second policy followed by a 120-second policy, and then no policy + // for the remainder of the placement. When updating policies, provide a complete // collection of policies. PlayerLatencyPolicies []*PlayerLatencyPolicy `type:"list"` - // Maximum time, in seconds, that a new game session placement request remains + // The maximum time, in seconds, that a new game session placement request remains // in the queue. When a request exceeds this time, the game session placement // changes to a TIMED_OUT status. TimeoutInSeconds *int64 `type:"integer"` @@ -19472,7 +20653,7 @@ func (s *UpdateGameSessionQueueInput) SetTimeoutInSeconds(v int64) *UpdateGameSe type UpdateGameSessionQueueOutput struct { _ struct{} `type:"structure"` - // Object that describes the newly updated game session queue. + // An object that describes the newly updated game session queue. GameSessionQueue *GameSessionQueue `type:"structure"` } @@ -19496,75 +20677,76 @@ func (s *UpdateGameSessionQueueOutput) SetGameSessionQueue(v *GameSessionQueue) type UpdateMatchmakingConfigurationInput struct { _ struct{} `type:"structure"` - // Flag that determines whether a match that was created with this configuration + // A flag that indicates whether a match that was created with this configuration // must be accepted by the matched players. To require acceptance, set to TRUE. AcceptanceRequired *bool `type:"boolean"` - // Length of time (in seconds) to wait for players to accept a proposed match. - // If any player rejects the match or fails to accept before the timeout, the - // ticket continues to look for an acceptable match. + // The length of time (in seconds) to wait for players to accept a proposed + // match. If any player rejects the match or fails to accept before the timeout, + // the ticket continues to look for an acceptable match. AcceptanceTimeoutSeconds *int64 `min:"1" type:"integer"` - // Number of player slots in a match to keep open for future players. For example, - // if the configuration's rule set specifies a match for a single 12-person - // team, and the additional player count is set to 2, only 10 players are selected - // for the match. + // The number of player slots in a match to keep open for future players. For + // example, assume that the configuration's rule set specifies a match for a + // single 12-person team. If the additional player count is set to 2, only 10 + // players are initially selected for the match. AdditionalPlayerCount *int64 `type:"integer"` - // Method used to backfill game sessions created with this matchmaking configuration. - // Specify MANUAL when your game manages backfill requests manually or does - // not use the match backfill feature. Specify AUTOMATIC to have GameLift create - // a StartMatchBackfill request whenever a game session has one or more open - // slots. Learn more about manual and automatic backfill in Backfill Existing + // The method that is used to backfill game sessions created with this matchmaking + // configuration. Specify MANUAL when your game manages backfill requests manually + // or does not use the match backfill feature. Specify AUTOMATIC to have GameLift + // create a StartMatchBackfill request whenever a game session has one or more + // open slots. Learn more about manual and automatic backfill in Backfill Existing // Games with FlexMatch (https://docs.aws.amazon.com/gamelift/latest/developerguide/match-backfill.html). BackfillMode *string `type:"string" enum:"BackfillMode"` // Information to add to all events related to the matchmaking configuration. CustomEventData *string `type:"string"` - // Descriptive label that is associated with matchmaking configuration. + // A descriptive label that is associated with matchmaking configuration. Description *string `min:"1" type:"string"` - // Set of custom properties for a game session, formatted as key:value pairs. + // A set of custom properties for a game session, formatted as key-value pairs. // These properties are passed to a game server process in the GameSession object // with a request to start a new game session (see Start a Game Session (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession)). // This information is added to the new GameSession object that is created for // a successful match. GameProperties []*GameProperty `type:"list"` - // Set of custom game session properties, formatted as a single string value. + // A set of custom game session properties, formatted as a single string value. // This data is passed to a game server process in the GameSession object with // a request to start a new game session (see Start a Game Session (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession)). // This information is added to the new GameSession object that is created for // a successful match. GameSessionData *string `min:"1" type:"string"` - // Amazon Resource Name (ARN (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html)) - // that is assigned to a game session queue and uniquely identifies it. Format - // is arn:aws:gamelift:::gamesessionqueue/. - // These queues are used when placing game sessions for matches that are created - // with this matchmaking configuration. Queues can be located in any region. + // Amazon Resource Name (ARN (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)) + // that is assigned to a GameLift game session queue resource and uniquely identifies + // it. ARNs are unique across all Regions. These queues are used when placing + // game sessions for matches that are created with this matchmaking configuration. + // Queues can be located in any Region. GameSessionQueueArns []*string `type:"list"` - // Unique identifier for a matchmaking configuration to update. + // A unique identifier for a matchmaking configuration to update. You can use + // either the configuration name or ARN value. // // Name is a required field - Name *string `type:"string" required:"true"` + Name *string `min:"1" type:"string" required:"true"` - // SNS topic ARN that is set up to receive matchmaking notifications. See Setting - // up Notifications for Matchmaking (https://docs.aws.amazon.com/gamelift/latest/developerguide/match-notification.html) + // An SNS topic ARN that is set up to receive matchmaking notifications. See + // Setting up Notifications for Matchmaking (https://docs.aws.amazon.com/gamelift/latest/developerguide/match-notification.html) // for more information. NotificationTarget *string `type:"string"` - // Maximum duration, in seconds, that a matchmaking ticket can remain in process - // before timing out. Requests that fail due to timing out can be resubmitted + // The maximum duration, in seconds, that a matchmaking ticket can remain in + // process before timing out. Requests that fail due to timing out can be resubmitted // as needed. RequestTimeoutSeconds *int64 `min:"1" type:"integer"` - // Unique identifier for a matchmaking rule set to use with this configuration. - // A matchmaking configuration can only use rule sets that are defined in the - // same region. - RuleSetName *string `type:"string"` + // A unique identifier for a matchmaking rule set to use with this configuration. + // You can use either the rule set name or ARN value. A matchmaking configuration + // can only use rule sets that are defined in the same Region. + RuleSetName *string `min:"1" type:"string"` } // String returns the string representation @@ -19592,9 +20774,15 @@ func (s *UpdateMatchmakingConfigurationInput) Validate() error { if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } if s.RequestTimeoutSeconds != nil && *s.RequestTimeoutSeconds < 1 { invalidParams.Add(request.NewErrParamMinValue("RequestTimeoutSeconds", 1)) } + if s.RuleSetName != nil && len(*s.RuleSetName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RuleSetName", 1)) + } if s.GameProperties != nil { for i, v := range s.GameProperties { if v == nil { @@ -19694,7 +20882,7 @@ func (s *UpdateMatchmakingConfigurationInput) SetRuleSetName(v string) *UpdateMa type UpdateMatchmakingConfigurationOutput struct { _ struct{} `type:"structure"` - // Object that describes the updated matchmaking configuration. + // The updated matchmaking configuration. Configuration *MatchmakingConfiguration `type:"structure"` } @@ -19718,18 +20906,19 @@ func (s *UpdateMatchmakingConfigurationOutput) SetConfiguration(v *MatchmakingCo type UpdateRuntimeConfigurationInput struct { _ struct{} `type:"structure"` - // Unique identifier for a fleet to update run-time configuration for. + // A unique identifier for a fleet to update runtime configuration for. You + // can use either the fleet ID or ARN value. // // FleetId is a required field FleetId *string `type:"string" required:"true"` // Instructions for launching server processes on each instance in the fleet. // Server processes run either a custom game build executable or a Realtime - // Servers script. The run-time configuration lists the types of server processes + // Servers script. The runtime configuration lists the types of server processes // to run on an instance and includes the following configuration settings: // the server executable or launch script file, launch parameters, and the number // of processes to run concurrently on each instance. A CreateFleet request - // must include a run-time configuration with at least one server process configuration. + // must include a runtime configuration with at least one server process configuration. // // RuntimeConfiguration is a required field RuntimeConfiguration *RuntimeConfiguration `type:"structure" required:"true"` @@ -19782,7 +20971,7 @@ func (s *UpdateRuntimeConfigurationInput) SetRuntimeConfiguration(v *RuntimeConf type UpdateRuntimeConfigurationOutput struct { _ struct{} `type:"structure"` - // The run-time configuration currently in force. If the update was successful, + // The runtime configuration currently in force. If the update was successful, // this object matches the one in the request. RuntimeConfiguration *RuntimeConfiguration `type:"structure"` } @@ -19806,32 +20995,33 @@ func (s *UpdateRuntimeConfigurationOutput) SetRuntimeConfiguration(v *RuntimeCon type UpdateScriptInput struct { _ struct{} `type:"structure"` - // Descriptive label that is associated with a script. Script names do not need - // to be unique. + // A descriptive label that is associated with a script. Script names do not + // need to be unique. Name *string `min:"1" type:"string"` - // Unique identifier for a Realtime script to update. + // A unique identifier for a Realtime script to update. You can use either the + // script ID or ARN value. // // ScriptId is a required field ScriptId *string `type:"string" required:"true"` - // Location of the Amazon S3 bucket where a zipped file containing your Realtime - // scripts is stored. The storage location must specify the Amazon S3 bucket - // name, the zip file name (the "key"), and a role ARN that allows Amazon GameLift - // to access the Amazon S3 storage location. The S3 bucket must be in the same - // region where you want to create a new script. By default, Amazon GameLift - // uploads the latest version of the zip file; if you have S3 object versioning - // turned on, you can use the ObjectVersion parameter to specify an earlier - // version. + // The location of the Amazon S3 bucket where a zipped file containing your + // Realtime scripts is stored. The storage location must specify the Amazon + // S3 bucket name, the zip file name (the "key"), and a role ARN that allows + // Amazon GameLift to access the Amazon S3 storage location. The S3 bucket must + // be in the same Region where you want to create a new script. By default, + // Amazon GameLift uploads the latest version of the zip file; if you have S3 + // object versioning turned on, you can use the ObjectVersion parameter to specify + // an earlier version. StorageLocation *S3Location `type:"structure"` - // Version that is associated with a build or script. Version strings do not - // need to be unique. + // The version that is associated with a build or script. Version strings do + // not need to be unique. Version *string `min:"1" type:"string"` - // Data object containing your Realtime scripts and dependencies as a zip file. - // The zip file can have one or multiple files. Maximum size of a zip file is - // 5 MB. + // A data object containing your Realtime scripts and dependencies as a zip + // file. The zip file can have one or multiple files. Maximum size of a zip + // file is 5 MB. // // When using the AWS CLI tool to create a script, this parameter is set to // the zip file name. It must be prepended with the string "fileb://" to indicate @@ -19937,7 +21127,7 @@ func (s *UpdateScriptOutput) SetScript(v *Script) *UpdateScriptOutput { type ValidateMatchmakingRuleSetInput struct { _ struct{} `type:"structure"` - // Collection of matchmaking rules to validate, formatted as a JSON string. + // A collection of matchmaking rules to validate, formatted as a JSON string. // // RuleSetBody is a required field RuleSetBody *string `min:"1" type:"string" required:"true"` @@ -19979,7 +21169,7 @@ func (s *ValidateMatchmakingRuleSetInput) SetRuleSetBody(v string) *ValidateMatc type ValidateMatchmakingRuleSetOutput struct { _ struct{} `type:"structure"` - // Response indicating whether the rule set is valid. + // A response indicating whether the rule set is valid. Valid *bool `type:"boolean"` } @@ -20026,15 +21216,15 @@ type VpcPeeringAuthorization struct { // Format is a number expressed in Unix time as milliseconds (for example "1469498468.057"). ExpirationTime *time.Time `type:"timestamp"` - // Unique identifier for the AWS account that you use to manage your Amazon + // A unique identifier for the AWS account that you use to manage your Amazon // GameLift fleet. You can find your Account ID in the AWS Management Console // under account settings. GameLiftAwsAccountId *string `min:"1" type:"string"` PeerVpcAwsAccountId *string `min:"1" type:"string"` - // Unique identifier for a VPC with resources to be accessed by your Amazon - // GameLift fleet. The VPC must be in the same region where your fleet is deployed. + // A unique identifier for a VPC with resources to be accessed by your Amazon + // GameLift fleet. The VPC must be in the same Region where your fleet is deployed. // Look up a VPC ID using the VPC Dashboard (https://console.aws.amazon.com/vpc/) // in the AWS Management Console. Learn more about VPC peering in VPC Peering // with Amazon GameLift Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/vpc-peering.html). @@ -20099,11 +21289,15 @@ func (s *VpcPeeringAuthorization) SetPeerVpcId(v string) *VpcPeeringAuthorizatio type VpcPeeringConnection struct { _ struct{} `type:"structure"` - // Unique identifier for a fleet. This ID determines the ID of the Amazon GameLift - // VPC for your fleet. + // The Amazon Resource Name (ARN (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)) + // associated with the GameLift fleet resource for this connection. + FleetArn *string `min:"1" type:"string"` + + // A unique identifier for a fleet. This ID determines the ID of the Amazon + // GameLift VPC for your fleet. FleetId *string `type:"string"` - // Unique identifier for the VPC that contains the Amazon GameLift fleet for + // A unique identifier for the VPC that contains the Amazon GameLift fleet for // this connection. This VPC is managed by Amazon GameLift and does not appear // in your AWS account. GameLiftVpcId *string `min:"1" type:"string"` @@ -20113,18 +21307,18 @@ type VpcPeeringConnection struct { // it; these blocks cannot overlap or the peering connection cannot be created. IpV4CidrBlock *string `min:"1" type:"string"` - // Unique identifier for a VPC with resources to be accessed by your Amazon - // GameLift fleet. The VPC must be in the same region where your fleet is deployed. + // A unique identifier for a VPC with resources to be accessed by your Amazon + // GameLift fleet. The VPC must be in the same Region where your fleet is deployed. // Look up a VPC ID using the VPC Dashboard (https://console.aws.amazon.com/vpc/) // in the AWS Management Console. Learn more about VPC peering in VPC Peering // with Amazon GameLift Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/vpc-peering.html). PeerVpcId *string `min:"1" type:"string"` - // Object that contains status information about the connection. Status indicates - // if a connection is pending, successful, or failed. + // The status information about the connection. Status indicates if a connection + // is pending, successful, or failed. Status *VpcPeeringConnectionStatus `type:"structure"` - // Unique identifier that is automatically assigned to the connection record. + // A unique identifier that is automatically assigned to the connection record. // This ID is referenced in VPC peering connection events, and is used when // deleting a connection with DeleteVpcPeeringConnection. VpcPeeringConnectionId *string `min:"1" type:"string"` @@ -20140,6 +21334,12 @@ func (s VpcPeeringConnection) GoString() string { return s.String() } +// SetFleetArn sets the FleetArn field's value. +func (s *VpcPeeringConnection) SetFleetArn(v string) *VpcPeeringConnection { + s.FleetArn = &v + return s +} + // SetFleetId sets the FleetId field's value. func (s *VpcPeeringConnection) SetFleetId(v string) *VpcPeeringConnection { s.FleetId = &v diff --git a/service/gamelift/errors.go b/service/gamelift/errors.go index d04e78d0d2c..9d74c2fb691 100644 --- a/service/gamelift/errors.go +++ b/service/gamelift/errors.go @@ -78,6 +78,14 @@ const ( // should not retry such requests. ErrCodeNotFoundException = "NotFoundException" + // ErrCodeTaggingFailedException for service response error code + // "TaggingFailedException". + // + // The requested tagging operation did not succeed. This may be due to invalid + // tag format or the maximum tag limit may have been exceeded. Resolve the issue + // before retrying. + ErrCodeTaggingFailedException = "TaggingFailedException" + // ErrCodeTerminalRoutingStrategyException for service response error code // "TerminalRoutingStrategyException". // @@ -97,6 +105,6 @@ const ( // ErrCodeUnsupportedRegionException for service response error code // "UnsupportedRegionException". // - // The requested operation is not supported in the region specified. + // The requested operation is not supported in the Region specified. ErrCodeUnsupportedRegionException = "UnsupportedRegionException" ) diff --git a/service/gamelift/gameliftiface/interface.go b/service/gamelift/gameliftiface/interface.go index f8ba3bc7d20..2236400098b 100644 --- a/service/gamelift/gameliftiface/interface.go +++ b/service/gamelift/gameliftiface/interface.go @@ -264,6 +264,10 @@ type GameLiftAPI interface { ListScriptsWithContext(aws.Context, *gamelift.ListScriptsInput, ...request.Option) (*gamelift.ListScriptsOutput, error) ListScriptsRequest(*gamelift.ListScriptsInput) (*request.Request, *gamelift.ListScriptsOutput) + ListTagsForResource(*gamelift.ListTagsForResourceInput) (*gamelift.ListTagsForResourceOutput, error) + ListTagsForResourceWithContext(aws.Context, *gamelift.ListTagsForResourceInput, ...request.Option) (*gamelift.ListTagsForResourceOutput, error) + ListTagsForResourceRequest(*gamelift.ListTagsForResourceInput) (*request.Request, *gamelift.ListTagsForResourceOutput) + PutScalingPolicy(*gamelift.PutScalingPolicyInput) (*gamelift.PutScalingPolicyOutput, error) PutScalingPolicyWithContext(aws.Context, *gamelift.PutScalingPolicyInput, ...request.Option) (*gamelift.PutScalingPolicyOutput, error) PutScalingPolicyRequest(*gamelift.PutScalingPolicyInput) (*request.Request, *gamelift.PutScalingPolicyOutput) @@ -308,6 +312,14 @@ type GameLiftAPI interface { StopMatchmakingWithContext(aws.Context, *gamelift.StopMatchmakingInput, ...request.Option) (*gamelift.StopMatchmakingOutput, error) StopMatchmakingRequest(*gamelift.StopMatchmakingInput) (*request.Request, *gamelift.StopMatchmakingOutput) + TagResource(*gamelift.TagResourceInput) (*gamelift.TagResourceOutput, error) + TagResourceWithContext(aws.Context, *gamelift.TagResourceInput, ...request.Option) (*gamelift.TagResourceOutput, error) + TagResourceRequest(*gamelift.TagResourceInput) (*request.Request, *gamelift.TagResourceOutput) + + UntagResource(*gamelift.UntagResourceInput) (*gamelift.UntagResourceOutput, error) + UntagResourceWithContext(aws.Context, *gamelift.UntagResourceInput, ...request.Option) (*gamelift.UntagResourceOutput, error) + UntagResourceRequest(*gamelift.UntagResourceInput) (*request.Request, *gamelift.UntagResourceOutput) + UpdateAlias(*gamelift.UpdateAliasInput) (*gamelift.UpdateAliasOutput, error) UpdateAliasWithContext(aws.Context, *gamelift.UpdateAliasInput, ...request.Option) (*gamelift.UpdateAliasOutput, error) UpdateAliasRequest(*gamelift.UpdateAliasInput) (*request.Request, *gamelift.UpdateAliasOutput) diff --git a/service/health/api.go b/service/health/api.go index cdaa0aa32d7..84a53c3009c 100644 --- a/service/health/api.go +++ b/service/health/api.go @@ -3,13 +3,158 @@ package health import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) +const opDescribeAffectedAccountsForOrganization = "DescribeAffectedAccountsForOrganization" + +// DescribeAffectedAccountsForOrganizationRequest generates a "aws/request.Request" representing the +// client's request for the DescribeAffectedAccountsForOrganization operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeAffectedAccountsForOrganization for more information on using the DescribeAffectedAccountsForOrganization +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeAffectedAccountsForOrganizationRequest method. +// req, resp := client.DescribeAffectedAccountsForOrganizationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeAffectedAccountsForOrganization +func (c *Health) DescribeAffectedAccountsForOrganizationRequest(input *DescribeAffectedAccountsForOrganizationInput) (req *request.Request, output *DescribeAffectedAccountsForOrganizationOutput) { + op := &request.Operation{ + Name: opDescribeAffectedAccountsForOrganization, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeAffectedAccountsForOrganizationInput{} + } + + output = &DescribeAffectedAccountsForOrganizationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeAffectedAccountsForOrganization API operation for AWS Health APIs and Notifications. +// +// Returns a list of accounts in the organization from AWS Organizations that +// are affected by the provided event. +// +// Before you can call this operation, you must first enable AWS Health to work +// with AWS Organizations. To do this, call the EnableHealthServiceAccessForOrganization +// operation from your organization's master account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Health APIs and Notifications's +// API operation DescribeAffectedAccountsForOrganization for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidPaginationToken "InvalidPaginationToken" +// The specified pagination token (nextToken) is not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeAffectedAccountsForOrganization +func (c *Health) DescribeAffectedAccountsForOrganization(input *DescribeAffectedAccountsForOrganizationInput) (*DescribeAffectedAccountsForOrganizationOutput, error) { + req, out := c.DescribeAffectedAccountsForOrganizationRequest(input) + return out, req.Send() +} + +// DescribeAffectedAccountsForOrganizationWithContext is the same as DescribeAffectedAccountsForOrganization with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeAffectedAccountsForOrganization for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Health) DescribeAffectedAccountsForOrganizationWithContext(ctx aws.Context, input *DescribeAffectedAccountsForOrganizationInput, opts ...request.Option) (*DescribeAffectedAccountsForOrganizationOutput, error) { + req, out := c.DescribeAffectedAccountsForOrganizationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeAffectedAccountsForOrganizationPages iterates over the pages of a DescribeAffectedAccountsForOrganization operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeAffectedAccountsForOrganization method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeAffectedAccountsForOrganization operation. +// pageNum := 0 +// err := client.DescribeAffectedAccountsForOrganizationPages(params, +// func(page *health.DescribeAffectedAccountsForOrganizationOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Health) DescribeAffectedAccountsForOrganizationPages(input *DescribeAffectedAccountsForOrganizationInput, fn func(*DescribeAffectedAccountsForOrganizationOutput, bool) bool) error { + return c.DescribeAffectedAccountsForOrganizationPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeAffectedAccountsForOrganizationPagesWithContext same as DescribeAffectedAccountsForOrganizationPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Health) DescribeAffectedAccountsForOrganizationPagesWithContext(ctx aws.Context, input *DescribeAffectedAccountsForOrganizationInput, fn func(*DescribeAffectedAccountsForOrganizationOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeAffectedAccountsForOrganizationInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeAffectedAccountsForOrganizationRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeAffectedAccountsForOrganizationOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opDescribeAffectedEntities = "DescribeAffectedEntities" // DescribeAffectedEntitiesRequest generates a "aws/request.Request" representing the @@ -158,6 +303,157 @@ func (c *Health) DescribeAffectedEntitiesPagesWithContext(ctx aws.Context, input return p.Err() } +const opDescribeAffectedEntitiesForOrganization = "DescribeAffectedEntitiesForOrganization" + +// DescribeAffectedEntitiesForOrganizationRequest generates a "aws/request.Request" representing the +// client's request for the DescribeAffectedEntitiesForOrganization operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeAffectedEntitiesForOrganization for more information on using the DescribeAffectedEntitiesForOrganization +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeAffectedEntitiesForOrganizationRequest method. +// req, resp := client.DescribeAffectedEntitiesForOrganizationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeAffectedEntitiesForOrganization +func (c *Health) DescribeAffectedEntitiesForOrganizationRequest(input *DescribeAffectedEntitiesForOrganizationInput) (req *request.Request, output *DescribeAffectedEntitiesForOrganizationOutput) { + op := &request.Operation{ + Name: opDescribeAffectedEntitiesForOrganization, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeAffectedEntitiesForOrganizationInput{} + } + + output = &DescribeAffectedEntitiesForOrganizationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeAffectedEntitiesForOrganization API operation for AWS Health APIs and Notifications. +// +// Returns a list of entities that have been affected by one or more events +// for one or more accounts in your organization in AWS Organizations, based +// on the filter criteria. Entities can refer to individual customer resources, +// groups of customer resources, or any other construct, depending on the AWS +// service. +// +// At least one event ARN and account ID are required. Results are sorted by +// the lastUpdatedTime of the entity, starting with the most recent. +// +// Before you can call this operation, you must first enable AWS Health to work +// with AWS Organizations. To do this, call the EnableHealthServiceAccessForOrganization +// operation from your organization's master account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Health APIs and Notifications's +// API operation DescribeAffectedEntitiesForOrganization for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidPaginationToken "InvalidPaginationToken" +// The specified pagination token (nextToken) is not valid. +// +// * ErrCodeUnsupportedLocale "UnsupportedLocale" +// The specified locale is not supported. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeAffectedEntitiesForOrganization +func (c *Health) DescribeAffectedEntitiesForOrganization(input *DescribeAffectedEntitiesForOrganizationInput) (*DescribeAffectedEntitiesForOrganizationOutput, error) { + req, out := c.DescribeAffectedEntitiesForOrganizationRequest(input) + return out, req.Send() +} + +// DescribeAffectedEntitiesForOrganizationWithContext is the same as DescribeAffectedEntitiesForOrganization with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeAffectedEntitiesForOrganization for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Health) DescribeAffectedEntitiesForOrganizationWithContext(ctx aws.Context, input *DescribeAffectedEntitiesForOrganizationInput, opts ...request.Option) (*DescribeAffectedEntitiesForOrganizationOutput, error) { + req, out := c.DescribeAffectedEntitiesForOrganizationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeAffectedEntitiesForOrganizationPages iterates over the pages of a DescribeAffectedEntitiesForOrganization operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeAffectedEntitiesForOrganization method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeAffectedEntitiesForOrganization operation. +// pageNum := 0 +// err := client.DescribeAffectedEntitiesForOrganizationPages(params, +// func(page *health.DescribeAffectedEntitiesForOrganizationOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Health) DescribeAffectedEntitiesForOrganizationPages(input *DescribeAffectedEntitiesForOrganizationInput, fn func(*DescribeAffectedEntitiesForOrganizationOutput, bool) bool) error { + return c.DescribeAffectedEntitiesForOrganizationPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeAffectedEntitiesForOrganizationPagesWithContext same as DescribeAffectedEntitiesForOrganizationPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Health) DescribeAffectedEntitiesForOrganizationPagesWithContext(ctx aws.Context, input *DescribeAffectedEntitiesForOrganizationInput, fn func(*DescribeAffectedEntitiesForOrganizationOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeAffectedEntitiesForOrganizationInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeAffectedEntitiesForOrganizationRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeAffectedEntitiesForOrganizationOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opDescribeEntityAggregates = "DescribeEntityAggregates" // DescribeEntityAggregatesRequest generates a "aws/request.Request" representing the @@ -418,10 +714,10 @@ func (c *Health) DescribeEventDetailsRequest(input *DescribeEventDetailsInput) ( // DescribeEventDetails API operation for AWS Health APIs and Notifications. // // Returns detailed information about one or more specified events. Information -// includes standard event data (region, service, etc., as returned by DescribeEvents), -// a detailed event description, and possible additional metadata that depends -// upon the nature of the event. Affected entities are not included; to retrieve -// those, use the DescribeAffectedEntities operation. +// includes standard event data (region, service, and so on, as returned by +// DescribeEvents), a detailed event description, and possible additional metadata +// that depends upon the nature of the event. Affected entities are not included; +// to retrieve those, use the DescribeAffectedEntities operation. // // If a specified event cannot be retrieved, an error message is returned for // that event. @@ -459,101 +755,189 @@ func (c *Health) DescribeEventDetailsWithContext(ctx aws.Context, input *Describ return out, req.Send() } -const opDescribeEventTypes = "DescribeEventTypes" +const opDescribeEventDetailsForOrganization = "DescribeEventDetailsForOrganization" -// DescribeEventTypesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEventTypes operation. The "output" return +// DescribeEventDetailsForOrganizationRequest generates a "aws/request.Request" representing the +// client's request for the DescribeEventDetailsForOrganization operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeEventTypes for more information on using the DescribeEventTypes +// See DescribeEventDetailsForOrganization for more information on using the DescribeEventDetailsForOrganization // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the DescribeEventTypesRequest method. -// req, resp := client.DescribeEventTypesRequest(params) +// // Example sending a request using the DescribeEventDetailsForOrganizationRequest method. +// req, resp := client.DescribeEventDetailsForOrganizationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventTypes -func (c *Health) DescribeEventTypesRequest(input *DescribeEventTypesInput) (req *request.Request, output *DescribeEventTypesOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventDetailsForOrganization +func (c *Health) DescribeEventDetailsForOrganizationRequest(input *DescribeEventDetailsForOrganizationInput) (req *request.Request, output *DescribeEventDetailsForOrganizationOutput) { op := &request.Operation{ - Name: opDescribeEventTypes, + Name: opDescribeEventDetailsForOrganization, HTTPMethod: "POST", HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, } if input == nil { - input = &DescribeEventTypesInput{} + input = &DescribeEventDetailsForOrganizationInput{} } - output = &DescribeEventTypesOutput{} + output = &DescribeEventDetailsForOrganizationOutput{} req = c.newRequest(op, input, output) return } -// DescribeEventTypes API operation for AWS Health APIs and Notifications. +// DescribeEventDetailsForOrganization API operation for AWS Health APIs and Notifications. // -// Returns the event types that meet the specified filter criteria. If no filter -// criteria are specified, all event types are returned, in no particular order. +// Returns detailed information about one or more specified events for one or +// more accounts in your organization. Information includes standard event data +// (Region, service, and so on, as returned by DescribeEventsForOrganization, +// a detailed event description, and possible additional metadata that depends +// upon the nature of the event. Affected entities are not included; to retrieve +// those, use the DescribeAffectedEntitiesForOrganization operation. +// +// Before you can call this operation, you must first enable AWS Health to work +// with AWS Organizations. To do this, call the EnableHealthServiceAccessForOrganization +// operation from your organization's master account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Health APIs and Notifications's -// API operation DescribeEventTypes for usage and error information. +// API operation DescribeEventDetailsForOrganization for usage and error information. // // Returned Error Codes: -// * ErrCodeInvalidPaginationToken "InvalidPaginationToken" -// The specified pagination token (nextToken) is not valid. -// // * ErrCodeUnsupportedLocale "UnsupportedLocale" // The specified locale is not supported. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventTypes -func (c *Health) DescribeEventTypes(input *DescribeEventTypesInput) (*DescribeEventTypesOutput, error) { - req, out := c.DescribeEventTypesRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventDetailsForOrganization +func (c *Health) DescribeEventDetailsForOrganization(input *DescribeEventDetailsForOrganizationInput) (*DescribeEventDetailsForOrganizationOutput, error) { + req, out := c.DescribeEventDetailsForOrganizationRequest(input) return out, req.Send() } -// DescribeEventTypesWithContext is the same as DescribeEventTypes with the addition of +// DescribeEventDetailsForOrganizationWithContext is the same as DescribeEventDetailsForOrganization with the addition of // the ability to pass a context and additional request options. // -// See DescribeEventTypes for details on how to use this API operation. +// See DescribeEventDetailsForOrganization for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Health) DescribeEventTypesWithContext(ctx aws.Context, input *DescribeEventTypesInput, opts ...request.Option) (*DescribeEventTypesOutput, error) { - req, out := c.DescribeEventTypesRequest(input) +func (c *Health) DescribeEventDetailsForOrganizationWithContext(ctx aws.Context, input *DescribeEventDetailsForOrganizationInput, opts ...request.Option) (*DescribeEventDetailsForOrganizationOutput, error) { + req, out := c.DescribeEventDetailsForOrganizationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// DescribeEventTypesPages iterates over the pages of a DescribeEventTypes operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeEventTypes method for more information on how to use this operation. -// +const opDescribeEventTypes = "DescribeEventTypes" + +// DescribeEventTypesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeEventTypes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeEventTypes for more information on using the DescribeEventTypes +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeEventTypesRequest method. +// req, resp := client.DescribeEventTypesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventTypes +func (c *Health) DescribeEventTypesRequest(input *DescribeEventTypesInput) (req *request.Request, output *DescribeEventTypesOutput) { + op := &request.Operation{ + Name: opDescribeEventTypes, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeEventTypesInput{} + } + + output = &DescribeEventTypesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeEventTypes API operation for AWS Health APIs and Notifications. +// +// Returns the event types that meet the specified filter criteria. If no filter +// criteria are specified, all event types are returned, in no particular order. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Health APIs and Notifications's +// API operation DescribeEventTypes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidPaginationToken "InvalidPaginationToken" +// The specified pagination token (nextToken) is not valid. +// +// * ErrCodeUnsupportedLocale "UnsupportedLocale" +// The specified locale is not supported. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventTypes +func (c *Health) DescribeEventTypes(input *DescribeEventTypesInput) (*DescribeEventTypesOutput, error) { + req, out := c.DescribeEventTypesRequest(input) + return out, req.Send() +} + +// DescribeEventTypesWithContext is the same as DescribeEventTypes with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeEventTypes for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Health) DescribeEventTypesWithContext(ctx aws.Context, input *DescribeEventTypesInput, opts ...request.Option) (*DescribeEventTypesOutput, error) { + req, out := c.DescribeEventTypesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeEventTypesPages iterates over the pages of a DescribeEventTypes operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeEventTypes method for more information on how to use this operation. +// // Note: This operation can generate multiple requests to a service. // // // Example iterating over at most 3 pages of a DescribeEventTypes operation. @@ -747,88 +1131,493 @@ func (c *Health) DescribeEventsPagesWithContext(ctx aws.Context, input *Describe return p.Err() } -// Information about an entity that is affected by a Health event. -type AffectedEntity struct { - _ struct{} `type:"structure"` - - // The 12-digit AWS account number that contains the affected entity. - AwsAccountId *string `locationName:"awsAccountId" type:"string"` - - // The unique identifier for the entity. Format: arn:aws:health:entity-region:aws-account:entity/entity-id - // . Example: arn:aws:health:us-east-1:111222333444:entity/AVh5GGT7ul1arKr1sE1K - EntityArn *string `locationName:"entityArn" type:"string"` - - EntityUrl *string `locationName:"entityUrl" type:"string"` - - // The ID of the affected entity. - EntityValue *string `locationName:"entityValue" type:"string"` - - // The unique identifier for the event. Format: arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID - // . Example: Example: arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456 - EventArn *string `locationName:"eventArn" type:"string"` - - // The most recent time that the entity was updated. - LastUpdatedTime *time.Time `locationName:"lastUpdatedTime" type:"timestamp"` - - // The most recent status of the entity affected by the event. The possible - // values are IMPAIRED, UNIMPAIRED, and UNKNOWN. - StatusCode *string `locationName:"statusCode" type:"string" enum:"entityStatusCode"` +const opDescribeEventsForOrganization = "DescribeEventsForOrganization" - // A map of entity tags attached to the affected entity. - Tags map[string]*string `locationName:"tags" type:"map"` -} +// DescribeEventsForOrganizationRequest generates a "aws/request.Request" representing the +// client's request for the DescribeEventsForOrganization operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeEventsForOrganization for more information on using the DescribeEventsForOrganization +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeEventsForOrganizationRequest method. +// req, resp := client.DescribeEventsForOrganizationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventsForOrganization +func (c *Health) DescribeEventsForOrganizationRequest(input *DescribeEventsForOrganizationInput) (req *request.Request, output *DescribeEventsForOrganizationOutput) { + op := &request.Operation{ + Name: opDescribeEventsForOrganization, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, + } -// String returns the string representation -func (s AffectedEntity) String() string { - return awsutil.Prettify(s) -} + if input == nil { + input = &DescribeEventsForOrganizationInput{} + } -// GoString returns the string representation -func (s AffectedEntity) GoString() string { - return s.String() + output = &DescribeEventsForOrganizationOutput{} + req = c.newRequest(op, input, output) + return } -// SetAwsAccountId sets the AwsAccountId field's value. -func (s *AffectedEntity) SetAwsAccountId(v string) *AffectedEntity { - s.AwsAccountId = &v - return s +// DescribeEventsForOrganization API operation for AWS Health APIs and Notifications. +// +// Returns information about events across your organization in AWS Organizations, +// meeting the specified filter criteria. Events are returned in a summary form +// and do not include the accounts impacted, detailed description, any additional +// metadata that depends on the event type, or any affected resources. To retrieve +// that information, use the DescribeAffectedAccountsForOrganization, DescribeEventDetailsForOrganization, +// and DescribeAffectedEntitiesForOrganization operations. +// +// If no filter criteria are specified, all events across your organization +// are returned. Results are sorted by lastModifiedTime, starting with the most +// recent. +// +// Before you can call this operation, you must first enable Health to work +// with AWS Organizations. To do this, call the EnableHealthServiceAccessForOrganization +// operation from your organization's master account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Health APIs and Notifications's +// API operation DescribeEventsForOrganization for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidPaginationToken "InvalidPaginationToken" +// The specified pagination token (nextToken) is not valid. +// +// * ErrCodeUnsupportedLocale "UnsupportedLocale" +// The specified locale is not supported. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeEventsForOrganization +func (c *Health) DescribeEventsForOrganization(input *DescribeEventsForOrganizationInput) (*DescribeEventsForOrganizationOutput, error) { + req, out := c.DescribeEventsForOrganizationRequest(input) + return out, req.Send() } -// SetEntityArn sets the EntityArn field's value. -func (s *AffectedEntity) SetEntityArn(v string) *AffectedEntity { - s.EntityArn = &v - return s +// DescribeEventsForOrganizationWithContext is the same as DescribeEventsForOrganization with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeEventsForOrganization for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Health) DescribeEventsForOrganizationWithContext(ctx aws.Context, input *DescribeEventsForOrganizationInput, opts ...request.Option) (*DescribeEventsForOrganizationOutput, error) { + req, out := c.DescribeEventsForOrganizationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() } -// SetEntityUrl sets the EntityUrl field's value. -func (s *AffectedEntity) SetEntityUrl(v string) *AffectedEntity { - s.EntityUrl = &v - return s +// DescribeEventsForOrganizationPages iterates over the pages of a DescribeEventsForOrganization operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeEventsForOrganization method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeEventsForOrganization operation. +// pageNum := 0 +// err := client.DescribeEventsForOrganizationPages(params, +// func(page *health.DescribeEventsForOrganizationOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Health) DescribeEventsForOrganizationPages(input *DescribeEventsForOrganizationInput, fn func(*DescribeEventsForOrganizationOutput, bool) bool) error { + return c.DescribeEventsForOrganizationPagesWithContext(aws.BackgroundContext(), input, fn) } -// SetEntityValue sets the EntityValue field's value. -func (s *AffectedEntity) SetEntityValue(v string) *AffectedEntity { - s.EntityValue = &v - return s -} +// DescribeEventsForOrganizationPagesWithContext same as DescribeEventsForOrganizationPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Health) DescribeEventsForOrganizationPagesWithContext(ctx aws.Context, input *DescribeEventsForOrganizationInput, fn func(*DescribeEventsForOrganizationOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeEventsForOrganizationInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeEventsForOrganizationRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } -// SetEventArn sets the EventArn field's value. -func (s *AffectedEntity) SetEventArn(v string) *AffectedEntity { - s.EventArn = &v - return s -} + for p.Next() { + if !fn(p.Page().(*DescribeEventsForOrganizationOutput), !p.HasNextPage()) { + break + } + } -// SetLastUpdatedTime sets the LastUpdatedTime field's value. -func (s *AffectedEntity) SetLastUpdatedTime(v time.Time) *AffectedEntity { - s.LastUpdatedTime = &v - return s + return p.Err() } -// SetStatusCode sets the StatusCode field's value. -func (s *AffectedEntity) SetStatusCode(v string) *AffectedEntity { - s.StatusCode = &v - return s -} +const opDescribeHealthServiceStatusForOrganization = "DescribeHealthServiceStatusForOrganization" + +// DescribeHealthServiceStatusForOrganizationRequest generates a "aws/request.Request" representing the +// client's request for the DescribeHealthServiceStatusForOrganization operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeHealthServiceStatusForOrganization for more information on using the DescribeHealthServiceStatusForOrganization +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeHealthServiceStatusForOrganizationRequest method. +// req, resp := client.DescribeHealthServiceStatusForOrganizationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeHealthServiceStatusForOrganization +func (c *Health) DescribeHealthServiceStatusForOrganizationRequest(input *DescribeHealthServiceStatusForOrganizationInput) (req *request.Request, output *DescribeHealthServiceStatusForOrganizationOutput) { + op := &request.Operation{ + Name: opDescribeHealthServiceStatusForOrganization, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeHealthServiceStatusForOrganizationInput{} + } + + output = &DescribeHealthServiceStatusForOrganizationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeHealthServiceStatusForOrganization API operation for AWS Health APIs and Notifications. +// +// This operation provides status information on enabling or disabling AWS Health +// to work with your organization. To call this operation, you must sign in +// as an IAM user, assume an IAM role, or sign in as the root user (not recommended) +// in the organization's master account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Health APIs and Notifications's +// API operation DescribeHealthServiceStatusForOrganization for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DescribeHealthServiceStatusForOrganization +func (c *Health) DescribeHealthServiceStatusForOrganization(input *DescribeHealthServiceStatusForOrganizationInput) (*DescribeHealthServiceStatusForOrganizationOutput, error) { + req, out := c.DescribeHealthServiceStatusForOrganizationRequest(input) + return out, req.Send() +} + +// DescribeHealthServiceStatusForOrganizationWithContext is the same as DescribeHealthServiceStatusForOrganization with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeHealthServiceStatusForOrganization for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Health) DescribeHealthServiceStatusForOrganizationWithContext(ctx aws.Context, input *DescribeHealthServiceStatusForOrganizationInput, opts ...request.Option) (*DescribeHealthServiceStatusForOrganizationOutput, error) { + req, out := c.DescribeHealthServiceStatusForOrganizationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisableHealthServiceAccessForOrganization = "DisableHealthServiceAccessForOrganization" + +// DisableHealthServiceAccessForOrganizationRequest generates a "aws/request.Request" representing the +// client's request for the DisableHealthServiceAccessForOrganization operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisableHealthServiceAccessForOrganization for more information on using the DisableHealthServiceAccessForOrganization +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisableHealthServiceAccessForOrganizationRequest method. +// req, resp := client.DisableHealthServiceAccessForOrganizationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DisableHealthServiceAccessForOrganization +func (c *Health) DisableHealthServiceAccessForOrganizationRequest(input *DisableHealthServiceAccessForOrganizationInput) (req *request.Request, output *DisableHealthServiceAccessForOrganizationOutput) { + op := &request.Operation{ + Name: opDisableHealthServiceAccessForOrganization, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisableHealthServiceAccessForOrganizationInput{} + } + + output = &DisableHealthServiceAccessForOrganizationOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DisableHealthServiceAccessForOrganization API operation for AWS Health APIs and Notifications. +// +// Calling this operation disables Health from working with AWS Organizations. +// This does not remove the Service Linked Role (SLR) from the the master account +// in your organization. Use the IAM console, API, or AWS CLI to remove the +// SLR if desired. To call this operation, you must sign in as an IAM user, +// assume an IAM role, or sign in as the root user (not recommended) in the +// organization's master account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Health APIs and Notifications's +// API operation DisableHealthServiceAccessForOrganization for usage and error information. +// +// Returned Error Codes: +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// EnableHealthServiceAccessForOrganization is already in progress. Wait for +// the action to complete before trying again. To get the current status, use +// the DescribeHealthServiceStatusForOrganization operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/DisableHealthServiceAccessForOrganization +func (c *Health) DisableHealthServiceAccessForOrganization(input *DisableHealthServiceAccessForOrganizationInput) (*DisableHealthServiceAccessForOrganizationOutput, error) { + req, out := c.DisableHealthServiceAccessForOrganizationRequest(input) + return out, req.Send() +} + +// DisableHealthServiceAccessForOrganizationWithContext is the same as DisableHealthServiceAccessForOrganization with the addition of +// the ability to pass a context and additional request options. +// +// See DisableHealthServiceAccessForOrganization for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Health) DisableHealthServiceAccessForOrganizationWithContext(ctx aws.Context, input *DisableHealthServiceAccessForOrganizationInput, opts ...request.Option) (*DisableHealthServiceAccessForOrganizationOutput, error) { + req, out := c.DisableHealthServiceAccessForOrganizationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opEnableHealthServiceAccessForOrganization = "EnableHealthServiceAccessForOrganization" + +// EnableHealthServiceAccessForOrganizationRequest generates a "aws/request.Request" representing the +// client's request for the EnableHealthServiceAccessForOrganization operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See EnableHealthServiceAccessForOrganization for more information on using the EnableHealthServiceAccessForOrganization +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the EnableHealthServiceAccessForOrganizationRequest method. +// req, resp := client.EnableHealthServiceAccessForOrganizationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/EnableHealthServiceAccessForOrganization +func (c *Health) EnableHealthServiceAccessForOrganizationRequest(input *EnableHealthServiceAccessForOrganizationInput) (req *request.Request, output *EnableHealthServiceAccessForOrganizationOutput) { + op := &request.Operation{ + Name: opEnableHealthServiceAccessForOrganization, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &EnableHealthServiceAccessForOrganizationInput{} + } + + output = &EnableHealthServiceAccessForOrganizationOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// EnableHealthServiceAccessForOrganization API operation for AWS Health APIs and Notifications. +// +// Calling this operation enables AWS Health to work with AWS Organizations. +// This applies a Service Linked Role (SLR) to the master account in the organization. +// To learn more about the steps in this process, visit enabling service access +// for AWS Health in AWS Organizations. To call this operation, you must sign +// in as an IAM user, assume an IAM role, or sign in as the root user (not recommended) +// in the organization's master account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Health APIs and Notifications's +// API operation EnableHealthServiceAccessForOrganization for usage and error information. +// +// Returned Error Codes: +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// EnableHealthServiceAccessForOrganization is already in progress. Wait for +// the action to complete before trying again. To get the current status, use +// the DescribeHealthServiceStatusForOrganization operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/health-2016-08-04/EnableHealthServiceAccessForOrganization +func (c *Health) EnableHealthServiceAccessForOrganization(input *EnableHealthServiceAccessForOrganizationInput) (*EnableHealthServiceAccessForOrganizationOutput, error) { + req, out := c.EnableHealthServiceAccessForOrganizationRequest(input) + return out, req.Send() +} + +// EnableHealthServiceAccessForOrganizationWithContext is the same as EnableHealthServiceAccessForOrganization with the addition of +// the ability to pass a context and additional request options. +// +// See EnableHealthServiceAccessForOrganization for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Health) EnableHealthServiceAccessForOrganizationWithContext(ctx aws.Context, input *EnableHealthServiceAccessForOrganizationInput, opts ...request.Option) (*EnableHealthServiceAccessForOrganizationOutput, error) { + req, out := c.EnableHealthServiceAccessForOrganizationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Information about an entity that is affected by a Health event. +type AffectedEntity struct { + _ struct{} `type:"structure"` + + // The 12-digit AWS account number that contains the affected entity. + AwsAccountId *string `locationName:"awsAccountId" type:"string"` + + // The unique identifier for the entity. Format: arn:aws:health:entity-region:aws-account:entity/entity-id + // . Example: arn:aws:health:us-east-1:111222333444:entity/AVh5GGT7ul1arKr1sE1K + EntityArn *string `locationName:"entityArn" type:"string"` + + // The URL of the affected entity. + EntityUrl *string `locationName:"entityUrl" type:"string"` + + // The ID of the affected entity. + EntityValue *string `locationName:"entityValue" type:"string"` + + // The unique identifier for the event. Format: arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID + // . Example: Example: arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456 + EventArn *string `locationName:"eventArn" type:"string"` + + // The most recent time that the entity was updated. + LastUpdatedTime *time.Time `locationName:"lastUpdatedTime" type:"timestamp"` + + // The most recent status of the entity affected by the event. The possible + // values are IMPAIRED, UNIMPAIRED, and UNKNOWN. + StatusCode *string `locationName:"statusCode" type:"string" enum:"entityStatusCode"` + + // A map of entity tags attached to the affected entity. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s AffectedEntity) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AffectedEntity) GoString() string { + return s.String() +} + +// SetAwsAccountId sets the AwsAccountId field's value. +func (s *AffectedEntity) SetAwsAccountId(v string) *AffectedEntity { + s.AwsAccountId = &v + return s +} + +// SetEntityArn sets the EntityArn field's value. +func (s *AffectedEntity) SetEntityArn(v string) *AffectedEntity { + s.EntityArn = &v + return s +} + +// SetEntityUrl sets the EntityUrl field's value. +func (s *AffectedEntity) SetEntityUrl(v string) *AffectedEntity { + s.EntityUrl = &v + return s +} + +// SetEntityValue sets the EntityValue field's value. +func (s *AffectedEntity) SetEntityValue(v string) *AffectedEntity { + s.EntityValue = &v + return s +} + +// SetEventArn sets the EventArn field's value. +func (s *AffectedEntity) SetEventArn(v string) *AffectedEntity { + s.EventArn = &v + return s +} + +// SetLastUpdatedTime sets the LastUpdatedTime field's value. +func (s *AffectedEntity) SetLastUpdatedTime(v time.Time) *AffectedEntity { + s.LastUpdatedTime = &v + return s +} + +// SetStatusCode sets the StatusCode field's value. +func (s *AffectedEntity) SetStatusCode(v string) *AffectedEntity { + s.StatusCode = &v + return s +} // SetTags sets the Tags field's value. func (s *AffectedEntity) SetTags(v map[string]*string) *AffectedEntity { @@ -845,42 +1634,994 @@ func (s *AffectedEntity) SetTags(v map[string]*string) *AffectedEntity { type DateTimeRange struct { _ struct{} `type:"structure"` - // The starting date and time of a time range. - From *time.Time `locationName:"from" type:"timestamp"` + // The starting date and time of a time range. + From *time.Time `locationName:"from" type:"timestamp"` + + // The ending date and time of a time range. + To *time.Time `locationName:"to" type:"timestamp"` +} + +// String returns the string representation +func (s DateTimeRange) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DateTimeRange) GoString() string { + return s.String() +} + +// SetFrom sets the From field's value. +func (s *DateTimeRange) SetFrom(v time.Time) *DateTimeRange { + s.From = &v + return s +} + +// SetTo sets the To field's value. +func (s *DateTimeRange) SetTo(v time.Time) *DateTimeRange { + s.To = &v + return s +} + +type DescribeAffectedAccountsForOrganizationInput struct { + _ struct{} `type:"structure"` + + // The unique identifier for the event. Format: arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID + // . Example: Example: arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456 + // + // EventArn is a required field + EventArn *string `locationName:"eventArn" type:"string" required:"true"` + + // The maximum number of items to return in one batch, between 10 and 100, inclusive. + MaxResults *int64 `locationName:"maxResults" min:"10" type:"integer"` + + // If the results of a search are large, only a portion of the results are returned, + // and a nextToken pagination token is returned in the response. To retrieve + // the next batch of results, reissue the search request and include the returned + // token. When all results have been returned, the response does not contain + // a pagination token value. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` +} + +// String returns the string representation +func (s DescribeAffectedAccountsForOrganizationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAffectedAccountsForOrganizationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeAffectedAccountsForOrganizationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeAffectedAccountsForOrganizationInput"} + if s.EventArn == nil { + invalidParams.Add(request.NewErrParamRequired("EventArn")) + } + if s.MaxResults != nil && *s.MaxResults < 10 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) + } + if s.NextToken != nil && len(*s.NextToken) < 4 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEventArn sets the EventArn field's value. +func (s *DescribeAffectedAccountsForOrganizationInput) SetEventArn(v string) *DescribeAffectedAccountsForOrganizationInput { + s.EventArn = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeAffectedAccountsForOrganizationInput) SetMaxResults(v int64) *DescribeAffectedAccountsForOrganizationInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeAffectedAccountsForOrganizationInput) SetNextToken(v string) *DescribeAffectedAccountsForOrganizationInput { + s.NextToken = &v + return s +} + +type DescribeAffectedAccountsForOrganizationOutput struct { + _ struct{} `type:"structure"` + + // A JSON set of elements of the affected accounts. + AffectedAccounts []*string `locationName:"affectedAccounts" type:"list"` + + // If the results of a search are large, only a portion of the results are returned, + // and a nextToken pagination token is returned in the response. To retrieve + // the next batch of results, reissue the search request and include the returned + // token. When all results have been returned, the response does not contain + // a pagination token value. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` +} + +// String returns the string representation +func (s DescribeAffectedAccountsForOrganizationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAffectedAccountsForOrganizationOutput) GoString() string { + return s.String() +} + +// SetAffectedAccounts sets the AffectedAccounts field's value. +func (s *DescribeAffectedAccountsForOrganizationOutput) SetAffectedAccounts(v []*string) *DescribeAffectedAccountsForOrganizationOutput { + s.AffectedAccounts = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeAffectedAccountsForOrganizationOutput) SetNextToken(v string) *DescribeAffectedAccountsForOrganizationOutput { + s.NextToken = &v + return s +} + +type DescribeAffectedEntitiesForOrganizationInput struct { + _ struct{} `type:"structure"` + + // The locale (language) to return information in. English (en) is the default + // and the only supported value at this time. + Locale *string `locationName:"locale" min:"2" type:"string"` + + // The maximum number of items to return in one batch, between 10 and 100, inclusive. + MaxResults *int64 `locationName:"maxResults" min:"10" type:"integer"` + + // If the results of a search are large, only a portion of the results are returned, + // and a nextToken pagination token is returned in the response. To retrieve + // the next batch of results, reissue the search request and include the returned + // token. When all results have been returned, the response does not contain + // a pagination token value. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` + + // A JSON set of elements including the awsAccountId and the eventArn. + // + // OrganizationEntityFilters is a required field + OrganizationEntityFilters []*EventAccountFilter `locationName:"organizationEntityFilters" min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribeAffectedEntitiesForOrganizationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAffectedEntitiesForOrganizationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeAffectedEntitiesForOrganizationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeAffectedEntitiesForOrganizationInput"} + if s.Locale != nil && len(*s.Locale) < 2 { + invalidParams.Add(request.NewErrParamMinLen("Locale", 2)) + } + if s.MaxResults != nil && *s.MaxResults < 10 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) + } + if s.NextToken != nil && len(*s.NextToken) < 4 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) + } + if s.OrganizationEntityFilters == nil { + invalidParams.Add(request.NewErrParamRequired("OrganizationEntityFilters")) + } + if s.OrganizationEntityFilters != nil && len(s.OrganizationEntityFilters) < 1 { + invalidParams.Add(request.NewErrParamMinLen("OrganizationEntityFilters", 1)) + } + if s.OrganizationEntityFilters != nil { + for i, v := range s.OrganizationEntityFilters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OrganizationEntityFilters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLocale sets the Locale field's value. +func (s *DescribeAffectedEntitiesForOrganizationInput) SetLocale(v string) *DescribeAffectedEntitiesForOrganizationInput { + s.Locale = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeAffectedEntitiesForOrganizationInput) SetMaxResults(v int64) *DescribeAffectedEntitiesForOrganizationInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeAffectedEntitiesForOrganizationInput) SetNextToken(v string) *DescribeAffectedEntitiesForOrganizationInput { + s.NextToken = &v + return s +} + +// SetOrganizationEntityFilters sets the OrganizationEntityFilters field's value. +func (s *DescribeAffectedEntitiesForOrganizationInput) SetOrganizationEntityFilters(v []*EventAccountFilter) *DescribeAffectedEntitiesForOrganizationInput { + s.OrganizationEntityFilters = v + return s +} + +type DescribeAffectedEntitiesForOrganizationOutput struct { + _ struct{} `type:"structure"` + + // A JSON set of elements including the awsAccountId and its entityArn, entityValue + // and its entityArn, lastUpdatedTime, statusCode, and tags. + Entities []*AffectedEntity `locationName:"entities" type:"list"` + + // A JSON set of elements of the failed response, including the awsAccountId, + // errorMessage, errorName, and eventArn. + FailedSet []*OrganizationAffectedEntitiesErrorItem `locationName:"failedSet" type:"list"` + + // If the results of a search are large, only a portion of the results are returned, + // and a nextToken pagination token is returned in the response. To retrieve + // the next batch of results, reissue the search request and include the returned + // token. When all results have been returned, the response does not contain + // a pagination token value. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` +} + +// String returns the string representation +func (s DescribeAffectedEntitiesForOrganizationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAffectedEntitiesForOrganizationOutput) GoString() string { + return s.String() +} + +// SetEntities sets the Entities field's value. +func (s *DescribeAffectedEntitiesForOrganizationOutput) SetEntities(v []*AffectedEntity) *DescribeAffectedEntitiesForOrganizationOutput { + s.Entities = v + return s +} + +// SetFailedSet sets the FailedSet field's value. +func (s *DescribeAffectedEntitiesForOrganizationOutput) SetFailedSet(v []*OrganizationAffectedEntitiesErrorItem) *DescribeAffectedEntitiesForOrganizationOutput { + s.FailedSet = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeAffectedEntitiesForOrganizationOutput) SetNextToken(v string) *DescribeAffectedEntitiesForOrganizationOutput { + s.NextToken = &v + return s +} + +type DescribeAffectedEntitiesInput struct { + _ struct{} `type:"structure"` + + // Values to narrow the results returned. At least one event ARN is required. + // + // Filter is a required field + Filter *EntityFilter `locationName:"filter" type:"structure" required:"true"` + + // The locale (language) to return information in. English (en) is the default + // and the only supported value at this time. + Locale *string `locationName:"locale" min:"2" type:"string"` + + // The maximum number of items to return in one batch, between 10 and 100, inclusive. + MaxResults *int64 `locationName:"maxResults" min:"10" type:"integer"` + + // If the results of a search are large, only a portion of the results are returned, + // and a nextToken pagination token is returned in the response. To retrieve + // the next batch of results, reissue the search request and include the returned + // token. When all results have been returned, the response does not contain + // a pagination token value. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` +} + +// String returns the string representation +func (s DescribeAffectedEntitiesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAffectedEntitiesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeAffectedEntitiesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeAffectedEntitiesInput"} + if s.Filter == nil { + invalidParams.Add(request.NewErrParamRequired("Filter")) + } + if s.Locale != nil && len(*s.Locale) < 2 { + invalidParams.Add(request.NewErrParamMinLen("Locale", 2)) + } + if s.MaxResults != nil && *s.MaxResults < 10 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) + } + if s.NextToken != nil && len(*s.NextToken) < 4 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) + } + if s.Filter != nil { + if err := s.Filter.Validate(); err != nil { + invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilter sets the Filter field's value. +func (s *DescribeAffectedEntitiesInput) SetFilter(v *EntityFilter) *DescribeAffectedEntitiesInput { + s.Filter = v + return s +} + +// SetLocale sets the Locale field's value. +func (s *DescribeAffectedEntitiesInput) SetLocale(v string) *DescribeAffectedEntitiesInput { + s.Locale = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeAffectedEntitiesInput) SetMaxResults(v int64) *DescribeAffectedEntitiesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeAffectedEntitiesInput) SetNextToken(v string) *DescribeAffectedEntitiesInput { + s.NextToken = &v + return s +} + +type DescribeAffectedEntitiesOutput struct { + _ struct{} `type:"structure"` + + // The entities that match the filter criteria. + Entities []*AffectedEntity `locationName:"entities" type:"list"` + + // If the results of a search are large, only a portion of the results are returned, + // and a nextToken pagination token is returned in the response. To retrieve + // the next batch of results, reissue the search request and include the returned + // token. When all results have been returned, the response does not contain + // a pagination token value. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` +} + +// String returns the string representation +func (s DescribeAffectedEntitiesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAffectedEntitiesOutput) GoString() string { + return s.String() +} + +// SetEntities sets the Entities field's value. +func (s *DescribeAffectedEntitiesOutput) SetEntities(v []*AffectedEntity) *DescribeAffectedEntitiesOutput { + s.Entities = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeAffectedEntitiesOutput) SetNextToken(v string) *DescribeAffectedEntitiesOutput { + s.NextToken = &v + return s +} + +type DescribeEntityAggregatesInput struct { + _ struct{} `type:"structure"` + + // A list of event ARNs (unique identifiers). For example: "arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-CDE456", + // "arn:aws:health:us-west-1::event/EBS/AWS_EBS_LOST_VOLUME/AWS_EBS_LOST_VOLUME_CHI789_JKL101" + EventArns []*string `locationName:"eventArns" min:"1" type:"list"` +} + +// String returns the string representation +func (s DescribeEntityAggregatesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEntityAggregatesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEntityAggregatesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEntityAggregatesInput"} + if s.EventArns != nil && len(s.EventArns) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventArns", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEventArns sets the EventArns field's value. +func (s *DescribeEntityAggregatesInput) SetEventArns(v []*string) *DescribeEntityAggregatesInput { + s.EventArns = v + return s +} + +type DescribeEntityAggregatesOutput struct { + _ struct{} `type:"structure"` + + // The number of entities that are affected by each of the specified events. + EntityAggregates []*EntityAggregate `locationName:"entityAggregates" type:"list"` +} + +// String returns the string representation +func (s DescribeEntityAggregatesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEntityAggregatesOutput) GoString() string { + return s.String() +} + +// SetEntityAggregates sets the EntityAggregates field's value. +func (s *DescribeEntityAggregatesOutput) SetEntityAggregates(v []*EntityAggregate) *DescribeEntityAggregatesOutput { + s.EntityAggregates = v + return s +} + +type DescribeEventAggregatesInput struct { + _ struct{} `type:"structure"` + + // The only currently supported value is eventTypeCategory. + // + // AggregateField is a required field + AggregateField *string `locationName:"aggregateField" type:"string" required:"true" enum:"eventAggregateField"` + + // Values to narrow the results returned. + Filter *EventFilter `locationName:"filter" type:"structure"` + + // The maximum number of items to return in one batch, between 10 and 100, inclusive. + MaxResults *int64 `locationName:"maxResults" min:"10" type:"integer"` + + // If the results of a search are large, only a portion of the results are returned, + // and a nextToken pagination token is returned in the response. To retrieve + // the next batch of results, reissue the search request and include the returned + // token. When all results have been returned, the response does not contain + // a pagination token value. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` +} + +// String returns the string representation +func (s DescribeEventAggregatesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventAggregatesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEventAggregatesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEventAggregatesInput"} + if s.AggregateField == nil { + invalidParams.Add(request.NewErrParamRequired("AggregateField")) + } + if s.MaxResults != nil && *s.MaxResults < 10 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) + } + if s.NextToken != nil && len(*s.NextToken) < 4 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) + } + if s.Filter != nil { + if err := s.Filter.Validate(); err != nil { + invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAggregateField sets the AggregateField field's value. +func (s *DescribeEventAggregatesInput) SetAggregateField(v string) *DescribeEventAggregatesInput { + s.AggregateField = &v + return s +} + +// SetFilter sets the Filter field's value. +func (s *DescribeEventAggregatesInput) SetFilter(v *EventFilter) *DescribeEventAggregatesInput { + s.Filter = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeEventAggregatesInput) SetMaxResults(v int64) *DescribeEventAggregatesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeEventAggregatesInput) SetNextToken(v string) *DescribeEventAggregatesInput { + s.NextToken = &v + return s +} + +type DescribeEventAggregatesOutput struct { + _ struct{} `type:"structure"` + + // The number of events in each category that meet the optional filter criteria. + EventAggregates []*EventAggregate `locationName:"eventAggregates" type:"list"` + + // If the results of a search are large, only a portion of the results are returned, + // and a nextToken pagination token is returned in the response. To retrieve + // the next batch of results, reissue the search request and include the returned + // token. When all results have been returned, the response does not contain + // a pagination token value. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` +} + +// String returns the string representation +func (s DescribeEventAggregatesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventAggregatesOutput) GoString() string { + return s.String() +} + +// SetEventAggregates sets the EventAggregates field's value. +func (s *DescribeEventAggregatesOutput) SetEventAggregates(v []*EventAggregate) *DescribeEventAggregatesOutput { + s.EventAggregates = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeEventAggregatesOutput) SetNextToken(v string) *DescribeEventAggregatesOutput { + s.NextToken = &v + return s +} + +type DescribeEventDetailsForOrganizationInput struct { + _ struct{} `type:"structure"` + + // The locale (language) to return information in. English (en) is the default + // and the only supported value at this time. + Locale *string `locationName:"locale" min:"2" type:"string"` + + // A set of JSON elements that includes the awsAccountId and the eventArn. + // + // OrganizationEventDetailFilters is a required field + OrganizationEventDetailFilters []*EventAccountFilter `locationName:"organizationEventDetailFilters" min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribeEventDetailsForOrganizationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventDetailsForOrganizationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEventDetailsForOrganizationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEventDetailsForOrganizationInput"} + if s.Locale != nil && len(*s.Locale) < 2 { + invalidParams.Add(request.NewErrParamMinLen("Locale", 2)) + } + if s.OrganizationEventDetailFilters == nil { + invalidParams.Add(request.NewErrParamRequired("OrganizationEventDetailFilters")) + } + if s.OrganizationEventDetailFilters != nil && len(s.OrganizationEventDetailFilters) < 1 { + invalidParams.Add(request.NewErrParamMinLen("OrganizationEventDetailFilters", 1)) + } + if s.OrganizationEventDetailFilters != nil { + for i, v := range s.OrganizationEventDetailFilters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OrganizationEventDetailFilters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLocale sets the Locale field's value. +func (s *DescribeEventDetailsForOrganizationInput) SetLocale(v string) *DescribeEventDetailsForOrganizationInput { + s.Locale = &v + return s +} + +// SetOrganizationEventDetailFilters sets the OrganizationEventDetailFilters field's value. +func (s *DescribeEventDetailsForOrganizationInput) SetOrganizationEventDetailFilters(v []*EventAccountFilter) *DescribeEventDetailsForOrganizationInput { + s.OrganizationEventDetailFilters = v + return s +} + +type DescribeEventDetailsForOrganizationOutput struct { + _ struct{} `type:"structure"` + + // Error messages for any events that could not be retrieved. + FailedSet []*OrganizationEventDetailsErrorItem `locationName:"failedSet" type:"list"` + + // Information about the events that could be retrieved. + SuccessfulSet []*OrganizationEventDetails `locationName:"successfulSet" type:"list"` +} + +// String returns the string representation +func (s DescribeEventDetailsForOrganizationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventDetailsForOrganizationOutput) GoString() string { + return s.String() +} + +// SetFailedSet sets the FailedSet field's value. +func (s *DescribeEventDetailsForOrganizationOutput) SetFailedSet(v []*OrganizationEventDetailsErrorItem) *DescribeEventDetailsForOrganizationOutput { + s.FailedSet = v + return s +} + +// SetSuccessfulSet sets the SuccessfulSet field's value. +func (s *DescribeEventDetailsForOrganizationOutput) SetSuccessfulSet(v []*OrganizationEventDetails) *DescribeEventDetailsForOrganizationOutput { + s.SuccessfulSet = v + return s +} + +type DescribeEventDetailsInput struct { + _ struct{} `type:"structure"` + + // A list of event ARNs (unique identifiers). For example: "arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-CDE456", + // "arn:aws:health:us-west-1::event/EBS/AWS_EBS_LOST_VOLUME/AWS_EBS_LOST_VOLUME_CHI789_JKL101" + // + // EventArns is a required field + EventArns []*string `locationName:"eventArns" min:"1" type:"list" required:"true"` + + // The locale (language) to return information in. English (en) is the default + // and the only supported value at this time. + Locale *string `locationName:"locale" min:"2" type:"string"` +} + +// String returns the string representation +func (s DescribeEventDetailsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventDetailsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEventDetailsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEventDetailsInput"} + if s.EventArns == nil { + invalidParams.Add(request.NewErrParamRequired("EventArns")) + } + if s.EventArns != nil && len(s.EventArns) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventArns", 1)) + } + if s.Locale != nil && len(*s.Locale) < 2 { + invalidParams.Add(request.NewErrParamMinLen("Locale", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEventArns sets the EventArns field's value. +func (s *DescribeEventDetailsInput) SetEventArns(v []*string) *DescribeEventDetailsInput { + s.EventArns = v + return s +} + +// SetLocale sets the Locale field's value. +func (s *DescribeEventDetailsInput) SetLocale(v string) *DescribeEventDetailsInput { + s.Locale = &v + return s +} + +type DescribeEventDetailsOutput struct { + _ struct{} `type:"structure"` + + // Error messages for any events that could not be retrieved. + FailedSet []*EventDetailsErrorItem `locationName:"failedSet" type:"list"` + + // Information about the events that could be retrieved. + SuccessfulSet []*EventDetails `locationName:"successfulSet" type:"list"` +} + +// String returns the string representation +func (s DescribeEventDetailsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventDetailsOutput) GoString() string { + return s.String() +} + +// SetFailedSet sets the FailedSet field's value. +func (s *DescribeEventDetailsOutput) SetFailedSet(v []*EventDetailsErrorItem) *DescribeEventDetailsOutput { + s.FailedSet = v + return s +} + +// SetSuccessfulSet sets the SuccessfulSet field's value. +func (s *DescribeEventDetailsOutput) SetSuccessfulSet(v []*EventDetails) *DescribeEventDetailsOutput { + s.SuccessfulSet = v + return s +} + +type DescribeEventTypesInput struct { + _ struct{} `type:"structure"` + + // Values to narrow the results returned. + Filter *EventTypeFilter `locationName:"filter" type:"structure"` + + // The locale (language) to return information in. English (en) is the default + // and the only supported value at this time. + Locale *string `locationName:"locale" min:"2" type:"string"` + + // The maximum number of items to return in one batch, between 10 and 100, inclusive. + MaxResults *int64 `locationName:"maxResults" min:"10" type:"integer"` + + // If the results of a search are large, only a portion of the results are returned, + // and a nextToken pagination token is returned in the response. To retrieve + // the next batch of results, reissue the search request and include the returned + // token. When all results have been returned, the response does not contain + // a pagination token value. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` +} + +// String returns the string representation +func (s DescribeEventTypesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventTypesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEventTypesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEventTypesInput"} + if s.Locale != nil && len(*s.Locale) < 2 { + invalidParams.Add(request.NewErrParamMinLen("Locale", 2)) + } + if s.MaxResults != nil && *s.MaxResults < 10 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) + } + if s.NextToken != nil && len(*s.NextToken) < 4 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) + } + if s.Filter != nil { + if err := s.Filter.Validate(); err != nil { + invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilter sets the Filter field's value. +func (s *DescribeEventTypesInput) SetFilter(v *EventTypeFilter) *DescribeEventTypesInput { + s.Filter = v + return s +} + +// SetLocale sets the Locale field's value. +func (s *DescribeEventTypesInput) SetLocale(v string) *DescribeEventTypesInput { + s.Locale = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeEventTypesInput) SetMaxResults(v int64) *DescribeEventTypesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeEventTypesInput) SetNextToken(v string) *DescribeEventTypesInput { + s.NextToken = &v + return s +} + +type DescribeEventTypesOutput struct { + _ struct{} `type:"structure"` + + // A list of event types that match the filter criteria. Event types have a + // category (issue, accountNotification, or scheduledChange), a service (for + // example, EC2, RDS, DATAPIPELINE, BILLING), and a code (in the format AWS_SERVICE_DESCRIPTION + // ; for example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT). + EventTypes []*EventType `locationName:"eventTypes" type:"list"` + + // If the results of a search are large, only a portion of the results are returned, + // and a nextToken pagination token is returned in the response. To retrieve + // the next batch of results, reissue the search request and include the returned + // token. When all results have been returned, the response does not contain + // a pagination token value. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` +} + +// String returns the string representation +func (s DescribeEventTypesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventTypesOutput) GoString() string { + return s.String() +} + +// SetEventTypes sets the EventTypes field's value. +func (s *DescribeEventTypesOutput) SetEventTypes(v []*EventType) *DescribeEventTypesOutput { + s.EventTypes = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeEventTypesOutput) SetNextToken(v string) *DescribeEventTypesOutput { + s.NextToken = &v + return s +} + +type DescribeEventsForOrganizationInput struct { + _ struct{} `type:"structure"` + + // Values to narrow the results returned. + Filter *OrganizationEventFilter `locationName:"filter" type:"structure"` + + // The locale (language) to return information in. English (en) is the default + // and the only supported value at this time. + Locale *string `locationName:"locale" min:"2" type:"string"` + + // The maximum number of items to return in one batch, between 10 and 100, inclusive. + MaxResults *int64 `locationName:"maxResults" min:"10" type:"integer"` + + // If the results of a search are large, only a portion of the results are returned, + // and a nextToken pagination token is returned in the response. To retrieve + // the next batch of results, reissue the search request and include the returned + // token. When all results have been returned, the response does not contain + // a pagination token value. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` +} + +// String returns the string representation +func (s DescribeEventsForOrganizationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventsForOrganizationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEventsForOrganizationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEventsForOrganizationInput"} + if s.Locale != nil && len(*s.Locale) < 2 { + invalidParams.Add(request.NewErrParamMinLen("Locale", 2)) + } + if s.MaxResults != nil && *s.MaxResults < 10 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) + } + if s.NextToken != nil && len(*s.NextToken) < 4 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) + } + if s.Filter != nil { + if err := s.Filter.Validate(); err != nil { + invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilter sets the Filter field's value. +func (s *DescribeEventsForOrganizationInput) SetFilter(v *OrganizationEventFilter) *DescribeEventsForOrganizationInput { + s.Filter = v + return s +} + +// SetLocale sets the Locale field's value. +func (s *DescribeEventsForOrganizationInput) SetLocale(v string) *DescribeEventsForOrganizationInput { + s.Locale = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeEventsForOrganizationInput) SetMaxResults(v int64) *DescribeEventsForOrganizationInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeEventsForOrganizationInput) SetNextToken(v string) *DescribeEventsForOrganizationInput { + s.NextToken = &v + return s +} + +type DescribeEventsForOrganizationOutput struct { + _ struct{} `type:"structure"` + + // The events that match the specified filter criteria. + Events []*OrganizationEvent `locationName:"events" type:"list"` - // The ending date and time of a time range. - To *time.Time `locationName:"to" type:"timestamp"` + // If the results of a search are large, only a portion of the results are returned, + // and a nextToken pagination token is returned in the response. To retrieve + // the next batch of results, reissue the search request and include the returned + // token. When all results have been returned, the response does not contain + // a pagination token value. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` } // String returns the string representation -func (s DateTimeRange) String() string { +func (s DescribeEventsForOrganizationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DateTimeRange) GoString() string { +func (s DescribeEventsForOrganizationOutput) GoString() string { return s.String() } -// SetFrom sets the From field's value. -func (s *DateTimeRange) SetFrom(v time.Time) *DateTimeRange { - s.From = &v +// SetEvents sets the Events field's value. +func (s *DescribeEventsForOrganizationOutput) SetEvents(v []*OrganizationEvent) *DescribeEventsForOrganizationOutput { + s.Events = v return s } -// SetTo sets the To field's value. -func (s *DateTimeRange) SetTo(v time.Time) *DateTimeRange { - s.To = &v +// SetNextToken sets the NextToken field's value. +func (s *DescribeEventsForOrganizationOutput) SetNextToken(v string) *DescribeEventsForOrganizationOutput { + s.NextToken = &v return s } -type DescribeAffectedEntitiesInput struct { +type DescribeEventsInput struct { _ struct{} `type:"structure"` - // Values to narrow the results returned. At least one event ARN is required. - // - // Filter is a required field - Filter *EntityFilter `locationName:"filter" type:"structure" required:"true"` + // Values to narrow the results returned. + Filter *EventFilter `locationName:"filter" type:"structure"` // The locale (language) to return information in. English (en) is the default // and the only supported value at this time. @@ -894,31 +2635,31 @@ type DescribeAffectedEntitiesInput struct { // the next batch of results, reissue the search request and include the returned // token. When all results have been returned, the response does not contain // a pagination token value. - NextToken *string `locationName:"nextToken" type:"string"` + NextToken *string `locationName:"nextToken" min:"4" type:"string"` } // String returns the string representation -func (s DescribeAffectedEntitiesInput) String() string { +func (s DescribeEventsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeAffectedEntitiesInput) GoString() string { +func (s DescribeEventsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAffectedEntitiesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAffectedEntitiesInput"} - if s.Filter == nil { - invalidParams.Add(request.NewErrParamRequired("Filter")) - } +func (s *DescribeEventsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEventsInput"} if s.Locale != nil && len(*s.Locale) < 2 { invalidParams.Add(request.NewErrParamMinLen("Locale", 2)) } if s.MaxResults != nil && *s.MaxResults < 10 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) } + if s.NextToken != nil && len(*s.NextToken) < 4 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) + } if s.Filter != nil { if err := s.Filter.Validate(); err != nil { invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) @@ -932,89 +2673,253 @@ func (s *DescribeAffectedEntitiesInput) Validate() error { } // SetFilter sets the Filter field's value. -func (s *DescribeAffectedEntitiesInput) SetFilter(v *EntityFilter) *DescribeAffectedEntitiesInput { +func (s *DescribeEventsInput) SetFilter(v *EventFilter) *DescribeEventsInput { s.Filter = v return s } // SetLocale sets the Locale field's value. -func (s *DescribeAffectedEntitiesInput) SetLocale(v string) *DescribeAffectedEntitiesInput { +func (s *DescribeEventsInput) SetLocale(v string) *DescribeEventsInput { s.Locale = &v return s } // SetMaxResults sets the MaxResults field's value. -func (s *DescribeAffectedEntitiesInput) SetMaxResults(v int64) *DescribeAffectedEntitiesInput { +func (s *DescribeEventsInput) SetMaxResults(v int64) *DescribeEventsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. -func (s *DescribeAffectedEntitiesInput) SetNextToken(v string) *DescribeAffectedEntitiesInput { +func (s *DescribeEventsInput) SetNextToken(v string) *DescribeEventsInput { s.NextToken = &v return s } -type DescribeAffectedEntitiesOutput struct { +type DescribeEventsOutput struct { _ struct{} `type:"structure"` - // The entities that match the filter criteria. - Entities []*AffectedEntity `locationName:"entities" type:"list"` + // The events that match the specified filter criteria. + Events []*Event `locationName:"events" type:"list"` // If the results of a search are large, only a portion of the results are returned, // and a nextToken pagination token is returned in the response. To retrieve // the next batch of results, reissue the search request and include the returned // token. When all results have been returned, the response does not contain // a pagination token value. - NextToken *string `locationName:"nextToken" type:"string"` + NextToken *string `locationName:"nextToken" min:"4" type:"string"` } // String returns the string representation -func (s DescribeAffectedEntitiesOutput) String() string { +func (s DescribeEventsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeAffectedEntitiesOutput) GoString() string { +func (s DescribeEventsOutput) GoString() string { return s.String() } -// SetEntities sets the Entities field's value. -func (s *DescribeAffectedEntitiesOutput) SetEntities(v []*AffectedEntity) *DescribeAffectedEntitiesOutput { - s.Entities = v +// SetEvents sets the Events field's value. +func (s *DescribeEventsOutput) SetEvents(v []*Event) *DescribeEventsOutput { + s.Events = v return s } // SetNextToken sets the NextToken field's value. -func (s *DescribeAffectedEntitiesOutput) SetNextToken(v string) *DescribeAffectedEntitiesOutput { +func (s *DescribeEventsOutput) SetNextToken(v string) *DescribeEventsOutput { s.NextToken = &v return s } -type DescribeEntityAggregatesInput struct { +type DescribeHealthServiceStatusForOrganizationInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DescribeHealthServiceStatusForOrganizationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeHealthServiceStatusForOrganizationInput) GoString() string { + return s.String() +} + +type DescribeHealthServiceStatusForOrganizationOutput struct { + _ struct{} `type:"structure"` + + // Information about the status of enabling or disabling AWS Health Organizational + // View in your organization. + // + // Valid values are ENABLED | DISABLED | PENDING. + HealthServiceAccessStatusForOrganization *string `locationName:"healthServiceAccessStatusForOrganization" type:"string"` +} + +// String returns the string representation +func (s DescribeHealthServiceStatusForOrganizationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeHealthServiceStatusForOrganizationOutput) GoString() string { + return s.String() +} + +// SetHealthServiceAccessStatusForOrganization sets the HealthServiceAccessStatusForOrganization field's value. +func (s *DescribeHealthServiceStatusForOrganizationOutput) SetHealthServiceAccessStatusForOrganization(v string) *DescribeHealthServiceStatusForOrganizationOutput { + s.HealthServiceAccessStatusForOrganization = &v + return s +} + +type DisableHealthServiceAccessForOrganizationInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisableHealthServiceAccessForOrganizationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableHealthServiceAccessForOrganizationInput) GoString() string { + return s.String() +} + +type DisableHealthServiceAccessForOrganizationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisableHealthServiceAccessForOrganizationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableHealthServiceAccessForOrganizationOutput) GoString() string { + return s.String() +} + +type EnableHealthServiceAccessForOrganizationInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s EnableHealthServiceAccessForOrganizationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableHealthServiceAccessForOrganizationInput) GoString() string { + return s.String() +} + +type EnableHealthServiceAccessForOrganizationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s EnableHealthServiceAccessForOrganizationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableHealthServiceAccessForOrganizationOutput) GoString() string { + return s.String() +} + +// The number of entities that are affected by one or more events. Returned +// by the DescribeEntityAggregates operation. +type EntityAggregate struct { + _ struct{} `type:"structure"` + + // The number entities that match the criteria for the specified events. + Count *int64 `locationName:"count" type:"integer"` + + // The unique identifier for the event. Format: arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID + // . Example: Example: arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456 + EventArn *string `locationName:"eventArn" type:"string"` +} + +// String returns the string representation +func (s EntityAggregate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EntityAggregate) GoString() string { + return s.String() +} + +// SetCount sets the Count field's value. +func (s *EntityAggregate) SetCount(v int64) *EntityAggregate { + s.Count = &v + return s +} + +// SetEventArn sets the EventArn field's value. +func (s *EntityAggregate) SetEventArn(v string) *EntityAggregate { + s.EventArn = &v + return s +} + +// The values to use to filter results from the DescribeAffectedEntities operation. +type EntityFilter struct { _ struct{} `type:"structure"` + // A list of entity ARNs (unique identifiers). + EntityArns []*string `locationName:"entityArns" min:"1" type:"list"` + + // A list of IDs for affected entities. + EntityValues []*string `locationName:"entityValues" min:"1" type:"list"` + // A list of event ARNs (unique identifiers). For example: "arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-CDE456", // "arn:aws:health:us-west-1::event/EBS/AWS_EBS_LOST_VOLUME/AWS_EBS_LOST_VOLUME_CHI789_JKL101" - EventArns []*string `locationName:"eventArns" min:"1" type:"list"` + // + // EventArns is a required field + EventArns []*string `locationName:"eventArns" min:"1" type:"list" required:"true"` + + // A list of the most recent dates and times that the entity was updated. + LastUpdatedTimes []*DateTimeRange `locationName:"lastUpdatedTimes" min:"1" type:"list"` + + // A list of entity status codes (IMPAIRED, UNIMPAIRED, or UNKNOWN). + StatusCodes []*string `locationName:"statusCodes" min:"1" type:"list"` + + // A map of entity tags attached to the affected entity. + Tags []map[string]*string `locationName:"tags" type:"list"` } // String returns the string representation -func (s DescribeEntityAggregatesInput) String() string { +func (s EntityFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeEntityAggregatesInput) GoString() string { +func (s EntityFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEntityAggregatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEntityAggregatesInput"} +func (s *EntityFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EntityFilter"} + if s.EntityArns != nil && len(s.EntityArns) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EntityArns", 1)) + } + if s.EntityValues != nil && len(s.EntityValues) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EntityValues", 1)) + } + if s.EventArns == nil { + invalidParams.Add(request.NewErrParamRequired("EventArns")) + } if s.EventArns != nil && len(s.EventArns) < 1 { invalidParams.Add(request.NewErrParamMinLen("EventArns", 1)) } + if s.LastUpdatedTimes != nil && len(s.LastUpdatedTimes) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LastUpdatedTimes", 1)) + } + if s.StatusCodes != nil && len(s.StatusCodes) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StatusCodes", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -1022,183 +2927,186 @@ func (s *DescribeEntityAggregatesInput) Validate() error { return nil } +// SetEntityArns sets the EntityArns field's value. +func (s *EntityFilter) SetEntityArns(v []*string) *EntityFilter { + s.EntityArns = v + return s +} + +// SetEntityValues sets the EntityValues field's value. +func (s *EntityFilter) SetEntityValues(v []*string) *EntityFilter { + s.EntityValues = v + return s +} + // SetEventArns sets the EventArns field's value. -func (s *DescribeEntityAggregatesInput) SetEventArns(v []*string) *DescribeEntityAggregatesInput { +func (s *EntityFilter) SetEventArns(v []*string) *EntityFilter { s.EventArns = v return s } -type DescribeEntityAggregatesOutput struct { +// SetLastUpdatedTimes sets the LastUpdatedTimes field's value. +func (s *EntityFilter) SetLastUpdatedTimes(v []*DateTimeRange) *EntityFilter { + s.LastUpdatedTimes = v + return s +} + +// SetStatusCodes sets the StatusCodes field's value. +func (s *EntityFilter) SetStatusCodes(v []*string) *EntityFilter { + s.StatusCodes = v + return s +} + +// SetTags sets the Tags field's value. +func (s *EntityFilter) SetTags(v []map[string]*string) *EntityFilter { + s.Tags = v + return s +} + +// Summary information about an AWS Health event. +type Event struct { _ struct{} `type:"structure"` - // The number of entities that are affected by each of the specified events. - EntityAggregates []*EntityAggregate `locationName:"entityAggregates" type:"list"` -} + // The unique identifier for the event. Format: arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID + // . Example: Example: arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456 + Arn *string `locationName:"arn" type:"string"` -// String returns the string representation -func (s DescribeEntityAggregatesOutput) String() string { - return awsutil.Prettify(s) -} + // The AWS Availability Zone of the event. For example, us-east-1a. + AvailabilityZone *string `locationName:"availabilityZone" min:"6" type:"string"` -// GoString returns the string representation -func (s DescribeEntityAggregatesOutput) GoString() string { - return s.String() -} + // The date and time that the event ended. + EndTime *time.Time `locationName:"endTime" type:"timestamp"` -// SetEntityAggregates sets the EntityAggregates field's value. -func (s *DescribeEntityAggregatesOutput) SetEntityAggregates(v []*EntityAggregate) *DescribeEntityAggregatesOutput { - s.EntityAggregates = v - return s -} + // The category of the event. Possible values are issue, scheduledChange, and + // accountNotification. + EventTypeCategory *string `locationName:"eventTypeCategory" min:"3" type:"string" enum:"eventTypeCategory"` -type DescribeEventAggregatesInput struct { - _ struct{} `type:"structure"` + // The unique identifier for the event type. The format is AWS_SERVICE_DESCRIPTION + // ; for example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT. + EventTypeCode *string `locationName:"eventTypeCode" min:"3" type:"string"` - // The only currently supported value is eventTypeCategory. - // - // AggregateField is a required field - AggregateField *string `locationName:"aggregateField" type:"string" required:"true" enum:"eventAggregateField"` + // The most recent date and time that the event was updated. + LastUpdatedTime *time.Time `locationName:"lastUpdatedTime" type:"timestamp"` - // Values to narrow the results returned. - Filter *EventFilter `locationName:"filter" type:"structure"` + // The AWS region name of the event. + Region *string `locationName:"region" min:"2" type:"string"` - // The maximum number of items to return in one batch, between 10 and 100, inclusive. - MaxResults *int64 `locationName:"maxResults" min:"10" type:"integer"` + // The AWS service that is affected by the event. For example, EC2, RDS. + Service *string `locationName:"service" min:"2" type:"string"` - // If the results of a search are large, only a portion of the results are returned, - // and a nextToken pagination token is returned in the response. To retrieve - // the next batch of results, reissue the search request and include the returned - // token. When all results have been returned, the response does not contain - // a pagination token value. - NextToken *string `locationName:"nextToken" type:"string"` + // The date and time that the event began. + StartTime *time.Time `locationName:"startTime" type:"timestamp"` + + // The most recent status of the event. Possible values are open, closed, and + // upcoming. + StatusCode *string `locationName:"statusCode" type:"string" enum:"eventStatusCode"` } // String returns the string representation -func (s DescribeEventAggregatesInput) String() string { +func (s Event) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeEventAggregatesInput) GoString() string { +func (s Event) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEventAggregatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEventAggregatesInput"} - if s.AggregateField == nil { - invalidParams.Add(request.NewErrParamRequired("AggregateField")) - } - if s.MaxResults != nil && *s.MaxResults < 10 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) - } - if s.Filter != nil { - if err := s.Filter.Validate(); err != nil { - invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetArn sets the Arn field's value. +func (s *Event) SetArn(v string) *Event { + s.Arn = &v + return s } -// SetAggregateField sets the AggregateField field's value. -func (s *DescribeEventAggregatesInput) SetAggregateField(v string) *DescribeEventAggregatesInput { - s.AggregateField = &v +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *Event) SetAvailabilityZone(v string) *Event { + s.AvailabilityZone = &v return s } -// SetFilter sets the Filter field's value. -func (s *DescribeEventAggregatesInput) SetFilter(v *EventFilter) *DescribeEventAggregatesInput { - s.Filter = v +// SetEndTime sets the EndTime field's value. +func (s *Event) SetEndTime(v time.Time) *Event { + s.EndTime = &v return s } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeEventAggregatesInput) SetMaxResults(v int64) *DescribeEventAggregatesInput { - s.MaxResults = &v +// SetEventTypeCategory sets the EventTypeCategory field's value. +func (s *Event) SetEventTypeCategory(v string) *Event { + s.EventTypeCategory = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeEventAggregatesInput) SetNextToken(v string) *DescribeEventAggregatesInput { - s.NextToken = &v +// SetEventTypeCode sets the EventTypeCode field's value. +func (s *Event) SetEventTypeCode(v string) *Event { + s.EventTypeCode = &v return s } -type DescribeEventAggregatesOutput struct { - _ struct{} `type:"structure"` - - // The number of events in each category that meet the optional filter criteria. - EventAggregates []*EventAggregate `locationName:"eventAggregates" type:"list"` - - // If the results of a search are large, only a portion of the results are returned, - // and a nextToken pagination token is returned in the response. To retrieve - // the next batch of results, reissue the search request and include the returned - // token. When all results have been returned, the response does not contain - // a pagination token value. - NextToken *string `locationName:"nextToken" type:"string"` +// SetLastUpdatedTime sets the LastUpdatedTime field's value. +func (s *Event) SetLastUpdatedTime(v time.Time) *Event { + s.LastUpdatedTime = &v + return s } -// String returns the string representation -func (s DescribeEventAggregatesOutput) String() string { - return awsutil.Prettify(s) +// SetRegion sets the Region field's value. +func (s *Event) SetRegion(v string) *Event { + s.Region = &v + return s } -// GoString returns the string representation -func (s DescribeEventAggregatesOutput) GoString() string { - return s.String() +// SetService sets the Service field's value. +func (s *Event) SetService(v string) *Event { + s.Service = &v + return s } -// SetEventAggregates sets the EventAggregates field's value. -func (s *DescribeEventAggregatesOutput) SetEventAggregates(v []*EventAggregate) *DescribeEventAggregatesOutput { - s.EventAggregates = v +// SetStartTime sets the StartTime field's value. +func (s *Event) SetStartTime(v time.Time) *Event { + s.StartTime = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeEventAggregatesOutput) SetNextToken(v string) *DescribeEventAggregatesOutput { - s.NextToken = &v +// SetStatusCode sets the StatusCode field's value. +func (s *Event) SetStatusCode(v string) *Event { + s.StatusCode = &v return s } -type DescribeEventDetailsInput struct { +// The values used to filter results from the DescribeEventDetailsForOrganization +// and DescribeAffectedEntitiesForOrganization operations. +type EventAccountFilter struct { _ struct{} `type:"structure"` - // A list of event ARNs (unique identifiers). For example: "arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-CDE456", - // "arn:aws:health:us-west-1::event/EBS/AWS_EBS_LOST_VOLUME/AWS_EBS_LOST_VOLUME_CHI789_JKL101" + // The 12-digit AWS account numbers that contains the affected entities. // - // EventArns is a required field - EventArns []*string `locationName:"eventArns" min:"1" type:"list" required:"true"` + // AwsAccountId is a required field + AwsAccountId *string `locationName:"awsAccountId" type:"string" required:"true"` - // The locale (language) to return information in. English (en) is the default - // and the only supported value at this time. - Locale *string `locationName:"locale" min:"2" type:"string"` + // The unique identifier for the event. Format: arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID + // . Example: Example: arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456 + // + // EventArn is a required field + EventArn *string `locationName:"eventArn" type:"string" required:"true"` } // String returns the string representation -func (s DescribeEventDetailsInput) String() string { +func (s EventAccountFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeEventDetailsInput) GoString() string { +func (s EventAccountFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEventDetailsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEventDetailsInput"} - if s.EventArns == nil { - invalidParams.Add(request.NewErrParamRequired("EventArns")) - } - if s.EventArns != nil && len(s.EventArns) < 1 { - invalidParams.Add(request.NewErrParamMinLen("EventArns", 1)) +func (s *EventAccountFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EventAccountFilter"} + if s.AwsAccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AwsAccountId")) } - if s.Locale != nil && len(*s.Locale) < 2 { - invalidParams.Add(request.NewErrParamMinLen("Locale", 2)) + if s.EventArn == nil { + invalidParams.Add(request.NewErrParamRequired("EventArn")) } if invalidParams.Len() > 0 { @@ -1207,209 +3115,257 @@ func (s *DescribeEventDetailsInput) Validate() error { return nil } -// SetEventArns sets the EventArns field's value. -func (s *DescribeEventDetailsInput) SetEventArns(v []*string) *DescribeEventDetailsInput { - s.EventArns = v +// SetAwsAccountId sets the AwsAccountId field's value. +func (s *EventAccountFilter) SetAwsAccountId(v string) *EventAccountFilter { + s.AwsAccountId = &v return s } -// SetLocale sets the Locale field's value. -func (s *DescribeEventDetailsInput) SetLocale(v string) *DescribeEventDetailsInput { - s.Locale = &v +// SetEventArn sets the EventArn field's value. +func (s *EventAccountFilter) SetEventArn(v string) *EventAccountFilter { + s.EventArn = &v return s } -type DescribeEventDetailsOutput struct { +// The number of events of each issue type. Returned by the DescribeEventAggregates +// operation. +type EventAggregate struct { _ struct{} `type:"structure"` - // Error messages for any events that could not be retrieved. - FailedSet []*EventDetailsErrorItem `locationName:"failedSet" type:"list"` + // The issue type for the associated count. + AggregateValue *string `locationName:"aggregateValue" type:"string"` - // Information about the events that could be retrieved. - SuccessfulSet []*EventDetails `locationName:"successfulSet" type:"list"` + // The number of events of the associated issue type. + Count *int64 `locationName:"count" type:"integer"` } // String returns the string representation -func (s DescribeEventDetailsOutput) String() string { +func (s EventAggregate) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeEventDetailsOutput) GoString() string { +func (s EventAggregate) GoString() string { return s.String() } -// SetFailedSet sets the FailedSet field's value. -func (s *DescribeEventDetailsOutput) SetFailedSet(v []*EventDetailsErrorItem) *DescribeEventDetailsOutput { - s.FailedSet = v +// SetAggregateValue sets the AggregateValue field's value. +func (s *EventAggregate) SetAggregateValue(v string) *EventAggregate { + s.AggregateValue = &v return s } -// SetSuccessfulSet sets the SuccessfulSet field's value. -func (s *DescribeEventDetailsOutput) SetSuccessfulSet(v []*EventDetails) *DescribeEventDetailsOutput { - s.SuccessfulSet = v +// SetCount sets the Count field's value. +func (s *EventAggregate) SetCount(v int64) *EventAggregate { + s.Count = &v return s } -type DescribeEventTypesInput struct { +// The detailed description of the event. Included in the information returned +// by the DescribeEventDetails operation. +type EventDescription struct { _ struct{} `type:"structure"` - // Values to narrow the results returned. - Filter *EventTypeFilter `locationName:"filter" type:"structure"` + // The most recent description of the event. + LatestDescription *string `locationName:"latestDescription" type:"string"` +} - // The locale (language) to return information in. English (en) is the default - // and the only supported value at this time. - Locale *string `locationName:"locale" min:"2" type:"string"` +// String returns the string representation +func (s EventDescription) String() string { + return awsutil.Prettify(s) +} - // The maximum number of items to return in one batch, between 10 and 100, inclusive. - MaxResults *int64 `locationName:"maxResults" min:"10" type:"integer"` +// GoString returns the string representation +func (s EventDescription) GoString() string { + return s.String() +} - // If the results of a search are large, only a portion of the results are returned, - // and a nextToken pagination token is returned in the response. To retrieve - // the next batch of results, reissue the search request and include the returned - // token. When all results have been returned, the response does not contain - // a pagination token value. - NextToken *string `locationName:"nextToken" type:"string"` +// SetLatestDescription sets the LatestDescription field's value. +func (s *EventDescription) SetLatestDescription(v string) *EventDescription { + s.LatestDescription = &v + return s +} + +// Detailed information about an event. A combination of an Event object, an +// EventDescription object, and additional metadata about the event. Returned +// by the DescribeEventDetails operation. +type EventDetails struct { + _ struct{} `type:"structure"` + + // Summary information about the event. + Event *Event `locationName:"event" type:"structure"` + + // The most recent description of the event. + EventDescription *EventDescription `locationName:"eventDescription" type:"structure"` + + // Additional metadata about the event. + EventMetadata map[string]*string `locationName:"eventMetadata" type:"map"` } // String returns the string representation -func (s DescribeEventTypesInput) String() string { +func (s EventDetails) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeEventTypesInput) GoString() string { +func (s EventDetails) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEventTypesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEventTypesInput"} - if s.Locale != nil && len(*s.Locale) < 2 { - invalidParams.Add(request.NewErrParamMinLen("Locale", 2)) - } - if s.MaxResults != nil && *s.MaxResults < 10 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) - } - if s.Filter != nil { - if err := s.Filter.Validate(); err != nil { - invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilter sets the Filter field's value. -func (s *DescribeEventTypesInput) SetFilter(v *EventTypeFilter) *DescribeEventTypesInput { - s.Filter = v - return s -} - -// SetLocale sets the Locale field's value. -func (s *DescribeEventTypesInput) SetLocale(v string) *DescribeEventTypesInput { - s.Locale = &v +// SetEvent sets the Event field's value. +func (s *EventDetails) SetEvent(v *Event) *EventDetails { + s.Event = v return s } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeEventTypesInput) SetMaxResults(v int64) *DescribeEventTypesInput { - s.MaxResults = &v +// SetEventDescription sets the EventDescription field's value. +func (s *EventDetails) SetEventDescription(v *EventDescription) *EventDetails { + s.EventDescription = v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeEventTypesInput) SetNextToken(v string) *DescribeEventTypesInput { - s.NextToken = &v +// SetEventMetadata sets the EventMetadata field's value. +func (s *EventDetails) SetEventMetadata(v map[string]*string) *EventDetails { + s.EventMetadata = v return s } -type DescribeEventTypesOutput struct { +// Error information returned when a DescribeEventDetails operation cannot find +// a specified event. +type EventDetailsErrorItem struct { _ struct{} `type:"structure"` - // A list of event types that match the filter criteria. Event types have a - // category (issue, accountNotification, or scheduledChange), a service (for - // example, EC2, RDS, DATAPIPELINE, BILLING), and a code (in the format AWS_SERVICE_DESCRIPTION - // ; for example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT). - EventTypes []*EventType `locationName:"eventTypes" type:"list"` + // A message that describes the error. + ErrorMessage *string `locationName:"errorMessage" type:"string"` - // If the results of a search are large, only a portion of the results are returned, - // and a nextToken pagination token is returned in the response. To retrieve - // the next batch of results, reissue the search request and include the returned - // token. When all results have been returned, the response does not contain - // a pagination token value. - NextToken *string `locationName:"nextToken" type:"string"` + // The name of the error. + ErrorName *string `locationName:"errorName" type:"string"` + + // The unique identifier for the event. Format: arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID + // . Example: Example: arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456 + EventArn *string `locationName:"eventArn" type:"string"` } // String returns the string representation -func (s DescribeEventTypesOutput) String() string { +func (s EventDetailsErrorItem) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeEventTypesOutput) GoString() string { +func (s EventDetailsErrorItem) GoString() string { return s.String() } -// SetEventTypes sets the EventTypes field's value. -func (s *DescribeEventTypesOutput) SetEventTypes(v []*EventType) *DescribeEventTypesOutput { - s.EventTypes = v +// SetErrorMessage sets the ErrorMessage field's value. +func (s *EventDetailsErrorItem) SetErrorMessage(v string) *EventDetailsErrorItem { + s.ErrorMessage = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeEventTypesOutput) SetNextToken(v string) *DescribeEventTypesOutput { - s.NextToken = &v +// SetErrorName sets the ErrorName field's value. +func (s *EventDetailsErrorItem) SetErrorName(v string) *EventDetailsErrorItem { + s.ErrorName = &v return s } -type DescribeEventsInput struct { +// SetEventArn sets the EventArn field's value. +func (s *EventDetailsErrorItem) SetEventArn(v string) *EventDetailsErrorItem { + s.EventArn = &v + return s +} + +// The values to use to filter results from the DescribeEvents and DescribeEventAggregates +// operations. +type EventFilter struct { _ struct{} `type:"structure"` - // Values to narrow the results returned. - Filter *EventFilter `locationName:"filter" type:"structure"` + // A list of AWS availability zones. + AvailabilityZones []*string `locationName:"availabilityZones" type:"list"` - // The locale (language) to return information in. English (en) is the default - // and the only supported value at this time. - Locale *string `locationName:"locale" min:"2" type:"string"` + // A list of dates and times that the event ended. + EndTimes []*DateTimeRange `locationName:"endTimes" min:"1" type:"list"` - // The maximum number of items to return in one batch, between 10 and 100, inclusive. - MaxResults *int64 `locationName:"maxResults" min:"10" type:"integer"` + // A list of entity ARNs (unique identifiers). + EntityArns []*string `locationName:"entityArns" min:"1" type:"list"` - // If the results of a search are large, only a portion of the results are returned, - // and a nextToken pagination token is returned in the response. To retrieve - // the next batch of results, reissue the search request and include the returned - // token. When all results have been returned, the response does not contain - // a pagination token value. - NextToken *string `locationName:"nextToken" type:"string"` + // A list of entity identifiers, such as EC2 instance IDs (i-34ab692e) or EBS + // volumes (vol-426ab23e). + EntityValues []*string `locationName:"entityValues" min:"1" type:"list"` + + // A list of event ARNs (unique identifiers). For example: "arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-CDE456", + // "arn:aws:health:us-west-1::event/EBS/AWS_EBS_LOST_VOLUME/AWS_EBS_LOST_VOLUME_CHI789_JKL101" + EventArns []*string `locationName:"eventArns" min:"1" type:"list"` + + // A list of event status codes. + EventStatusCodes []*string `locationName:"eventStatusCodes" min:"1" type:"list"` + + // A list of event type category codes (issue, scheduledChange, or accountNotification). + EventTypeCategories []*string `locationName:"eventTypeCategories" min:"1" type:"list"` + + // A list of unique identifiers for event types. For example, "AWS_EC2_SYSTEM_MAINTENANCE_EVENT","AWS_RDS_MAINTENANCE_SCHEDULED". + EventTypeCodes []*string `locationName:"eventTypeCodes" min:"1" type:"list"` + + // A list of dates and times that the event was last updated. + LastUpdatedTimes []*DateTimeRange `locationName:"lastUpdatedTimes" min:"1" type:"list"` + + // A list of AWS regions. + Regions []*string `locationName:"regions" min:"1" type:"list"` + + // The AWS services associated with the event. For example, EC2, RDS. + Services []*string `locationName:"services" min:"1" type:"list"` + + // A list of dates and times that the event began. + StartTimes []*DateTimeRange `locationName:"startTimes" min:"1" type:"list"` + + // A map of entity tags attached to the affected entity. + Tags []map[string]*string `locationName:"tags" type:"list"` } // String returns the string representation -func (s DescribeEventsInput) String() string { +func (s EventFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeEventsInput) GoString() string { +func (s EventFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeEventsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeEventsInput"} - if s.Locale != nil && len(*s.Locale) < 2 { - invalidParams.Add(request.NewErrParamMinLen("Locale", 2)) +func (s *EventFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EventFilter"} + if s.EndTimes != nil && len(s.EndTimes) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EndTimes", 1)) } - if s.MaxResults != nil && *s.MaxResults < 10 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 10)) + if s.EntityArns != nil && len(s.EntityArns) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EntityArns", 1)) } - if s.Filter != nil { - if err := s.Filter.Validate(); err != nil { - invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) - } + if s.EntityValues != nil && len(s.EntityValues) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EntityValues", 1)) + } + if s.EventArns != nil && len(s.EventArns) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventArns", 1)) + } + if s.EventStatusCodes != nil && len(s.EventStatusCodes) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventStatusCodes", 1)) + } + if s.EventTypeCategories != nil && len(s.EventTypeCategories) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventTypeCategories", 1)) + } + if s.EventTypeCodes != nil && len(s.EventTypeCodes) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventTypeCodes", 1)) + } + if s.LastUpdatedTimes != nil && len(s.LastUpdatedTimes) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LastUpdatedTimes", 1)) + } + if s.Regions != nil && len(s.Regions) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Regions", 1)) + } + if s.Services != nil && len(s.Services) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Services", 1)) + } + if s.StartTimes != nil && len(s.StartTimes) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StartTimes", 1)) } if invalidParams.Len() > 0 { @@ -1418,157 +3374,164 @@ func (s *DescribeEventsInput) Validate() error { return nil } -// SetFilter sets the Filter field's value. -func (s *DescribeEventsInput) SetFilter(v *EventFilter) *DescribeEventsInput { - s.Filter = v +// SetAvailabilityZones sets the AvailabilityZones field's value. +func (s *EventFilter) SetAvailabilityZones(v []*string) *EventFilter { + s.AvailabilityZones = v return s } -// SetLocale sets the Locale field's value. -func (s *DescribeEventsInput) SetLocale(v string) *DescribeEventsInput { - s.Locale = &v +// SetEndTimes sets the EndTimes field's value. +func (s *EventFilter) SetEndTimes(v []*DateTimeRange) *EventFilter { + s.EndTimes = v return s } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeEventsInput) SetMaxResults(v int64) *DescribeEventsInput { - s.MaxResults = &v +// SetEntityArns sets the EntityArns field's value. +func (s *EventFilter) SetEntityArns(v []*string) *EventFilter { + s.EntityArns = v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeEventsInput) SetNextToken(v string) *DescribeEventsInput { - s.NextToken = &v +// SetEntityValues sets the EntityValues field's value. +func (s *EventFilter) SetEntityValues(v []*string) *EventFilter { + s.EntityValues = v return s } -type DescribeEventsOutput struct { - _ struct{} `type:"structure"` +// SetEventArns sets the EventArns field's value. +func (s *EventFilter) SetEventArns(v []*string) *EventFilter { + s.EventArns = v + return s +} - // The events that match the specified filter criteria. - Events []*Event `locationName:"events" type:"list"` +// SetEventStatusCodes sets the EventStatusCodes field's value. +func (s *EventFilter) SetEventStatusCodes(v []*string) *EventFilter { + s.EventStatusCodes = v + return s +} - // If the results of a search are large, only a portion of the results are returned, - // and a nextToken pagination token is returned in the response. To retrieve - // the next batch of results, reissue the search request and include the returned - // token. When all results have been returned, the response does not contain - // a pagination token value. - NextToken *string `locationName:"nextToken" type:"string"` +// SetEventTypeCategories sets the EventTypeCategories field's value. +func (s *EventFilter) SetEventTypeCategories(v []*string) *EventFilter { + s.EventTypeCategories = v + return s } -// String returns the string representation -func (s DescribeEventsOutput) String() string { - return awsutil.Prettify(s) +// SetEventTypeCodes sets the EventTypeCodes field's value. +func (s *EventFilter) SetEventTypeCodes(v []*string) *EventFilter { + s.EventTypeCodes = v + return s +} + +// SetLastUpdatedTimes sets the LastUpdatedTimes field's value. +func (s *EventFilter) SetLastUpdatedTimes(v []*DateTimeRange) *EventFilter { + s.LastUpdatedTimes = v + return s +} + +// SetRegions sets the Regions field's value. +func (s *EventFilter) SetRegions(v []*string) *EventFilter { + s.Regions = v + return s } -// GoString returns the string representation -func (s DescribeEventsOutput) GoString() string { - return s.String() +// SetServices sets the Services field's value. +func (s *EventFilter) SetServices(v []*string) *EventFilter { + s.Services = v + return s } -// SetEvents sets the Events field's value. -func (s *DescribeEventsOutput) SetEvents(v []*Event) *DescribeEventsOutput { - s.Events = v +// SetStartTimes sets the StartTimes field's value. +func (s *EventFilter) SetStartTimes(v []*DateTimeRange) *EventFilter { + s.StartTimes = v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeEventsOutput) SetNextToken(v string) *DescribeEventsOutput { - s.NextToken = &v +// SetTags sets the Tags field's value. +func (s *EventFilter) SetTags(v []map[string]*string) *EventFilter { + s.Tags = v return s } -// The number of entities that are affected by one or more events. Returned -// by the DescribeEntityAggregates operation. -type EntityAggregate struct { +// Metadata about a type of event that is reported by AWS Health. Data consists +// of the category (for example, issue), the service (for example, EC2), and +// the event type code (for example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT). +type EventType struct { _ struct{} `type:"structure"` - // The number entities that match the criteria for the specified events. - Count *int64 `locationName:"count" type:"integer"` + // A list of event type category codes (issue, scheduledChange, or accountNotification). + Category *string `locationName:"category" min:"3" type:"string" enum:"eventTypeCategory"` - // The unique identifier for the event. Format: arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID - // . Example: Example: arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456 - EventArn *string `locationName:"eventArn" type:"string"` + // The unique identifier for the event type. The format is AWS_SERVICE_DESCRIPTION + // ; for example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT. + Code *string `locationName:"code" min:"3" type:"string"` + + // The AWS service that is affected by the event. For example, EC2, RDS. + Service *string `locationName:"service" min:"2" type:"string"` } // String returns the string representation -func (s EntityAggregate) String() string { +func (s EventType) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s EntityAggregate) GoString() string { +func (s EventType) GoString() string { return s.String() } -// SetCount sets the Count field's value. -func (s *EntityAggregate) SetCount(v int64) *EntityAggregate { - s.Count = &v +// SetCategory sets the Category field's value. +func (s *EventType) SetCategory(v string) *EventType { + s.Category = &v return s } -// SetEventArn sets the EventArn field's value. -func (s *EntityAggregate) SetEventArn(v string) *EntityAggregate { - s.EventArn = &v +// SetCode sets the Code field's value. +func (s *EventType) SetCode(v string) *EventType { + s.Code = &v return s } -// The values to use to filter results from the DescribeAffectedEntities operation. -type EntityFilter struct { - _ struct{} `type:"structure"` - - // A list of entity ARNs (unique identifiers). - EntityArns []*string `locationName:"entityArns" min:"1" type:"list"` - - // A list of IDs for affected entities. - EntityValues []*string `locationName:"entityValues" min:"1" type:"list"` +// SetService sets the Service field's value. +func (s *EventType) SetService(v string) *EventType { + s.Service = &v + return s +} - // A list of event ARNs (unique identifiers). For example: "arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-CDE456", - // "arn:aws:health:us-west-1::event/EBS/AWS_EBS_LOST_VOLUME/AWS_EBS_LOST_VOLUME_CHI789_JKL101" - // - // EventArns is a required field - EventArns []*string `locationName:"eventArns" min:"1" type:"list" required:"true"` +// The values to use to filter results from the DescribeEventTypes operation. +type EventTypeFilter struct { + _ struct{} `type:"structure"` - // A list of the most recent dates and times that the entity was updated. - LastUpdatedTimes []*DateTimeRange `locationName:"lastUpdatedTimes" min:"1" type:"list"` + // A list of event type category codes (issue, scheduledChange, or accountNotification). + EventTypeCategories []*string `locationName:"eventTypeCategories" min:"1" type:"list"` - // A list of entity status codes (IMPAIRED, UNIMPAIRED, or UNKNOWN). - StatusCodes []*string `locationName:"statusCodes" min:"1" type:"list"` + // A list of event type codes. + EventTypeCodes []*string `locationName:"eventTypeCodes" min:"1" type:"list"` - // A map of entity tags attached to the affected entity. - Tags []map[string]*string `locationName:"tags" type:"list"` + // The AWS services associated with the event. For example, EC2, RDS. + Services []*string `locationName:"services" min:"1" type:"list"` } // String returns the string representation -func (s EntityFilter) String() string { +func (s EventTypeFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s EntityFilter) GoString() string { +func (s EventTypeFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *EntityFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EntityFilter"} - if s.EntityArns != nil && len(s.EntityArns) < 1 { - invalidParams.Add(request.NewErrParamMinLen("EntityArns", 1)) - } - if s.EntityValues != nil && len(s.EntityValues) < 1 { - invalidParams.Add(request.NewErrParamMinLen("EntityValues", 1)) - } - if s.EventArns == nil { - invalidParams.Add(request.NewErrParamRequired("EventArns")) - } - if s.EventArns != nil && len(s.EventArns) < 1 { - invalidParams.Add(request.NewErrParamMinLen("EventArns", 1)) +func (s *EventTypeFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EventTypeFilter"} + if s.EventTypeCategories != nil && len(s.EventTypeCategories) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventTypeCategories", 1)) } - if s.LastUpdatedTimes != nil && len(s.LastUpdatedTimes) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LastUpdatedTimes", 1)) + if s.EventTypeCodes != nil && len(s.EventTypeCodes) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventTypeCodes", 1)) } - if s.StatusCodes != nil && len(s.StatusCodes) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StatusCodes", 1)) + if s.Services != nil && len(s.Services) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Services", 1)) } if invalidParams.Len() > 0 { @@ -1577,71 +3540,102 @@ func (s *EntityFilter) Validate() error { return nil } -// SetEntityArns sets the EntityArns field's value. -func (s *EntityFilter) SetEntityArns(v []*string) *EntityFilter { - s.EntityArns = v +// SetEventTypeCategories sets the EventTypeCategories field's value. +func (s *EventTypeFilter) SetEventTypeCategories(v []*string) *EventTypeFilter { + s.EventTypeCategories = v return s } -// SetEntityValues sets the EntityValues field's value. -func (s *EntityFilter) SetEntityValues(v []*string) *EntityFilter { - s.EntityValues = v +// SetEventTypeCodes sets the EventTypeCodes field's value. +func (s *EventTypeFilter) SetEventTypeCodes(v []*string) *EventTypeFilter { + s.EventTypeCodes = v return s } -// SetEventArns sets the EventArns field's value. -func (s *EntityFilter) SetEventArns(v []*string) *EntityFilter { - s.EventArns = v +// SetServices sets the Services field's value. +func (s *EventTypeFilter) SetServices(v []*string) *EventTypeFilter { + s.Services = v return s } -// SetLastUpdatedTimes sets the LastUpdatedTimes field's value. -func (s *EntityFilter) SetLastUpdatedTimes(v []*DateTimeRange) *EntityFilter { - s.LastUpdatedTimes = v +// Error information returned when a DescribeAffectedEntitiesForOrganization +// operation cannot find or process a specific entity. +type OrganizationAffectedEntitiesErrorItem struct { + _ struct{} `type:"structure"` + + // The 12-digit AWS account numbers that contains the affected entities. + AwsAccountId *string `locationName:"awsAccountId" type:"string"` + + // The unique identifier for the event type. The format is AWS_SERVICE_DESCRIPTION. + // For example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT. + ErrorMessage *string `locationName:"errorMessage" type:"string"` + + // The name of the error. + ErrorName *string `locationName:"errorName" type:"string"` + + // The unique identifier for the event. Format: arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID + // . Example: Example: arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456 + EventArn *string `locationName:"eventArn" type:"string"` +} + +// String returns the string representation +func (s OrganizationAffectedEntitiesErrorItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OrganizationAffectedEntitiesErrorItem) GoString() string { + return s.String() +} + +// SetAwsAccountId sets the AwsAccountId field's value. +func (s *OrganizationAffectedEntitiesErrorItem) SetAwsAccountId(v string) *OrganizationAffectedEntitiesErrorItem { + s.AwsAccountId = &v return s } -// SetStatusCodes sets the StatusCodes field's value. -func (s *EntityFilter) SetStatusCodes(v []*string) *EntityFilter { - s.StatusCodes = v +// SetErrorMessage sets the ErrorMessage field's value. +func (s *OrganizationAffectedEntitiesErrorItem) SetErrorMessage(v string) *OrganizationAffectedEntitiesErrorItem { + s.ErrorMessage = &v return s } -// SetTags sets the Tags field's value. -func (s *EntityFilter) SetTags(v []map[string]*string) *EntityFilter { - s.Tags = v +// SetErrorName sets the ErrorName field's value. +func (s *OrganizationAffectedEntitiesErrorItem) SetErrorName(v string) *OrganizationAffectedEntitiesErrorItem { + s.ErrorName = &v return s } -// Summary information about an event, returned by the DescribeEvents operation. -// The DescribeEventDetails operation also returns this information, as well -// as the EventDescription and additional event metadata. -type Event struct { +// SetEventArn sets the EventArn field's value. +func (s *OrganizationAffectedEntitiesErrorItem) SetEventArn(v string) *OrganizationAffectedEntitiesErrorItem { + s.EventArn = &v + return s +} + +// Summary information about an event, returned by the DescribeEventsForOrganization +// operation. +type OrganizationEvent struct { _ struct{} `type:"structure"` // The unique identifier for the event. Format: arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID // . Example: Example: arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456 Arn *string `locationName:"arn" type:"string"` - // The AWS Availability Zone of the event. For example, us-east-1a. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - // The date and time that the event ended. EndTime *time.Time `locationName:"endTime" type:"timestamp"` - // The category of the event. Possible values are issue, scheduledChange, and - // accountNotification. + // The category of the event type. EventTypeCategory *string `locationName:"eventTypeCategory" min:"3" type:"string" enum:"eventTypeCategory"` - // The unique identifier for the event type. The format is AWS_SERVICE_DESCRIPTION - // ; for example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT. + // The unique identifier for the event type. The format is AWS_SERVICE_DESCRIPTION. + // For example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT. EventTypeCode *string `locationName:"eventTypeCode" min:"3" type:"string"` // The most recent date and time that the event was updated. LastUpdatedTime *time.Time `locationName:"lastUpdatedTime" type:"timestamp"` - // The AWS region name of the event. - Region *string `locationName:"region" type:"string"` + // The AWS Region name of the event. + Region *string `locationName:"region" min:"2" type:"string"` // The AWS service that is affected by the event. For example, EC2, RDS. Service *string `locationName:"service" min:"2" type:"string"` @@ -1655,144 +3649,83 @@ type Event struct { } // String returns the string representation -func (s Event) String() string { +func (s OrganizationEvent) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Event) GoString() string { +func (s OrganizationEvent) GoString() string { return s.String() } // SetArn sets the Arn field's value. -func (s *Event) SetArn(v string) *Event { +func (s *OrganizationEvent) SetArn(v string) *OrganizationEvent { s.Arn = &v return s } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *Event) SetAvailabilityZone(v string) *Event { - s.AvailabilityZone = &v - return s -} - -// SetEndTime sets the EndTime field's value. -func (s *Event) SetEndTime(v time.Time) *Event { - s.EndTime = &v - return s -} - -// SetEventTypeCategory sets the EventTypeCategory field's value. -func (s *Event) SetEventTypeCategory(v string) *Event { - s.EventTypeCategory = &v - return s -} - -// SetEventTypeCode sets the EventTypeCode field's value. -func (s *Event) SetEventTypeCode(v string) *Event { - s.EventTypeCode = &v - return s -} - -// SetLastUpdatedTime sets the LastUpdatedTime field's value. -func (s *Event) SetLastUpdatedTime(v time.Time) *Event { - s.LastUpdatedTime = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *Event) SetRegion(v string) *Event { - s.Region = &v - return s -} - -// SetService sets the Service field's value. -func (s *Event) SetService(v string) *Event { - s.Service = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *Event) SetStartTime(v time.Time) *Event { - s.StartTime = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *Event) SetStatusCode(v string) *Event { - s.StatusCode = &v - return s -} - -// The number of events of each issue type. Returned by the DescribeEventAggregates -// operation. -type EventAggregate struct { - _ struct{} `type:"structure"` - - // The issue type for the associated count. - AggregateValue *string `locationName:"aggregateValue" type:"string"` - - // The number of events of the associated issue type. - Count *int64 `locationName:"count" type:"integer"` -} - -// String returns the string representation -func (s EventAggregate) String() string { - return awsutil.Prettify(s) +// SetEndTime sets the EndTime field's value. +func (s *OrganizationEvent) SetEndTime(v time.Time) *OrganizationEvent { + s.EndTime = &v + return s } -// GoString returns the string representation -func (s EventAggregate) GoString() string { - return s.String() +// SetEventTypeCategory sets the EventTypeCategory field's value. +func (s *OrganizationEvent) SetEventTypeCategory(v string) *OrganizationEvent { + s.EventTypeCategory = &v + return s } -// SetAggregateValue sets the AggregateValue field's value. -func (s *EventAggregate) SetAggregateValue(v string) *EventAggregate { - s.AggregateValue = &v +// SetEventTypeCode sets the EventTypeCode field's value. +func (s *OrganizationEvent) SetEventTypeCode(v string) *OrganizationEvent { + s.EventTypeCode = &v return s } -// SetCount sets the Count field's value. -func (s *EventAggregate) SetCount(v int64) *EventAggregate { - s.Count = &v +// SetLastUpdatedTime sets the LastUpdatedTime field's value. +func (s *OrganizationEvent) SetLastUpdatedTime(v time.Time) *OrganizationEvent { + s.LastUpdatedTime = &v return s } -// The detailed description of the event. Included in the information returned -// by the DescribeEventDetails operation. -type EventDescription struct { - _ struct{} `type:"structure"` - - // The most recent description of the event. - LatestDescription *string `locationName:"latestDescription" type:"string"` +// SetRegion sets the Region field's value. +func (s *OrganizationEvent) SetRegion(v string) *OrganizationEvent { + s.Region = &v + return s } -// String returns the string representation -func (s EventDescription) String() string { - return awsutil.Prettify(s) +// SetService sets the Service field's value. +func (s *OrganizationEvent) SetService(v string) *OrganizationEvent { + s.Service = &v + return s } -// GoString returns the string representation -func (s EventDescription) GoString() string { - return s.String() +// SetStartTime sets the StartTime field's value. +func (s *OrganizationEvent) SetStartTime(v time.Time) *OrganizationEvent { + s.StartTime = &v + return s } -// SetLatestDescription sets the LatestDescription field's value. -func (s *EventDescription) SetLatestDescription(v string) *EventDescription { - s.LatestDescription = &v +// SetStatusCode sets the StatusCode field's value. +func (s *OrganizationEvent) SetStatusCode(v string) *OrganizationEvent { + s.StatusCode = &v return s } // Detailed information about an event. A combination of an Event object, an // EventDescription object, and additional metadata about the event. Returned -// by the DescribeEventDetails operation. -type EventDetails struct { +// by the DescribeEventDetailsForOrganization operation. +type OrganizationEventDetails struct { _ struct{} `type:"structure"` - // Summary information about the event. + // The 12-digit AWS account numbers that contains the affected entities. + AwsAccountId *string `locationName:"awsAccountId" type:"string"` + + // Summary information about an AWS Health event. Event *Event `locationName:"event" type:"structure"` - // The most recent description of the event. + // The detailed description of the event. Included in the information returned + // by the DescribeEventDetails operation. EventDescription *EventDescription `locationName:"eventDescription" type:"structure"` // Additional metadata about the event. @@ -1800,38 +3733,48 @@ type EventDetails struct { } // String returns the string representation -func (s EventDetails) String() string { +func (s OrganizationEventDetails) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s EventDetails) GoString() string { +func (s OrganizationEventDetails) GoString() string { return s.String() } +// SetAwsAccountId sets the AwsAccountId field's value. +func (s *OrganizationEventDetails) SetAwsAccountId(v string) *OrganizationEventDetails { + s.AwsAccountId = &v + return s +} + // SetEvent sets the Event field's value. -func (s *EventDetails) SetEvent(v *Event) *EventDetails { +func (s *OrganizationEventDetails) SetEvent(v *Event) *OrganizationEventDetails { s.Event = v return s } // SetEventDescription sets the EventDescription field's value. -func (s *EventDetails) SetEventDescription(v *EventDescription) *EventDetails { +func (s *OrganizationEventDetails) SetEventDescription(v *EventDescription) *OrganizationEventDetails { s.EventDescription = v return s } // SetEventMetadata sets the EventMetadata field's value. -func (s *EventDetails) SetEventMetadata(v map[string]*string) *EventDetails { +func (s *OrganizationEventDetails) SetEventMetadata(v map[string]*string) *OrganizationEventDetails { s.EventMetadata = v return s } -// Error information returned when a DescribeEventDetails operation cannot find -// a specified event. -type EventDetailsErrorItem struct { +// Error information returned when a DescribeEventDetailsForOrganization operation +// cannot find a specified event. +type OrganizationEventDetailsErrorItem struct { _ struct{} `type:"structure"` + // Error information returned when a DescribeEventDetailsForOrganization operation + // cannot find a specified event. + AwsAccountId *string `locationName:"awsAccountId" type:"string"` + // A message that describes the error. ErrorMessage *string `locationName:"errorMessage" type:"string"` @@ -1844,95 +3787,108 @@ type EventDetailsErrorItem struct { } // String returns the string representation -func (s EventDetailsErrorItem) String() string { +func (s OrganizationEventDetailsErrorItem) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s EventDetailsErrorItem) GoString() string { +func (s OrganizationEventDetailsErrorItem) GoString() string { return s.String() } +// SetAwsAccountId sets the AwsAccountId field's value. +func (s *OrganizationEventDetailsErrorItem) SetAwsAccountId(v string) *OrganizationEventDetailsErrorItem { + s.AwsAccountId = &v + return s +} + // SetErrorMessage sets the ErrorMessage field's value. -func (s *EventDetailsErrorItem) SetErrorMessage(v string) *EventDetailsErrorItem { +func (s *OrganizationEventDetailsErrorItem) SetErrorMessage(v string) *OrganizationEventDetailsErrorItem { s.ErrorMessage = &v return s } // SetErrorName sets the ErrorName field's value. -func (s *EventDetailsErrorItem) SetErrorName(v string) *EventDetailsErrorItem { +func (s *OrganizationEventDetailsErrorItem) SetErrorName(v string) *OrganizationEventDetailsErrorItem { s.ErrorName = &v return s } // SetEventArn sets the EventArn field's value. -func (s *EventDetailsErrorItem) SetEventArn(v string) *EventDetailsErrorItem { +func (s *OrganizationEventDetailsErrorItem) SetEventArn(v string) *OrganizationEventDetailsErrorItem { s.EventArn = &v return s } -// The values to use to filter results from the DescribeEvents and DescribeEventAggregates -// operations. -type EventFilter struct { +// The values to filter results from the DescribeEventsForOrganization operation. +type OrganizationEventFilter struct { _ struct{} `type:"structure"` - // A list of AWS availability zones. - AvailabilityZones []*string `locationName:"availabilityZones" type:"list"` + // A list of 12-digit AWS account numbers that contains the affected entities. + AwsAccountIds []*string `locationName:"awsAccountIds" min:"1" type:"list"` - // A list of dates and times that the event ended. - EndTimes []*DateTimeRange `locationName:"endTimes" min:"1" type:"list"` + // A range of dates and times that is used by the EventFilter and EntityFilter + // objects. If from is set and to is set: match items where the timestamp (startTime, + // endTime, or lastUpdatedTime) is between from and to inclusive. If from is + // set and to is not set: match items where the timestamp value is equal to + // or after from. If from is not set and to is set: match items where the timestamp + // value is equal to or before to. + EndTime *DateTimeRange `locationName:"endTime" type:"structure"` - // A list of entity ARNs (unique identifiers). + // REPLACEME EntityArns []*string `locationName:"entityArns" min:"1" type:"list"` // A list of entity identifiers, such as EC2 instance IDs (i-34ab692e) or EBS // volumes (vol-426ab23e). EntityValues []*string `locationName:"entityValues" min:"1" type:"list"` - // A list of event ARNs (unique identifiers). For example: "arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-CDE456", - // "arn:aws:health:us-west-1::event/EBS/AWS_EBS_LOST_VOLUME/AWS_EBS_LOST_VOLUME_CHI789_JKL101" - EventArns []*string `locationName:"eventArns" min:"1" type:"list"` - // A list of event status codes. EventStatusCodes []*string `locationName:"eventStatusCodes" min:"1" type:"list"` - // A list of event type category codes (issue, scheduledChange, or accountNotification). + // REPLACEME EventTypeCategories []*string `locationName:"eventTypeCategories" min:"1" type:"list"` - // A list of unique identifiers for event types. For example, "AWS_EC2_SYSTEM_MAINTENANCE_EVENT","AWS_RDS_MAINTENANCE_SCHEDULED" + // A list of unique identifiers for event types. For example, "AWS_EC2_SYSTEM_MAINTENANCE_EVENT","AWS_RDS_MAINTENANCE_SCHEDULED". EventTypeCodes []*string `locationName:"eventTypeCodes" min:"1" type:"list"` - // A list of dates and times that the event was last updated. - LastUpdatedTimes []*DateTimeRange `locationName:"lastUpdatedTimes" min:"1" type:"list"` + // A range of dates and times that is used by the EventFilter and EntityFilter + // objects. If from is set and to is set: match items where the timestamp (startTime, + // endTime, or lastUpdatedTime) is between from and to inclusive. If from is + // set and to is not set: match items where the timestamp value is equal to + // or after from. If from is not set and to is set: match items where the timestamp + // value is equal to or before to. + LastUpdatedTime *DateTimeRange `locationName:"lastUpdatedTime" type:"structure"` - // A list of AWS regions. + // A list of AWS Regions. Regions []*string `locationName:"regions" min:"1" type:"list"` // The AWS services associated with the event. For example, EC2, RDS. Services []*string `locationName:"services" min:"1" type:"list"` - // A list of dates and times that the event began. - StartTimes []*DateTimeRange `locationName:"startTimes" min:"1" type:"list"` - - // A map of entity tags attached to the affected entity. - Tags []map[string]*string `locationName:"tags" type:"list"` + // A range of dates and times that is used by the EventFilter and EntityFilter + // objects. If from is set and to is set: match items where the timestamp (startTime, + // endTime, or lastUpdatedTime) is between from and to inclusive. If from is + // set and to is not set: match items where the timestamp value is equal to + // or after from. If from is not set and to is set: match items where the timestamp + // value is equal to or before to. + StartTime *DateTimeRange `locationName:"startTime" type:"structure"` } // String returns the string representation -func (s EventFilter) String() string { +func (s OrganizationEventFilter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s EventFilter) GoString() string { +func (s OrganizationEventFilter) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *EventFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EventFilter"} - if s.EndTimes != nil && len(s.EndTimes) < 1 { - invalidParams.Add(request.NewErrParamMinLen("EndTimes", 1)) +func (s *OrganizationEventFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OrganizationEventFilter"} + if s.AwsAccountIds != nil && len(s.AwsAccountIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AwsAccountIds", 1)) } if s.EntityArns != nil && len(s.EntityArns) < 1 { invalidParams.Add(request.NewErrParamMinLen("EntityArns", 1)) @@ -1940,9 +3896,6 @@ func (s *EventFilter) Validate() error { if s.EntityValues != nil && len(s.EntityValues) < 1 { invalidParams.Add(request.NewErrParamMinLen("EntityValues", 1)) } - if s.EventArns != nil && len(s.EventArns) < 1 { - invalidParams.Add(request.NewErrParamMinLen("EventArns", 1)) - } if s.EventStatusCodes != nil && len(s.EventStatusCodes) < 1 { invalidParams.Add(request.NewErrParamMinLen("EventStatusCodes", 1)) } @@ -1952,18 +3905,12 @@ func (s *EventFilter) Validate() error { if s.EventTypeCodes != nil && len(s.EventTypeCodes) < 1 { invalidParams.Add(request.NewErrParamMinLen("EventTypeCodes", 1)) } - if s.LastUpdatedTimes != nil && len(s.LastUpdatedTimes) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LastUpdatedTimes", 1)) - } if s.Regions != nil && len(s.Regions) < 1 { invalidParams.Add(request.NewErrParamMinLen("Regions", 1)) } if s.Services != nil && len(s.Services) < 1 { invalidParams.Add(request.NewErrParamMinLen("Services", 1)) } - if s.StartTimes != nil && len(s.StartTimes) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StartTimes", 1)) - } if invalidParams.Len() > 0 { return invalidParams @@ -1971,187 +3918,69 @@ func (s *EventFilter) Validate() error { return nil } -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *EventFilter) SetAvailabilityZones(v []*string) *EventFilter { - s.AvailabilityZones = v +// SetAwsAccountIds sets the AwsAccountIds field's value. +func (s *OrganizationEventFilter) SetAwsAccountIds(v []*string) *OrganizationEventFilter { + s.AwsAccountIds = v return s } -// SetEndTimes sets the EndTimes field's value. -func (s *EventFilter) SetEndTimes(v []*DateTimeRange) *EventFilter { - s.EndTimes = v +// SetEndTime sets the EndTime field's value. +func (s *OrganizationEventFilter) SetEndTime(v *DateTimeRange) *OrganizationEventFilter { + s.EndTime = v return s } // SetEntityArns sets the EntityArns field's value. -func (s *EventFilter) SetEntityArns(v []*string) *EventFilter { +func (s *OrganizationEventFilter) SetEntityArns(v []*string) *OrganizationEventFilter { s.EntityArns = v return s } // SetEntityValues sets the EntityValues field's value. -func (s *EventFilter) SetEntityValues(v []*string) *EventFilter { +func (s *OrganizationEventFilter) SetEntityValues(v []*string) *OrganizationEventFilter { s.EntityValues = v return s } -// SetEventArns sets the EventArns field's value. -func (s *EventFilter) SetEventArns(v []*string) *EventFilter { - s.EventArns = v - return s -} - // SetEventStatusCodes sets the EventStatusCodes field's value. -func (s *EventFilter) SetEventStatusCodes(v []*string) *EventFilter { +func (s *OrganizationEventFilter) SetEventStatusCodes(v []*string) *OrganizationEventFilter { s.EventStatusCodes = v return s } // SetEventTypeCategories sets the EventTypeCategories field's value. -func (s *EventFilter) SetEventTypeCategories(v []*string) *EventFilter { +func (s *OrganizationEventFilter) SetEventTypeCategories(v []*string) *OrganizationEventFilter { s.EventTypeCategories = v return s } // SetEventTypeCodes sets the EventTypeCodes field's value. -func (s *EventFilter) SetEventTypeCodes(v []*string) *EventFilter { +func (s *OrganizationEventFilter) SetEventTypeCodes(v []*string) *OrganizationEventFilter { s.EventTypeCodes = v return s } -// SetLastUpdatedTimes sets the LastUpdatedTimes field's value. -func (s *EventFilter) SetLastUpdatedTimes(v []*DateTimeRange) *EventFilter { - s.LastUpdatedTimes = v +// SetLastUpdatedTime sets the LastUpdatedTime field's value. +func (s *OrganizationEventFilter) SetLastUpdatedTime(v *DateTimeRange) *OrganizationEventFilter { + s.LastUpdatedTime = v return s } // SetRegions sets the Regions field's value. -func (s *EventFilter) SetRegions(v []*string) *EventFilter { +func (s *OrganizationEventFilter) SetRegions(v []*string) *OrganizationEventFilter { s.Regions = v return s } // SetServices sets the Services field's value. -func (s *EventFilter) SetServices(v []*string) *EventFilter { +func (s *OrganizationEventFilter) SetServices(v []*string) *OrganizationEventFilter { s.Services = v return s } -// SetStartTimes sets the StartTimes field's value. -func (s *EventFilter) SetStartTimes(v []*DateTimeRange) *EventFilter { - s.StartTimes = v - return s -} - -// SetTags sets the Tags field's value. -func (s *EventFilter) SetTags(v []map[string]*string) *EventFilter { - s.Tags = v - return s -} - -// Metadata about a type of event that is reported by AWS Health. Data consists -// of the category (for example, issue), the service (for example, EC2), and -// the event type code (for example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT). -type EventType struct { - _ struct{} `type:"structure"` - - // A list of event type category codes (issue, scheduledChange, or accountNotification). - Category *string `locationName:"category" min:"3" type:"string" enum:"eventTypeCategory"` - - // The unique identifier for the event type. The format is AWS_SERVICE_DESCRIPTION - // ; for example, AWS_EC2_SYSTEM_MAINTENANCE_EVENT. - Code *string `locationName:"code" min:"3" type:"string"` - - // The AWS service that is affected by the event. For example, EC2, RDS. - Service *string `locationName:"service" min:"2" type:"string"` -} - -// String returns the string representation -func (s EventType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventType) GoString() string { - return s.String() -} - -// SetCategory sets the Category field's value. -func (s *EventType) SetCategory(v string) *EventType { - s.Category = &v - return s -} - -// SetCode sets the Code field's value. -func (s *EventType) SetCode(v string) *EventType { - s.Code = &v - return s -} - -// SetService sets the Service field's value. -func (s *EventType) SetService(v string) *EventType { - s.Service = &v - return s -} - -// The values to use to filter results from the DescribeEventTypes operation. -type EventTypeFilter struct { - _ struct{} `type:"structure"` - - // A list of event type category codes (issue, scheduledChange, or accountNotification). - EventTypeCategories []*string `locationName:"eventTypeCategories" min:"1" type:"list"` - - // A list of event type codes. - EventTypeCodes []*string `locationName:"eventTypeCodes" min:"1" type:"list"` - - // The AWS services associated with the event. For example, EC2, RDS. - Services []*string `locationName:"services" min:"1" type:"list"` -} - -// String returns the string representation -func (s EventTypeFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s EventTypeFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EventTypeFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EventTypeFilter"} - if s.EventTypeCategories != nil && len(s.EventTypeCategories) < 1 { - invalidParams.Add(request.NewErrParamMinLen("EventTypeCategories", 1)) - } - if s.EventTypeCodes != nil && len(s.EventTypeCodes) < 1 { - invalidParams.Add(request.NewErrParamMinLen("EventTypeCodes", 1)) - } - if s.Services != nil && len(s.Services) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Services", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEventTypeCategories sets the EventTypeCategories field's value. -func (s *EventTypeFilter) SetEventTypeCategories(v []*string) *EventTypeFilter { - s.EventTypeCategories = v - return s -} - -// SetEventTypeCodes sets the EventTypeCodes field's value. -func (s *EventTypeFilter) SetEventTypeCodes(v []*string) *EventTypeFilter { - s.EventTypeCodes = v - return s -} - -// SetServices sets the Services field's value. -func (s *EventTypeFilter) SetServices(v []*string) *EventTypeFilter { - s.Services = v +// SetStartTime sets the StartTime field's value. +func (s *OrganizationEventFilter) SetStartTime(v *DateTimeRange) *OrganizationEventFilter { + s.StartTime = v return s } diff --git a/service/health/doc.go b/service/health/doc.go index cb5de344b65..69d9a84fa0a 100644 --- a/service/health/doc.go +++ b/service/health/doc.go @@ -26,6 +26,33 @@ // * DescribeEntityAggregates: A count of the number of affected entities // that meet specified criteria. // +// AWS Health integrates with AWS Organizations to provide a centralized view +// of AWS Health events across all accounts in your organization. +// +// * DescribeEventsForOrganization: Summary information about events across +// the organization. +// +// * DescribeAffectedAccountsForOrganization: List of accounts in your organization +// impacted by an event. +// +// * DescribeEventDetailsForOrganization: Detailed information about events +// in your organization. +// +// * DescribeAffectedEntitiesForOrganization: Information about AWS resources +// in your organization that are affected by events. +// +// You can use the following operations to enable or disable AWS Health from +// working with AWS Organizations. +// +// * EnableHealthServiceAccessForOrganization: Enables AWS Health to work +// with AWS Organizations. +// +// * DisableHealthServiceAccessForOrganization: Disables AWS Health from +// working with AWS Organizations. +// +// * DescribeHealthServiceStatusForOrganization: Status information about +// enabling or disabling AWS Health from working with AWS Organizations. +// // The Health API requires a Business or Enterprise support plan from AWS Support // (http://aws.amazon.com/premiumsupport/). Calling the Health API from an account // that does not have a Business or Enterprise support plan causes a SubscriptionRequiredException. diff --git a/service/health/errors.go b/service/health/errors.go index 1c9edfff2cf..5d1457adf02 100644 --- a/service/health/errors.go +++ b/service/health/errors.go @@ -4,6 +4,14 @@ package health const ( + // ErrCodeConcurrentModificationException for service response error code + // "ConcurrentModificationException". + // + // EnableHealthServiceAccessForOrganization is already in progress. Wait for + // the action to complete before trying again. To get the current status, use + // the DescribeHealthServiceStatusForOrganization operation. + ErrCodeConcurrentModificationException = "ConcurrentModificationException" + // ErrCodeInvalidPaginationToken for service response error code // "InvalidPaginationToken". // diff --git a/service/health/healthiface/interface.go b/service/health/healthiface/interface.go index 25f81c1a65a..2464163c879 100644 --- a/service/health/healthiface/interface.go +++ b/service/health/healthiface/interface.go @@ -26,7 +26,7 @@ import ( // // myFunc uses an SDK service client to make a request to // // AWS Health APIs and Notifications. // func myFunc(svc healthiface.HealthAPI) bool { -// // Make svc.DescribeAffectedEntities request +// // Make svc.DescribeAffectedAccountsForOrganization request // } // // func main() { @@ -42,7 +42,7 @@ import ( // type mockHealthClient struct { // healthiface.HealthAPI // } -// func (m *mockHealthClient) DescribeAffectedEntities(input *health.DescribeAffectedEntitiesInput) (*health.DescribeAffectedEntitiesOutput, error) { +// func (m *mockHealthClient) DescribeAffectedAccountsForOrganization(input *health.DescribeAffectedAccountsForOrganizationInput) (*health.DescribeAffectedAccountsForOrganizationOutput, error) { // // mock response/functionality // } // @@ -60,6 +60,13 @@ import ( // and waiters. Its suggested to use the pattern above for testing, or using // tooling to generate mocks to satisfy the interfaces. type HealthAPI interface { + DescribeAffectedAccountsForOrganization(*health.DescribeAffectedAccountsForOrganizationInput) (*health.DescribeAffectedAccountsForOrganizationOutput, error) + DescribeAffectedAccountsForOrganizationWithContext(aws.Context, *health.DescribeAffectedAccountsForOrganizationInput, ...request.Option) (*health.DescribeAffectedAccountsForOrganizationOutput, error) + DescribeAffectedAccountsForOrganizationRequest(*health.DescribeAffectedAccountsForOrganizationInput) (*request.Request, *health.DescribeAffectedAccountsForOrganizationOutput) + + DescribeAffectedAccountsForOrganizationPages(*health.DescribeAffectedAccountsForOrganizationInput, func(*health.DescribeAffectedAccountsForOrganizationOutput, bool) bool) error + DescribeAffectedAccountsForOrganizationPagesWithContext(aws.Context, *health.DescribeAffectedAccountsForOrganizationInput, func(*health.DescribeAffectedAccountsForOrganizationOutput, bool) bool, ...request.Option) error + DescribeAffectedEntities(*health.DescribeAffectedEntitiesInput) (*health.DescribeAffectedEntitiesOutput, error) DescribeAffectedEntitiesWithContext(aws.Context, *health.DescribeAffectedEntitiesInput, ...request.Option) (*health.DescribeAffectedEntitiesOutput, error) DescribeAffectedEntitiesRequest(*health.DescribeAffectedEntitiesInput) (*request.Request, *health.DescribeAffectedEntitiesOutput) @@ -67,6 +74,13 @@ type HealthAPI interface { DescribeAffectedEntitiesPages(*health.DescribeAffectedEntitiesInput, func(*health.DescribeAffectedEntitiesOutput, bool) bool) error DescribeAffectedEntitiesPagesWithContext(aws.Context, *health.DescribeAffectedEntitiesInput, func(*health.DescribeAffectedEntitiesOutput, bool) bool, ...request.Option) error + DescribeAffectedEntitiesForOrganization(*health.DescribeAffectedEntitiesForOrganizationInput) (*health.DescribeAffectedEntitiesForOrganizationOutput, error) + DescribeAffectedEntitiesForOrganizationWithContext(aws.Context, *health.DescribeAffectedEntitiesForOrganizationInput, ...request.Option) (*health.DescribeAffectedEntitiesForOrganizationOutput, error) + DescribeAffectedEntitiesForOrganizationRequest(*health.DescribeAffectedEntitiesForOrganizationInput) (*request.Request, *health.DescribeAffectedEntitiesForOrganizationOutput) + + DescribeAffectedEntitiesForOrganizationPages(*health.DescribeAffectedEntitiesForOrganizationInput, func(*health.DescribeAffectedEntitiesForOrganizationOutput, bool) bool) error + DescribeAffectedEntitiesForOrganizationPagesWithContext(aws.Context, *health.DescribeAffectedEntitiesForOrganizationInput, func(*health.DescribeAffectedEntitiesForOrganizationOutput, bool) bool, ...request.Option) error + DescribeEntityAggregates(*health.DescribeEntityAggregatesInput) (*health.DescribeEntityAggregatesOutput, error) DescribeEntityAggregatesWithContext(aws.Context, *health.DescribeEntityAggregatesInput, ...request.Option) (*health.DescribeEntityAggregatesOutput, error) DescribeEntityAggregatesRequest(*health.DescribeEntityAggregatesInput) (*request.Request, *health.DescribeEntityAggregatesOutput) @@ -82,6 +96,10 @@ type HealthAPI interface { DescribeEventDetailsWithContext(aws.Context, *health.DescribeEventDetailsInput, ...request.Option) (*health.DescribeEventDetailsOutput, error) DescribeEventDetailsRequest(*health.DescribeEventDetailsInput) (*request.Request, *health.DescribeEventDetailsOutput) + DescribeEventDetailsForOrganization(*health.DescribeEventDetailsForOrganizationInput) (*health.DescribeEventDetailsForOrganizationOutput, error) + DescribeEventDetailsForOrganizationWithContext(aws.Context, *health.DescribeEventDetailsForOrganizationInput, ...request.Option) (*health.DescribeEventDetailsForOrganizationOutput, error) + DescribeEventDetailsForOrganizationRequest(*health.DescribeEventDetailsForOrganizationInput) (*request.Request, *health.DescribeEventDetailsForOrganizationOutput) + DescribeEventTypes(*health.DescribeEventTypesInput) (*health.DescribeEventTypesOutput, error) DescribeEventTypesWithContext(aws.Context, *health.DescribeEventTypesInput, ...request.Option) (*health.DescribeEventTypesOutput, error) DescribeEventTypesRequest(*health.DescribeEventTypesInput) (*request.Request, *health.DescribeEventTypesOutput) @@ -95,6 +113,25 @@ type HealthAPI interface { DescribeEventsPages(*health.DescribeEventsInput, func(*health.DescribeEventsOutput, bool) bool) error DescribeEventsPagesWithContext(aws.Context, *health.DescribeEventsInput, func(*health.DescribeEventsOutput, bool) bool, ...request.Option) error + + DescribeEventsForOrganization(*health.DescribeEventsForOrganizationInput) (*health.DescribeEventsForOrganizationOutput, error) + DescribeEventsForOrganizationWithContext(aws.Context, *health.DescribeEventsForOrganizationInput, ...request.Option) (*health.DescribeEventsForOrganizationOutput, error) + DescribeEventsForOrganizationRequest(*health.DescribeEventsForOrganizationInput) (*request.Request, *health.DescribeEventsForOrganizationOutput) + + DescribeEventsForOrganizationPages(*health.DescribeEventsForOrganizationInput, func(*health.DescribeEventsForOrganizationOutput, bool) bool) error + DescribeEventsForOrganizationPagesWithContext(aws.Context, *health.DescribeEventsForOrganizationInput, func(*health.DescribeEventsForOrganizationOutput, bool) bool, ...request.Option) error + + DescribeHealthServiceStatusForOrganization(*health.DescribeHealthServiceStatusForOrganizationInput) (*health.DescribeHealthServiceStatusForOrganizationOutput, error) + DescribeHealthServiceStatusForOrganizationWithContext(aws.Context, *health.DescribeHealthServiceStatusForOrganizationInput, ...request.Option) (*health.DescribeHealthServiceStatusForOrganizationOutput, error) + DescribeHealthServiceStatusForOrganizationRequest(*health.DescribeHealthServiceStatusForOrganizationInput) (*request.Request, *health.DescribeHealthServiceStatusForOrganizationOutput) + + DisableHealthServiceAccessForOrganization(*health.DisableHealthServiceAccessForOrganizationInput) (*health.DisableHealthServiceAccessForOrganizationOutput, error) + DisableHealthServiceAccessForOrganizationWithContext(aws.Context, *health.DisableHealthServiceAccessForOrganizationInput, ...request.Option) (*health.DisableHealthServiceAccessForOrganizationOutput, error) + DisableHealthServiceAccessForOrganizationRequest(*health.DisableHealthServiceAccessForOrganizationInput) (*request.Request, *health.DisableHealthServiceAccessForOrganizationOutput) + + EnableHealthServiceAccessForOrganization(*health.EnableHealthServiceAccessForOrganizationInput) (*health.EnableHealthServiceAccessForOrganizationOutput, error) + EnableHealthServiceAccessForOrganizationWithContext(aws.Context, *health.EnableHealthServiceAccessForOrganizationInput, ...request.Option) (*health.EnableHealthServiceAccessForOrganizationOutput, error) + EnableHealthServiceAccessForOrganizationRequest(*health.EnableHealthServiceAccessForOrganizationInput) (*request.Request, *health.EnableHealthServiceAccessForOrganizationOutput) } var _ HealthAPI = (*health.Health)(nil) diff --git a/service/kinesis/api.go b/service/kinesis/api.go index a4a81b872f1..35383657d63 100644 --- a/service/kinesis/api.go +++ b/service/kinesis/api.go @@ -7,7 +7,6 @@ import ( "fmt" "io" "sync" - "sync/atomic" "time" "github.com/aws/aws-sdk-go/aws" @@ -3160,10 +3159,17 @@ func (c *Kinesis) SubscribeToShardRequest(input *SubscribeToShardInput) (req *re output = &SubscribeToShardOutput{} req = c.newRequest(op, input, output) + + es := newSubscribeToShardEventStream() + req.Handlers.Unmarshal.PushBack(es.setStreamCloser) + output.EventStream = es + req.Handlers.Send.Swap(client.LogHTTPResponseHandler.Name, client.LogHTTPResponseHeaderHandler) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, rest.UnmarshalHandler) - req.Handlers.Unmarshal.PushBack(output.runEventStreamLoop) - req.Handlers.Unmarshal.PushBack(output.unmarshalInitialResponse) + req.Handlers.Unmarshal.PushBack(es.runOutputStream) + es.output = output + req.Handlers.Unmarshal.PushBack(es.recvInitialEvent) + req.Handlers.Unmarshal.PushBack(es.runOnStreamPartClose) return } @@ -3227,6 +3233,168 @@ func (c *Kinesis) SubscribeToShardWithContext(ctx aws.Context, input *SubscribeT return out, req.Send() } +// SubscribeToShardEventStream provides the event stream handling for the SubscribeToShard. +type SubscribeToShardEventStream struct { + + // Reader is the EventStream reader for the SubscribeToShardEventStream + // events. This value is automatically set by the SDK when the API call is made + // Use this member when unit testing your code with the SDK to mock out the + // EventStream Reader. + // + // Must not be nil. + Reader SubscribeToShardEventStreamReader + + outputReader io.ReadCloser + output *SubscribeToShardOutput + + // StreamCloser is the io.Closer for the EventStream connection. For HTTP + // EventStream this is the response Body. The stream will be closed when + // the Close method of the EventStream is called. + StreamCloser io.Closer + + done chan struct{} + closeOnce sync.Once + err *eventstreamapi.OnceError +} + +func newSubscribeToShardEventStream() *SubscribeToShardEventStream { + return &SubscribeToShardEventStream{ + done: make(chan struct{}), + err: eventstreamapi.NewOnceError(), + } +} + +func (es *SubscribeToShardEventStream) setStreamCloser(r *request.Request) { + es.StreamCloser = r.HTTPResponse.Body +} + +func (es *SubscribeToShardEventStream) runOnStreamPartClose(r *request.Request) { + if es.done == nil { + return + } + go es.waitStreamPartClose() + +} + +func (es *SubscribeToShardEventStream) waitStreamPartClose() { + var outputErrCh <-chan struct{} + if v, ok := es.Reader.(interface{ ErrorSet() <-chan struct{} }); ok { + outputErrCh = v.ErrorSet() + } + var outputClosedCh <-chan struct{} + if v, ok := es.Reader.(interface{ Closed() <-chan struct{} }); ok { + outputClosedCh = v.Closed() + } + + select { + case <-es.done: + case <-outputErrCh: + es.err.SetError(es.Reader.Err()) + es.Close() + case <-outputClosedCh: + if err := es.Reader.Err(); err != nil { + es.err.SetError(es.Reader.Err()) + } + es.Close() + } +} + +func (es *SubscribeToShardEventStream) eventTypeForSubscribeToShardEventStreamOutputEvent(eventType string) (eventstreamapi.Unmarshaler, error) { + if eventType == "initial-response" { + return es.output, nil + } + return unmarshalerForSubscribeToShardEventStreamEvent(eventType) +} + +// Events returns a channel to read events from. +// +// These events are: +// +// * SubscribeToShardEvent +func (es *SubscribeToShardEventStream) Events() <-chan SubscribeToShardEventStreamEvent { + return es.Reader.Events() +} + +func (es *SubscribeToShardEventStream) runOutputStream(r *request.Request) { + var opts []func(*eventstream.Decoder) + if r.Config.Logger != nil && r.Config.LogLevel.Matches(aws.LogDebugWithEventStreamBody) { + opts = append(opts, eventstream.DecodeWithLogger(r.Config.Logger)) + } + + decoder := eventstream.NewDecoder(r.HTTPResponse.Body, opts...) + eventReader := eventstreamapi.NewEventReader(decoder, + protocol.HandlerPayloadUnmarshal{ + Unmarshalers: r.Handlers.UnmarshalStream, + }, + es.eventTypeForSubscribeToShardEventStreamOutputEvent, + ) + + es.outputReader = r.HTTPResponse.Body + es.Reader = newReadSubscribeToShardEventStream(eventReader) +} +func (es *SubscribeToShardEventStream) recvInitialEvent(r *request.Request) { + // Wait for the initial response event, which must be the first + // event to be received from the API. + select { + case event, ok := <-es.Events(): + if !ok { + return + } + + v, ok := event.(*SubscribeToShardOutput) + if !ok || v == nil { + r.Error = awserr.New( + request.ErrCodeSerialization, + fmt.Sprintf("invalid event, %T, expect %T, %v", + event, (*SubscribeToShardOutput)(nil), v), + nil, + ) + return + } + + *es.output = *v + es.output.EventStream = es + } +} + +// Close closes the stream. This will also cause the stream to be closed. +// Close must be called when done using the stream API. Not calling Close +// may result in resource leaks. +// +// You can use the closing of the Reader's Events channel to terminate your +// application's read from the API's stream. +// +func (es *SubscribeToShardEventStream) Close() (err error) { + es.closeOnce.Do(es.safeClose) + return es.Err() +} + +func (es *SubscribeToShardEventStream) safeClose() { + if es.done != nil { + close(es.done) + } + + es.Reader.Close() + if es.outputReader != nil { + es.outputReader.Close() + } + + es.StreamCloser.Close() +} + +// Err returns any error that occurred while reading or writing EventStream +// Events from the service API's response. Returns nil if there were no errors. +func (es *SubscribeToShardEventStream) Err() error { + if err := es.err.Err(); err != nil { + return err + } + if err := es.Reader.Err(); err != nil { + return err + } + + return nil +} + const opUpdateShardCount = "UpdateShardCount" // UpdateShardCountRequest generates a "aws/request.Request" representing the @@ -4810,6 +4978,16 @@ func (s *InternalFailureException) UnmarshalEvent( return nil } +func (s *InternalFailureException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + // Code returns the exception type name. func (s InternalFailureException) Code() string { return "InternalFailureException" @@ -4865,6 +5043,16 @@ func (s *KMSAccessDeniedException) UnmarshalEvent( return nil } +func (s *KMSAccessDeniedException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + // Code returns the exception type name. func (s KMSAccessDeniedException) Code() string { return "KMSAccessDeniedException" @@ -4920,6 +5108,16 @@ func (s *KMSDisabledException) UnmarshalEvent( return nil } +func (s *KMSDisabledException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + // Code returns the exception type name. func (s KMSDisabledException) Code() string { return "KMSDisabledException" @@ -4977,6 +5175,16 @@ func (s *KMSInvalidStateException) UnmarshalEvent( return nil } +func (s *KMSInvalidStateException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + // Code returns the exception type name. func (s KMSInvalidStateException) Code() string { return "KMSInvalidStateException" @@ -5032,6 +5240,16 @@ func (s *KMSNotFoundException) UnmarshalEvent( return nil } +func (s *KMSNotFoundException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + // Code returns the exception type name. func (s KMSNotFoundException) Code() string { return "KMSNotFoundException" @@ -5086,6 +5304,16 @@ func (s *KMSOptInRequired) UnmarshalEvent( return nil } +func (s *KMSOptInRequired) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + // Code returns the exception type name. func (s KMSOptInRequired) Code() string { return "KMSOptInRequired" @@ -5142,6 +5370,16 @@ func (s *KMSThrottlingException) UnmarshalEvent( return nil } +func (s *KMSThrottlingException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + // Code returns the exception type name. func (s KMSThrottlingException) Code() string { return "KMSThrottlingException" @@ -6455,6 +6693,16 @@ func (s *ResourceInUseException) UnmarshalEvent( return nil } +func (s *ResourceInUseException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + // Code returns the exception type name. func (s ResourceInUseException) Code() string { return "ResourceInUseException" @@ -6510,6 +6758,16 @@ func (s *ResourceNotFoundException) UnmarshalEvent( return nil } +func (s *ResourceNotFoundException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + // Code returns the exception type name. func (s ResourceNotFoundException) Code() string { return "ResourceNotFoundException" @@ -7350,78 +7608,30 @@ func (s *SubscribeToShardEvent) UnmarshalEvent( return nil } -// SubscribeToShardEventStream provides handling of EventStreams for -// the SubscribeToShard API. -// -// Use this type to receive SubscribeToShardEventStream events. The events -// can be read from the Events channel member. -// -// The events that can be received are: -// -// * SubscribeToShardEvent -type SubscribeToShardEventStream struct { - // Reader is the EventStream reader for the SubscribeToShardEventStream - // events. This value is automatically set by the SDK when the API call is made - // Use this member when unit testing your code with the SDK to mock out the - // EventStream Reader. - // - // Must not be nil. - Reader SubscribeToShardEventStreamReader - - // StreamCloser is the io.Closer for the EventStream connection. For HTTP - // EventStream this is the response Body. The stream will be closed when - // the Close method of the EventStream is called. - StreamCloser io.Closer -} - -// Close closes the EventStream. This will also cause the Events channel to be -// closed. You can use the closing of the Events channel to terminate your -// application's read from the API's EventStream. -// -// Will close the underlying EventStream reader. For EventStream over HTTP -// connection this will also close the HTTP connection. -// -// Close must be called when done using the EventStream API. Not calling Close -// may result in resource leaks. -func (es *SubscribeToShardEventStream) Close() (err error) { - es.Reader.Close() - es.StreamCloser.Close() - - return es.Err() -} - -// Err returns any error that occurred while reading EventStream Events from -// the service API's response. Returns nil if there were no errors. -func (es *SubscribeToShardEventStream) Err() error { - if err := es.Reader.Err(); err != nil { - return err +func (s *SubscribeToShardEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err } - return nil -} - -// Events returns a channel to read EventStream Events from the -// SubscribeToShard API. -// -// These events are: -// -// * SubscribeToShardEvent -func (es *SubscribeToShardEventStream) Events() <-chan SubscribeToShardEventStreamEvent { - return es.Reader.Events() + msg.Payload = buf.Bytes() + return msg, err } // SubscribeToShardEventStreamEvent groups together all EventStream -// events read from the SubscribeToShard API. +// events writes for SubscribeToShardEventStream. // // These events are: // // * SubscribeToShardEvent type SubscribeToShardEventStreamEvent interface { eventSubscribeToShardEventStream() + eventstreamapi.Marshaler + eventstreamapi.Unmarshaler } -// SubscribeToShardEventStreamReader provides the interface for reading EventStream -// Events from the SubscribeToShard API. The -// default implementation for this interface will be SubscribeToShardEventStream. +// SubscribeToShardEventStreamReader provides the interface for reading to the stream. The +// default implementation for this interface will be SubscribeToShardEventStreamData. // // The reader's Close method must allow multiple concurrent calls. // @@ -7432,8 +7642,7 @@ type SubscribeToShardEventStreamReader interface { // Returns a channel of events as they are read from the event stream. Events() <-chan SubscribeToShardEventStreamEvent - // Close will close the underlying event stream reader. For event stream over - // HTTP this will also close the HTTP connection. + // Close will stop the reader reading events from the stream. Close() error // Returns any error that has occurred while reading from the event stream. @@ -7443,61 +7652,44 @@ type SubscribeToShardEventStreamReader interface { type readSubscribeToShardEventStream struct { eventReader *eventstreamapi.EventReader stream chan SubscribeToShardEventStreamEvent - errVal atomic.Value + err *eventstreamapi.OnceError done chan struct{} closeOnce sync.Once - - initResp eventstreamapi.Unmarshaler } -func newReadSubscribeToShardEventStream( - reader io.ReadCloser, - unmarshalers request.HandlerList, - logger aws.Logger, - logLevel aws.LogLevelType, - initResp eventstreamapi.Unmarshaler, -) *readSubscribeToShardEventStream { +func newReadSubscribeToShardEventStream(eventReader *eventstreamapi.EventReader) *readSubscribeToShardEventStream { r := &readSubscribeToShardEventStream{ - stream: make(chan SubscribeToShardEventStreamEvent), - done: make(chan struct{}), - initResp: initResp, + eventReader: eventReader, + stream: make(chan SubscribeToShardEventStreamEvent), + done: make(chan struct{}), + err: eventstreamapi.NewOnceError(), } - - r.eventReader = eventstreamapi.NewEventReader( - reader, - protocol.HandlerPayloadUnmarshal{ - Unmarshalers: unmarshalers, - }, - r.unmarshalerForEventType, - ) - r.eventReader.UseLogger(logger, logLevel) + go r.readEventStream() return r } -// Close will close the underlying event stream reader. For EventStream over -// HTTP this will also close the HTTP connection. +// Close will close the underlying event stream reader. func (r *readSubscribeToShardEventStream) Close() error { r.closeOnce.Do(r.safeClose) - return r.Err() } +func (r *readSubscribeToShardEventStream) ErrorSet() <-chan struct{} { + return r.err.ErrorSet() +} + +func (r *readSubscribeToShardEventStream) Closed() <-chan struct{} { + return r.done +} + func (r *readSubscribeToShardEventStream) safeClose() { close(r.done) - err := r.eventReader.Close() - if err != nil { - r.errVal.Store(err) - } } func (r *readSubscribeToShardEventStream) Err() error { - if v := r.errVal.Load(); v != nil { - return v.(error) - } - - return nil + return r.err.Err() } func (r *readSubscribeToShardEventStream) Events() <-chan SubscribeToShardEventStreamEvent { @@ -7505,6 +7697,7 @@ func (r *readSubscribeToShardEventStream) Events() <-chan SubscribeToShardEventS } func (r *readSubscribeToShardEventStream) readEventStream() { + defer r.Close() defer close(r.stream) for { @@ -7519,7 +7712,7 @@ func (r *readSubscribeToShardEventStream) readEventStream() { return default: } - r.errVal.Store(err) + r.err.SetError(err) return } @@ -7531,40 +7724,26 @@ func (r *readSubscribeToShardEventStream) readEventStream() { } } -func (r *readSubscribeToShardEventStream) unmarshalerForEventType( - eventType string, -) (eventstreamapi.Unmarshaler, error) { +func unmarshalerForSubscribeToShardEventStreamEvent(eventType string) (eventstreamapi.Unmarshaler, error) { switch eventType { - case "initial-response": - return r.initResp, nil - case "SubscribeToShardEvent": return &SubscribeToShardEvent{}, nil - case "InternalFailureException": return &InternalFailureException{}, nil - case "KMSAccessDeniedException": return &KMSAccessDeniedException{}, nil - case "KMSDisabledException": return &KMSDisabledException{}, nil - case "KMSInvalidStateException": return &KMSInvalidStateException{}, nil - case "KMSNotFoundException": return &KMSNotFoundException{}, nil - case "KMSOptInRequired": return &KMSOptInRequired{}, nil - case "KMSThrottlingException": return &KMSThrottlingException{}, nil - case "ResourceInUseException": return &ResourceInUseException{}, nil - case "ResourceNotFoundException": return &ResourceNotFoundException{}, nil default: @@ -7655,10 +7834,7 @@ func (s *SubscribeToShardInput) SetStartingPosition(v *StartingPosition) *Subscr type SubscribeToShardOutput struct { _ struct{} `type:"structure"` - // Use EventStream to use the API's stream. - // - // EventStream is a required field - EventStream *SubscribeToShardEventStream `type:"structure" required:"true"` + EventStream *SubscribeToShardEventStream } // String returns the string representation @@ -7671,53 +7847,17 @@ func (s SubscribeToShardOutput) GoString() string { return s.String() } -// SetEventStream sets the EventStream field's value. func (s *SubscribeToShardOutput) SetEventStream(v *SubscribeToShardEventStream) *SubscribeToShardOutput { s.EventStream = v return s } - -func (s *SubscribeToShardOutput) runEventStreamLoop(r *request.Request) { - if r.Error != nil { - return - } - reader := newReadSubscribeToShardEventStream( - r.HTTPResponse.Body, - r.Handlers.UnmarshalStream, - r.Config.Logger, - r.Config.LogLevel.Value(), - s, - ) - go reader.readEventStream() - - eventStream := &SubscribeToShardEventStream{ - StreamCloser: r.HTTPResponse.Body, - Reader: reader, - } - s.EventStream = eventStream +func (s *SubscribeToShardOutput) GetEventStream() *SubscribeToShardEventStream { + return s.EventStream } -func (s *SubscribeToShardOutput) unmarshalInitialResponse(r *request.Request) { - // Wait for the initial response event, which must be the first event to be - // received from the API. - select { - case event, ok := <-s.EventStream.Events(): - if !ok { - return - } - es := s.EventStream - v, ok := event.(*SubscribeToShardOutput) - if !ok || v == nil { - r.Error = awserr.New( - request.ErrCodeSerialization, - fmt.Sprintf("invalid event, %T, expect *SubscribeToShardOutput, %v", event, v), - nil, - ) - return - } - *s = *v - s.EventStream = es - } +// GetStream returns the type to interact with the event stream. +func (s *SubscribeToShardOutput) GetStream() *SubscribeToShardEventStream { + return s.EventStream } // The SubscribeToShardOutput is and event in the SubscribeToShardEventStream group of events. @@ -7737,6 +7877,16 @@ func (s *SubscribeToShardOutput) UnmarshalEvent( return nil } +func (s *SubscribeToShardOutput) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + // Metadata assigned to the stream, consisting of a key-value pair. type Tag struct { _ struct{} `type:"structure"` diff --git a/service/kinesis/eventstream_test.go b/service/kinesis/eventstream_test.go index 798db08ea30..0ddd7120a28 100644 --- a/service/kinesis/eventstream_test.go +++ b/service/kinesis/eventstream_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.6 +// +build go1.10 package kinesis @@ -46,12 +46,12 @@ func TestSubscribeToShard_Read(t *testing.T) { if err != nil { t.Fatalf("expect no error got, %v", err) } - defer resp.EventStream.Close() + defer resp.GetStream().Close() // Trim off response output type pseudo event so only event messages remain. expectEvents = expectEvents[1:] var i int - for event := range resp.EventStream.Events() { + for event := range resp.GetStream().Events() { if event == nil { t.Errorf("%d, expect event, got nil", i) } @@ -61,7 +61,7 @@ func TestSubscribeToShard_Read(t *testing.T) { i++ } - if err := resp.EventStream.Err(); err != nil { + if err := resp.GetStream().Err(); err != nil { t.Errorf("expect no error, %v", err) } } @@ -87,19 +87,19 @@ func TestSubscribeToShard_ReadClose(t *testing.T) { } // Assert calling Err before close does not close the stream. - resp.EventStream.Err() + resp.GetStream().Err() select { - case _, ok := <-resp.EventStream.Events(): + case _, ok := <-resp.GetStream().Events(): if !ok { t.Fatalf("expect stream not to be closed, but was") } default: } - resp.EventStream.Close() - <-resp.EventStream.Events() + resp.GetStream().Close() + <-resp.GetStream().Events() - if err := resp.EventStream.Err(); err != nil { + if err := resp.GetStream().Err(); err != nil { t.Errorf("expect no error, %v", err) } } @@ -137,16 +137,16 @@ func BenchmarkSubscribeToShard_Read(b *testing.B) { if err != nil { b.Fatalf("failed to create request, %v", err) } - defer resp.EventStream.Close() + defer resp.GetStream().Close() b.ResetTimer() for i := 0; i < b.N; i++ { - if err = resp.EventStream.Err(); err != nil { + if err = resp.GetStream().Err(); err != nil { b.Fatalf("expect no error, got %v", err) } - event := <-resp.EventStream.Events() + event := <-resp.GetStream().Events() if event == nil { - b.Fatalf("expect event, got nil, %v, %d", resp.EventStream.Err(), i) + b.Fatalf("expect event, got nil, %v, %d", resp.GetStream().Err(), i) } } } @@ -273,11 +273,11 @@ func TestSubscribeToShard_ReadException(t *testing.T) { t.Fatalf("expect no error got, %v", err) } - defer resp.EventStream.Close() + defer resp.GetStream().Close() - <-resp.EventStream.Events() + <-resp.GetStream().Events() - err = resp.EventStream.Err() + err = resp.GetStream().Err() if err == nil { t.Fatalf("expect err, got none") } diff --git a/service/kinesis/service.go b/service/kinesis/service.go index 353756308f2..6c372673b3e 100644 --- a/service/kinesis/service.go +++ b/service/kinesis/service.go @@ -78,6 +78,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) + svc.Handlers.BuildStream.PushBackNamed(jsonrpc.BuildHandler) svc.Handlers.UnmarshalStream.PushBackNamed(jsonrpc.UnmarshalHandler) // Run custom client initialization if present diff --git a/service/lexmodelbuildingservice/api.go b/service/lexmodelbuildingservice/api.go index 83259744d81..b6481e4595b 100644 --- a/service/lexmodelbuildingservice/api.go +++ b/service/lexmodelbuildingservice/api.go @@ -4275,6 +4275,9 @@ type BotAliasMetadata struct { // Checksum of the bot alias. Checksum *string `locationName:"checksum" type:"string"` + // Settings that determine how Amazon Lex uses conversation logs for the alias. + ConversationLogs *ConversationLogsResponse `locationName:"conversationLogs" type:"structure"` + // The date that the bot alias was created. CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` @@ -4317,6 +4320,12 @@ func (s *BotAliasMetadata) SetChecksum(v string) *BotAliasMetadata { return s } +// SetConversationLogs sets the ConversationLogs field's value. +func (s *BotAliasMetadata) SetConversationLogs(v *ConversationLogsResponse) *BotAliasMetadata { + s.ConversationLogs = v + return s +} + // SetCreatedDate sets the CreatedDate field's value. func (s *BotAliasMetadata) SetCreatedDate(v time.Time) *BotAliasMetadata { s.CreatedDate = &v @@ -4677,6 +4686,111 @@ func (s *CodeHook) SetUri(v string) *CodeHook { return s } +// Provides the settings needed for conversation logs. +type ConversationLogsRequest struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of an IAM role with permission to write to + // your CloudWatch Logs for text logs and your S3 bucket for audio logs. If + // audio encryption is enabled, this role also provides access permission for + // the AWS KMS key used for encrypting audio logs. For more information, see + // Creating an IAM Role and Policy for Conversation Logs (https://docs.aws.amazon.com/lex/latest/dg/conversation-logs-role-and-policy.html). + // + // IamRoleArn is a required field + IamRoleArn *string `locationName:"iamRoleArn" min:"20" type:"string" required:"true"` + + // The settings for your conversation logs. You can log the conversation text, + // conversation audio, or both. + // + // LogSettings is a required field + LogSettings []*LogSettingsRequest `locationName:"logSettings" type:"list" required:"true"` +} + +// String returns the string representation +func (s ConversationLogsRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConversationLogsRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ConversationLogsRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ConversationLogsRequest"} + if s.IamRoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("IamRoleArn")) + } + if s.IamRoleArn != nil && len(*s.IamRoleArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("IamRoleArn", 20)) + } + if s.LogSettings == nil { + invalidParams.Add(request.NewErrParamRequired("LogSettings")) + } + if s.LogSettings != nil { + for i, v := range s.LogSettings { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LogSettings", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetIamRoleArn sets the IamRoleArn field's value. +func (s *ConversationLogsRequest) SetIamRoleArn(v string) *ConversationLogsRequest { + s.IamRoleArn = &v + return s +} + +// SetLogSettings sets the LogSettings field's value. +func (s *ConversationLogsRequest) SetLogSettings(v []*LogSettingsRequest) *ConversationLogsRequest { + s.LogSettings = v + return s +} + +// Contains information about conversation log settings. +type ConversationLogsResponse struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the IAM role used to write your logs to + // CloudWatch Logs or an S3 bucket. + IamRoleArn *string `locationName:"iamRoleArn" min:"20" type:"string"` + + // The settings for your conversation logs. You can log text, audio, or both. + LogSettings []*LogSettingsResponse `locationName:"logSettings" type:"list"` +} + +// String returns the string representation +func (s ConversationLogsResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConversationLogsResponse) GoString() string { + return s.String() +} + +// SetIamRoleArn sets the IamRoleArn field's value. +func (s *ConversationLogsResponse) SetIamRoleArn(v string) *ConversationLogsResponse { + s.IamRoleArn = &v + return s +} + +// SetLogSettings sets the LogSettings field's value. +func (s *ConversationLogsResponse) SetLogSettings(v []*LogSettingsResponse) *ConversationLogsResponse { + s.LogSettings = v + return s +} + type CreateBotVersionInput struct { _ struct{} `type:"structure"` @@ -6164,6 +6278,10 @@ type GetBotAliasOutput struct { // Checksum of the bot alias. Checksum *string `locationName:"checksum" type:"string"` + // The settings that determine how Amazon Lex uses conversation logs for the + // alias. + ConversationLogs *ConversationLogsResponse `locationName:"conversationLogs" type:"structure"` + // The date that the bot alias was created. CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` @@ -6206,6 +6324,12 @@ func (s *GetBotAliasOutput) SetChecksum(v string) *GetBotAliasOutput { return s } +// SetConversationLogs sets the ConversationLogs field's value. +func (s *GetBotAliasOutput) SetConversationLogs(v *ConversationLogsResponse) *GetBotAliasOutput { + s.ConversationLogs = v + return s +} + // SetCreatedDate sets the CreatedDate field's value. func (s *GetBotAliasOutput) SetCreatedDate(v time.Time) *GetBotAliasOutput { s.CreatedDate = &v @@ -8687,6 +8811,158 @@ func (s *IntentMetadata) SetVersion(v string) *IntentMetadata { return s } +// Settings used to configure delivery mode and destination for conversation +// logs. +type LogSettingsRequest struct { + _ struct{} `type:"structure"` + + // Where the logs will be delivered. Text logs are delivered to a CloudWatch + // Logs log group. Audio logs are delivered to an S3 bucket. + // + // Destination is a required field + Destination *string `locationName:"destination" type:"string" required:"true" enum:"Destination"` + + // The Amazon Resource Name (ARN) of the AWS KMS customer managed key for encrypting + // audio logs delivered to an S3 bucket. The key does not apply to CloudWatch + // Logs and is optional for S3 buckets. + KmsKeyArn *string `locationName:"kmsKeyArn" min:"20" type:"string"` + + // The type of logging to enable. Text logs are delivered to a CloudWatch Logs + // log group. Audio logs are delivered to an S3 bucket. + // + // LogType is a required field + LogType *string `locationName:"logType" type:"string" required:"true" enum:"LogType"` + + // The Amazon Resource Name (ARN) of the CloudWatch Logs log group or S3 bucket + // where the logs should be delivered. + // + // ResourceArn is a required field + ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s LogSettingsRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LogSettingsRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LogSettingsRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LogSettingsRequest"} + if s.Destination == nil { + invalidParams.Add(request.NewErrParamRequired("Destination")) + } + if s.KmsKeyArn != nil && len(*s.KmsKeyArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("KmsKeyArn", 20)) + } + if s.LogType == nil { + invalidParams.Add(request.NewErrParamRequired("LogType")) + } + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDestination sets the Destination field's value. +func (s *LogSettingsRequest) SetDestination(v string) *LogSettingsRequest { + s.Destination = &v + return s +} + +// SetKmsKeyArn sets the KmsKeyArn field's value. +func (s *LogSettingsRequest) SetKmsKeyArn(v string) *LogSettingsRequest { + s.KmsKeyArn = &v + return s +} + +// SetLogType sets the LogType field's value. +func (s *LogSettingsRequest) SetLogType(v string) *LogSettingsRequest { + s.LogType = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *LogSettingsRequest) SetResourceArn(v string) *LogSettingsRequest { + s.ResourceArn = &v + return s +} + +// The settings for conversation logs. +type LogSettingsResponse struct { + _ struct{} `type:"structure"` + + // The destination where logs are delivered. + Destination *string `locationName:"destination" type:"string" enum:"Destination"` + + // The Amazon Resource Name (ARN) of the key used to encrypt audio logs in an + // S3 bucket. + KmsKeyArn *string `locationName:"kmsKeyArn" min:"20" type:"string"` + + // The type of logging that is enabled. + LogType *string `locationName:"logType" type:"string" enum:"LogType"` + + // The Amazon Resource Name (ARN) of the CloudWatch Logs log group or S3 bucket + // where the logs are delivered. + ResourceArn *string `locationName:"resourceArn" min:"1" type:"string"` + + // The resource prefix is the first part of the S3 object key within the S3 + // bucket that you specified to contain audio logs. For CloudWatch Logs it is + // the prefix of the log stream name within the log group that you specified. + ResourcePrefix *string `locationName:"resourcePrefix" type:"string"` +} + +// String returns the string representation +func (s LogSettingsResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LogSettingsResponse) GoString() string { + return s.String() +} + +// SetDestination sets the Destination field's value. +func (s *LogSettingsResponse) SetDestination(v string) *LogSettingsResponse { + s.Destination = &v + return s +} + +// SetKmsKeyArn sets the KmsKeyArn field's value. +func (s *LogSettingsResponse) SetKmsKeyArn(v string) *LogSettingsResponse { + s.KmsKeyArn = &v + return s +} + +// SetLogType sets the LogType field's value. +func (s *LogSettingsResponse) SetLogType(v string) *LogSettingsResponse { + s.LogType = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *LogSettingsResponse) SetResourceArn(v string) *LogSettingsResponse { + s.ResourceArn = &v + return s +} + +// SetResourcePrefix sets the ResourcePrefix field's value. +func (s *LogSettingsResponse) SetResourcePrefix(v string) *LogSettingsResponse { + s.ResourcePrefix = &v + return s +} + // The message object that provides the message text and its type. type Message struct { _ struct{} `type:"structure"` @@ -8869,6 +9145,9 @@ type PutBotAliasInput struct { // you get a PreconditionFailedException exception. Checksum *string `locationName:"checksum" type:"string"` + // Settings for conversation logs for the alias. + ConversationLogs *ConversationLogsRequest `locationName:"conversationLogs" type:"structure"` + // A description of the alias. Description *string `locationName:"description" type:"string"` @@ -8909,6 +9188,11 @@ func (s *PutBotAliasInput) Validate() error { if s.Name != nil && len(*s.Name) < 1 { invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } + if s.ConversationLogs != nil { + if err := s.ConversationLogs.Validate(); err != nil { + invalidParams.AddNested("ConversationLogs", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -8934,6 +9218,12 @@ func (s *PutBotAliasInput) SetChecksum(v string) *PutBotAliasInput { return s } +// SetConversationLogs sets the ConversationLogs field's value. +func (s *PutBotAliasInput) SetConversationLogs(v *ConversationLogsRequest) *PutBotAliasInput { + s.ConversationLogs = v + return s +} + // SetDescription sets the Description field's value. func (s *PutBotAliasInput) SetDescription(v string) *PutBotAliasInput { s.Description = &v @@ -8958,6 +9248,10 @@ type PutBotAliasOutput struct { // The checksum for the current version of the alias. Checksum *string `locationName:"checksum" type:"string"` + // The settings that determine how Amazon Lex uses conversation logs for the + // alias. + ConversationLogs *ConversationLogsResponse `locationName:"conversationLogs" type:"structure"` + // The date that the bot alias was created. CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` @@ -9000,6 +9294,12 @@ func (s *PutBotAliasOutput) SetChecksum(v string) *PutBotAliasOutput { return s } +// SetConversationLogs sets the ConversationLogs field's value. +func (s *PutBotAliasOutput) SetConversationLogs(v *ConversationLogsResponse) *PutBotAliasOutput { + s.ConversationLogs = v + return s +} + // SetCreatedDate sets the CreatedDate field's value. func (s *PutBotAliasOutput) SetCreatedDate(v time.Time) *PutBotAliasOutput { s.CreatedDate = &v @@ -10247,6 +10547,13 @@ type Slot struct { // Name is a required field Name *string `locationName:"name" min:"1" type:"string" required:"true"` + // Determines whether a slot is obfuscated in conversation logs and stored utterances. + // When you obfuscate a slot, the value is replaced by the slot name in curly + // braces ({}). For example, if the slot name is "full_name", obfuscated values + // are replaced with "{full_name}". For more information, see Slot Obfuscation + // (https://docs.aws.amazon.com/lex/latest/dg/how-obfuscate.html). + ObfuscationSetting *string `locationName:"obfuscationSetting" type:"string" enum:"ObfuscationSetting"` + // Directs Lex the order in which to elicit this slot value from the user. For // example, if the intent has two slots with priorities 1 and 2, AWS Lex first // elicits a value for the slot with priority 1. @@ -10337,6 +10644,12 @@ func (s *Slot) SetName(v string) *Slot { return s } +// SetObfuscationSetting sets the ObfuscationSetting field's value. +func (s *Slot) SetObfuscationSetting(v string) *Slot { + s.ObfuscationSetting = &v + return s +} + // SetPriority sets the Priority field's value. func (s *Slot) SetPriority(v int64) *Slot { s.Priority = &v @@ -10793,6 +11106,14 @@ const ( ContentTypeCustomPayload = "CustomPayload" ) +const ( + // DestinationCloudwatchLogs is a Destination enum value + DestinationCloudwatchLogs = "CLOUDWATCH_LOGS" + + // DestinationS3 is a Destination enum value + DestinationS3 = "S3" +) + const ( // ExportStatusInProgress is a ExportStatus enum value ExportStatusInProgress = "IN_PROGRESS" @@ -10842,6 +11163,14 @@ const ( LocaleDeDe = "de-DE" ) +const ( + // LogTypeAudio is a LogType enum value + LogTypeAudio = "AUDIO" + + // LogTypeText is a LogType enum value + LogTypeText = "TEXT" +) + const ( // MergeStrategyOverwriteLatest is a MergeStrategy enum value MergeStrategyOverwriteLatest = "OVERWRITE_LATEST" @@ -10850,6 +11179,14 @@ const ( MergeStrategyFailOnConflict = "FAIL_ON_CONFLICT" ) +const ( + // ObfuscationSettingNone is a ObfuscationSetting enum value + ObfuscationSettingNone = "NONE" + + // ObfuscationSettingDefaultObfuscation is a ObfuscationSetting enum value + ObfuscationSettingDefaultObfuscation = "DEFAULT_OBFUSCATION" +) + const ( // ProcessBehaviorSave is a ProcessBehavior enum value ProcessBehaviorSave = "SAVE" diff --git a/service/lightsail/api.go b/service/lightsail/api.go index 84cac53bb6d..53e3acae25a 100644 --- a/service/lightsail/api.go +++ b/service/lightsail/api.go @@ -706,10 +706,10 @@ func (c *Lightsail) CopySnapshotRequest(input *CopySnapshotInput) (req *request. // CopySnapshot API operation for Amazon Lightsail. // -// Copies a manual instance or disk snapshot as another manual snapshot, or -// copies an automatic instance or disk snapshot as a manual snapshot. This -// operation can also be used to copy a manual or automatic snapshot of an instance -// or a disk from one AWS Region to another in Amazon Lightsail. +// Copies a manual snapshot of an instance or disk as another manual snapshot, +// or copies an automatic snapshot of an instance or disk as a manual snapshot. +// This operation can also be used to copy a manual or automatic snapshot of +// an instance or a disk from one AWS Region to another in Amazon Lightsail. // // When copying a manual snapshot, be sure to define the source region, source // snapshot name, and target snapshot name parameters. @@ -718,8 +718,6 @@ func (c *Lightsail) CopySnapshotRequest(input *CopySnapshotInput) (req *request. // source resource name, target snapshot name, and either the restore date or // the use latest restorable auto snapshot parameters. // -// Database snapshots cannot be copied at this time. -// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -2485,7 +2483,8 @@ func (c *Lightsail) DeleteAutoSnapshotRequest(input *DeleteAutoSnapshotInput) (r // DeleteAutoSnapshot API operation for Amazon Lightsail. // -// Deletes an automatic snapshot for an instance or disk. +// Deletes an automatic snapshot of an instance or disk. For more information, +// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-configuring-automatic-snapshots). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4752,8 +4751,8 @@ func (c *Lightsail) GetAutoSnapshotsRequest(input *GetAutoSnapshotsInput) (req * // GetAutoSnapshots API operation for Amazon Lightsail. // -// Returns the available automatic snapshots for the specified resource name. -// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-configuring-automatic-snapshots). +// Returns the available automatic snapshots for an instance or disk. For more +// information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-configuring-automatic-snapshots). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -11242,7 +11241,7 @@ func (c *Lightsail) UpdateRelationalDatabaseParametersRequest(input *UpdateRelat // // Parameter updates don't cause outages; therefore, their application is not // subject to the preferred maintenance window. However, there are two ways -// in which paramater updates are applied: dynamic or pending-reboot. Parameters +// in which parameter updates are applied: dynamic or pending-reboot. Parameters // marked with a dynamic apply type are applied immediately. Parameters marked // with a pending-reboot apply type are applied only after the database is rebooted // using the reboot relational database operation. @@ -12462,10 +12461,8 @@ func (s *CloudFormationStackRecordSourceInfo) SetResourceType(v string) *CloudFo type CopySnapshotInput struct { _ struct{} `type:"structure"` - // The date of the automatic snapshot to copy for the new manual snapshot. - // - // Use the get auto snapshots operation to identify the dates of the available - // automatic snapshots. + // The date of the source automatic snapshot to copy. Use the get auto snapshots + // operation to identify the dates of the available automatic snapshots. // // Constraints: // @@ -12475,8 +12472,8 @@ type CopySnapshotInput struct { // auto snapshot parameter. The restore date and use latest restorable auto // snapshot parameters are mutually exclusive. // - // Define this parameter only when copying an automatic snapshot as a manual - // snapshot. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-configuring-automatic-snapshots). + // * Define this parameter only when copying an automatic snapshot as a manual + // snapshot. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-keeping-automatic-snapshots). RestoreDate *string `locationName:"restoreDate" type:"string"` // The AWS Region where the source manual or automatic snapshot is located. @@ -12484,32 +12481,39 @@ type CopySnapshotInput struct { // SourceRegion is a required field SourceRegion *string `locationName:"sourceRegion" type:"string" required:"true" enum:"RegionName"` - // The name of the source resource from which the automatic snapshot was created. + // The name of the source instance or disk from which the source automatic snapshot + // was created. // - // Define this parameter only when copying an automatic snapshot as a manual - // snapshot. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-configuring-automatic-snapshots). + // Constraint: + // + // * Define this parameter only when copying an automatic snapshot as a manual + // snapshot. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-keeping-automatic-snapshots). SourceResourceName *string `locationName:"sourceResourceName" type:"string"` - // The name of the source instance or disk snapshot to be copied. + // The name of the source manual snapshot to copy. // - // Define this parameter only when copying a manual snapshot as another manual - // snapshot. + // Constraint: + // + // * Define this parameter only when copying a manual snapshot as another + // manual snapshot. SourceSnapshotName *string `locationName:"sourceSnapshotName" type:"string"` - // The name of the new instance or disk snapshot to be created as a copy. + // The name of the new manual snapshot to be created as a copy. // // TargetSnapshotName is a required field TargetSnapshotName *string `locationName:"targetSnapshotName" type:"string" required:"true"` // A Boolean value to indicate whether to use the latest available automatic - // snapshot. + // snapshot of the specified source instance or disk. // - // This parameter cannot be defined together with the restore date parameter. - // The use latest restorable auto snapshot and restore date parameters are mutually - // exclusive. + // Constraints: + // + // * This parameter cannot be defined together with the restore date parameter. + // The use latest restorable auto snapshot and restore date parameters are + // mutually exclusive. // - // Define this parameter only when copying an automatic snapshot as a manual - // snapshot. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-configuring-automatic-snapshots). + // * Define this parameter only when copying an automatic snapshot as a manual + // snapshot. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-keeping-automatic-snapshots). UseLatestRestorableAutoSnapshot *bool `locationName:"useLatestRestorableAutoSnapshot" type:"boolean"` } @@ -12696,14 +12700,15 @@ type CreateDiskFromSnapshotInput struct { // The name of the disk snapshot (e.g., my-snapshot) from which to create the // new storage disk. // - // This parameter cannot be defined together with the source disk name parameter. - // The disk snapshot name and source disk name parameters are mutually exclusive. + // Constraint: + // + // * This parameter cannot be defined together with the source disk name + // parameter. The disk snapshot name and source disk name parameters are + // mutually exclusive. DiskSnapshotName *string `locationName:"diskSnapshotName" type:"string"` - // The date of the automatic snapshot to use for the new disk. - // - // Use the get auto snapshots operation to identify the dates of the available - // automatic snapshots. + // The date of the automatic snapshot to use for the new disk. Use the get auto + // snapshots operation to identify the dates of the available automatic snapshots. // // Constraints: // @@ -12713,8 +12718,8 @@ type CreateDiskFromSnapshotInput struct { // auto snapshot parameter. The restore date and use latest restorable auto // snapshot parameters are mutually exclusive. // - // Define this parameter only when creating a new disk from an automatic snapshot. - // For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-configuring-automatic-snapshots). + // * Define this parameter only when creating a new disk from an automatic + // snapshot. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-configuring-automatic-snapshots). RestoreDate *string `locationName:"restoreDate" type:"string"` // The size of the disk in GB (e.g., 32). @@ -12725,11 +12730,14 @@ type CreateDiskFromSnapshotInput struct { // The name of the source disk from which the source automatic snapshot was // created. // - // This parameter cannot be defined together with the disk snapshot name parameter. - // The source disk name and disk snapshot name parameters are mutually exclusive. + // Constraints: + // + // * This parameter cannot be defined together with the disk snapshot name + // parameter. The source disk name and disk snapshot name parameters are + // mutually exclusive. // - // Define this parameter only when creating a new disk from an automatic snapshot. - // For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-configuring-automatic-snapshots). + // * Define this parameter only when creating a new disk from an automatic + // snapshot. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-configuring-automatic-snapshots). SourceDiskName *string `locationName:"sourceDiskName" type:"string"` // The tag keys and optional values to add to the resource during create. @@ -12740,12 +12748,14 @@ type CreateDiskFromSnapshotInput struct { // A Boolean value to indicate whether to use the latest available automatic // snapshot. // - // This parameter cannot be defined together with the restore date parameter. - // The use latest restorable auto snapshot and restore date parameters are mutually - // exclusive. + // Constraints: + // + // * This parameter cannot be defined together with the restore date parameter. + // The use latest restorable auto snapshot and restore date parameters are + // mutually exclusive. // - // Define this parameter only when creating a new disk from an automatic snapshot. - // For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-configuring-automatic-snapshots). + // * Define this parameter only when creating a new disk from an automatic + // snapshot. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-configuring-automatic-snapshots). UseLatestRestorableAutoSnapshot *bool `locationName:"useLatestRestorableAutoSnapshot" type:"boolean"` } @@ -13362,18 +13372,19 @@ type CreateInstancesFromSnapshotInput struct { // Use the get instance snapshots operation to return information about your // existing snapshots. // - // This parameter cannot be defined together with the source instance name parameter. - // The instance snapshot name and source instance name parameters are mutually - // exclusive. + // Constraint: + // + // * This parameter cannot be defined together with the source instance name + // parameter. The instance snapshot name and source instance name parameters + // are mutually exclusive. InstanceSnapshotName *string `locationName:"instanceSnapshotName" type:"string"` // The name for your key pair. KeyPairName *string `locationName:"keyPairName" type:"string"` - // The date of the automatic snapshot to use for the new instance. - // - // Use the get auto snapshots operation to identify the dates of the available - // automatic snapshots. + // The date of the automatic snapshot to use for the new instance. Use the get + // auto snapshots operation to identify the dates of the available automatic + // snapshots. // // Constraints: // @@ -13383,19 +13394,21 @@ type CreateInstancesFromSnapshotInput struct { // auto snapshot parameter. The restore date and use latest restorable auto // snapshot parameters are mutually exclusive. // - // Define this parameter only when creating a new instance from an automatic - // snapshot. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-configuring-automatic-snapshots). + // * Define this parameter only when creating a new instance from an automatic + // snapshot. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-configuring-automatic-snapshots). RestoreDate *string `locationName:"restoreDate" type:"string"` // The name of the source instance from which the source automatic snapshot // was created. // - // This parameter cannot be defined together with the instance snapshot name - // parameter. The source instance name and instance snapshot name parameters - // are mutually exclusive. + // Constraints: + // + // * This parameter cannot be defined together with the instance snapshot + // name parameter. The source instance name and instance snapshot name parameters + // are mutually exclusive. // - // Define this parameter only when creating a new instance from an automatic - // snapshot. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-configuring-automatic-snapshots). + // * Define this parameter only when creating a new instance from an automatic + // snapshot. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-configuring-automatic-snapshots). SourceInstanceName *string `locationName:"sourceInstanceName" type:"string"` // The tag keys and optional values to add to the resource during create. @@ -13406,12 +13419,14 @@ type CreateInstancesFromSnapshotInput struct { // A Boolean value to indicate whether to use the latest available automatic // snapshot. // - // This parameter cannot be defined together with the restore date parameter. - // The use latest restorable auto snapshot and restore date parameters are mutually - // exclusive. + // Constraints: + // + // * This parameter cannot be defined together with the restore date parameter. + // The use latest restorable auto snapshot and restore date parameters are + // mutually exclusive. // - // Define this parameter only when creating a new instance from an automatic - // snapshot. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-configuring-automatic-snapshots). + // * Define this parameter only when creating a new instance from an automatic + // snapshot. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-configuring-automatic-snapshots). UseLatestRestorableAutoSnapshot *bool `locationName:"useLatestRestorableAutoSnapshot" type:"boolean"` // You can create a launch script that configures a server with additional user @@ -14617,15 +14632,15 @@ func (s *CreateRelationalDatabaseSnapshotOutput) SetOperations(v []*Operation) * type DeleteAutoSnapshotInput struct { _ struct{} `type:"structure"` - // The date of the automatic snapshot to delete in YYYY-MM-DD format. - // - // Use the get auto snapshots operation to get the available automatic snapshots - // for a resource. + // The date of the automatic snapshot to delete in YYYY-MM-DD format. Use the + // get auto snapshots operation to get the available automatic snapshots for + // a resource. // // Date is a required field Date *string `locationName:"date" type:"string" required:"true"` - // The name of the source resource from which to delete the automatic snapshot. + // The name of the source instance or disk from which to delete the automatic + // snapshot. // // ResourceName is a required field ResourceName *string `locationName:"resourceName" type:"string" required:"true"` @@ -15767,7 +15782,7 @@ type DisableAddOnInput struct { // AddOnType is a required field AddOnType *string `locationName:"addOnType" type:"string" required:"true" enum:"AddOnType"` - // The name of the source resource from which to disable the add-on. + // The name of the source resource for which to disable the add-on. // // ResourceName is a required field ResourceName *string `locationName:"resourceName" type:"string" required:"true"` @@ -16893,7 +16908,8 @@ func (s *GetActiveNamesOutput) SetNextPageToken(v string) *GetActiveNamesOutput type GetAutoSnapshotsInput struct { _ struct{} `type:"structure"` - // The name of the source resource from which to get automatic snapshot information. + // The name of the source instance or disk from which to get automatic snapshot + // information. // // ResourceName is a required field ResourceName *string `locationName:"resourceName" type:"string" required:"true"` @@ -16932,10 +16948,10 @@ type GetAutoSnapshotsOutput struct { _ struct{} `type:"structure"` // An array of objects that describe the automatic snapshots that are available - // for the specified source resource.asdf + // for the specified source instance or disk. AutoSnapshots []*AutoSnapshotDetails `locationName:"autoSnapshots" type:"list"` - // The name of the source resource for the automatic snapshots. + // The name of the source instance or disk for the automatic snapshots. ResourceName *string `locationName:"resourceName" type:"string"` // The resource type (e.g., Instance or Disk). @@ -22895,6 +22911,9 @@ type RelationalDatabase struct { // for the database. BackupRetentionEnabled *bool `locationName:"backupRetentionEnabled" type:"boolean"` + // The certificate associated with the database. + CaCertificateIdentifier *string `locationName:"caCertificateIdentifier" type:"string"` + // The timestamp when the database was created. Formatted in Unix time. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` @@ -23000,6 +23019,12 @@ func (s *RelationalDatabase) SetBackupRetentionEnabled(v bool) *RelationalDataba return s } +// SetCaCertificateIdentifier sets the CaCertificateIdentifier field's value. +func (s *RelationalDatabase) SetCaCertificateIdentifier(v string) *RelationalDatabase { + s.CaCertificateIdentifier = &v + return s +} + // SetCreatedAt sets the CreatedAt field's value. func (s *RelationalDatabase) SetCreatedAt(v time.Time) *RelationalDatabase { s.CreatedAt = &v @@ -24562,6 +24587,9 @@ type UpdateRelationalDatabaseInput struct { // Default: false ApplyImmediately *bool `locationName:"applyImmediately" type:"boolean"` + // Indicates the certificate that needs to be associated with the database. + CaCertificateIdentifier *string `locationName:"caCertificateIdentifier" type:"string"` + // When true, disables automated backup retention for your database. // // Disabling backup retention deletes all automated database backups. Before @@ -24664,6 +24692,12 @@ func (s *UpdateRelationalDatabaseInput) SetApplyImmediately(v bool) *UpdateRelat return s } +// SetCaCertificateIdentifier sets the CaCertificateIdentifier field's value. +func (s *UpdateRelationalDatabaseInput) SetCaCertificateIdentifier(v string) *UpdateRelationalDatabaseInput { + s.CaCertificateIdentifier = &v + return s +} + // SetDisableBackupRetention sets the DisableBackupRetention field's value. func (s *UpdateRelationalDatabaseInput) SetDisableBackupRetention(v bool) *UpdateRelationalDatabaseInput { s.DisableBackupRetention = &v diff --git a/service/opsworkscm/api.go b/service/opsworkscm/api.go index d606d519333..c195e4eea29 100644 --- a/service/opsworkscm/api.go +++ b/service/opsworkscm/api.go @@ -3,6 +3,7 @@ package opsworkscm import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws" @@ -1152,6 +1153,89 @@ func (c *OpsWorksCM) ExportServerEngineAttributeWithContext(ctx aws.Context, inp return out, req.Send() } +const opListTagsForResource = "ListTagsForResource" + +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTagsForResource for more information on using the ListTagsForResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTagsForResourceRequest method. +// req, resp := client.ListTagsForResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/ListTagsForResource +func (c *OpsWorksCM) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for AWS OpsWorks CM. +// +// Returns a list of tags that are applied to the specified AWS OpsWorks for +// Chef Automate or AWS OpsWorks for Puppet Enterprise servers or backups. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS OpsWorks CM's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The requested resource does not exist, or access was denied. +// +// * ErrCodeValidationException "ValidationException" +// One or more of the provided request parameters are not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/ListTagsForResource +func (c *OpsWorksCM) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + return out, req.Send() +} + +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *OpsWorksCM) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRestoreServer = "RestoreServer" // RestoreServerRequest generates a "aws/request.Request" representing the @@ -1203,6 +1287,12 @@ func (c *OpsWorksCM) RestoreServerRequest(input *RestoreServerInput) (req *reque // maintains the existing server endpoint, so configuration management of the // server's client devices (nodes) should continue to work. // +// Restoring from a backup is performed by creating a new EC2 instance. If restoration +// is successful, and the server is in a HEALTHY state, AWS OpsWorks CM switches +// traffic over to the new instance. After restoration is finished, the old +// EC2 instance is maintained in a Running or Stopped state, but is eventually +// terminated. +// // This operation is asynchronous. // // An InvalidStateException is thrown when the server is not in a valid state. @@ -1343,6 +1433,181 @@ func (c *OpsWorksCM) StartMaintenanceWithContext(ctx aws.Context, input *StartMa return out, req.Send() } +const opTagResource = "TagResource" + +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TagResource for more information on using the TagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/TagResource +func (c *OpsWorksCM) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagResource API operation for AWS OpsWorks CM. +// +// Applies tags to an AWS OpsWorks for Chef Automate or AWS OpsWorks for Puppet +// Enterprise server, or to server backups. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS OpsWorks CM's +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The requested resource does not exist, or access was denied. +// +// * ErrCodeValidationException "ValidationException" +// One or more of the provided request parameters are not valid. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// The resource is in a state that does not allow you to perform a specified +// action. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/TagResource +func (c *OpsWorksCM) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *OpsWorksCM) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UntagResource for more information on using the UntagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/UntagResource +func (c *OpsWorksCM) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for AWS OpsWorks CM. +// +// Removes specified tags from an AWS OpsWorks-CM server or backup. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS OpsWorks CM's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The requested resource does not exist, or access was denied. +// +// * ErrCodeValidationException "ValidationException" +// One or more of the provided request parameters are not valid. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// The resource is in a state that does not allow you to perform a specified +// action. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/UntagResource +func (c *OpsWorksCM) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *OpsWorksCM) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateServer = "UpdateServer" // UpdateServerRequest generates a "aws/request.Request" representing the @@ -1937,6 +2202,26 @@ type CreateBackupInput struct { // // ServerName is a required field ServerName *string `min:"1" type:"string" required:"true"` + + // A map that contains tag keys and tag values to attach to an AWS OpsWorks-CM + // server backup. + // + // * The key cannot be empty. + // + // * The key can be a maximum of 127 characters, and can contain only Unicode + // letters, numbers, or separators, or the following special characters: + // + - = . _ : / + // + // * The value can be a maximum 255 characters, and contain only Unicode + // letters, numbers, or separators, or the following special characters: + // + - = . _ : / + // + // * Leading and trailing white spaces are trimmed from both the key and + // value. + // + // * A maximum of 50 user-applied tags is allowed for tag-supported AWS OpsWorks-CM + // resources. + Tags []*Tag `type:"list"` } // String returns the string representation @@ -1958,6 +2243,16 @@ func (s *CreateBackupInput) Validate() error { if s.ServerName != nil && len(*s.ServerName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ServerName", 1)) } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -1977,6 +2272,12 @@ func (s *CreateBackupInput) SetServerName(v string) *CreateBackupInput { return s } +// SetTags sets the Tags field's value. +func (s *CreateBackupInput) SetTags(v []*Tag) *CreateBackupInput { + s.Tags = v + return s +} + type CreateBackupOutput struct { _ struct{} `type:"structure"` @@ -2016,10 +2317,11 @@ type CreateServerInput struct { // exceeded. The default value is 1. BackupRetentionCount *int64 `min:"1" type:"integer"` - // A PEM-formatted HTTPS certificate. The value can be be a single, self-signed - // certificate, or a certificate chain. If you specify a custom certificate, - // you must also specify values for CustomDomain and CustomPrivateKey. The following - // are requirements for the CustomCertificate value: + // Supported on servers running Chef Automate 2. A PEM-formatted HTTPS certificate. + // The value can be be a single, self-signed certificate, or a certificate chain. + // If you specify a custom certificate, you must also specify values for CustomDomain + // and CustomPrivateKey. The following are requirements for the CustomCertificate + // value: // // * You can provide either a self-signed, custom certificate, or the full // certificate chain. @@ -2037,19 +2339,20 @@ type CreateServerInput struct { // * The certificate must match the value of CustomPrivateKey. CustomCertificate *string `type:"string"` - // An optional public endpoint of a server, such as https://aws.my-company.com. - // To access the server, create a CNAME DNS record in your preferred DNS service - // that points the custom domain to the endpoint that is generated when the - // server is created (the value of the CreateServer Endpoint attribute). You - // cannot access the server by using the generated Endpoint value if the server - // is using a custom domain. If you specify a custom domain, you must also specify - // values for CustomCertificate and CustomPrivateKey. + // Supported on servers running Chef Automate 2. An optional public endpoint + // of a server, such as https://aws.my-company.com. To access the server, create + // a CNAME DNS record in your preferred DNS service that points the custom domain + // to the endpoint that is generated when the server is created (the value of + // the CreateServer Endpoint attribute). You cannot access the server by using + // the generated Endpoint value if the server is using a custom domain. If you + // specify a custom domain, you must also specify values for CustomCertificate + // and CustomPrivateKey. CustomDomain *string `type:"string"` - // A private key in PEM format for connecting to the server by using HTTPS. - // The private key must not be encrypted; it cannot be protected by a password - // or passphrase. If you specify a custom private key, you must also specify - // values for CustomDomain and CustomCertificate. + // Supported on servers running Chef Automate 2. A private key in PEM format + // for connecting to the server by using HTTPS. The private key must not be + // encrypted; it cannot be protected by a password or passphrase. If you specify + // a custom private key, you must also specify values for CustomDomain and CustomCertificate. CustomPrivateKey *string `type:"string" sensitive:"true"` // Enable or disable scheduled backups. Valid values are true or false. The @@ -2183,6 +2486,26 @@ type CreateServerInput struct { // For more information about supported Amazon EC2 platforms, see Supported // Platforms (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html). SubnetIds []*string `type:"list"` + + // A map that contains tag keys and tag values to attach to an AWS OpsWorks + // for Chef Automate or AWS OpsWorks for Puppet Enterprise server. + // + // * The key cannot be empty. + // + // * The key can be a maximum of 127 characters, and can contain only Unicode + // letters, numbers, or separators, or the following special characters: + // + - = . _ : / + // + // * The value can be a maximum 255 characters, and contain only Unicode + // letters, numbers, or separators, or the following special characters: + // + - = . _ : / + // + // * Leading and trailing white spaces are trimmed from both the key and + // value. + // + // * A maximum of 50 user-applied tags is allowed for any AWS OpsWorks-CM + // server. + Tags []*Tag `type:"list"` } // String returns the string representation @@ -2216,6 +2539,16 @@ func (s *CreateServerInput) Validate() error { if s.ServiceRoleArn == nil { invalidParams.Add(request.NewErrParamRequired("ServiceRoleArn")) } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -2343,6 +2676,12 @@ func (s *CreateServerInput) SetSubnetIds(v []*string) *CreateServerInput { return s } +// SetTags sets the Tags field's value. +func (s *CreateServerInput) SetTags(v []*Tag) *CreateServerInput { + s.Tags = v + return s +} + type CreateServerOutput struct { _ struct{} `type:"structure"` @@ -3154,6 +3493,111 @@ func (s *ExportServerEngineAttributeOutput) SetServerName(v string) *ExportServe return s } +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // To receive a paginated response, use this parameter to specify the maximum + // number of results to be returned with a single call. If the number of available + // results exceeds this maximum, the response includes a NextToken value that + // you can assign to the NextToken request parameter to get the next set of + // results. + MaxResults *int64 `min:"1" type:"integer"` + + // NextToken is a string that is returned in some command responses. It indicates + // that not all entries have been returned, and that you must run at least one + // more request to get remaining items. To get remaining results, call ListTagsForResource + // again, and assign the token from the previous results as the value of the + // nextToken parameter. If there are no more results, the response object's + // nextToken parameter value is null. Setting a nextToken value that was not + // returned in your previous results causes an InvalidNextTokenException to + // occur. + NextToken *string `type:"string"` + + // The Amazon Resource Number (ARN) of an AWS OpsWorks for Chef Automate or + // AWS OpsWorks for Puppet Enterprise server for which you want to show applied + // tags. For example, arn:aws:opsworks-cm:us-west-2:123456789012:server/test-owcm-server/EXAMPLE-66b0-4196-8274-d1a2bEXAMPLE. + // + // ResourceArn is a required field + ResourceArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListTagsForResourceInput) SetMaxResults(v int64) *ListTagsForResourceInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTagsForResourceInput) SetNextToken(v string) *ListTagsForResourceInput { + s.NextToken = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { + s.ResourceArn = &v + return s +} + +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // A token that you can use as the value of NextToken in subsequent calls to + // the API to show more results. + NextToken *string `type:"string"` + + // Tags that have been applied to the resource. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s ListTagsForResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTagsForResourceOutput) SetNextToken(v string) *ListTagsForResourceOutput { + s.NextToken = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { + s.Tags = v + return s +} + type RestoreServerInput struct { _ struct{} `type:"structure"` @@ -3641,6 +4085,230 @@ func (s *StartMaintenanceOutput) SetServer(v *Server) *StartMaintenanceOutput { return s } +// A map that contains tag keys and tag values to attach to an AWS OpsWorks +// for Chef Automate or AWS OpsWorks for Puppet Enterprise server. Leading and +// trailing white spaces are trimmed from both the key and value. A maximum +// of 50 user-applied tags is allowed for tag-supported AWS OpsWorks-CM resources. +type Tag struct { + _ struct{} `type:"structure"` + + // A tag key, such as Stage or Name. A tag key cannot be empty. The key can + // be a maximum of 127 characters, and can contain only Unicode letters, numbers, + // or separators, or the following special characters: + - = . _ : / + // + // Key is a required field + Key *string `min:"1" type:"string" required:"true"` + + // An optional tag value, such as Production or test-owcm-server. The value + // can be a maximum of 255 characters, and contain only Unicode letters, numbers, + // or separators, or the following special characters: + - = . _ : / + // + // Value is a required field + Value *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Tag) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Tag"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Number (ARN) of a resource to which you want to apply + // tags. For example, arn:aws:opsworks-cm:us-west-2:123456789012:server/test-owcm-server/EXAMPLE-66b0-4196-8274-d1a2bEXAMPLE. + // + // ResourceArn is a required field + ResourceArn *string `type:"string" required:"true"` + + // A map that contains tag keys and tag values to attach to AWS OpsWorks-CM + // servers or backups. + // + // * The key cannot be empty. + // + // * The key can be a maximum of 127 characters, and can contain only Unicode + // letters, numbers, or separators, or the following special characters: + // + - = . _ : / + // + // * The value can be a maximum 255 characters, and contain only Unicode + // letters, numbers, or separators, or the following special characters: + // + - = . _ : / + // + // * Leading and trailing white spaces are trimmed from both the key and + // value. + // + // * A maximum of 50 user-applied tags is allowed for any AWS OpsWorks-CM + // server or backup. + // + // Tags is a required field + Tags []*Tag `type:"list" required:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { + s.Tags = v + return s +} + +type TagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceOutput) GoString() string { + return s.String() +} + +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Number (ARN) of a resource from which you want to remove + // tags. For example, arn:aws:opsworks-cm:us-west-2:123456789012:server/test-owcm-server/EXAMPLE-66b0-4196-8274-d1a2bEXAMPLE. + // + // ResourceArn is a required field + ResourceArn *string `type:"string" required:"true"` + + // The keys of tags that you want to remove. + // + // TagKeys is a required field + TagKeys []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s UntagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { + s.TagKeys = v + return s +} + +type UntagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceOutput) GoString() string { + return s.String() +} + type UpdateServerEngineAttributesInput struct { _ struct{} `type:"structure"` diff --git a/service/opsworkscm/opsworkscmiface/interface.go b/service/opsworkscm/opsworkscmiface/interface.go index 8329cf88ae6..c8cbeb08af5 100644 --- a/service/opsworkscm/opsworkscmiface/interface.go +++ b/service/opsworkscm/opsworkscmiface/interface.go @@ -108,6 +108,10 @@ type OpsWorksCMAPI interface { ExportServerEngineAttributeWithContext(aws.Context, *opsworkscm.ExportServerEngineAttributeInput, ...request.Option) (*opsworkscm.ExportServerEngineAttributeOutput, error) ExportServerEngineAttributeRequest(*opsworkscm.ExportServerEngineAttributeInput) (*request.Request, *opsworkscm.ExportServerEngineAttributeOutput) + ListTagsForResource(*opsworkscm.ListTagsForResourceInput) (*opsworkscm.ListTagsForResourceOutput, error) + ListTagsForResourceWithContext(aws.Context, *opsworkscm.ListTagsForResourceInput, ...request.Option) (*opsworkscm.ListTagsForResourceOutput, error) + ListTagsForResourceRequest(*opsworkscm.ListTagsForResourceInput) (*request.Request, *opsworkscm.ListTagsForResourceOutput) + RestoreServer(*opsworkscm.RestoreServerInput) (*opsworkscm.RestoreServerOutput, error) RestoreServerWithContext(aws.Context, *opsworkscm.RestoreServerInput, ...request.Option) (*opsworkscm.RestoreServerOutput, error) RestoreServerRequest(*opsworkscm.RestoreServerInput) (*request.Request, *opsworkscm.RestoreServerOutput) @@ -116,6 +120,14 @@ type OpsWorksCMAPI interface { StartMaintenanceWithContext(aws.Context, *opsworkscm.StartMaintenanceInput, ...request.Option) (*opsworkscm.StartMaintenanceOutput, error) StartMaintenanceRequest(*opsworkscm.StartMaintenanceInput) (*request.Request, *opsworkscm.StartMaintenanceOutput) + TagResource(*opsworkscm.TagResourceInput) (*opsworkscm.TagResourceOutput, error) + TagResourceWithContext(aws.Context, *opsworkscm.TagResourceInput, ...request.Option) (*opsworkscm.TagResourceOutput, error) + TagResourceRequest(*opsworkscm.TagResourceInput) (*request.Request, *opsworkscm.TagResourceOutput) + + UntagResource(*opsworkscm.UntagResourceInput) (*opsworkscm.UntagResourceOutput, error) + UntagResourceWithContext(aws.Context, *opsworkscm.UntagResourceInput, ...request.Option) (*opsworkscm.UntagResourceOutput, error) + UntagResourceRequest(*opsworkscm.UntagResourceInput) (*request.Request, *opsworkscm.UntagResourceOutput) + UpdateServer(*opsworkscm.UpdateServerInput) (*opsworkscm.UpdateServerOutput, error) UpdateServerWithContext(aws.Context, *opsworkscm.UpdateServerInput, ...request.Option) (*opsworkscm.UpdateServerOutput, error) UpdateServerRequest(*opsworkscm.UpdateServerInput) (*request.Request, *opsworkscm.UpdateServerOutput) diff --git a/service/personalizeruntime/api.go b/service/personalizeruntime/api.go index 255cac26384..58817e305f9 100644 --- a/service/personalizeruntime/api.go +++ b/service/personalizeruntime/api.go @@ -193,8 +193,15 @@ type GetPersonalizedRankingInput struct { // CampaignArn is a required field CampaignArn *string `locationName:"campaignArn" type:"string" required:"true"` + // The contextual metadata to use when getting recommendations. Contextual metadata + // includes any interaction information that might be relevant when getting + // a user's recommendations, such as the user's current location or device type. + // For more information, see Contextual Metadata. + Context map[string]*string `locationName:"context" type:"map"` + // A list of items (itemId's) to rank. If an item was not included in the training - // dataset, the item is appended to the end of the reranked list. + // dataset, the item is appended to the end of the reranked list. The maximum + // is 500. // // InputList is a required field InputList []*string `locationName:"inputList" type:"list" required:"true"` @@ -240,6 +247,12 @@ func (s *GetPersonalizedRankingInput) SetCampaignArn(v string) *GetPersonalizedR return s } +// SetContext sets the Context field's value. +func (s *GetPersonalizedRankingInput) SetContext(v map[string]*string) *GetPersonalizedRankingInput { + s.Context = v + return s +} + // SetInputList sets the InputList field's value. func (s *GetPersonalizedRankingInput) SetInputList(v []*string) *GetPersonalizedRankingInput { s.InputList = v @@ -255,7 +268,8 @@ func (s *GetPersonalizedRankingInput) SetUserId(v string) *GetPersonalizedRankin type GetPersonalizedRankingOutput struct { _ struct{} `type:"structure"` - // A list of items in order of most likely interest to the user. + // A list of items in order of most likely interest to the user. The maximum + // is 500. PersonalizedRanking []*PredictedItem `locationName:"personalizedRanking" type:"list"` } @@ -283,12 +297,18 @@ type GetRecommendationsInput struct { // CampaignArn is a required field CampaignArn *string `locationName:"campaignArn" type:"string" required:"true"` + // The contextual metadata to use when getting recommendations. Contextual metadata + // includes any interaction information that might be relevant when getting + // a user's recommendations, such as the user's current location or device type. + // For more information, see Contextual Metadata. + Context map[string]*string `locationName:"context" type:"map"` + // The item ID to provide recommendations for. // // Required for RELATED_ITEMS recipe type. ItemId *string `locationName:"itemId" type:"string"` - // The number of results to return. The default is 25. The maximum is 100. + // The number of results to return. The default is 25. The maximum is 500. NumResults *int64 `locationName:"numResults" type:"integer"` // The user ID to provide recommendations for. @@ -326,6 +346,12 @@ func (s *GetRecommendationsInput) SetCampaignArn(v string) *GetRecommendationsIn return s } +// SetContext sets the Context field's value. +func (s *GetRecommendationsInput) SetContext(v map[string]*string) *GetRecommendationsInput { + s.Context = v + return s +} + // SetItemId sets the ItemId field's value. func (s *GetRecommendationsInput) SetItemId(v string) *GetRecommendationsInput { s.ItemId = &v @@ -347,7 +373,8 @@ func (s *GetRecommendationsInput) SetUserId(v string) *GetRecommendationsInput { type GetRecommendationsOutput struct { _ struct{} `type:"structure"` - // A list of recommendations. + // A list of recommendations sorted in ascending order by prediction score. + // There can be a maximum of 500 items in the list. ItemList []*PredictedItem `locationName:"itemList" type:"list"` } diff --git a/service/pinpoint/api.go b/service/pinpoint/api.go index c9e9516641f..9bfa0400aeb 100644 --- a/service/pinpoint/api.go +++ b/service/pinpoint/api.go @@ -246,8 +246,7 @@ func (c *Pinpoint) CreateEmailTemplateRequest(input *CreateEmailTemplateInput) ( // CreateEmailTemplate API operation for Amazon Pinpoint. // -// Creates a message template that you can use in messages that are sent through -// the email channel. +// Creates a message template for messages that are sent through the email channel. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -620,8 +619,8 @@ func (c *Pinpoint) CreatePushTemplateRequest(input *CreatePushTemplateInput) (re // CreatePushTemplate API operation for Amazon Pinpoint. // -// Creates a message template that you can use in messages that are sent through -// a push notification channel. +// Creates a message template for messages that are sent through a push notification +// channel. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -807,8 +806,7 @@ func (c *Pinpoint) CreateSmsTemplateRequest(input *CreateSmsTemplateInput) (req // CreateSmsTemplate API operation for Amazon Pinpoint. // -// Creates a message template that you can use in messages that are sent through -// the SMS channel. +// Creates a message template for messages that are sent through the SMS channel. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -899,8 +897,7 @@ func (c *Pinpoint) CreateVoiceTemplateRequest(input *CreateVoiceTemplateInput) ( // CreateVoiceTemplate API operation for Amazon Pinpoint. // -// Creates a message template that you can use in messages that are sent through -// the voice channel. +// Creates a message template for messages that are sent through the voice channel. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1844,8 +1841,8 @@ func (c *Pinpoint) DeleteEmailTemplateRequest(input *DeleteEmailTemplateInput) ( // DeleteEmailTemplate API operation for Amazon Pinpoint. // -// Deletes a message template that was designed for use in messages that were -// sent through the email channel. +// Deletes a message template for messages that were sent through the email +// channel. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2316,8 +2313,8 @@ func (c *Pinpoint) DeletePushTemplateRequest(input *DeletePushTemplateInput) (re // DeletePushTemplate API operation for Amazon Pinpoint. // -// Deletes a message template that was designed for use in messages that were -// sent through a push notification channel. +// Deletes a message template for messages that were sent through a push notification +// channel. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2600,8 +2597,7 @@ func (c *Pinpoint) DeleteSmsTemplateRequest(input *DeleteSmsTemplateInput) (req // DeleteSmsTemplate API operation for Amazon Pinpoint. // -// Deletes a message template that was designed for use in messages that were -// sent through the SMS channel. +// Deletes a message template for messages that were sent through the SMS channel. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2884,8 +2880,8 @@ func (c *Pinpoint) DeleteVoiceTemplateRequest(input *DeleteVoiceTemplateInput) ( // DeleteVoiceTemplate API operation for Amazon Pinpoint. // -// Deletes a message template that was designed for use in messages that were -// sent through the voice channel. +// Deletes a message template for messages that were sent through the voice +// channel. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3737,7 +3733,8 @@ func (c *Pinpoint) GetAppsRequest(input *GetAppsInput) (req *request.Request, ou // GetApps API operation for Amazon Pinpoint. // -// Retrieves information about all of your applications. +// Retrieves information about all the applications that are associated with +// your Amazon Pinpoint account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4685,8 +4682,8 @@ func (c *Pinpoint) GetEmailTemplateRequest(input *GetEmailTemplateInput) (req *r // GetEmailTemplate API operation for Amazon Pinpoint. // -// Retrieves the content and settings for a message template that you can use -// in messages that are sent through the email channel. +// Retrieves the content and settings of a message template for messages that +// are sent through the email channel. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -5824,8 +5821,8 @@ func (c *Pinpoint) GetPushTemplateRequest(input *GetPushTemplateInput) (req *req // GetPushTemplate API operation for Amazon Pinpoint. // -// Retrieves the content and settings for a message template that you can use -// in messages that are sent through a push notification channel. +// Retrieves the content and settings of a message template for messages that +// are sent through a push notification channel. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -6300,7 +6297,7 @@ func (c *Pinpoint) GetSegmentVersionsRequest(input *GetSegmentVersionsInput) (re // GetSegmentVersions API operation for Amazon Pinpoint. // // Retrieves information about the configuration, dimension, and other settings -// for all versions of a specific segment that's associated with an application. +// for all the versions of a specific segment that's associated with an application. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -6584,8 +6581,8 @@ func (c *Pinpoint) GetSmsTemplateRequest(input *GetSmsTemplateInput) (req *reque // GetSmsTemplate API operation for Amazon Pinpoint. // -// Retrieves the content and settings for a message template that you can use -// in messages that are sent through the SMS channel. +// Retrieves the content and settings of a message template for messages that +// are sent through the SMS channel. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -6869,8 +6866,8 @@ func (c *Pinpoint) GetVoiceTemplateRequest(input *GetVoiceTemplateInput) (req *r // GetVoiceTemplate API operation for Amazon Pinpoint. // -// Retrieves the content and settings for a message template that you can use -// in messages that are sent through the voice channel. +// Retrieves the content and settings of a message template for messages that +// are sent through the voice channel. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -7090,6 +7087,100 @@ func (c *Pinpoint) ListTagsForResourceWithContext(ctx aws.Context, input *ListTa return out, req.Send() } +const opListTemplateVersions = "ListTemplateVersions" + +// ListTemplateVersionsRequest generates a "aws/request.Request" representing the +// client's request for the ListTemplateVersions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTemplateVersions for more information on using the ListTemplateVersions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTemplateVersionsRequest method. +// req, resp := client.ListTemplateVersionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/ListTemplateVersions +func (c *Pinpoint) ListTemplateVersionsRequest(input *ListTemplateVersionsInput) (req *request.Request, output *ListTemplateVersionsOutput) { + op := &request.Operation{ + Name: opListTemplateVersions, + HTTPMethod: "GET", + HTTPPath: "/v1/templates/{template-name}/{template-type}/versions", + } + + if input == nil { + input = &ListTemplateVersionsInput{} + } + + output = &ListTemplateVersionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTemplateVersions API operation for Amazon Pinpoint. +// +// Retrieves information about all the versions of a specific message template. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation ListTemplateVersions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Provides information about an API request or response. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Provides information about an API request or response. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Provides information about an API request or response. +// +// * ErrCodeNotFoundException "NotFoundException" +// Provides information about an API request or response. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Provides information about an API request or response. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Provides information about an API request or response. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/ListTemplateVersions +func (c *Pinpoint) ListTemplateVersions(input *ListTemplateVersionsInput) (*ListTemplateVersionsOutput, error) { + req, out := c.ListTemplateVersionsRequest(input) + return out, req.Send() +} + +// ListTemplateVersionsWithContext is the same as ListTemplateVersions with the addition of +// the ability to pass a context and additional request options. +// +// See ListTemplateVersions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) ListTemplateVersionsWithContext(ctx aws.Context, input *ListTemplateVersionsInput, opts ...request.Option) (*ListTemplateVersionsOutput, error) { + req, out := c.ListTemplateVersionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListTemplates = "ListTemplates" // ListTemplatesRequest generates a "aws/request.Request" representing the @@ -8798,8 +8889,8 @@ func (c *Pinpoint) UpdateEmailTemplateRequest(input *UpdateEmailTemplateInput) ( // UpdateEmailTemplate API operation for Amazon Pinpoint. // -// Updates an existing message template that you can use in messages that are -// sent through the email channel. +// Updates an existing message template for messages that are sent through the +// email channel. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -9276,7 +9367,7 @@ func (c *Pinpoint) UpdateJourneyStateRequest(input *UpdateJourneyStateInput) (re // UpdateJourneyState API operation for Amazon Pinpoint. // -// Cancels an active journey. +// Cancels (stops) an active journey. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -9370,8 +9461,8 @@ func (c *Pinpoint) UpdatePushTemplateRequest(input *UpdatePushTemplateInput) (re // UpdatePushTemplate API operation for Amazon Pinpoint. // -// Updates an existing message template that you can use in messages that are -// sent through a push notification channel. +// Updates an existing message template for messages that are sent through a +// push notification channel. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -9655,8 +9746,8 @@ func (c *Pinpoint) UpdateSmsTemplateRequest(input *UpdateSmsTemplateInput) (req // UpdateSmsTemplate API operation for Amazon Pinpoint. // -// Updates an existing message template that you can use in messages that are -// sent through the SMS channel. +// Updates an existing message template for messages that are sent through the +// SMS channel. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -9706,6 +9797,100 @@ func (c *Pinpoint) UpdateSmsTemplateWithContext(ctx aws.Context, input *UpdateSm return out, req.Send() } +const opUpdateTemplateActiveVersion = "UpdateTemplateActiveVersion" + +// UpdateTemplateActiveVersionRequest generates a "aws/request.Request" representing the +// client's request for the UpdateTemplateActiveVersion operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateTemplateActiveVersion for more information on using the UpdateTemplateActiveVersion +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateTemplateActiveVersionRequest method. +// req, resp := client.UpdateTemplateActiveVersionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateTemplateActiveVersion +func (c *Pinpoint) UpdateTemplateActiveVersionRequest(input *UpdateTemplateActiveVersionInput) (req *request.Request, output *UpdateTemplateActiveVersionOutput) { + op := &request.Operation{ + Name: opUpdateTemplateActiveVersion, + HTTPMethod: "PUT", + HTTPPath: "/v1/templates/{template-name}/{template-type}/active-version", + } + + if input == nil { + input = &UpdateTemplateActiveVersionInput{} + } + + output = &UpdateTemplateActiveVersionOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateTemplateActiveVersion API operation for Amazon Pinpoint. +// +// Changes the status of a specific version of a message template to active. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation UpdateTemplateActiveVersion for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Provides information about an API request or response. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Provides information about an API request or response. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Provides information about an API request or response. +// +// * ErrCodeNotFoundException "NotFoundException" +// Provides information about an API request or response. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Provides information about an API request or response. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Provides information about an API request or response. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateTemplateActiveVersion +func (c *Pinpoint) UpdateTemplateActiveVersion(input *UpdateTemplateActiveVersionInput) (*UpdateTemplateActiveVersionOutput, error) { + req, out := c.UpdateTemplateActiveVersionRequest(input) + return out, req.Send() +} + +// UpdateTemplateActiveVersionWithContext is the same as UpdateTemplateActiveVersion with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateTemplateActiveVersion for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) UpdateTemplateActiveVersionWithContext(ctx aws.Context, input *UpdateTemplateActiveVersionInput, opts ...request.Option) (*UpdateTemplateActiveVersionOutput, error) { + req, out := c.UpdateTemplateActiveVersionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateVoiceChannel = "UpdateVoiceChannel" // UpdateVoiceChannelRequest generates a "aws/request.Request" representing the @@ -9845,8 +10030,8 @@ func (c *Pinpoint) UpdateVoiceTemplateRequest(input *UpdateVoiceTemplateInput) ( // UpdateVoiceTemplate API operation for Amazon Pinpoint. // -// Updates an existing message template that you can use in messages that are -// sent through the voice channel. +// Updates an existing message template for messages that are sent through the +// voice channel. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -11614,8 +11799,8 @@ type Activity struct { Holdout *HoldoutActivity `type:"structure"` // The settings for a multivariate split activity. This type of activity sends - // participants down one of as many as five paths in a journey, based on conditions - // that you specify. + // participants down one of as many as five paths (including a default Else + // path) in a journey, based on conditions that you specify. MultiCondition *MultiConditionalSplitActivity `type:"structure"` // The settings for a random split activity. This type of activity randomly @@ -13147,7 +13332,7 @@ type CampaignResponse struct { // Arn is a required field Arn *string `type:"string" required:"true"` - // The date, ISO 8601 format, when the campaign was created. + // The date, in ISO 8601 format, when the campaign was created. // // CreationDate is a required field CreationDate *string `type:"string" required:"true"` @@ -13680,11 +13865,11 @@ type ConditionalSplitActivity struct { // are met. EvaluationWaitTime *WaitTime `type:"structure"` - // The unique identifier for the activity to perform if the condition isn't + // The unique identifier for the activity to perform if the conditions aren't // met. FalseActivity *string `type:"string"` - // The unique identifier for the activity to perform if the condition is met. + // The unique identifier for the activity to perform if the conditions are met. TrueActivity *string `type:"string"` } @@ -15465,6 +15650,8 @@ type DeleteEmailTemplateInput struct { // TemplateName is a required field TemplateName *string `location:"uri" locationName:"template-name" type:"string" required:"true"` + + Version *string `location:"querystring" locationName:"version" type:"string"` } // String returns the string representation @@ -15499,6 +15686,12 @@ func (s *DeleteEmailTemplateInput) SetTemplateName(v string) *DeleteEmailTemplat return s } +// SetVersion sets the Version field's value. +func (s *DeleteEmailTemplateInput) SetVersion(v string) *DeleteEmailTemplateInput { + s.Version = &v + return s +} + type DeleteEmailTemplateOutput struct { _ struct{} `type:"structure" payload:"MessageBody"` @@ -15820,6 +16013,8 @@ type DeletePushTemplateInput struct { // TemplateName is a required field TemplateName *string `location:"uri" locationName:"template-name" type:"string" required:"true"` + + Version *string `location:"querystring" locationName:"version" type:"string"` } // String returns the string representation @@ -15854,6 +16049,12 @@ func (s *DeletePushTemplateInput) SetTemplateName(v string) *DeletePushTemplateI return s } +// SetVersion sets the Version field's value. +func (s *DeletePushTemplateInput) SetVersion(v string) *DeletePushTemplateInput { + s.Version = &v + return s +} + type DeletePushTemplateOutput struct { _ struct{} `type:"structure" payload:"MessageBody"` @@ -16029,6 +16230,8 @@ type DeleteSmsTemplateInput struct { // TemplateName is a required field TemplateName *string `location:"uri" locationName:"template-name" type:"string" required:"true"` + + Version *string `location:"querystring" locationName:"version" type:"string"` } // String returns the string representation @@ -16063,6 +16266,12 @@ func (s *DeleteSmsTemplateInput) SetTemplateName(v string) *DeleteSmsTemplateInp return s } +// SetVersion sets the Version field's value. +func (s *DeleteSmsTemplateInput) SetVersion(v string) *DeleteSmsTemplateInput { + s.Version = &v + return s +} + type DeleteSmsTemplateOutput struct { _ struct{} `type:"structure" payload:"MessageBody"` @@ -16238,6 +16447,8 @@ type DeleteVoiceTemplateInput struct { // TemplateName is a required field TemplateName *string `location:"uri" locationName:"template-name" type:"string" required:"true"` + + Version *string `location:"querystring" locationName:"version" type:"string"` } // String returns the string representation @@ -16272,6 +16483,12 @@ func (s *DeleteVoiceTemplateInput) SetTemplateName(v string) *DeleteVoiceTemplat return s } +// SetVersion sets the Version field's value. +func (s *DeleteVoiceTemplateInput) SetVersion(v string) *DeleteVoiceTemplateInput { + s.Version = &v + return s +} + type DeleteVoiceTemplateOutput struct { _ struct{} `type:"structure" payload:"MessageBody"` @@ -16747,6 +16964,17 @@ type EmailMessageActivity struct { // The name of the email template to use for the message. TemplateName *string `type:"string"` + + // The unique identifier for the version of the email template to use for the + // message. If specified, this value must match the identifier for an existing + // template version. To retrieve a list of versions and version identifiers + // for a template, use the Template Versions resource. + // + // If you don't specify a value for this property, Amazon Pinpoint uses the + // active version of the template. The active version is typically the version + // of a template that's been most recently reviewed and approved for use, depending + // on your workflow. It isn't necessarily the latest version of a template. + TemplateVersion *string `type:"string"` } // String returns the string representation @@ -16777,6 +17005,12 @@ func (s *EmailMessageActivity) SetTemplateName(v string) *EmailMessageActivity { return s } +// SetTemplateVersion sets the TemplateVersion field's value. +func (s *EmailMessageActivity) SetTemplateVersion(v string) *EmailMessageActivity { + s.TemplateVersion = &v + return s +} + // Specifies the content and settings for a message template that can be used // in messages that are sent through the email channel. type EmailTemplateRequest struct { @@ -16869,7 +17103,7 @@ type EmailTemplateResponse struct { // The Amazon Resource Name (ARN) of the message template. Arn *string `type:"string"` - // The date when the message template was created. + // The date, in ISO 8601 format, when the message template was created. // // CreationDate is a required field CreationDate *string `type:"string" required:"true"` @@ -16884,7 +17118,7 @@ type EmailTemplateResponse struct { // based on the message template. HtmlPart *string `type:"string"` - // The date when the message template was last modified. + // The date, in ISO 8601 format, when the message template was last modified. // // LastModifiedDate is a required field LastModifiedDate *string `type:"string" required:"true"` @@ -16915,6 +17149,11 @@ type EmailTemplateResponse struct { // The message body, in plain text format, that's used in email messages that // are based on the message template. TextPart *string `type:"string"` + + // The unique identifier, as an integer, for the active version of the message + // template, or the version of the template that you specified by using the + // version parameter in your request. + Version *string `type:"string"` } // String returns the string representation @@ -16993,6 +17232,12 @@ func (s *EmailTemplateResponse) SetTextPart(v string) *EmailTemplateResponse { return s } +// SetVersion sets the Version field's value. +func (s *EmailTemplateResponse) SetVersion(v string) *EmailTemplateResponse { + s.Version = &v + return s +} + // Specifies an endpoint to create or update and the settings and attributes // to set or change for the endpoint. type EndpointBatchItem struct { @@ -17198,16 +17443,16 @@ type EndpointDemographic struct { // code, followed by an underscore (_), followed by an ISO 3166-1 alpha-2 value. Locale *string `type:"string"` - // The manufacturer of the endpoint device, such as Apple or Samsung. + // The manufacturer of the endpoint device, such as apple or samsung. Make *string `type:"string"` - // The model name or number of the endpoint device, such as iPhone. + // The model name or number of the endpoint device, such as iPhone or SM-G900F. Model *string `type:"string"` // The model version of the endpoint device. ModelVersion *string `type:"string"` - // The platform of the endpoint device, such as iOS or Android. + // The platform of the endpoint device, such as ios. Platform *string `type:"string"` // The platform version of the endpoint device. @@ -20712,6 +20957,8 @@ type GetEmailTemplateInput struct { // TemplateName is a required field TemplateName *string `location:"uri" locationName:"template-name" type:"string" required:"true"` + + Version *string `location:"querystring" locationName:"version" type:"string"` } // String returns the string representation @@ -20746,6 +20993,12 @@ func (s *GetEmailTemplateInput) SetTemplateName(v string) *GetEmailTemplateInput return s } +// SetVersion sets the Version field's value. +func (s *GetEmailTemplateInput) SetVersion(v string) *GetEmailTemplateInput { + s.Version = &v + return s +} + type GetEmailTemplateOutput struct { _ struct{} `type:"structure" payload:"EmailTemplateResponse"` @@ -21624,7 +21877,7 @@ type GetJourneyExecutionMetricsOutput struct { _ struct{} `type:"structure" payload:"JourneyExecutionMetricsResponse"` // Provides the results of a query that retrieved the data for a standard execution - // metric that applies to a journey. + // metric that applies to a journey, and provides information about that query. // // JourneyExecutionMetricsResponse is a required field JourneyExecutionMetricsResponse *JourneyExecutionMetricsResponse `type:"structure" required:"true"` @@ -21731,6 +21984,8 @@ type GetPushTemplateInput struct { // TemplateName is a required field TemplateName *string `location:"uri" locationName:"template-name" type:"string" required:"true"` + + Version *string `location:"querystring" locationName:"version" type:"string"` } // String returns the string representation @@ -21765,6 +22020,12 @@ func (s *GetPushTemplateInput) SetTemplateName(v string) *GetPushTemplateInput { return s } +// SetVersion sets the Version field's value. +func (s *GetPushTemplateInput) SetVersion(v string) *GetPushTemplateInput { + s.Version = &v + return s +} + type GetPushTemplateOutput struct { _ struct{} `type:"structure" payload:"PushNotificationTemplateResponse"` @@ -22405,6 +22666,8 @@ type GetSmsTemplateInput struct { // TemplateName is a required field TemplateName *string `location:"uri" locationName:"template-name" type:"string" required:"true"` + + Version *string `location:"querystring" locationName:"version" type:"string"` } // String returns the string representation @@ -22439,6 +22702,12 @@ func (s *GetSmsTemplateInput) SetTemplateName(v string) *GetSmsTemplateInput { return s } +// SetVersion sets the Version field's value. +func (s *GetSmsTemplateInput) SetVersion(v string) *GetSmsTemplateInput { + s.Version = &v + return s +} + type GetSmsTemplateOutput struct { _ struct{} `type:"structure" payload:"SMSTemplateResponse"` @@ -22615,6 +22884,8 @@ type GetVoiceTemplateInput struct { // TemplateName is a required field TemplateName *string `location:"uri" locationName:"template-name" type:"string" required:"true"` + + Version *string `location:"querystring" locationName:"version" type:"string"` } // String returns the string representation @@ -22649,6 +22920,12 @@ func (s *GetVoiceTemplateInput) SetTemplateName(v string) *GetVoiceTemplateInput return s } +// SetVersion sets the Version field's value. +func (s *GetVoiceTemplateInput) SetVersion(v string) *GetVoiceTemplateInput { + s.Version = &v + return s +} + type GetVoiceTemplateOutput struct { _ struct{} `type:"structure" payload:"VoiceTemplateResponse"` @@ -22686,6 +22963,11 @@ type HoldoutActivity struct { // The percentage of participants who shouldn't continue the journey. // + // To determine which participants are held out, Amazon Pinpoint applies a probability-based + // algorithm to the percentage that you specify. Therefore, the actual percentage + // of participants who are held out may not be equal to the percentage that + // you specify. + // // Percentage is a required field Percentage *int64 `type:"integer" required:"true"` } @@ -23440,7 +23722,7 @@ func (s *JourneyExecutionActivityMetricsResponse) SetMetrics(v map[string]*strin } // Provides the results of a query that retrieved the data for a standard execution -// metric that applies to a journey. +// metric that applies to a journey, and provides information about that query. type JourneyExecutionMetricsResponse struct { _ struct{} `type:"structure"` @@ -23553,8 +23835,9 @@ func (s *JourneyLimits) SetMessagesPerSecond(v int64) *JourneyLimits { type JourneyResponse struct { _ struct{} `type:"structure"` - // The configuration and other settings for the activities that comprise the - // journey. + // A map that contains a set of Activity objects, one object for each activity + // in the journey. For each Activity object, the key is the unique identifier + // (string) for an activity and the value is the settings for the activity. Activities map[string]*Activity `type:"map"` // The unique identifier for the application that the journey applies to. @@ -23638,7 +23921,7 @@ type JourneyResponse struct { // time and a refresh frequency hasn't been specified for it. If a journey's // status is CLOSED, you can't add participants to it, and no existing participants // can enter the journey for the first time. However, any existing participants - // who are currently waiting to start an activity may resume the journey. + // who are currently waiting to start an activity may continue the journey. State *string `type:"string" enum:"State"` // A string-to-string map of key-value pairs that identifies the tags that are @@ -24009,81 +24292,176 @@ func (s *ListTagsForResourceOutput) SetTagsModel(v *TagsModel) *ListTagsForResou return s } -type ListTemplatesInput struct { +type ListTemplateVersionsInput struct { _ struct{} `type:"structure"` NextToken *string `location:"querystring" locationName:"next-token" type:"string"` PageSize *string `location:"querystring" locationName:"page-size" type:"string"` - Prefix *string `location:"querystring" locationName:"prefix" type:"string"` + // TemplateName is a required field + TemplateName *string `location:"uri" locationName:"template-name" type:"string" required:"true"` - TemplateType *string `location:"querystring" locationName:"template-type" type:"string"` + // TemplateType is a required field + TemplateType *string `location:"uri" locationName:"template-type" type:"string" required:"true"` } // String returns the string representation -func (s ListTemplatesInput) String() string { +func (s ListTemplateVersionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListTemplatesInput) GoString() string { +func (s ListTemplateVersionsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTemplateVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTemplateVersionsInput"} + if s.TemplateName == nil { + invalidParams.Add(request.NewErrParamRequired("TemplateName")) + } + if s.TemplateName != nil && len(*s.TemplateName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TemplateName", 1)) + } + if s.TemplateType == nil { + invalidParams.Add(request.NewErrParamRequired("TemplateType")) + } + if s.TemplateType != nil && len(*s.TemplateType) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TemplateType", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetNextToken sets the NextToken field's value. -func (s *ListTemplatesInput) SetNextToken(v string) *ListTemplatesInput { +func (s *ListTemplateVersionsInput) SetNextToken(v string) *ListTemplateVersionsInput { s.NextToken = &v return s } // SetPageSize sets the PageSize field's value. -func (s *ListTemplatesInput) SetPageSize(v string) *ListTemplatesInput { +func (s *ListTemplateVersionsInput) SetPageSize(v string) *ListTemplateVersionsInput { s.PageSize = &v return s } -// SetPrefix sets the Prefix field's value. -func (s *ListTemplatesInput) SetPrefix(v string) *ListTemplatesInput { - s.Prefix = &v +// SetTemplateName sets the TemplateName field's value. +func (s *ListTemplateVersionsInput) SetTemplateName(v string) *ListTemplateVersionsInput { + s.TemplateName = &v return s } // SetTemplateType sets the TemplateType field's value. -func (s *ListTemplatesInput) SetTemplateType(v string) *ListTemplatesInput { +func (s *ListTemplateVersionsInput) SetTemplateType(v string) *ListTemplateVersionsInput { s.TemplateType = &v return s } -type ListTemplatesOutput struct { - _ struct{} `type:"structure" payload:"TemplatesResponse"` +type ListTemplateVersionsOutput struct { + _ struct{} `type:"structure" payload:"TemplateVersionsResponse"` - // Provides information about all the message templates that are associated - // with your Amazon Pinpoint account. + // Provides information about all the versions of a specific message template. // - // TemplatesResponse is a required field - TemplatesResponse *TemplatesResponse `type:"structure" required:"true"` + // TemplateVersionsResponse is a required field + TemplateVersionsResponse *TemplateVersionsResponse `type:"structure" required:"true"` } // String returns the string representation -func (s ListTemplatesOutput) String() string { +func (s ListTemplateVersionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListTemplatesOutput) GoString() string { +func (s ListTemplateVersionsOutput) GoString() string { return s.String() } -// SetTemplatesResponse sets the TemplatesResponse field's value. -func (s *ListTemplatesOutput) SetTemplatesResponse(v *TemplatesResponse) *ListTemplatesOutput { - s.TemplatesResponse = v +// SetTemplateVersionsResponse sets the TemplateVersionsResponse field's value. +func (s *ListTemplateVersionsOutput) SetTemplateVersionsResponse(v *TemplateVersionsResponse) *ListTemplateVersionsOutput { + s.TemplateVersionsResponse = v return s } -// Specifies the content and settings for a push notification that's sent to -// recipients of a campaign. -type Message struct { +type ListTemplatesInput struct { + _ struct{} `type:"structure"` + + NextToken *string `location:"querystring" locationName:"next-token" type:"string"` + + PageSize *string `location:"querystring" locationName:"page-size" type:"string"` + + Prefix *string `location:"querystring" locationName:"prefix" type:"string"` + + TemplateType *string `location:"querystring" locationName:"template-type" type:"string"` +} + +// String returns the string representation +func (s ListTemplatesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTemplatesInput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTemplatesInput) SetNextToken(v string) *ListTemplatesInput { + s.NextToken = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *ListTemplatesInput) SetPageSize(v string) *ListTemplatesInput { + s.PageSize = &v + return s +} + +// SetPrefix sets the Prefix field's value. +func (s *ListTemplatesInput) SetPrefix(v string) *ListTemplatesInput { + s.Prefix = &v + return s +} + +// SetTemplateType sets the TemplateType field's value. +func (s *ListTemplatesInput) SetTemplateType(v string) *ListTemplatesInput { + s.TemplateType = &v + return s +} + +type ListTemplatesOutput struct { + _ struct{} `type:"structure" payload:"TemplatesResponse"` + + // Provides information about all the message templates that are associated + // with your Amazon Pinpoint account. + // + // TemplatesResponse is a required field + TemplatesResponse *TemplatesResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s ListTemplatesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTemplatesOutput) GoString() string { + return s.String() +} + +// SetTemplatesResponse sets the TemplatesResponse field's value. +func (s *ListTemplatesOutput) SetTemplatesResponse(v *TemplatesResponse) *ListTemplatesOutput { + s.TemplatesResponse = v + return s +} + +// Specifies the content and settings for a push notification that's sent to +// recipients of a campaign. +type Message struct { _ struct{} `type:"structure"` // The action to occur if a recipient taps the push notification. Valid values @@ -24715,8 +25093,8 @@ func (s *MultiConditionalBranch) SetNextActivity(v string) *MultiConditionalBran } // Specifies the settings for a multivariate split activity in a journey. This -// type of activity sends participants down one of as many as five paths in -// a journey, based on conditions that you specify. +// type of activity sends participants down one of as many as five paths (including +// a default Else path) in a journey, based on conditions that you specify. type MultiConditionalSplitActivity struct { _ struct{} `type:"structure"` @@ -24724,7 +25102,8 @@ type MultiConditionalSplitActivity struct { // and the activity to perform for each path. Branches []*MultiConditionalBranch `type:"list"` - // The activity to perform by default for any path in the activity. + // The unique identifier for the activity to perform for participants who don't + // meet any of the conditions specified for other paths in the activity. DefaultActivity *string `type:"string"` // The amount of time to wait or the date and time when Amazon Pinpoint determines @@ -25289,7 +25668,7 @@ type PushNotificationTemplateResponse struct { // channels (DefaultPushNotificationTemplate). Baidu *AndroidPushNotificationTemplate `type:"structure"` - // The date when the message template was created. + // The date, in ISO 8601 format, when the message template was created. // // CreationDate is a required field CreationDate *string `type:"string" required:"true"` @@ -25309,7 +25688,7 @@ type PushNotificationTemplateResponse struct { // template for push notification channels (DefaultPushNotificationTemplate). GCM *AndroidPushNotificationTemplate `type:"structure"` - // The date when the message template was last modified. + // The date, in ISO 8601 format, when the message template was last modified. // // LastModifiedDate is a required field LastModifiedDate *string `type:"string" required:"true"` @@ -25332,6 +25711,11 @@ type PushNotificationTemplateResponse struct { // // TemplateType is a required field TemplateType *string `type:"string" required:"true" enum:"TemplateType"` + + // The unique identifier, as an integer, for the active version of the message + // template, or the version of the template that you specified by using the + // version parameter in your request. + Version *string `type:"string"` } // String returns the string representation @@ -25422,6 +25806,12 @@ func (s *PushNotificationTemplateResponse) SetTemplateType(v string) *PushNotifi return s } +// SetVersion sets the Version field's value. +func (s *PushNotificationTemplateResponse) SetVersion(v string) *PushNotificationTemplateResponse { + s.Version = &v + return s +} + type PutEventStreamInput struct { _ struct{} `type:"structure" payload:"WriteEventStream"` @@ -25668,6 +26058,11 @@ type RandomSplitEntry struct { NextActivity *string `type:"string"` // The percentage of participants to send down the activity path. + // + // To determine which participants are sent down each path, Amazon Pinpoint + // applies a probability-based algorithm to the percentages that you specify + // for the paths. Therefore, the actual percentage of participants who are sent + // down a path may not be equal to the percentage that you specify. Percentage *int64 `type:"integer"` } @@ -26305,7 +26700,7 @@ type SMSTemplateResponse struct { // template. Body *string `type:"string"` - // The date when the message template was created. + // The date, in ISO 8601 format, when the message template was created. // // CreationDate is a required field CreationDate *string `type:"string" required:"true"` @@ -26316,7 +26711,7 @@ type SMSTemplateResponse struct { // defines the default value for that variable. DefaultSubstitutions *string `type:"string"` - // The date when the message template was last modified. + // The date, in ISO 8601 format, when the message template was last modified. // // LastModifiedDate is a required field LastModifiedDate *string `type:"string" required:"true"` @@ -26339,6 +26734,11 @@ type SMSTemplateResponse struct { // // TemplateType is a required field TemplateType *string `type:"string" required:"true" enum:"TemplateType"` + + // The unique identifier, as an integer, for the active version of the message + // template, or the version of the template that you specified by using the + // version parameter in your request. + Version *string `type:"string"` } // String returns the string representation @@ -26405,6 +26805,12 @@ func (s *SMSTemplateResponse) SetTemplateType(v string) *SMSTemplateResponse { return s } +// SetVersion sets the Version field's value. +func (s *SMSTemplateResponse) SetVersion(v string) *SMSTemplateResponse { + s.Version = &v + return s +} + // Specifies the schedule settings for a campaign. type Schedule struct { _ struct{} `type:"structure"` @@ -28111,13 +28517,24 @@ func (s *TagsModel) SetTags(v map[string]*string) *TagsModel { return s } -// Specifies the name of the message template to use for the message. +// Specifies the name and version of the message template to use for the message. type Template struct { _ struct{} `type:"structure"` // The name of the message template to use for the message. If specified, this // value must match the name of an existing message template. Name *string `type:"string"` + + // The unique identifier for the version of the message template to use for + // the message. If specified, this value must match the identifier for an existing + // template version. To retrieve a list of versions and version identifiers + // for a template, use the Template Versions resource. + // + // If you don't specify a value for this property, Amazon Pinpoint uses the + // active version of the template. The active version is typically the version + // of a template that's been most recently reviewed and approved for use, depending + // on your workflow. It isn't necessarily the latest version of a template. + Version *string `type:"string"` } // String returns the string representation @@ -28136,6 +28553,40 @@ func (s *Template) SetName(v string) *Template { return s } +// SetVersion sets the Version field's value. +func (s *Template) SetVersion(v string) *Template { + s.Version = &v + return s +} + +// Specifies which version of a message template to use as the active version +// of the template. +type TemplateActiveVersionRequest struct { + _ struct{} `type:"structure"` + + // The unique identifier for the version of the message template to use as the + // active version of the template. If specified, this value must match the identifier + // for an existing template version. To retrieve a list of versions and version + // identifiers for a template, use the Template Versions resource. + Version *string `type:"string"` +} + +// String returns the string representation +func (s TemplateActiveVersionRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TemplateActiveVersionRequest) GoString() string { + return s.String() +} + +// SetVersion sets the Version field's value. +func (s *TemplateActiveVersionRequest) SetVersion(v string) *TemplateActiveVersionRequest { + s.Version = &v + return s +} + // Specifies the message template to use for the message, for each type of channel. type TemplateConfiguration struct { _ struct{} `type:"structure"` @@ -28195,7 +28646,7 @@ type TemplateResponse struct { // The Amazon Resource Name (ARN) of the message template. Arn *string `type:"string"` - // The date when the message template was created. + // The date, in ISO 8601 format, when the message template was created. // // CreationDate is a required field CreationDate *string `type:"string" required:"true"` @@ -28206,7 +28657,7 @@ type TemplateResponse struct { // defines the default value for that variable. DefaultSubstitutions *string `type:"string"` - // The date when the message template was last modified. + // The date, in ISO 8601 format, when the message template was last modified. // // LastModifiedDate is a required field LastModifiedDate *string `type:"string" required:"true"` @@ -28224,10 +28675,15 @@ type TemplateResponse struct { // TemplateName is a required field TemplateName *string `type:"string" required:"true"` - // The type of channel that the message template is designed for. + // The type of channel that the message template is designed for. Possible values + // are: EMAIL, PUSH, SMS, and VOICE. // // TemplateType is a required field TemplateType *string `type:"string" required:"true" enum:"TemplateType"` + + // The unique identifier, as an integer, for the active version of the message + // template. + Version *string `type:"string"` } // String returns the string representation @@ -28288,6 +28744,162 @@ func (s *TemplateResponse) SetTemplateType(v string) *TemplateResponse { return s } +// SetVersion sets the Version field's value. +func (s *TemplateResponse) SetVersion(v string) *TemplateResponse { + s.Version = &v + return s +} + +// Provides information about a specific version of a message template. +type TemplateVersionResponse struct { + _ struct{} `type:"structure"` + + // The date, in ISO 8601 format, when the version of the message template was + // created. + // + // CreationDate is a required field + CreationDate *string `type:"string" required:"true"` + + // A JSON object that specifies the default values that are used for message + // variables in the version of the message template. This object is a set of + // key-value pairs. Each key defines a message variable in the template. The + // corresponding value defines the default value for that variable. + DefaultSubstitutions *string `type:"string"` + + // The date, in ISO 8601 format, when the version of the message template was + // last modified. + // + // LastModifiedDate is a required field + LastModifiedDate *string `type:"string" required:"true"` + + // The custom description of the version of the message template. + TemplateDescription *string `type:"string"` + + // The name of the message template. + // + // TemplateName is a required field + TemplateName *string `type:"string" required:"true"` + + // The type of channel that the message template is designed for. Possible values + // are: EMAIL, PUSH, SMS, and VOICE. + // + // TemplateType is a required field + TemplateType *string `type:"string" required:"true"` + + // The unique identifier for the version of the message template. This value + // is an integer that Amazon Pinpoint automatically increments and assigns to + // each new version of a template. + Version *string `type:"string"` +} + +// String returns the string representation +func (s TemplateVersionResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TemplateVersionResponse) GoString() string { + return s.String() +} + +// SetCreationDate sets the CreationDate field's value. +func (s *TemplateVersionResponse) SetCreationDate(v string) *TemplateVersionResponse { + s.CreationDate = &v + return s +} + +// SetDefaultSubstitutions sets the DefaultSubstitutions field's value. +func (s *TemplateVersionResponse) SetDefaultSubstitutions(v string) *TemplateVersionResponse { + s.DefaultSubstitutions = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *TemplateVersionResponse) SetLastModifiedDate(v string) *TemplateVersionResponse { + s.LastModifiedDate = &v + return s +} + +// SetTemplateDescription sets the TemplateDescription field's value. +func (s *TemplateVersionResponse) SetTemplateDescription(v string) *TemplateVersionResponse { + s.TemplateDescription = &v + return s +} + +// SetTemplateName sets the TemplateName field's value. +func (s *TemplateVersionResponse) SetTemplateName(v string) *TemplateVersionResponse { + s.TemplateName = &v + return s +} + +// SetTemplateType sets the TemplateType field's value. +func (s *TemplateVersionResponse) SetTemplateType(v string) *TemplateVersionResponse { + s.TemplateType = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *TemplateVersionResponse) SetVersion(v string) *TemplateVersionResponse { + s.Version = &v + return s +} + +// Provides information about all the versions of a specific message template. +type TemplateVersionsResponse struct { + _ struct{} `type:"structure"` + + // An array of responses, one for each version of the message template. + // + // Item is a required field + Item []*TemplateVersionResponse `type:"list" required:"true"` + + // The message that's returned from the API for the request to retrieve information + // about all the versions of the message template. + Message *string `type:"string"` + + // The string to use in a subsequent request to get the next page of results + // in a paginated response. This value is null if there are no additional pages. + NextToken *string `type:"string"` + + // The unique identifier for the request to retrieve information about all the + // versions of the message template. + RequestID *string `type:"string"` +} + +// String returns the string representation +func (s TemplateVersionsResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TemplateVersionsResponse) GoString() string { + return s.String() +} + +// SetItem sets the Item field's value. +func (s *TemplateVersionsResponse) SetItem(v []*TemplateVersionResponse) *TemplateVersionsResponse { + s.Item = v + return s +} + +// SetMessage sets the Message field's value. +func (s *TemplateVersionsResponse) SetMessage(v string) *TemplateVersionsResponse { + s.Message = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *TemplateVersionsResponse) SetNextToken(v string) *TemplateVersionsResponse { + s.NextToken = &v + return s +} + +// SetRequestID sets the RequestID field's value. +func (s *TemplateVersionsResponse) SetRequestID(v string) *TemplateVersionsResponse { + s.RequestID = &v + return s +} + // Provides information about all the message templates that are associated // with your Amazon Pinpoint account. type TemplatesResponse struct { @@ -29269,6 +29881,8 @@ func (s *UpdateEmailChannelOutput) SetEmailChannelResponse(v *EmailChannelRespon type UpdateEmailTemplateInput struct { _ struct{} `type:"structure" payload:"EmailTemplateRequest"` + CreateNewVersion *bool `location:"querystring" locationName:"create-new-version" type:"boolean"` + // Specifies the content and settings for a message template that can be used // in messages that are sent through the email channel. // @@ -29277,6 +29891,8 @@ type UpdateEmailTemplateInput struct { // TemplateName is a required field TemplateName *string `location:"uri" locationName:"template-name" type:"string" required:"true"` + + Version *string `location:"querystring" locationName:"version" type:"string"` } // String returns the string representation @@ -29308,6 +29924,12 @@ func (s *UpdateEmailTemplateInput) Validate() error { return nil } +// SetCreateNewVersion sets the CreateNewVersion field's value. +func (s *UpdateEmailTemplateInput) SetCreateNewVersion(v bool) *UpdateEmailTemplateInput { + s.CreateNewVersion = &v + return s +} + // SetEmailTemplateRequest sets the EmailTemplateRequest field's value. func (s *UpdateEmailTemplateInput) SetEmailTemplateRequest(v *EmailTemplateRequest) *UpdateEmailTemplateInput { s.EmailTemplateRequest = v @@ -29320,6 +29942,12 @@ func (s *UpdateEmailTemplateInput) SetTemplateName(v string) *UpdateEmailTemplat return s } +// SetVersion sets the Version field's value. +func (s *UpdateEmailTemplateInput) SetVersion(v string) *UpdateEmailTemplateInput { + s.Version = &v + return s +} + type UpdateEmailTemplateOutput struct { _ struct{} `type:"structure" payload:"MessageBody"` @@ -29806,6 +30434,8 @@ func (s *UpdateJourneyStateOutput) SetJourneyResponse(v *JourneyResponse) *Updat type UpdatePushTemplateInput struct { _ struct{} `type:"structure" payload:"PushNotificationTemplateRequest"` + CreateNewVersion *bool `location:"querystring" locationName:"create-new-version" type:"boolean"` + // Specifies the content and settings for a message template that can be used // in messages that are sent through a push notification channel. // @@ -29814,6 +30444,8 @@ type UpdatePushTemplateInput struct { // TemplateName is a required field TemplateName *string `location:"uri" locationName:"template-name" type:"string" required:"true"` + + Version *string `location:"querystring" locationName:"version" type:"string"` } // String returns the string representation @@ -29845,6 +30477,12 @@ func (s *UpdatePushTemplateInput) Validate() error { return nil } +// SetCreateNewVersion sets the CreateNewVersion field's value. +func (s *UpdatePushTemplateInput) SetCreateNewVersion(v bool) *UpdatePushTemplateInput { + s.CreateNewVersion = &v + return s +} + // SetPushNotificationTemplateRequest sets the PushNotificationTemplateRequest field's value. func (s *UpdatePushTemplateInput) SetPushNotificationTemplateRequest(v *PushNotificationTemplateRequest) *UpdatePushTemplateInput { s.PushNotificationTemplateRequest = v @@ -29857,6 +30495,12 @@ func (s *UpdatePushTemplateInput) SetTemplateName(v string) *UpdatePushTemplateI return s } +// SetVersion sets the Version field's value. +func (s *UpdatePushTemplateInput) SetVersion(v string) *UpdatePushTemplateInput { + s.Version = &v + return s +} + type UpdatePushTemplateOutput struct { _ struct{} `type:"structure" payload:"MessageBody"` @@ -30065,6 +30709,8 @@ func (s *UpdateSmsChannelOutput) SetSMSChannelResponse(v *SMSChannelResponse) *U type UpdateSmsTemplateInput struct { _ struct{} `type:"structure" payload:"SMSTemplateRequest"` + CreateNewVersion *bool `location:"querystring" locationName:"create-new-version" type:"boolean"` + // Specifies the content and settings for a message template that can be used // in text messages that are sent through the SMS channel. // @@ -30073,6 +30719,8 @@ type UpdateSmsTemplateInput struct { // TemplateName is a required field TemplateName *string `location:"uri" locationName:"template-name" type:"string" required:"true"` + + Version *string `location:"querystring" locationName:"version" type:"string"` } // String returns the string representation @@ -30104,6 +30752,12 @@ func (s *UpdateSmsTemplateInput) Validate() error { return nil } +// SetCreateNewVersion sets the CreateNewVersion field's value. +func (s *UpdateSmsTemplateInput) SetCreateNewVersion(v bool) *UpdateSmsTemplateInput { + s.CreateNewVersion = &v + return s +} + // SetSMSTemplateRequest sets the SMSTemplateRequest field's value. func (s *UpdateSmsTemplateInput) SetSMSTemplateRequest(v *SMSTemplateRequest) *UpdateSmsTemplateInput { s.SMSTemplateRequest = v @@ -30116,6 +30770,12 @@ func (s *UpdateSmsTemplateInput) SetTemplateName(v string) *UpdateSmsTemplateInp return s } +// SetVersion sets the Version field's value. +func (s *UpdateSmsTemplateInput) SetVersion(v string) *UpdateSmsTemplateInput { + s.Version = &v + return s +} + type UpdateSmsTemplateOutput struct { _ struct{} `type:"structure" payload:"MessageBody"` @@ -30141,6 +30801,100 @@ func (s *UpdateSmsTemplateOutput) SetMessageBody(v *MessageBody) *UpdateSmsTempl return s } +type UpdateTemplateActiveVersionInput struct { + _ struct{} `type:"structure" payload:"TemplateActiveVersionRequest"` + + // Specifies which version of a message template to use as the active version + // of the template. + // + // TemplateActiveVersionRequest is a required field + TemplateActiveVersionRequest *TemplateActiveVersionRequest `type:"structure" required:"true"` + + // TemplateName is a required field + TemplateName *string `location:"uri" locationName:"template-name" type:"string" required:"true"` + + // TemplateType is a required field + TemplateType *string `location:"uri" locationName:"template-type" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateTemplateActiveVersionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateTemplateActiveVersionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateTemplateActiveVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateTemplateActiveVersionInput"} + if s.TemplateActiveVersionRequest == nil { + invalidParams.Add(request.NewErrParamRequired("TemplateActiveVersionRequest")) + } + if s.TemplateName == nil { + invalidParams.Add(request.NewErrParamRequired("TemplateName")) + } + if s.TemplateName != nil && len(*s.TemplateName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TemplateName", 1)) + } + if s.TemplateType == nil { + invalidParams.Add(request.NewErrParamRequired("TemplateType")) + } + if s.TemplateType != nil && len(*s.TemplateType) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TemplateType", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTemplateActiveVersionRequest sets the TemplateActiveVersionRequest field's value. +func (s *UpdateTemplateActiveVersionInput) SetTemplateActiveVersionRequest(v *TemplateActiveVersionRequest) *UpdateTemplateActiveVersionInput { + s.TemplateActiveVersionRequest = v + return s +} + +// SetTemplateName sets the TemplateName field's value. +func (s *UpdateTemplateActiveVersionInput) SetTemplateName(v string) *UpdateTemplateActiveVersionInput { + s.TemplateName = &v + return s +} + +// SetTemplateType sets the TemplateType field's value. +func (s *UpdateTemplateActiveVersionInput) SetTemplateType(v string) *UpdateTemplateActiveVersionInput { + s.TemplateType = &v + return s +} + +type UpdateTemplateActiveVersionOutput struct { + _ struct{} `type:"structure" payload:"MessageBody"` + + // Provides information about an API request or response. + // + // MessageBody is a required field + MessageBody *MessageBody `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateTemplateActiveVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateTemplateActiveVersionOutput) GoString() string { + return s.String() +} + +// SetMessageBody sets the MessageBody field's value. +func (s *UpdateTemplateActiveVersionOutput) SetMessageBody(v *MessageBody) *UpdateTemplateActiveVersionOutput { + s.MessageBody = v + return s +} + type UpdateVoiceChannelInput struct { _ struct{} `type:"structure" payload:"VoiceChannelRequest"` @@ -30223,9 +30977,13 @@ func (s *UpdateVoiceChannelOutput) SetVoiceChannelResponse(v *VoiceChannelRespon type UpdateVoiceTemplateInput struct { _ struct{} `type:"structure" payload:"VoiceTemplateRequest"` + CreateNewVersion *bool `location:"querystring" locationName:"create-new-version" type:"boolean"` + // TemplateName is a required field TemplateName *string `location:"uri" locationName:"template-name" type:"string" required:"true"` + Version *string `location:"querystring" locationName:"version" type:"string"` + // Specifies the content and settings for a message template that can be used // in messages that are sent through the voice channel. // @@ -30262,12 +31020,24 @@ func (s *UpdateVoiceTemplateInput) Validate() error { return nil } +// SetCreateNewVersion sets the CreateNewVersion field's value. +func (s *UpdateVoiceTemplateInput) SetCreateNewVersion(v bool) *UpdateVoiceTemplateInput { + s.CreateNewVersion = &v + return s +} + // SetTemplateName sets the TemplateName field's value. func (s *UpdateVoiceTemplateInput) SetTemplateName(v string) *UpdateVoiceTemplateInput { s.TemplateName = &v return s } +// SetVersion sets the Version field's value. +func (s *UpdateVoiceTemplateInput) SetVersion(v string) *UpdateVoiceTemplateInput { + s.Version = &v + return s +} + // SetVoiceTemplateRequest sets the VoiceTemplateRequest field's value. func (s *UpdateVoiceTemplateInput) SetVoiceTemplateRequest(v *VoiceTemplateRequest) *UpdateVoiceTemplateInput { s.VoiceTemplateRequest = v @@ -30597,7 +31367,7 @@ type VoiceTemplateResponse struct { // template, in plain text format. Body *string `type:"string"` - // The date when the message template was created. + // The date, in ISO 8601 format, when the message template was created. // // CreationDate is a required field CreationDate *string `type:"string" required:"true"` @@ -30614,7 +31384,7 @@ type VoiceTemplateResponse struct { // (https://docs.aws.amazon.com/polly/latest/dg/what-is.html). LanguageCode *string `type:"string"` - // The date when the message template was last modified. + // The date, in ISO 8601 format, when the message template was last modified. // // LastModifiedDate is a required field LastModifiedDate *string `type:"string" required:"true"` @@ -30638,6 +31408,11 @@ type VoiceTemplateResponse struct { // TemplateType is a required field TemplateType *string `type:"string" required:"true" enum:"TemplateType"` + // The unique identifier, as an integer, for the active version of the message + // template, or the version of the template that you specified by using the + // version parameter in your request. + Version *string `type:"string"` + // The name of the voice that's used when delivering messages that are based // on the message template. For a list of supported voices, see the Amazon Polly // Developer Guide (https://docs.aws.amazon.com/polly/latest/dg/what-is.html). @@ -30714,6 +31489,12 @@ func (s *VoiceTemplateResponse) SetTemplateType(v string) *VoiceTemplateResponse return s } +// SetVersion sets the Version field's value. +func (s *VoiceTemplateResponse) SetVersion(v string) *VoiceTemplateResponse { + s.Version = &v + return s +} + // SetVoiceId sets the VoiceId field's value. func (s *VoiceTemplateResponse) SetVoiceId(v string) *VoiceTemplateResponse { s.VoiceId = &v @@ -31123,8 +31904,11 @@ func (s *WriteEventStream) SetRoleArn(v string) *WriteEventStream { type WriteJourneyRequest struct { _ struct{} `type:"structure"` - // The configuration and other settings for the activities that comprise the - // journey. + // A map that contains a set of Activity objects, one object for each activity + // in the journey. For each Activity object, the key is the unique identifier + // (string) for an activity and the value is the settings for the activity. + // An activity identifier can contain a maximum of 128 characters. The characters + // must be alphanumeric characters. Activities map[string]*Activity `type:"map"` // The date, in ISO 8601 format, when the journey was created. @@ -31172,7 +31956,9 @@ type WriteJourneyRequest struct { // The schedule settings for the journey. Schedule *JourneySchedule `type:"structure"` - // The unique identifier for the first activity in the journey. + // The unique identifier for the first activity in the journey. An activity + // identifier can contain a maximum of 128 characters. The characters must be + // alphanumeric characters. StartActivity *string `type:"string"` // The segment that defines which users are participants in the journey. diff --git a/service/pinpoint/pinpointiface/interface.go b/service/pinpoint/pinpointiface/interface.go index 79461bd192f..2baae55396e 100644 --- a/service/pinpoint/pinpointiface/interface.go +++ b/service/pinpoint/pinpointiface/interface.go @@ -360,6 +360,10 @@ type PinpointAPI interface { ListTagsForResourceWithContext(aws.Context, *pinpoint.ListTagsForResourceInput, ...request.Option) (*pinpoint.ListTagsForResourceOutput, error) ListTagsForResourceRequest(*pinpoint.ListTagsForResourceInput) (*request.Request, *pinpoint.ListTagsForResourceOutput) + ListTemplateVersions(*pinpoint.ListTemplateVersionsInput) (*pinpoint.ListTemplateVersionsOutput, error) + ListTemplateVersionsWithContext(aws.Context, *pinpoint.ListTemplateVersionsInput, ...request.Option) (*pinpoint.ListTemplateVersionsOutput, error) + ListTemplateVersionsRequest(*pinpoint.ListTemplateVersionsInput) (*request.Request, *pinpoint.ListTemplateVersionsOutput) + ListTemplates(*pinpoint.ListTemplatesInput) (*pinpoint.ListTemplatesOutput, error) ListTemplatesWithContext(aws.Context, *pinpoint.ListTemplatesInput, ...request.Option) (*pinpoint.ListTemplatesOutput, error) ListTemplatesRequest(*pinpoint.ListTemplatesInput) (*request.Request, *pinpoint.ListTemplatesOutput) @@ -472,6 +476,10 @@ type PinpointAPI interface { UpdateSmsTemplateWithContext(aws.Context, *pinpoint.UpdateSmsTemplateInput, ...request.Option) (*pinpoint.UpdateSmsTemplateOutput, error) UpdateSmsTemplateRequest(*pinpoint.UpdateSmsTemplateInput) (*request.Request, *pinpoint.UpdateSmsTemplateOutput) + UpdateTemplateActiveVersion(*pinpoint.UpdateTemplateActiveVersionInput) (*pinpoint.UpdateTemplateActiveVersionOutput, error) + UpdateTemplateActiveVersionWithContext(aws.Context, *pinpoint.UpdateTemplateActiveVersionInput, ...request.Option) (*pinpoint.UpdateTemplateActiveVersionOutput, error) + UpdateTemplateActiveVersionRequest(*pinpoint.UpdateTemplateActiveVersionInput) (*request.Request, *pinpoint.UpdateTemplateActiveVersionOutput) + UpdateVoiceChannel(*pinpoint.UpdateVoiceChannelInput) (*pinpoint.UpdateVoiceChannelOutput, error) UpdateVoiceChannelWithContext(aws.Context, *pinpoint.UpdateVoiceChannelInput, ...request.Option) (*pinpoint.UpdateVoiceChannelOutput, error) UpdateVoiceChannelRequest(*pinpoint.UpdateVoiceChannelInput) (*request.Request, *pinpoint.UpdateVoiceChannelOutput) diff --git a/service/rds/api.go b/service/rds/api.go index 9947cb453c7..f302ef8474f 100644 --- a/service/rds/api.go +++ b/service/rds/api.go @@ -1029,7 +1029,7 @@ func (c *RDS) CopyDBSnapshotRequest(input *CopyDBSnapshotInput) (req *request.Re // AWS Region where you call the CopyDBSnapshot action is the destination AWS // Region for the DB snapshot copy. // -// For more information about copying snapshots, see Copying a DB Snapshot (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CopyDBSnapshot.html) +// For more information about copying snapshots, see Copying a DB Snapshot (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CopySnapshot.html#USER_CopyDBSnapshot) // in the Amazon RDS User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -21853,7 +21853,7 @@ type DBProxyTarget struct { TargetArn *string `type:"string"` // The DB cluster identifier when the target represents an Aurora DB cluster. - // This field is blank when the target represents an + // This field is blank when the target represents an RDS DB instance. TrackedClusterId *string `type:"string"` // Specifies the kind of database, such as an RDS DB instance or an Aurora DB @@ -31221,6 +31221,27 @@ type ModifyDBInstanceInput struct { // Indicates the certificate that needs to be associated with the instance. CACertificateIdentifier *string `type:"string"` + // A value that indicates whether the DB instance is restarted when you rotate + // your SSL/TLS certificate. + // + // By default, the DB instance is restarted when you rotate your SSL/TLS certificate. + // The certificate is not updated until the DB instance is restarted. + // + // Set this parameter only if you are not using SSL/TLS to connect to the DB + // instance. + // + // If you are using SSL/TLS to connect to the DB instance, follow the appropriate + // instructions for your DB engine to rotate your SSL/TLS certificate: + // + // * For more information about rotating your SSL/TLS certificate for RDS + // DB engines, see Rotating Your SSL/TLS Certificate. (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL-certificate-rotation.html) + // in the Amazon RDS User Guide. + // + // * For more information about rotating your SSL/TLS certificate for Aurora + // DB engines, see Rotating Your SSL/TLS Certificate (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.SSL-certificate-rotation.html) + // in the Amazon Aurora User Guide. + CertificateRotationRestart *bool `type:"boolean"` + // The configuration setting for the log types to be enabled for export to CloudWatch // Logs for a specific DB instance. // @@ -31722,6 +31743,12 @@ func (s *ModifyDBInstanceInput) SetCACertificateIdentifier(v string) *ModifyDBIn return s } +// SetCertificateRotationRestart sets the CertificateRotationRestart field's value. +func (s *ModifyDBInstanceInput) SetCertificateRotationRestart(v bool) *ModifyDBInstanceInput { + s.CertificateRotationRestart = &v + return s +} + // SetCloudwatchLogsExportConfiguration sets the CloudwatchLogsExportConfiguration field's value. func (s *ModifyDBInstanceInput) SetCloudwatchLogsExportConfiguration(v *CloudwatchLogsExportConfiguration) *ModifyDBInstanceInput { s.CloudwatchLogsExportConfiguration = v diff --git a/service/redshift/api.go b/service/redshift/api.go index f5738439429..acd6154bc67 100644 --- a/service/redshift/api.go +++ b/service/redshift/api.go @@ -8519,7 +8519,7 @@ func (c *Redshift) ResizeClusterRequest(input *ResizeClusterInput) (req *request // Elastic resize operations have the following restrictions: // // * You can only resize clusters of the following types: dc2.large dc2.8xlarge -// ds2.xlarge ds2.8xlarge +// ds2.xlarge ds2.8xlarge ra3.16xlarge // // * The type of nodes that you add must match the node type for the cluster. // @@ -11431,8 +11431,8 @@ type CreateClusterInput struct { // types, go to Working with Clusters (https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#how-many-nodes) // in the Amazon Redshift Cluster Management Guide. // - // Valid Values: ds2.xlarge | ds2.8xlarge | ds2.xlarge | ds2.8xlarge | dc1.large - // | dc1.8xlarge | dc2.large | dc2.8xlarge + // Valid Values: ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge | dc2.large + // | dc2.8xlarge | ra3.16xlarge // // NodeType is a required field NodeType *string `type:"string" required:"true"` @@ -18935,7 +18935,7 @@ type ModifyClusterInput struct { // the progress of the resize request. // // Valid Values: ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge | dc2.large - // | dc2.8xlarge + // | dc2.8xlarge | ra3.16xlarge NodeType *string `type:"string"` // The new number of nodes of the cluster. If you specify a new number of nodes, diff --git a/service/resourcegroupstaggingapi/api.go b/service/resourcegroupstaggingapi/api.go index c5df89f7801..72e5ee6c9fa 100644 --- a/service/resourcegroupstaggingapi/api.go +++ b/service/resourcegroupstaggingapi/api.go @@ -1173,10 +1173,11 @@ type ComplianceDetails struct { // Whether a resource is compliant with the effective tag policy. ComplianceStatus *bool `type:"boolean"` - // The tag value is noncompliant with the effective tag policy. + // These are keys defined in the effective policy that are on the resource with + // either incorrect case treatment or noncompliant values. KeysWithNoncompliantValues []*string `type:"list"` - // The tag key is noncompliant with the effective tag policy. + // These tag keys on the resource are noncompliant with the effective tag policy. NoncompliantKeys []*string `type:"list"` } diff --git a/service/s3/api.go b/service/s3/api.go index ea5dc6d73a1..91d61f8a561 100644 --- a/service/s3/api.go +++ b/service/s3/api.go @@ -7,7 +7,6 @@ import ( "fmt" "io" "sync" - "sync/atomic" "time" "github.com/aws/aws-sdk-go/aws" @@ -347,7 +346,7 @@ func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, ou // encryption key. You can do this regardless of the form of server-side encryption // that was used to encrypt the source, or even if the source object was not // encrypted. For more information about server-side encryption, see Using Server-Side -// Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html). +// Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html). // // A copy request might return an error when Amazon S3 receives the copy request // or while Amazon S3 is copying the files. If the error occurs before the copy @@ -429,13 +428,18 @@ func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, ou // * To encrypt the target object using server-side encryption with an AWS // managed encryption key, provide the following request headers, as appropriate. // x-amz-server-side​-encryption x-amz-server-side-encryption-aws-kms-key-id -// x-amz-server-side-encryption-context If you specify x-amz-server-side-encryption:aws:kms -// but don't provide x-amz-server-side- encryption-aws-kms-key-id, Amazon -// S3 uses the AWS managed customer master key (CMK) in AWS KMS to protect -// the data. All GET and PUT requests for an object protected by AWS KMS -// fail if you don't make them with SSL or by using SigV4. For more information -// about server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see -// Protecting Data Using Server-Side Encryption with CMKs stored in KMS (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html). +// x-amz-server-side-encryption-context If you specify x-amz-server-side-encryption:aws:kms, +// but don't provide x-amz-server-side-encryption-aws-kms-key-id, Amazon +// S3 uses the AWS managed CMK in AWS KMS to protect the data. If you want +// to use a customer managed AWS KMS CMK, you must provide the x-amz-server-side-encryption-aws-kms-key-id +// of the symmetric customer managed CMK. Amazon S3 only supports symmetric +// CMKs and not asymmetric CMKs. For more information, see Using Symmetric +// and Asymmetric Keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) +// in the AWS Key Management Service Developer Guide. All GET and PUT requests +// for an object protected by AWS KMS fail if you don't make them with SSL +// or by using SigV4. For more information about server-side encryption with +// CMKs stored in AWS KMS (SSE-KMS), see Protecting Data Using Server-Side +// Encryption with CMKs stored in KMS (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html). // // * To encrypt the target object using server-side encryption with an encryption // key that you provide, use the following headers. x-amz-server-side​-encryption​-customer-algorithm @@ -790,7 +794,7 @@ func (c *S3) CreateMultipartUploadRequest(input *CreateMultipartUploadInput) (re // manage the keys used to encrypt data, specify the following headers in // the request. x-amz-server-side​-encryption x-amz-server-side-encryption-aws-kms-key-id // x-amz-server-side-encryption-context If you specify x-amz-server-side-encryption:aws:kms, -// but don't provide x-amz-server-side- encryption-aws-kms-key-id, Amazon +// but don't provide x-amz-server-side-encryption-aws-kms-key-id, Amazon // S3 uses the AWS managed CMK in AWS KMS to protect the data. All GET and // PUT requests for an object protected by AWS KMS fail if you don't make // them with SSL or by using SigV4. For more information about server-side @@ -2026,7 +2030,7 @@ func (c *S3) DeleteObjectTaggingRequest(input *DeleteObjectTaggingInput) (req *r // DeleteObjectTagging API operation for Amazon Simple Storage Service. // // Removes the entire tag set from the specified object. For more information -// about managing object tags, see Object Tagging (https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete). +// about managing object tags, see Object Tagging (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html). // // To use this operation, you must have permission to perform the s3:DeleteObjectTagging // action. @@ -6818,9 +6822,9 @@ func (c *S3) PutBucketEncryptionRequest(input *PutBucketEncryptionInput) (req *r // This implementation of the PUT operation uses the encryption subresource // to set the default encryption state of an existing bucket. // -// This implementation of the PUT operation sets default encryption for a buckets +// This implementation of the PUT operation sets default encryption for a bucket // using server-side encryption with Amazon S3-managed keys SSE-S3 or AWS KMS -// customer master keys (CMKs) (SSE-KMS) bucket. +// customer master keys (CMKs) (SSE-KMS). // // This operation requires AWS Signature Version 4. For more information, see // Authenticating Requests (AWS Signature Version 4) (sig-v4-authenticating-requests.html). @@ -8454,19 +8458,24 @@ func (c *S3) PutObjectRequest(input *PutObjectInput) (req *request.Request, outp // manage the keys used to encrypt data, specify the following headers in // the request. x-amz-server-side​-encryption x-amz-server-side-encryption-aws-kms-key-id // x-amz-server-side-encryption-context If you specify x-amz-server-side-encryption:aws:kms, -// but don't provide x-amz-server-side- encryption-aws-kms-key-id, Amazon -// S3 uses the AWS managed CMK in AWS KMS to protect the data. All GET and -// PUT requests for an object protected by AWS KMS fail if you don't make -// them with SSL or by using SigV4. For more information about server-side -// encryption with CMKs stored in AWS KMS (SSE-KMS), see Protecting Data -// Using Server-Side Encryption with CMKs stored in AWS (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html). +// but don't provide x-amz-server-side-encryption-aws-kms-key-id, Amazon +// S3 uses the AWS managed CMK in AWS KMS to protect the data. If you want +// to use a customer managed AWS KMS CMK, you must provide the x-amz-server-side-encryption-aws-kms-key-id +// of the symmetric customer managed CMK. Amazon S3 only supports symmetric +// CMKs and not asymmetric CMKs. For more information, see Using Symmetric +// and Asymmetric Keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) +// in the AWS Key Management Service Developer Guide. All GET and PUT requests +// for an object protected by AWS KMS fail if you don't make them with SSL +// or by using SigV4. For more information about server-side encryption with +// CMKs stored in AWS KMS (SSE-KMS), see Protecting Data Using Server-Side +// Encryption with CMKs stored in AWS (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html). // // * Use customer-provided encryption keys – If you want to manage your // own encryption keys, provide all the following headers in the request. // x-amz-server-side​-encryption​-customer-algorithm x-amz-server-side​-encryption​-customer-key // x-amz-server-side​-encryption​-customer-key-MD5 For more information // about server-side encryption with CMKs stored in KMS (SSE-KMS), see Protecting -// Data Using Server-Side Encryption with CMKs stored in AWS KMS (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html). +// Data Using Server-Side Encryption with CMKs stored in AWS (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html). // // Access-Control-List (ACL)-Specific Request Headers // @@ -8517,8 +8526,13 @@ func (c *S3) PutObjectRequest(input *PutObjectInput) (req *request.Request, outp // manage the keys used to encrypt data, specify the following headers in // the request. x-amz-server-side​-encryption x-amz-server-side-encryption-aws-kms-key-id // x-amz-server-side-encryption-context If you specify x-amz-server-side-encryption:aws:kms, -// but don't provide x-amz-server-side- encryption-aws-kms-key-id, Amazon -// S3 uses the default AWS KMS CMK to protect the data. All GET and PUT requests +// but don't provide x-amz-server-side-encryption-aws-kms-key-id, Amazon +// S3 uses the AWS managed CMK in AWS KMS to protect the data. If you want +// to use a customer managed AWS KMS CMK, you must provide the x-amz-server-side-encryption-aws-kms-key-id +// of the symmetric customer managed CMK. Amazon S3 only supports symmetric +// CMKs and not asymmetric CMKs. For more information, see Using Symmetric +// and Asymmetric Keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) +// in the AWS Key Management Service Developer Guide. All GET and PUT requests // for an object protected by AWS KMS fail if you don't make them with SSL // or by using SigV4. For more information about server-side encryption with // CMKs stored in AWS KMS (SSE-KMS), see Protecting Data Using Server-Side @@ -9481,9 +9495,15 @@ func (c *S3) SelectObjectContentRequest(input *SelectObjectContentInput) (req *r output = &SelectObjectContentOutput{} req = c.newRequest(op, input, output) + + es := newSelectObjectContentEventStream() + req.Handlers.Unmarshal.PushBack(es.setStreamCloser) + output.EventStream = es + req.Handlers.Send.Swap(client.LogHTTPResponseHandler.Name, client.LogHTTPResponseHeaderHandler) req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, rest.UnmarshalHandler) - req.Handlers.Unmarshal.PushBack(output.runEventStreamLoop) + req.Handlers.Unmarshal.PushBack(es.runOutputStream) + req.Handlers.Unmarshal.PushBack(es.runOnStreamPartClose) return } @@ -9602,6 +9622,140 @@ func (c *S3) SelectObjectContentWithContext(ctx aws.Context, input *SelectObject return out, req.Send() } +// SelectObjectContentEventStream provides the event stream handling for the SelectObjectContent. +type SelectObjectContentEventStream struct { + + // Reader is the EventStream reader for the SelectObjectContentEventStream + // events. This value is automatically set by the SDK when the API call is made + // Use this member when unit testing your code with the SDK to mock out the + // EventStream Reader. + // + // Must not be nil. + Reader SelectObjectContentEventStreamReader + + outputReader io.ReadCloser + + // StreamCloser is the io.Closer for the EventStream connection. For HTTP + // EventStream this is the response Body. The stream will be closed when + // the Close method of the EventStream is called. + StreamCloser io.Closer + + done chan struct{} + closeOnce sync.Once + err *eventstreamapi.OnceError +} + +func newSelectObjectContentEventStream() *SelectObjectContentEventStream { + return &SelectObjectContentEventStream{ + done: make(chan struct{}), + err: eventstreamapi.NewOnceError(), + } +} + +func (es *SelectObjectContentEventStream) setStreamCloser(r *request.Request) { + es.StreamCloser = r.HTTPResponse.Body +} + +func (es *SelectObjectContentEventStream) runOnStreamPartClose(r *request.Request) { + if es.done == nil { + return + } + go es.waitStreamPartClose() + +} + +func (es *SelectObjectContentEventStream) waitStreamPartClose() { + var outputErrCh <-chan struct{} + if v, ok := es.Reader.(interface{ ErrorSet() <-chan struct{} }); ok { + outputErrCh = v.ErrorSet() + } + var outputClosedCh <-chan struct{} + if v, ok := es.Reader.(interface{ Closed() <-chan struct{} }); ok { + outputClosedCh = v.Closed() + } + + select { + case <-es.done: + case <-outputErrCh: + es.err.SetError(es.Reader.Err()) + es.Close() + case <-outputClosedCh: + if err := es.Reader.Err(); err != nil { + es.err.SetError(es.Reader.Err()) + } + es.Close() + } +} + +// Events returns a channel to read events from. +// +// These events are: +// +// * ContinuationEvent +// * EndEvent +// * ProgressEvent +// * RecordsEvent +// * StatsEvent +func (es *SelectObjectContentEventStream) Events() <-chan SelectObjectContentEventStreamEvent { + return es.Reader.Events() +} + +func (es *SelectObjectContentEventStream) runOutputStream(r *request.Request) { + var opts []func(*eventstream.Decoder) + if r.Config.Logger != nil && r.Config.LogLevel.Matches(aws.LogDebugWithEventStreamBody) { + opts = append(opts, eventstream.DecodeWithLogger(r.Config.Logger)) + } + + decoder := eventstream.NewDecoder(r.HTTPResponse.Body, opts...) + eventReader := eventstreamapi.NewEventReader(decoder, + protocol.HandlerPayloadUnmarshal{ + Unmarshalers: r.Handlers.UnmarshalStream, + }, + unmarshalerForSelectObjectContentEventStreamEvent, + ) + + es.outputReader = r.HTTPResponse.Body + es.Reader = newReadSelectObjectContentEventStream(eventReader) +} + +// Close closes the stream. This will also cause the stream to be closed. +// Close must be called when done using the stream API. Not calling Close +// may result in resource leaks. +// +// You can use the closing of the Reader's Events channel to terminate your +// application's read from the API's stream. +// +func (es *SelectObjectContentEventStream) Close() (err error) { + es.closeOnce.Do(es.safeClose) + return es.Err() +} + +func (es *SelectObjectContentEventStream) safeClose() { + if es.done != nil { + close(es.done) + } + + es.Reader.Close() + if es.outputReader != nil { + es.outputReader.Close() + } + + es.StreamCloser.Close() +} + +// Err returns any error that occurred while reading or writing EventStream +// Events from the service API's response. Returns nil if there were no errors. +func (es *SelectObjectContentEventStream) Err() error { + if err := es.err.Err(); err != nil { + return err + } + if err := es.Reader.Err(); err != nil { + return err + } + + return nil +} + const opUploadPart = "UploadPart" // UploadPartRequest generates a "aws/request.Request" representing the @@ -9967,10 +10121,10 @@ type AbortMultipartUploadInput struct { // Key is a required field Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - // Confirms that the requester knows that she or he will be charged for the - // request. Bucket owners need not specify this parameter in their requests. - // For information about downloading objects from Requester Pays buckets, see - // Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) + // Confirms that the requester knows that they will be charged for the request. + // Bucket owners need not specify this parameter in their requests. For information + // about downloading objects from requester pays buckets, see Downloading Objects + // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) // in the Amazon S3 Developer Guide. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` @@ -11073,10 +11227,10 @@ type CompleteMultipartUploadInput struct { // The container for the multipart upload request information. MultipartUpload *CompletedMultipartUpload `locationName:"CompleteMultipartUpload" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` - // Confirms that the requester knows that she or he will be charged for the - // request. Bucket owners need not specify this parameter in their requests. - // For information about downloading objects from Requester Pays buckets, see - // Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) + // Confirms that the requester knows that they will be charged for the request. + // Bucket owners need not specify this parameter in their requests. For information + // about downloading objects from requester pays buckets, see Downloading Objects + // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) // in the Amazon S3 Developer Guide. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` @@ -11201,7 +11355,8 @@ type CompleteMultipartUploadOutput struct { RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` // If present, specifies the ID of the AWS Key Management Service (AWS KMS) - // customer master key (CMK) that was used for the object. + // symmetric customer managed customer master key (CMK) that was used for the + // object. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` // If you specified server-side encryption either with an Amazon S3-managed @@ -11416,6 +11571,11 @@ func (s *ContinuationEvent) UnmarshalEvent( return nil } +func (s *ContinuationEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + return msg, err +} + type CopyObjectInput struct { _ struct{} `locationName:"CopyObjectRequest" type:"structure"` @@ -11513,10 +11673,10 @@ type CopyObjectInput struct { // The date and time when you want the copied object's Object Lock to expire. ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"` - // Confirms that the requester knows that she or he will be charged for the - // request. Bucket owners need not specify this parameter in their requests. - // For information about downloading objects from Requester Pays buckets, see - // Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) + // Confirms that the requester knows that they will be charged for the request. + // Bucket owners need not specify this parameter in their requests. For information + // about downloading objects from requester pays buckets, see Downloading Objects + // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) // in the Amazon S3 Developer Guide. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` @@ -11545,7 +11705,7 @@ type CopyObjectInput struct { // requests for an object protected by AWS KMS will fail if not made via SSL // or using SigV4. For information about configuring using any of the officially // supported AWS SDKs and AWS CLI, see Specifying the Signature Version in Request - // Authentication (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version) + // Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version) // in the Amazon S3 Developer Guide. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` @@ -11895,7 +12055,8 @@ type CopyObjectOutput struct { SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"` // If present, specifies the ID of the AWS Key Management Service (AWS KMS) - // customer master key (CMK) that was used for the object. + // symmetric customer managed customer master key (CMK) that was used for the + // object. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` // The server-side encryption algorithm used when storing this object in Amazon @@ -12275,10 +12436,10 @@ type CreateMultipartUploadInput struct { // Specifies the date and time when you want the Object Lock to expire. ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"` - // Confirms that the requester knows that she or he will be charged for the - // request. Bucket owners need not specify this parameter in their requests. - // For information about downloading objects from Requester Pays buckets, see - // Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) + // Confirms that the requester knows that they will be charged for the request. + // Bucket owners need not specify this parameter in their requests. For information + // about downloading objects from requester pays buckets, see Downloading Objects + // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) // in the Amazon S3 Developer Guide. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` @@ -12303,11 +12464,11 @@ type CreateMultipartUploadInput struct { // encryption context key-value pairs. SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"` - // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT - // requests for an object protected by AWS KMS will fail if not made via SSL - // or using SigV4. For information about configuring using any of the officially - // supported AWS SDKs and AWS CLI, see Specifying the Signature Version in Request - // Authentication (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version) + // Specifies the ID of the symmetric customer managed AWS KMS CMK to use for + // object encryption. All GET and PUT requests for an object protected by AWS + // KMS will fail if not made via SSL or using SigV4. For information about configuring + // using any of the officially supported AWS SDKs and AWS CLI, see Specifying + // the Signature Version in Request Authentication (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version) // in the Amazon S3 Developer Guide. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` @@ -12601,7 +12762,8 @@ type CreateMultipartUploadOutput struct { SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"` // If present, specifies the ID of the AWS Key Management Service (AWS KMS) - // customer master key (CMK) that was used for the object. + // symmetric customer managed customer master key (CMK) that was used for the + // object. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` // The server-side encryption algorithm used when storing this object in Amazon @@ -13805,10 +13967,10 @@ type DeleteObjectInput struct { // delete enabled. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"` - // Confirms that the requester knows that she or he will be charged for the - // request. Bucket owners need not specify this parameter in their requests. - // For information about downloading objects from Requester Pays buckets, see - // Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) + // Confirms that the requester knows that they will be charged for the request. + // Bucket owners need not specify this parameter in their requests. For information + // about downloading objects from requester pays buckets, see Downloading Objects + // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) // in the Amazon S3 Developer Guide. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` @@ -14098,10 +14260,10 @@ type DeleteObjectsInput struct { // delete enabled. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"` - // Confirms that the requester knows that she or he will be charged for the - // request. Bucket owners need not specify this parameter in their requests. - // For information about downloading objects from Requester Pays buckets, see - // Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) + // Confirms that the requester knows that they will be charged for the request. + // Bucket owners need not specify this parameter in their requests. For information + // about downloading objects from requester pays buckets, see Downloading Objects + // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) // in the Amazon S3 Developer Guide. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` } @@ -14517,8 +14679,11 @@ type Encryption struct { // the encryption context for the restore results. KMSContext *string `type:"string"` - // If the encryption type is aws:kms, this optional value specifies the AWS - // KMS key ID to use for encryption of job results. + // If the encryption type is aws:kms, this optional value specifies the ID of + // the symmetric customer managed AWS KMS CMK to use for encryption of job results. + // Amazon S3 only supports symmetric CMKs. For more information, see Using Symmetric + // and Asymmetric Keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) + // in the AWS Key Management Service Developer Guide. KMSKeyId *string `type:"string" sensitive:"true"` } @@ -14568,8 +14733,12 @@ func (s *Encryption) SetKMSKeyId(v string) *Encryption { type EncryptionConfiguration struct { _ struct{} `type:"structure"` - // Specifies the AWS KMS Key ID (Key ARN or Alias ARN) for the destination bucket. - // Amazon S3 uses this key to encrypt replica objects. + // Specifies the ID (Key ARN or Alias ARN) of the customer managed customer + // master key (CMK) stored in AWS Key Management Service (KMS) for the destination + // bucket. Amazon S3 uses this key to encrypt replica objects. Amazon S3 only + // supports symmetric customer managed CMKs. For more information, see Using + // Symmetric and Asymmetric Keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) + // in the AWS Key Management Service Developer Guide. ReplicaKmsKeyID *string `type:"string"` } @@ -14618,6 +14787,11 @@ func (s *EndEvent) UnmarshalEvent( return nil } +func (s *EndEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + return msg, err +} + // Container for all error elements. type Error struct { _ struct{} `type:"structure"` @@ -16854,10 +17028,10 @@ type GetObjectAclInput struct { // Key is a required field Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - // Confirms that the requester knows that she or he will be charged for the - // request. Bucket owners need not specify this parameter in their requests. - // For information about downloading objects from Requester Pays buckets, see - // Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) + // Confirms that the requester knows that they will be charged for the request. + // Bucket owners need not specify this parameter in their requests. For information + // about downloading objects from requester pays buckets, see Downloading Objects + // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) // in the Amazon S3 Developer Guide. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` @@ -17029,10 +17203,10 @@ type GetObjectInput struct { // the HTTP Range header, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35. Range *string `location:"header" locationName:"Range" type:"string"` - // Confirms that the requester knows that she or he will be charged for the - // request. Bucket owners need not specify this parameter in their requests. - // For information about downloading objects from Requester Pays buckets, see - // Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) + // Confirms that the requester knows that they will be charged for the request. + // Bucket owners need not specify this parameter in their requests. For information + // about downloading objects from requester pays buckets, see Downloading Objects + // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) // in the Amazon S3 Developer Guide. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` @@ -17269,10 +17443,10 @@ type GetObjectLegalHoldInput struct { // Key is a required field Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - // Confirms that the requester knows that she or he will be charged for the - // request. Bucket owners need not specify this parameter in their requests. - // For information about downloading objects from Requester Pays buckets, see - // Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) + // Confirms that the requester knows that they will be charged for the request. + // Bucket owners need not specify this parameter in their requests. For information + // about downloading objects from requester pays buckets, see Downloading Objects + // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) // in the Amazon S3 Developer Guide. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` @@ -17562,7 +17736,8 @@ type GetObjectOutput struct { SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` // If present, specifies the ID of the AWS Key Management Service (AWS KMS) - // customer master key (CMK) that was used for the object. + // symmetric customer managed customer master key (CMK) that was used for the + // object. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` // The server-side encryption algorithm used when storing this object in Amazon @@ -17802,10 +17977,10 @@ type GetObjectRetentionInput struct { // Key is a required field Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - // Confirms that the requester knows that she or he will be charged for the - // request. Bucket owners need not specify this parameter in their requests. - // For information about downloading objects from Requester Pays buckets, see - // Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) + // Confirms that the requester knows that they will be charged for the request. + // Bucket owners need not specify this parameter in their requests. For information + // about downloading objects from requester pays buckets, see Downloading Objects + // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) // in the Amazon S3 Developer Guide. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` @@ -18056,10 +18231,10 @@ type GetObjectTorrentInput struct { // Key is a required field Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - // Confirms that the requester knows that she or he will be charged for the - // request. Bucket owners need not specify this parameter in their requests. - // For information about downloading objects from Requester Pays buckets, see - // Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) + // Confirms that the requester knows that they will be charged for the request. + // Bucket owners need not specify this parameter in their requests. For information + // about downloading objects from requester pays buckets, see Downloading Objects + // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) // in the Amazon S3 Developer Guide. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` } @@ -18532,10 +18707,10 @@ type HeadObjectInput struct { // the HTTP Range header, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35. Range *string `location:"header" locationName:"Range" type:"string"` - // Confirms that the requester knows that she or he will be charged for the - // request. Bucket owners need not specify this parameter in their requests. - // For information about downloading objects from Requester Pays buckets, see - // Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) + // Confirms that the requester knows that they will be charged for the request. + // Bucket owners need not specify this parameter in their requests. For information + // about downloading objects from requester pays buckets, see Downloading Objects + // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) // in the Amazon S3 Developer Guide. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` @@ -18828,7 +19003,8 @@ type HeadObjectOutput struct { SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` // If present, specifies the ID of the AWS Key Management Service (AWS KMS) - // customer master key (CMK) that was used for the object. + // symmetric customer managed customer master key (CMK) that was used for the + // object. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` // If the object is stored using server-side encryption either with an AWS KMS @@ -21676,10 +21852,10 @@ type ListPartsInput struct { // part numbers will be listed. PartNumberMarker *int64 `location:"querystring" locationName:"part-number-marker" type:"integer"` - // Confirms that the requester knows that she or he will be charged for the - // request. Bucket owners need not specify this parameter in their requests. - // For information about downloading objects from Requester Pays buckets, see - // Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) + // Confirms that the requester knows that they will be charged for the request. + // Bucket owners need not specify this parameter in their requests. For information + // about downloading objects from requester pays buckets, see Downloading Objects + // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) // in the Amazon S3 Developer Guide. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` @@ -23339,6 +23515,16 @@ func (s *ProgressEvent) UnmarshalEvent( return nil } +func (s *ProgressEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + // The PublicAccessBlock configuration that you want to apply to this Amazon // S3 bucket. You can enable the configuration options in any combination. For // more information about when Amazon S3 considers a bucket or object public, @@ -25272,10 +25458,10 @@ type PutObjectAclInput struct { // Key is a required field Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - // Confirms that the requester knows that she or he will be charged for the - // request. Bucket owners need not specify this parameter in their requests. - // For information about downloading objects from Requester Pays buckets, see - // Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) + // Confirms that the requester knows that they will be charged for the request. + // Bucket owners need not specify this parameter in their requests. For information + // about downloading objects from requester pays buckets, see Downloading Objects + // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) // in the Amazon S3 Developer Guide. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` @@ -25522,10 +25708,10 @@ type PutObjectInput struct { // The date and time when you want this object's Object Lock to expire. ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"` - // Confirms that the requester knows that she or he will be charged for the - // request. Bucket owners need not specify this parameter in their requests. - // For information about downloading objects from Requester Pays buckets, see - // Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) + // Confirms that the requester knows that they will be charged for the request. + // Bucket owners need not specify this parameter in their requests. For information + // about downloading objects from requester pays buckets, see Downloading Objects + // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) // in the Amazon S3 Developer Guide. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` @@ -25552,12 +25738,14 @@ type PutObjectInput struct { // If x-amz-server-side-encryption is present and has the value of aws:kms, // this header specifies the ID of the AWS Key Management Service (AWS KMS) - // customer master key (CMK) that was used for the object. + // symmetrical customer managed customer master key (CMK) that was used for + // the object. // // If the value of x-amz-server-side-encryption is aws:kms, this header specifies - // the ID of the AWS KMS CMK that will be used for the object. If you specify - // x-amz-server-side-encryption:aws:kms, but do not providex-amz-server-side-encryption-aws-kms-key-id, - // Amazon S3 uses the AWS managed CMK in AWS to protect the data. + // the ID of the symmetric customer managed AWS KMS CMK that will be used for + // the object. If you specify x-amz-server-side-encryption:aws:kms, but do not + // providex-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the AWS + // managed CMK in AWS to protect the data. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` // The server-side encryption algorithm used when storing this object in Amazon @@ -25858,10 +26046,10 @@ type PutObjectLegalHoldInput struct { // specified object. LegalHold *ObjectLockLegalHold `locationName:"LegalHold" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` - // Confirms that the requester knows that she or he will be charged for the - // request. Bucket owners need not specify this parameter in their requests. - // For information about downloading objects from Requester Pays buckets, see - // Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) + // Confirms that the requester knows that they will be charged for the request. + // Bucket owners need not specify this parameter in their requests. For information + // about downloading objects from requester pays buckets, see Downloading Objects + // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) // in the Amazon S3 Developer Guide. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` @@ -25987,10 +26175,10 @@ type PutObjectLockConfigurationInput struct { // The Object Lock configuration that you want to apply to the specified bucket. ObjectLockConfiguration *ObjectLockConfiguration `locationName:"ObjectLockConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` - // Confirms that the requester knows that she or he will be charged for the - // request. Bucket owners need not specify this parameter in their requests. - // For information about downloading objects from Requester Pays buckets, see - // Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) + // Confirms that the requester knows that they will be charged for the request. + // Bucket owners need not specify this parameter in their requests. For information + // about downloading objects from requester pays buckets, see Downloading Objects + // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) // in the Amazon S3 Developer Guide. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` @@ -26126,7 +26314,8 @@ type PutObjectOutput struct { // If x-amz-server-side-encryption is present and has the value of aws:kms, // this header specifies the ID of the AWS Key Management Service (AWS KMS) - // customer master key (CMK) that was used for the object. + // symmetric customer managed customer master key (CMK) that was used for the + // object. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` // If you specified server-side encryption either with an AWS KMS customer master @@ -26228,10 +26417,10 @@ type PutObjectRetentionInput struct { // Key is a required field Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - // Confirms that the requester knows that she or he will be charged for the - // request. Bucket owners need not specify this parameter in their requests. - // For information about downloading objects from Requester Pays buckets, see - // Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) + // Confirms that the requester knows that they will be charged for the request. + // Bucket owners need not specify this parameter in their requests. For information + // about downloading objects from requester pays buckets, see Downloading Objects + // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) // in the Amazon S3 Developer Guide. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` @@ -26762,6 +26951,13 @@ func (s *RecordsEvent) UnmarshalEvent( return nil } +func (s *RecordsEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + msg.Headers.Set(":content-type", eventstream.StringValue("application/octet-stream")) + msg.Payload = s.Payload + return msg, err +} + // Specifies how requests are redirected. In the event of an error, you can // specify a different error code to return. type Redirect struct { @@ -27426,10 +27622,10 @@ type RestoreObjectInput struct { // Key is a required field Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - // Confirms that the requester knows that she or he will be charged for the - // request. Bucket owners need not specify this parameter in their requests. - // For information about downloading objects from Requester Pays buckets, see - // Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) + // Confirms that the requester knows that they will be charged for the request. + // Bucket owners need not specify this parameter in their requests. For information + // about downloading objects from requester pays buckets, see Downloading Objects + // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) // in the Amazon S3 Developer Guide. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` @@ -27849,8 +28045,8 @@ func (s *Rule) SetTransition(v *Transition) *Rule { type SSEKMS struct { _ struct{} `locationName:"SSE-KMS" type:"structure"` - // Specifies the ID of the AWS Key Management Service (AWS KMS) customer master - // key (CMK) to use for encrypting inventory reports. + // Specifies the ID of the AWS Key Management Service (AWS KMS) symmetric customer + // managed customer master key (CMK) to use for encrypting inventory reports. // // KeyId is a required field KeyId *string `type:"string" required:"true" sensitive:"true"` @@ -27943,75 +28139,8 @@ func (s *ScanRange) SetStart(v int64) *ScanRange { return s } -// SelectObjectContentEventStream provides handling of EventStreams for -// the SelectObjectContent API. -// -// Use this type to receive SelectObjectContentEventStream events. The events -// can be read from the Events channel member. -// -// The events that can be received are: -// -// * ContinuationEvent -// * EndEvent -// * ProgressEvent -// * RecordsEvent -// * StatsEvent -type SelectObjectContentEventStream struct { - // Reader is the EventStream reader for the SelectObjectContentEventStream - // events. This value is automatically set by the SDK when the API call is made - // Use this member when unit testing your code with the SDK to mock out the - // EventStream Reader. - // - // Must not be nil. - Reader SelectObjectContentEventStreamReader - - // StreamCloser is the io.Closer for the EventStream connection. For HTTP - // EventStream this is the response Body. The stream will be closed when - // the Close method of the EventStream is called. - StreamCloser io.Closer -} - -// Close closes the EventStream. This will also cause the Events channel to be -// closed. You can use the closing of the Events channel to terminate your -// application's read from the API's EventStream. -// -// Will close the underlying EventStream reader. For EventStream over HTTP -// connection this will also close the HTTP connection. -// -// Close must be called when done using the EventStream API. Not calling Close -// may result in resource leaks. -func (es *SelectObjectContentEventStream) Close() (err error) { - es.Reader.Close() - es.StreamCloser.Close() - - return es.Err() -} - -// Err returns any error that occurred while reading EventStream Events from -// the service API's response. Returns nil if there were no errors. -func (es *SelectObjectContentEventStream) Err() error { - if err := es.Reader.Err(); err != nil { - return err - } - return nil -} - -// Events returns a channel to read EventStream Events from the -// SelectObjectContent API. -// -// These events are: -// -// * ContinuationEvent -// * EndEvent -// * ProgressEvent -// * RecordsEvent -// * StatsEvent -func (es *SelectObjectContentEventStream) Events() <-chan SelectObjectContentEventStreamEvent { - return es.Reader.Events() -} - // SelectObjectContentEventStreamEvent groups together all EventStream -// events read from the SelectObjectContent API. +// events writes for SelectObjectContentEventStream. // // These events are: // @@ -28022,11 +28151,12 @@ func (es *SelectObjectContentEventStream) Events() <-chan SelectObjectContentEve // * StatsEvent type SelectObjectContentEventStreamEvent interface { eventSelectObjectContentEventStream() + eventstreamapi.Marshaler + eventstreamapi.Unmarshaler } -// SelectObjectContentEventStreamReader provides the interface for reading EventStream -// Events from the SelectObjectContent API. The -// default implementation for this interface will be SelectObjectContentEventStream. +// SelectObjectContentEventStreamReader provides the interface for reading to the stream. The +// default implementation for this interface will be SelectObjectContentEventStreamData. // // The reader's Close method must allow multiple concurrent calls. // @@ -28041,8 +28171,7 @@ type SelectObjectContentEventStreamReader interface { // Returns a channel of events as they are read from the event stream. Events() <-chan SelectObjectContentEventStreamEvent - // Close will close the underlying event stream reader. For event stream over - // HTTP this will also close the HTTP connection. + // Close will stop the reader reading events from the stream. Close() error // Returns any error that has occurred while reading from the event stream. @@ -28052,57 +28181,44 @@ type SelectObjectContentEventStreamReader interface { type readSelectObjectContentEventStream struct { eventReader *eventstreamapi.EventReader stream chan SelectObjectContentEventStreamEvent - errVal atomic.Value + err *eventstreamapi.OnceError done chan struct{} closeOnce sync.Once } -func newReadSelectObjectContentEventStream( - reader io.ReadCloser, - unmarshalers request.HandlerList, - logger aws.Logger, - logLevel aws.LogLevelType, -) *readSelectObjectContentEventStream { +func newReadSelectObjectContentEventStream(eventReader *eventstreamapi.EventReader) *readSelectObjectContentEventStream { r := &readSelectObjectContentEventStream{ - stream: make(chan SelectObjectContentEventStreamEvent), - done: make(chan struct{}), + eventReader: eventReader, + stream: make(chan SelectObjectContentEventStreamEvent), + done: make(chan struct{}), + err: eventstreamapi.NewOnceError(), } - - r.eventReader = eventstreamapi.NewEventReader( - reader, - protocol.HandlerPayloadUnmarshal{ - Unmarshalers: unmarshalers, - }, - r.unmarshalerForEventType, - ) - r.eventReader.UseLogger(logger, logLevel) + go r.readEventStream() return r } -// Close will close the underlying event stream reader. For EventStream over -// HTTP this will also close the HTTP connection. +// Close will close the underlying event stream reader. func (r *readSelectObjectContentEventStream) Close() error { r.closeOnce.Do(r.safeClose) - return r.Err() } +func (r *readSelectObjectContentEventStream) ErrorSet() <-chan struct{} { + return r.err.ErrorSet() +} + +func (r *readSelectObjectContentEventStream) Closed() <-chan struct{} { + return r.done +} + func (r *readSelectObjectContentEventStream) safeClose() { close(r.done) - err := r.eventReader.Close() - if err != nil { - r.errVal.Store(err) - } } func (r *readSelectObjectContentEventStream) Err() error { - if v := r.errVal.Load(); v != nil { - return v.(error) - } - - return nil + return r.err.Err() } func (r *readSelectObjectContentEventStream) Events() <-chan SelectObjectContentEventStreamEvent { @@ -28110,6 +28226,7 @@ func (r *readSelectObjectContentEventStream) Events() <-chan SelectObjectContent } func (r *readSelectObjectContentEventStream) readEventStream() { + defer r.Close() defer close(r.stream) for { @@ -28124,7 +28241,7 @@ func (r *readSelectObjectContentEventStream) readEventStream() { return default: } - r.errVal.Store(err) + r.err.SetError(err) return } @@ -28136,22 +28253,16 @@ func (r *readSelectObjectContentEventStream) readEventStream() { } } -func (r *readSelectObjectContentEventStream) unmarshalerForEventType( - eventType string, -) (eventstreamapi.Unmarshaler, error) { +func unmarshalerForSelectObjectContentEventStreamEvent(eventType string) (eventstreamapi.Unmarshaler, error) { switch eventType { case "Cont": return &ContinuationEvent{}, nil - case "End": return &EndEvent{}, nil - case "Progress": return &ProgressEvent{}, nil - case "Records": return &RecordsEvent{}, nil - case "Stats": return &StatsEvent{}, nil default: @@ -28378,8 +28489,7 @@ func (s *SelectObjectContentInput) hasEndpointARN() bool { type SelectObjectContentOutput struct { _ struct{} `type:"structure" payload:"Payload"` - // Use EventStream to use the API's stream. - EventStream *SelectObjectContentEventStream `type:"structure"` + EventStream *SelectObjectContentEventStream } // String returns the string representation @@ -28392,29 +28502,17 @@ func (s SelectObjectContentOutput) GoString() string { return s.String() } -// SetEventStream sets the EventStream field's value. func (s *SelectObjectContentOutput) SetEventStream(v *SelectObjectContentEventStream) *SelectObjectContentOutput { s.EventStream = v return s } +func (s *SelectObjectContentOutput) GetEventStream() *SelectObjectContentEventStream { + return s.EventStream +} -func (s *SelectObjectContentOutput) runEventStreamLoop(r *request.Request) { - if r.Error != nil { - return - } - reader := newReadSelectObjectContentEventStream( - r.HTTPResponse.Body, - r.Handlers.UnmarshalStream, - r.Config.Logger, - r.Config.LogLevel.Value(), - ) - go reader.readEventStream() - - eventStream := &SelectObjectContentEventStream{ - StreamCloser: r.HTTPResponse.Body, - Reader: reader, - } - s.EventStream = eventStream +// GetStream returns the type to interact with the event stream. +func (s *SelectObjectContentOutput) GetStream() *SelectObjectContentEventStream { + return s.EventStream } // Describes the parameters for Select job types. @@ -28811,6 +28909,16 @@ func (s *StatsEvent) UnmarshalEvent( return nil } +func (s *StatsEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + // Specifies data related to access patterns to be collected and made available // to analyze the tradeoffs between different storage classes for an Amazon // S3 bucket. @@ -29305,10 +29413,10 @@ type UploadPartCopyInput struct { // PartNumber is a required field PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"` - // Confirms that the requester knows that she or he will be charged for the - // request. Bucket owners need not specify this parameter in their requests. - // For information about downloading objects from Requester Pays buckets, see - // Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) + // Confirms that the requester knows that they will be charged for the request. + // Bucket owners need not specify this parameter in their requests. For information + // about downloading objects from requester pays buckets, see Downloading Objects + // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) // in the Amazon S3 Developer Guide. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` @@ -29538,7 +29646,8 @@ type UploadPartCopyOutput struct { SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` // If present, specifies the ID of the AWS Key Management Service (AWS KMS) - // customer master key (CMK) that was used for the object. + // symmetric customer managed customer master key (CMK) that was used for the + // object. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` // The server-side encryption algorithm used when storing this object in Amazon @@ -29629,10 +29738,10 @@ type UploadPartInput struct { // PartNumber is a required field PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"` - // Confirms that the requester knows that she or he will be charged for the - // request. Bucket owners need not specify this parameter in their requests. - // For information about downloading objects from Requester Pays buckets, see - // Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) + // Confirms that the requester knows that they will be charged for the request. + // Bucket owners need not specify this parameter in their requests. For information + // about downloading objects from requester pays buckets, see Downloading Objects + // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) // in the Amazon S3 Developer Guide. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` @@ -29812,7 +29921,7 @@ type UploadPartOutput struct { SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` // If present, specifies the ID of the AWS Key Management Service (AWS KMS) - // customer master key (CMK) was used for the object. + // symmetric customer managed customer master key (CMK) was used for the object. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` // The server-side encryption algorithm used when storing this object in Amazon @@ -30461,10 +30570,10 @@ const ( RequestChargedRequester = "requester" ) -// Confirms that the requester knows that she or he will be charged for the -// request. Bucket owners need not specify this parameter in their requests. -// For information about downloading objects from Requester Pays buckets, see -// Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) +// Confirms that the requester knows that they will be charged for the request. +// Bucket owners need not specify this parameter in their requests. For information +// about downloading objects from requester pays buckets, see Downloading Objects +// in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) // in the Amazon S3 Developer Guide. const ( // RequestPayerRequester is a RequestPayer enum value diff --git a/service/s3/eventstream_test.go b/service/s3/eventstream_test.go index 35f30565ecf..226f5ae50d6 100644 --- a/service/s3/eventstream_test.go +++ b/service/s3/eventstream_test.go @@ -1,6 +1,6 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. -// +build go1.6 +// +build go1.10 package s3 @@ -46,10 +46,10 @@ func TestSelectObjectContent_Read(t *testing.T) { if err != nil { t.Fatalf("expect no error got, %v", err) } - defer resp.EventStream.Close() + defer resp.GetStream().Close() var i int - for event := range resp.EventStream.Events() { + for event := range resp.GetStream().Events() { if event == nil { t.Errorf("%d, expect event, got nil", i) } @@ -59,7 +59,7 @@ func TestSelectObjectContent_Read(t *testing.T) { i++ } - if err := resp.EventStream.Err(); err != nil { + if err := resp.GetStream().Err(); err != nil { t.Errorf("expect no error, %v", err) } } @@ -85,19 +85,19 @@ func TestSelectObjectContent_ReadClose(t *testing.T) { } // Assert calling Err before close does not close the stream. - resp.EventStream.Err() + resp.GetStream().Err() select { - case _, ok := <-resp.EventStream.Events(): + case _, ok := <-resp.GetStream().Events(): if !ok { t.Fatalf("expect stream not to be closed, but was") } default: } - resp.EventStream.Close() - <-resp.EventStream.Events() + resp.GetStream().Close() + <-resp.GetStream().Events() - if err := resp.EventStream.Err(); err != nil { + if err := resp.GetStream().Err(); err != nil { t.Errorf("expect no error, %v", err) } } @@ -135,16 +135,16 @@ func BenchmarkSelectObjectContent_Read(b *testing.B) { if err != nil { b.Fatalf("failed to create request, %v", err) } - defer resp.EventStream.Close() + defer resp.GetStream().Close() b.ResetTimer() for i := 0; i < b.N; i++ { - if err = resp.EventStream.Err(); err != nil { + if err = resp.GetStream().Err(); err != nil { b.Fatalf("expect no error, got %v", err) } - event := <-resp.EventStream.Events() + event := <-resp.GetStream().Events() if event == nil { - b.Fatalf("expect event, got nil, %v, %d", resp.EventStream.Err(), i) + b.Fatalf("expect event, got nil, %v, %d", resp.GetStream().Err(), i) } } } diff --git a/service/s3/s3manager/download_test.go b/service/s3/s3manager/download_test.go index a1700d8559c..a3a1e05aca8 100644 --- a/service/s3/s3manager/download_test.go +++ b/service/s3/s3manager/download_test.go @@ -2,6 +2,7 @@ package s3manager_test import ( "bytes" + "encoding/xml" "fmt" "io" "io/ioutil" @@ -101,9 +102,19 @@ func dlLoggingSvcNoContentRangeLength(data []byte, states []int) (*s3.S3, *[]str names = append(names, r.Operation.Name) + var body io.Reader + if states[index] < 400 { + body = bytes.NewReader(data[:]) + } else { + var buffer bytes.Buffer + encoder := xml.NewEncoder(&buffer) + _ = encoder.Encode(&mockErrorResponse) + body = &buffer + } + r.HTTPResponse = &http.Response{ StatusCode: states[index], - Body: ioutil.NopCloser(bytes.NewReader(data[:])), + Body: ioutil.NopCloser(body), Header: http.Header{}, } index++ @@ -840,3 +851,12 @@ func (b *badReader) Read(p []byte) (int, error) { return len(p), b.err } + +var mockErrorResponse = struct { + XMLName xml.Name `xml:"Error"` + Code string `xml:"Code"` + Message string `xml:"Message"` +}{ + Code: "MOCK_S3_ERROR_CODE", + Message: "Mocked S3 Error Message", +} diff --git a/service/s3/s3manager/upload.go b/service/s3/s3manager/upload.go index 8debfcd026c..96eef5c49e9 100644 --- a/service/s3/s3manager/upload.go +++ b/service/s3/s3manager/upload.go @@ -397,14 +397,18 @@ func (u *uploader) init() error { u.cfg.MaxUploadParts = MaxUploadParts } + // Try to get the total size for some optimizations + if err := u.initSize(); err != nil { + return err + } + // If PartSize was changed or partPool was never setup then we need to allocated a new pool // so that we return []byte slices of the correct size if u.cfg.partPool == nil || u.cfg.partPool.partSize != u.cfg.PartSize { u.cfg.partPool = newPartPool(u.cfg.PartSize) } - // Try to get the total size for some optimizations - return u.initSize() + return nil } // initSize tries to detect the total stream size, setting u.totalSize. If diff --git a/service/s3/s3manager/upload_input.go b/service/s3/s3manager/upload_input.go index 3b210180d07..9a5b46388bf 100644 --- a/service/s3/s3manager/upload_input.go +++ b/service/s3/s3manager/upload_input.go @@ -97,10 +97,10 @@ type UploadInput struct { // The date and time when you want this object's Object Lock to expire. ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"` - // Confirms that the requester knows that she or he will be charged for the - // request. Bucket owners need not specify this parameter in their requests. - // For information about downloading objects from Requester Pays buckets, see - // Downloading Objects in Requestor Pays Buckets (https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) + // Confirms that the requester knows that they will be charged for the request. + // Bucket owners need not specify this parameter in their requests. For information + // about downloading objects from requester pays buckets, see Downloading Objects + // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) // in the Amazon S3 Developer Guide. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` @@ -127,12 +127,14 @@ type UploadInput struct { // If x-amz-server-side-encryption is present and has the value of aws:kms, // this header specifies the ID of the AWS Key Management Service (AWS KMS) - // customer master key (CMK) that was used for the object. + // symmetrical customer managed customer master key (CMK) that was used for + // the object. // // If the value of x-amz-server-side-encryption is aws:kms, this header specifies - // the ID of the AWS KMS CMK that will be used for the object. If you specify - // x-amz-server-side-encryption:aws:kms, but do not providex-amz-server-side-encryption-aws-kms-key-id, - // Amazon S3 uses the AWS managed CMK in AWS to protect the data. + // the ID of the symmetric customer managed AWS KMS CMK that will be used for + // the object. If you specify x-amz-server-side-encryption:aws:kms, but do not + // providex-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the AWS + // managed CMK in AWS to protect the data. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` // The server-side encryption algorithm used when storing this object in Amazon diff --git a/service/s3/service.go b/service/s3/service.go index c90199c4603..b4c07b4d47e 100644 --- a/service/s3/service.go +++ b/service/s3/service.go @@ -78,6 +78,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) + svc.Handlers.BuildStream.PushBackNamed(restxml.BuildHandler) svc.Handlers.UnmarshalStream.PushBackNamed(restxml.UnmarshalHandler) // Run custom client initialization if present diff --git a/service/securityhub/api.go b/service/securityhub/api.go index 53ea5acaef2..d496b6b18d5 100644 --- a/service/securityhub/api.go +++ b/service/securityhub/api.go @@ -2060,7 +2060,8 @@ func (c *SecurityHub) EnableSecurityHubRequest(input *EnableSecurityHubInput) (r // EnableSecurityHub API operation for AWS SecurityHub. // // Enables Security Hub for your account in the current Region or the Region -// you specify in the request. When you enable Security Hub, you grant to Security +// you specify in the request. Enabling Security Hub also enables the CIS AWS +// Foundations standard. When you enable Security Hub, you grant to Security // Hub the permissions necessary to gather findings from AWS Config, Amazon // GuardDuty, Amazon Inspector, and Amazon Macie. To learn more, see Setting // Up AWS Security Hub (https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-settingup.html). @@ -3987,141 +3988,1095 @@ func (s *ActionTarget) SetName(v string) *ActionTarget { return s } +// Information about an Availability Zone. +type AvailabilityZone struct { + _ struct{} `type:"structure"` + + // The ID of the subnet. You can specify one subnet per Availability Zone. + SubnetId *string `type:"string"` + + // The name of the Availability Zone. + ZoneName *string `type:"string"` +} + +// String returns the string representation +func (s AvailabilityZone) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AvailabilityZone) GoString() string { + return s.String() +} + +// SetSubnetId sets the SubnetId field's value. +func (s *AvailabilityZone) SetSubnetId(v string) *AvailabilityZone { + s.SubnetId = &v + return s +} + +// SetZoneName sets the ZoneName field's value. +func (s *AvailabilityZone) SetZoneName(v string) *AvailabilityZone { + s.ZoneName = &v + return s +} + +// A distribution configuration. +type AwsCloudFrontDistributionDetails struct { + _ struct{} `type:"structure"` + + // The domain name corresponding to the distribution. + DomainName *string `type:"string"` + + // The entity tag is a hash of the object. + ETag *string `type:"string"` + + // The date and time that the distribution was last modified. + LastModifiedTime *string `type:"string"` + + // A complex type that controls whether access logs are written for the distribution. + Logging *AwsCloudFrontDistributionLogging `type:"structure"` + + // A complex type that contains information about origins for this distribution. + Origins *AwsCloudFrontDistributionOrigins `type:"structure"` + + // Indicates the current status of the distribution. + Status *string `type:"string"` + + // A unique identifier that specifies the AWS WAF web ACL, if any, to associate + // with this distribution. + WebAclId *string `type:"string"` +} + +// String returns the string representation +func (s AwsCloudFrontDistributionDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsCloudFrontDistributionDetails) GoString() string { + return s.String() +} + +// SetDomainName sets the DomainName field's value. +func (s *AwsCloudFrontDistributionDetails) SetDomainName(v string) *AwsCloudFrontDistributionDetails { + s.DomainName = &v + return s +} + +// SetETag sets the ETag field's value. +func (s *AwsCloudFrontDistributionDetails) SetETag(v string) *AwsCloudFrontDistributionDetails { + s.ETag = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *AwsCloudFrontDistributionDetails) SetLastModifiedTime(v string) *AwsCloudFrontDistributionDetails { + s.LastModifiedTime = &v + return s +} + +// SetLogging sets the Logging field's value. +func (s *AwsCloudFrontDistributionDetails) SetLogging(v *AwsCloudFrontDistributionLogging) *AwsCloudFrontDistributionDetails { + s.Logging = v + return s +} + +// SetOrigins sets the Origins field's value. +func (s *AwsCloudFrontDistributionDetails) SetOrigins(v *AwsCloudFrontDistributionOrigins) *AwsCloudFrontDistributionDetails { + s.Origins = v + return s +} + +// SetStatus sets the Status field's value. +func (s *AwsCloudFrontDistributionDetails) SetStatus(v string) *AwsCloudFrontDistributionDetails { + s.Status = &v + return s +} + +// SetWebAclId sets the WebAclId field's value. +func (s *AwsCloudFrontDistributionDetails) SetWebAclId(v string) *AwsCloudFrontDistributionDetails { + s.WebAclId = &v + return s +} + +// A complex type that controls whether access logs are written for the distribution. +type AwsCloudFrontDistributionLogging struct { + _ struct{} `type:"structure"` + + // The Amazon S3 bucket to store the access logs in. + Bucket *string `type:"string"` + + // With this field, you can enable or disable the selected distribution. + Enabled *bool `type:"boolean"` + + // Specifies whether you want CloudFront to include cookies in access logs. + IncludeCookies *bool `type:"boolean"` + + // An optional string that you want CloudFront to prefix to the access log filenames + // for this distribution. + Prefix *string `type:"string"` +} + +// String returns the string representation +func (s AwsCloudFrontDistributionLogging) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsCloudFrontDistributionLogging) GoString() string { + return s.String() +} + +// SetBucket sets the Bucket field's value. +func (s *AwsCloudFrontDistributionLogging) SetBucket(v string) *AwsCloudFrontDistributionLogging { + s.Bucket = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *AwsCloudFrontDistributionLogging) SetEnabled(v bool) *AwsCloudFrontDistributionLogging { + s.Enabled = &v + return s +} + +// SetIncludeCookies sets the IncludeCookies field's value. +func (s *AwsCloudFrontDistributionLogging) SetIncludeCookies(v bool) *AwsCloudFrontDistributionLogging { + s.IncludeCookies = &v + return s +} + +// SetPrefix sets the Prefix field's value. +func (s *AwsCloudFrontDistributionLogging) SetPrefix(v string) *AwsCloudFrontDistributionLogging { + s.Prefix = &v + return s +} + +// A complex type that describes the Amazon S3 bucket, HTTP server (for example, +// a web server), Amazon MediaStore, or other server from which CloudFront gets +// your files. +type AwsCloudFrontDistributionOriginItem struct { + _ struct{} `type:"structure"` + + // Amazon S3 origins: The DNS name of the Amazon S3 bucket from which you want + // CloudFront to get objects for this origin. + DomainName *string `type:"string"` + + // A unique identifier for the origin or origin group. + Id *string `type:"string"` + + // An optional element that causes CloudFront to request your content from a + // directory in your Amazon S3 bucket or your custom origin. + OriginPath *string `type:"string"` +} + +// String returns the string representation +func (s AwsCloudFrontDistributionOriginItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsCloudFrontDistributionOriginItem) GoString() string { + return s.String() +} + +// SetDomainName sets the DomainName field's value. +func (s *AwsCloudFrontDistributionOriginItem) SetDomainName(v string) *AwsCloudFrontDistributionOriginItem { + s.DomainName = &v + return s +} + +// SetId sets the Id field's value. +func (s *AwsCloudFrontDistributionOriginItem) SetId(v string) *AwsCloudFrontDistributionOriginItem { + s.Id = &v + return s +} + +// SetOriginPath sets the OriginPath field's value. +func (s *AwsCloudFrontDistributionOriginItem) SetOriginPath(v string) *AwsCloudFrontDistributionOriginItem { + s.OriginPath = &v + return s +} + +// A complex type that contains information about origins and origin groups +// for this distribution. +type AwsCloudFrontDistributionOrigins struct { + _ struct{} `type:"structure"` + + // A complex type that contains origins or origin groups for this distribution. + Items []*AwsCloudFrontDistributionOriginItem `type:"list"` +} + +// String returns the string representation +func (s AwsCloudFrontDistributionOrigins) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsCloudFrontDistributionOrigins) GoString() string { + return s.String() +} + +// SetItems sets the Items field's value. +func (s *AwsCloudFrontDistributionOrigins) SetItems(v []*AwsCloudFrontDistributionOriginItem) *AwsCloudFrontDistributionOrigins { + s.Items = v + return s +} + // The details of an Amazon EC2 instance. type AwsEc2InstanceDetails struct { _ struct{} `type:"structure"` - // The IAM profile ARN of the instance. - IamInstanceProfileArn *string `type:"string"` + // The IAM profile ARN of the instance. + IamInstanceProfileArn *string `type:"string"` + + // The Amazon Machine Image (AMI) ID of the instance. + ImageId *string `type:"string"` + + // The IPv4 addresses associated with the instance. + IpV4Addresses []*string `type:"list"` + + // The IPv6 addresses associated with the instance. + IpV6Addresses []*string `type:"list"` + + // The key name associated with the instance. + KeyName *string `type:"string"` + + // The date/time the instance was launched. + LaunchedAt *string `type:"string"` + + // The identifier of the subnet that the instance was launched in. + SubnetId *string `type:"string"` + + // The instance type of the instance. + Type *string `type:"string"` + + // The identifier of the VPC that the instance was launched in. + VpcId *string `type:"string"` +} + +// String returns the string representation +func (s AwsEc2InstanceDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsEc2InstanceDetails) GoString() string { + return s.String() +} + +// SetIamInstanceProfileArn sets the IamInstanceProfileArn field's value. +func (s *AwsEc2InstanceDetails) SetIamInstanceProfileArn(v string) *AwsEc2InstanceDetails { + s.IamInstanceProfileArn = &v + return s +} + +// SetImageId sets the ImageId field's value. +func (s *AwsEc2InstanceDetails) SetImageId(v string) *AwsEc2InstanceDetails { + s.ImageId = &v + return s +} + +// SetIpV4Addresses sets the IpV4Addresses field's value. +func (s *AwsEc2InstanceDetails) SetIpV4Addresses(v []*string) *AwsEc2InstanceDetails { + s.IpV4Addresses = v + return s +} + +// SetIpV6Addresses sets the IpV6Addresses field's value. +func (s *AwsEc2InstanceDetails) SetIpV6Addresses(v []*string) *AwsEc2InstanceDetails { + s.IpV6Addresses = v + return s +} + +// SetKeyName sets the KeyName field's value. +func (s *AwsEc2InstanceDetails) SetKeyName(v string) *AwsEc2InstanceDetails { + s.KeyName = &v + return s +} + +// SetLaunchedAt sets the LaunchedAt field's value. +func (s *AwsEc2InstanceDetails) SetLaunchedAt(v string) *AwsEc2InstanceDetails { + s.LaunchedAt = &v + return s +} + +// SetSubnetId sets the SubnetId field's value. +func (s *AwsEc2InstanceDetails) SetSubnetId(v string) *AwsEc2InstanceDetails { + s.SubnetId = &v + return s +} + +// SetType sets the Type field's value. +func (s *AwsEc2InstanceDetails) SetType(v string) *AwsEc2InstanceDetails { + s.Type = &v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *AwsEc2InstanceDetails) SetVpcId(v string) *AwsEc2InstanceDetails { + s.VpcId = &v + return s +} + +// Information about a load balancer. +type AwsElbv2LoadBalancerDetails struct { + _ struct{} `type:"structure"` + + // The Availability Zones for the load balancer. + AvailabilityZones []*AvailabilityZone `type:"list"` + + // The ID of the Amazon Route 53 hosted zone associated with the load balancer. + CanonicalHostedZoneId *string `type:"string"` + + // The date and time the load balancer was created. + CreatedTime *string `type:"string"` + + // The public DNS name of the load balancer. + DNSName *string `type:"string"` + + // The type of IP addresses used by the subnets for your load balancer. The + // possible values are ipv4 (for IPv4 addresses) and dualstack (for IPv4 and + // IPv6 addresses). + IpAddressType *string `type:"string"` + + // The nodes of an Internet-facing load balancer have public IP addresses. + Scheme *string `type:"string"` + + // The IDs of the security groups for the load balancer. + SecurityGroups []*string `type:"list"` + + // The state of the load balancer. + State *LoadBalancerState `type:"structure"` + + // The type of load balancer. + Type *string `type:"string"` + + // The ID of the VPC for the load balancer. + VpcId *string `type:"string"` +} + +// String returns the string representation +func (s AwsElbv2LoadBalancerDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsElbv2LoadBalancerDetails) GoString() string { + return s.String() +} + +// SetAvailabilityZones sets the AvailabilityZones field's value. +func (s *AwsElbv2LoadBalancerDetails) SetAvailabilityZones(v []*AvailabilityZone) *AwsElbv2LoadBalancerDetails { + s.AvailabilityZones = v + return s +} + +// SetCanonicalHostedZoneId sets the CanonicalHostedZoneId field's value. +func (s *AwsElbv2LoadBalancerDetails) SetCanonicalHostedZoneId(v string) *AwsElbv2LoadBalancerDetails { + s.CanonicalHostedZoneId = &v + return s +} + +// SetCreatedTime sets the CreatedTime field's value. +func (s *AwsElbv2LoadBalancerDetails) SetCreatedTime(v string) *AwsElbv2LoadBalancerDetails { + s.CreatedTime = &v + return s +} + +// SetDNSName sets the DNSName field's value. +func (s *AwsElbv2LoadBalancerDetails) SetDNSName(v string) *AwsElbv2LoadBalancerDetails { + s.DNSName = &v + return s +} + +// SetIpAddressType sets the IpAddressType field's value. +func (s *AwsElbv2LoadBalancerDetails) SetIpAddressType(v string) *AwsElbv2LoadBalancerDetails { + s.IpAddressType = &v + return s +} + +// SetScheme sets the Scheme field's value. +func (s *AwsElbv2LoadBalancerDetails) SetScheme(v string) *AwsElbv2LoadBalancerDetails { + s.Scheme = &v + return s +} + +// SetSecurityGroups sets the SecurityGroups field's value. +func (s *AwsElbv2LoadBalancerDetails) SetSecurityGroups(v []*string) *AwsElbv2LoadBalancerDetails { + s.SecurityGroups = v + return s +} + +// SetState sets the State field's value. +func (s *AwsElbv2LoadBalancerDetails) SetState(v *LoadBalancerState) *AwsElbv2LoadBalancerDetails { + s.State = v + return s +} + +// SetType sets the Type field's value. +func (s *AwsElbv2LoadBalancerDetails) SetType(v string) *AwsElbv2LoadBalancerDetails { + s.Type = &v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *AwsElbv2LoadBalancerDetails) SetVpcId(v string) *AwsElbv2LoadBalancerDetails { + s.VpcId = &v + return s +} + +// IAM access key details related to a finding. +type AwsIamAccessKeyDetails struct { + _ struct{} `type:"structure"` + + // The creation date/time of the IAM access key related to a finding. + CreatedAt *string `type:"string"` + + // The ID of the principal associated with an access key. + PrincipalId *string `type:"string"` + + // The name of the principal. + PrincipalName *string `type:"string"` + + // The type of principal associated with an access key. + PrincipalType *string `type:"string"` + + // The status of the IAM access key related to a finding. + Status *string `type:"string" enum:"AwsIamAccessKeyStatus"` + + // The user associated with the IAM access key related to a finding. + // + // The UserName parameter has been replaced with the PrincipalName parameter + // because access keys can also be assigned to principals that are not IAM users. + // + // Deprecated: This field is deprecated, use PrincipalName instead. + UserName *string `deprecated:"true" type:"string"` +} + +// String returns the string representation +func (s AwsIamAccessKeyDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsIamAccessKeyDetails) GoString() string { + return s.String() +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *AwsIamAccessKeyDetails) SetCreatedAt(v string) *AwsIamAccessKeyDetails { + s.CreatedAt = &v + return s +} + +// SetPrincipalId sets the PrincipalId field's value. +func (s *AwsIamAccessKeyDetails) SetPrincipalId(v string) *AwsIamAccessKeyDetails { + s.PrincipalId = &v + return s +} + +// SetPrincipalName sets the PrincipalName field's value. +func (s *AwsIamAccessKeyDetails) SetPrincipalName(v string) *AwsIamAccessKeyDetails { + s.PrincipalName = &v + return s +} + +// SetPrincipalType sets the PrincipalType field's value. +func (s *AwsIamAccessKeyDetails) SetPrincipalType(v string) *AwsIamAccessKeyDetails { + s.PrincipalType = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *AwsIamAccessKeyDetails) SetStatus(v string) *AwsIamAccessKeyDetails { + s.Status = &v + return s +} + +// SetUserName sets the UserName field's value. +func (s *AwsIamAccessKeyDetails) SetUserName(v string) *AwsIamAccessKeyDetails { + s.UserName = &v + return s +} + +// Contains information about an IAM role, including all of the role's policies. +type AwsIamRoleDetails struct { + _ struct{} `type:"structure"` + + // The trust policy that grants permission to assume the role. + AssumeRolePolicyDocument *string `min:"1" type:"string"` + + // The date and time, in ISO 8601 date-time format, when the role was created. + CreateDate *string `type:"string"` + + // The maximum session duration (in seconds) that you want to set for the specified + // role. + MaxSessionDuration *int64 `type:"integer"` + + // The path to the role. + Path *string `type:"string"` + + // The stable and unique string identifying the role. + RoleId *string `type:"string"` + + // The friendly name that identifies the role. + RoleName *string `type:"string"` +} + +// String returns the string representation +func (s AwsIamRoleDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsIamRoleDetails) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AwsIamRoleDetails) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AwsIamRoleDetails"} + if s.AssumeRolePolicyDocument != nil && len(*s.AssumeRolePolicyDocument) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AssumeRolePolicyDocument", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAssumeRolePolicyDocument sets the AssumeRolePolicyDocument field's value. +func (s *AwsIamRoleDetails) SetAssumeRolePolicyDocument(v string) *AwsIamRoleDetails { + s.AssumeRolePolicyDocument = &v + return s +} + +// SetCreateDate sets the CreateDate field's value. +func (s *AwsIamRoleDetails) SetCreateDate(v string) *AwsIamRoleDetails { + s.CreateDate = &v + return s +} + +// SetMaxSessionDuration sets the MaxSessionDuration field's value. +func (s *AwsIamRoleDetails) SetMaxSessionDuration(v int64) *AwsIamRoleDetails { + s.MaxSessionDuration = &v + return s +} + +// SetPath sets the Path field's value. +func (s *AwsIamRoleDetails) SetPath(v string) *AwsIamRoleDetails { + s.Path = &v + return s +} + +// SetRoleId sets the RoleId field's value. +func (s *AwsIamRoleDetails) SetRoleId(v string) *AwsIamRoleDetails { + s.RoleId = &v + return s +} + +// SetRoleName sets the RoleName field's value. +func (s *AwsIamRoleDetails) SetRoleName(v string) *AwsIamRoleDetails { + s.RoleName = &v + return s +} + +// Contains metadata about a customer master key (CMK). +type AwsKmsKeyDetails struct { + _ struct{} `type:"structure"` + + // The twelve-digit account ID of the AWS account that owns the CMK. + AWSAccountId *string `type:"string"` + + // The date and time when the CMK was created. + CreationDate *float64 `type:"double"` + + // The globally unique identifier for the CMK. + KeyId *string `type:"string"` + + // The manager of the CMK. CMKs in your AWS account are either customer managed + // or AWS managed. + KeyManager *string `type:"string"` + + // The state of the CMK. + KeyState *string `type:"string"` + + // The source of the CMK's key material. When this value is AWS_KMS, AWS KMS + // created the key material. When this value is EXTERNAL, the key material was + // imported from your existing key management infrastructure or the CMK lacks + // key material. When this value is AWS_CLOUDHSM, the key material was created + // in the AWS CloudHSM cluster associated with a custom key store. + Origin *string `type:"string"` +} + +// String returns the string representation +func (s AwsKmsKeyDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsKmsKeyDetails) GoString() string { + return s.String() +} + +// SetAWSAccountId sets the AWSAccountId field's value. +func (s *AwsKmsKeyDetails) SetAWSAccountId(v string) *AwsKmsKeyDetails { + s.AWSAccountId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *AwsKmsKeyDetails) SetCreationDate(v float64) *AwsKmsKeyDetails { + s.CreationDate = &v + return s +} + +// SetKeyId sets the KeyId field's value. +func (s *AwsKmsKeyDetails) SetKeyId(v string) *AwsKmsKeyDetails { + s.KeyId = &v + return s +} + +// SetKeyManager sets the KeyManager field's value. +func (s *AwsKmsKeyDetails) SetKeyManager(v string) *AwsKmsKeyDetails { + s.KeyManager = &v + return s +} + +// SetKeyState sets the KeyState field's value. +func (s *AwsKmsKeyDetails) SetKeyState(v string) *AwsKmsKeyDetails { + s.KeyState = &v + return s +} + +// SetOrigin sets the Origin field's value. +func (s *AwsKmsKeyDetails) SetOrigin(v string) *AwsKmsKeyDetails { + s.Origin = &v + return s +} + +// The code for the Lambda function. You can specify either an object in Amazon +// S3, or upload a deployment package directly. +type AwsLambdaFunctionCode struct { + _ struct{} `type:"structure"` + + // An Amazon S3 bucket in the same AWS Region as your function. The bucket can + // be in a different AWS account. + S3Bucket *string `type:"string"` + + // The Amazon S3 key of the deployment package. + S3Key *string `type:"string"` + + // For versioned objects, the version of the deployment package object to use. + S3ObjectVersion *string `type:"string"` + + // The base64-encoded contents of the deployment package. AWS SDK and AWS CLI + // clients handle the encoding for you. + ZipFile *string `type:"string"` +} + +// String returns the string representation +func (s AwsLambdaFunctionCode) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsLambdaFunctionCode) GoString() string { + return s.String() +} + +// SetS3Bucket sets the S3Bucket field's value. +func (s *AwsLambdaFunctionCode) SetS3Bucket(v string) *AwsLambdaFunctionCode { + s.S3Bucket = &v + return s +} + +// SetS3Key sets the S3Key field's value. +func (s *AwsLambdaFunctionCode) SetS3Key(v string) *AwsLambdaFunctionCode { + s.S3Key = &v + return s +} + +// SetS3ObjectVersion sets the S3ObjectVersion field's value. +func (s *AwsLambdaFunctionCode) SetS3ObjectVersion(v string) *AwsLambdaFunctionCode { + s.S3ObjectVersion = &v + return s +} + +// SetZipFile sets the ZipFile field's value. +func (s *AwsLambdaFunctionCode) SetZipFile(v string) *AwsLambdaFunctionCode { + s.ZipFile = &v + return s +} + +// The dead-letter queue for failed asynchronous invocations. +type AwsLambdaFunctionDeadLetterConfig struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic. + TargetArn *string `type:"string"` +} + +// String returns the string representation +func (s AwsLambdaFunctionDeadLetterConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsLambdaFunctionDeadLetterConfig) GoString() string { + return s.String() +} + +// SetTargetArn sets the TargetArn field's value. +func (s *AwsLambdaFunctionDeadLetterConfig) SetTargetArn(v string) *AwsLambdaFunctionDeadLetterConfig { + s.TargetArn = &v + return s +} + +// Details about a function's configuration. +type AwsLambdaFunctionDetails struct { + _ struct{} `type:"structure"` + + // An AwsLambdaFunctionCode object. + Code *AwsLambdaFunctionCode `type:"structure"` + + // The SHA256 hash of the function's deployment package. + CodeSha256 *string `type:"string"` + + // The function's dead letter queue. + DeadLetterConfig *AwsLambdaFunctionDeadLetterConfig `type:"structure"` + + // The function's environment variables. + Environment *AwsLambdaFunctionEnvironment `type:"structure"` + + // The name of the function. + FunctionName *string `type:"string"` + + // The function that Lambda calls to begin executing your function. + Handler *string `type:"string"` + + // The KMS key that's used to encrypt the function's environment variables. + // This key is only returned if you've configured a customer managed CMK. + KmsKeyArn *string `type:"string"` + + // The date and time that the function was last updated, in ISO-8601 format + // (YYYY-MM-DDThh:mm:ss.sTZD). + LastModified *string `type:"string"` + + // The function's layers. + Layers []*AwsLambdaFunctionLayer `type:"list"` + + // For Lambda@Edge functions, the ARN of the master function. + MasterArn *string `type:"string"` + + // The memory that's allocated to the function. + MemorySize *int64 `type:"integer"` + + // The latest updated revision of the function or alias. + RevisionId *string `type:"string"` + + // The function's execution role. + Role *string `type:"string"` + + // The runtime environment for the Lambda function. + Runtime *string `type:"string"` + + // The amount of time that Lambda allows a function to run before stopping it. + Timeout *int64 `type:"integer"` + + // The function's AWS X-Ray tracing configuration. + TracingConfig *AwsLambdaFunctionTracingConfig `type:"structure"` + + // The version of the Lambda function. + Version *string `type:"string"` + + // The function's networking configuration. + VpcConfig *AwsLambdaFunctionVpcConfig `type:"structure"` +} + +// String returns the string representation +func (s AwsLambdaFunctionDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsLambdaFunctionDetails) GoString() string { + return s.String() +} + +// SetCode sets the Code field's value. +func (s *AwsLambdaFunctionDetails) SetCode(v *AwsLambdaFunctionCode) *AwsLambdaFunctionDetails { + s.Code = v + return s +} + +// SetCodeSha256 sets the CodeSha256 field's value. +func (s *AwsLambdaFunctionDetails) SetCodeSha256(v string) *AwsLambdaFunctionDetails { + s.CodeSha256 = &v + return s +} + +// SetDeadLetterConfig sets the DeadLetterConfig field's value. +func (s *AwsLambdaFunctionDetails) SetDeadLetterConfig(v *AwsLambdaFunctionDeadLetterConfig) *AwsLambdaFunctionDetails { + s.DeadLetterConfig = v + return s +} + +// SetEnvironment sets the Environment field's value. +func (s *AwsLambdaFunctionDetails) SetEnvironment(v *AwsLambdaFunctionEnvironment) *AwsLambdaFunctionDetails { + s.Environment = v + return s +} + +// SetFunctionName sets the FunctionName field's value. +func (s *AwsLambdaFunctionDetails) SetFunctionName(v string) *AwsLambdaFunctionDetails { + s.FunctionName = &v + return s +} + +// SetHandler sets the Handler field's value. +func (s *AwsLambdaFunctionDetails) SetHandler(v string) *AwsLambdaFunctionDetails { + s.Handler = &v + return s +} + +// SetKmsKeyArn sets the KmsKeyArn field's value. +func (s *AwsLambdaFunctionDetails) SetKmsKeyArn(v string) *AwsLambdaFunctionDetails { + s.KmsKeyArn = &v + return s +} + +// SetLastModified sets the LastModified field's value. +func (s *AwsLambdaFunctionDetails) SetLastModified(v string) *AwsLambdaFunctionDetails { + s.LastModified = &v + return s +} + +// SetLayers sets the Layers field's value. +func (s *AwsLambdaFunctionDetails) SetLayers(v []*AwsLambdaFunctionLayer) *AwsLambdaFunctionDetails { + s.Layers = v + return s +} + +// SetMasterArn sets the MasterArn field's value. +func (s *AwsLambdaFunctionDetails) SetMasterArn(v string) *AwsLambdaFunctionDetails { + s.MasterArn = &v + return s +} + +// SetMemorySize sets the MemorySize field's value. +func (s *AwsLambdaFunctionDetails) SetMemorySize(v int64) *AwsLambdaFunctionDetails { + s.MemorySize = &v + return s +} + +// SetRevisionId sets the RevisionId field's value. +func (s *AwsLambdaFunctionDetails) SetRevisionId(v string) *AwsLambdaFunctionDetails { + s.RevisionId = &v + return s +} + +// SetRole sets the Role field's value. +func (s *AwsLambdaFunctionDetails) SetRole(v string) *AwsLambdaFunctionDetails { + s.Role = &v + return s +} - // The Amazon Machine Image (AMI) ID of the instance. - ImageId *string `type:"string"` +// SetRuntime sets the Runtime field's value. +func (s *AwsLambdaFunctionDetails) SetRuntime(v string) *AwsLambdaFunctionDetails { + s.Runtime = &v + return s +} - // The IPv4 addresses associated with the instance. - IpV4Addresses []*string `type:"list"` +// SetTimeout sets the Timeout field's value. +func (s *AwsLambdaFunctionDetails) SetTimeout(v int64) *AwsLambdaFunctionDetails { + s.Timeout = &v + return s +} - // The IPv6 addresses associated with the instance. - IpV6Addresses []*string `type:"list"` +// SetTracingConfig sets the TracingConfig field's value. +func (s *AwsLambdaFunctionDetails) SetTracingConfig(v *AwsLambdaFunctionTracingConfig) *AwsLambdaFunctionDetails { + s.TracingConfig = v + return s +} - // The key name associated with the instance. - KeyName *string `type:"string"` +// SetVersion sets the Version field's value. +func (s *AwsLambdaFunctionDetails) SetVersion(v string) *AwsLambdaFunctionDetails { + s.Version = &v + return s +} - // The date/time the instance was launched. - LaunchedAt *string `type:"string"` +// SetVpcConfig sets the VpcConfig field's value. +func (s *AwsLambdaFunctionDetails) SetVpcConfig(v *AwsLambdaFunctionVpcConfig) *AwsLambdaFunctionDetails { + s.VpcConfig = v + return s +} - // The identifier of the subnet that the instance was launched in. - SubnetId *string `type:"string"` +// A function's environment variable settings. +type AwsLambdaFunctionEnvironment struct { + _ struct{} `type:"structure"` - // The instance type of the instance. - Type *string `type:"string"` + // An AwsLambdaFunctionEnvironmentError object. + Error *AwsLambdaFunctionEnvironmentError `type:"structure"` - // The identifier of the VPC that the instance was launched in. - VpcId *string `type:"string"` + // Environment variable key-value pairs. + Variables map[string]*string `type:"map"` } // String returns the string representation -func (s AwsEc2InstanceDetails) String() string { +func (s AwsLambdaFunctionEnvironment) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AwsEc2InstanceDetails) GoString() string { +func (s AwsLambdaFunctionEnvironment) GoString() string { return s.String() } -// SetIamInstanceProfileArn sets the IamInstanceProfileArn field's value. -func (s *AwsEc2InstanceDetails) SetIamInstanceProfileArn(v string) *AwsEc2InstanceDetails { - s.IamInstanceProfileArn = &v +// SetError sets the Error field's value. +func (s *AwsLambdaFunctionEnvironment) SetError(v *AwsLambdaFunctionEnvironmentError) *AwsLambdaFunctionEnvironment { + s.Error = v return s } -// SetImageId sets the ImageId field's value. -func (s *AwsEc2InstanceDetails) SetImageId(v string) *AwsEc2InstanceDetails { - s.ImageId = &v +// SetVariables sets the Variables field's value. +func (s *AwsLambdaFunctionEnvironment) SetVariables(v map[string]*string) *AwsLambdaFunctionEnvironment { + s.Variables = v return s } -// SetIpV4Addresses sets the IpV4Addresses field's value. -func (s *AwsEc2InstanceDetails) SetIpV4Addresses(v []*string) *AwsEc2InstanceDetails { - s.IpV4Addresses = v - return s +// Error messages for environment variables that couldn't be applied. +type AwsLambdaFunctionEnvironmentError struct { + _ struct{} `type:"structure"` + + // The error code. + ErrorCode *string `type:"string"` + + // The error message. + Message *string `type:"string"` } -// SetIpV6Addresses sets the IpV6Addresses field's value. -func (s *AwsEc2InstanceDetails) SetIpV6Addresses(v []*string) *AwsEc2InstanceDetails { - s.IpV6Addresses = v - return s +// String returns the string representation +func (s AwsLambdaFunctionEnvironmentError) String() string { + return awsutil.Prettify(s) } -// SetKeyName sets the KeyName field's value. -func (s *AwsEc2InstanceDetails) SetKeyName(v string) *AwsEc2InstanceDetails { - s.KeyName = &v +// GoString returns the string representation +func (s AwsLambdaFunctionEnvironmentError) GoString() string { + return s.String() +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *AwsLambdaFunctionEnvironmentError) SetErrorCode(v string) *AwsLambdaFunctionEnvironmentError { + s.ErrorCode = &v return s } -// SetLaunchedAt sets the LaunchedAt field's value. -func (s *AwsEc2InstanceDetails) SetLaunchedAt(v string) *AwsEc2InstanceDetails { - s.LaunchedAt = &v +// SetMessage sets the Message field's value. +func (s *AwsLambdaFunctionEnvironmentError) SetMessage(v string) *AwsLambdaFunctionEnvironmentError { + s.Message = &v return s } -// SetSubnetId sets the SubnetId field's value. -func (s *AwsEc2InstanceDetails) SetSubnetId(v string) *AwsEc2InstanceDetails { - s.SubnetId = &v +// An AWS Lambda layer. +type AwsLambdaFunctionLayer struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the function layer. + Arn *string `type:"string"` + + // The size of the layer archive in bytes. + CodeSize *int64 `type:"integer"` +} + +// String returns the string representation +func (s AwsLambdaFunctionLayer) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsLambdaFunctionLayer) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *AwsLambdaFunctionLayer) SetArn(v string) *AwsLambdaFunctionLayer { + s.Arn = &v return s } -// SetType sets the Type field's value. -func (s *AwsEc2InstanceDetails) SetType(v string) *AwsEc2InstanceDetails { - s.Type = &v +// SetCodeSize sets the CodeSize field's value. +func (s *AwsLambdaFunctionLayer) SetCodeSize(v int64) *AwsLambdaFunctionLayer { + s.CodeSize = &v return s } -// SetVpcId sets the VpcId field's value. -func (s *AwsEc2InstanceDetails) SetVpcId(v string) *AwsEc2InstanceDetails { - s.VpcId = &v +// The function's AWS X-Ray tracing configuration. +type AwsLambdaFunctionTracingConfig struct { + _ struct{} `type:"structure"` + + // The tracing mode. + Mode *string `type:"string"` +} + +// String returns the string representation +func (s AwsLambdaFunctionTracingConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsLambdaFunctionTracingConfig) GoString() string { + return s.String() +} + +// SetMode sets the Mode field's value. +func (s *AwsLambdaFunctionTracingConfig) SetMode(v string) *AwsLambdaFunctionTracingConfig { + s.Mode = &v return s } -// IAM access key details related to a finding. -type AwsIamAccessKeyDetails struct { +// The VPC security groups and subnets that are attached to a Lambda function. +// For more information, see VPC Settings. +type AwsLambdaFunctionVpcConfig struct { _ struct{} `type:"structure"` - // The creation date/time of the IAM access key related to a finding. - CreatedAt *string `type:"string"` + // A list of VPC security groups IDs. + SecurityGroupIds []*string `type:"list"` - // The status of the IAM access key related to a finding. - Status *string `type:"string" enum:"AwsIamAccessKeyStatus"` + // A list of VPC subnet IDs. + SubnetIds []*string `type:"list"` - // The user associated with the IAM access key related to a finding. - UserName *string `type:"string"` + // The ID of the VPC. + VpcId *string `type:"string"` } // String returns the string representation -func (s AwsIamAccessKeyDetails) String() string { +func (s AwsLambdaFunctionVpcConfig) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AwsIamAccessKeyDetails) GoString() string { +func (s AwsLambdaFunctionVpcConfig) GoString() string { return s.String() } -// SetCreatedAt sets the CreatedAt field's value. -func (s *AwsIamAccessKeyDetails) SetCreatedAt(v string) *AwsIamAccessKeyDetails { - s.CreatedAt = &v +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *AwsLambdaFunctionVpcConfig) SetSecurityGroupIds(v []*string) *AwsLambdaFunctionVpcConfig { + s.SecurityGroupIds = v return s } -// SetStatus sets the Status field's value. -func (s *AwsIamAccessKeyDetails) SetStatus(v string) *AwsIamAccessKeyDetails { - s.Status = &v +// SetSubnetIds sets the SubnetIds field's value. +func (s *AwsLambdaFunctionVpcConfig) SetSubnetIds(v []*string) *AwsLambdaFunctionVpcConfig { + s.SubnetIds = v return s } -// SetUserName sets the UserName field's value. -func (s *AwsIamAccessKeyDetails) SetUserName(v string) *AwsIamAccessKeyDetails { - s.UserName = &v +// SetVpcId sets the VpcId field's value. +func (s *AwsLambdaFunctionVpcConfig) SetVpcId(v string) *AwsLambdaFunctionVpcConfig { + s.VpcId = &v return s } @@ -5376,6 +6331,146 @@ func (s *AwsSecurityFindingFilters) SetWorkflowState(v []*StringFilter) *AwsSecu return s } +// A wrapper type for the topic's Amazon Resource Name (ARN). +type AwsSnsTopicDetails struct { + _ struct{} `type:"structure"` + + // The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom + // CMK. + KmsMasterKeyId *string `type:"string"` + + // The subscription's owner. + Owner *string `type:"string"` + + // Subscription is an embedded property that describes the subscription endpoints + // of an Amazon SNS topic. + Subscription []*AwsSnsTopicSubscription `type:"list"` + + // The name of the topic. + TopicName *string `type:"string"` +} + +// String returns the string representation +func (s AwsSnsTopicDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsSnsTopicDetails) GoString() string { + return s.String() +} + +// SetKmsMasterKeyId sets the KmsMasterKeyId field's value. +func (s *AwsSnsTopicDetails) SetKmsMasterKeyId(v string) *AwsSnsTopicDetails { + s.KmsMasterKeyId = &v + return s +} + +// SetOwner sets the Owner field's value. +func (s *AwsSnsTopicDetails) SetOwner(v string) *AwsSnsTopicDetails { + s.Owner = &v + return s +} + +// SetSubscription sets the Subscription field's value. +func (s *AwsSnsTopicDetails) SetSubscription(v []*AwsSnsTopicSubscription) *AwsSnsTopicDetails { + s.Subscription = v + return s +} + +// SetTopicName sets the TopicName field's value. +func (s *AwsSnsTopicDetails) SetTopicName(v string) *AwsSnsTopicDetails { + s.TopicName = &v + return s +} + +// A wrapper type for the attributes of an Amazon SNS subscription. +type AwsSnsTopicSubscription struct { + _ struct{} `type:"structure"` + + // The subscription's endpoint (format depends on the protocol). + Endpoint *string `type:"string"` + + // The subscription's protocol. + Protocol *string `type:"string"` +} + +// String returns the string representation +func (s AwsSnsTopicSubscription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsSnsTopicSubscription) GoString() string { + return s.String() +} + +// SetEndpoint sets the Endpoint field's value. +func (s *AwsSnsTopicSubscription) SetEndpoint(v string) *AwsSnsTopicSubscription { + s.Endpoint = &v + return s +} + +// SetProtocol sets the Protocol field's value. +func (s *AwsSnsTopicSubscription) SetProtocol(v string) *AwsSnsTopicSubscription { + s.Protocol = &v + return s +} + +// Data about a queue. +type AwsSqsQueueDetails struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the dead-letter queue to which Amazon SQS + // moves messages after the value of maxReceiveCount is exceeded. + DeadLetterTargetArn *string `type:"string"` + + // The length of time, in seconds, for which Amazon SQS can reuse a data key + // to encrypt or decrypt messages before calling AWS KMS again. + KmsDataKeyReusePeriodSeconds *int64 `type:"integer"` + + // The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom + // CMK. + KmsMasterKeyId *string `type:"string"` + + // The name of the new queue. + QueueName *string `type:"string"` +} + +// String returns the string representation +func (s AwsSqsQueueDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsSqsQueueDetails) GoString() string { + return s.String() +} + +// SetDeadLetterTargetArn sets the DeadLetterTargetArn field's value. +func (s *AwsSqsQueueDetails) SetDeadLetterTargetArn(v string) *AwsSqsQueueDetails { + s.DeadLetterTargetArn = &v + return s +} + +// SetKmsDataKeyReusePeriodSeconds sets the KmsDataKeyReusePeriodSeconds field's value. +func (s *AwsSqsQueueDetails) SetKmsDataKeyReusePeriodSeconds(v int64) *AwsSqsQueueDetails { + s.KmsDataKeyReusePeriodSeconds = &v + return s +} + +// SetKmsMasterKeyId sets the KmsMasterKeyId field's value. +func (s *AwsSqsQueueDetails) SetKmsMasterKeyId(v string) *AwsSqsQueueDetails { + s.KmsMasterKeyId = &v + return s +} + +// SetQueueName sets the QueueName field's value. +func (s *AwsSqsQueueDetails) SetQueueName(v string) *AwsSqsQueueDetails { + s.QueueName = &v + return s +} + type BatchDisableStandardsInput struct { _ struct{} `type:"structure"` @@ -5523,6 +6618,7 @@ type BatchImportFindingsInput struct { // A list of findings to import. To successfully import a finding, it must follow // the AWS Security Finding Format (https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-findings-format.html). + // Maximum of 100 findings per request. // // Findings is a required field Findings []*AwsSecurityFinding `type:"list" required:"true"` @@ -5615,6 +6711,14 @@ func (s *BatchImportFindingsOutput) SetSuccessCount(v int64) *BatchImportFinding // Exclusive to findings that are generated as the result of a check run against // a specific rule in a supported standard (for example, CIS AWS Foundations). // Contains compliance-related finding details. +// +// Values include the following: +// +// * Allowed values are the following: PASSED - Compliance check passed for +// all evaluated resources. WARNING - Some information is missing or this +// check is not supported given your configuration. FAILED - Compliance check +// failed for at least one evaluated resource. NOT_AVAILABLE - Check could +// not be performed due to a service outage or API error. type Compliance struct { _ struct{} `type:"structure"` @@ -7945,6 +9049,41 @@ func (s *ListTagsForResourceOutput) SetTags(v map[string]*string) *ListTagsForRe return s } +// Information about the state of the load balancer. +type LoadBalancerState struct { + _ struct{} `type:"structure"` + + // The state code. The initial state of the load balancer is provisioning. After + // the load balancer is fully set up and ready to route traffic, its state is + // active. If the load balancer could not be set up, its state is failed. + Code *string `type:"string"` + + // A description of the state. + Reason *string `type:"string"` +} + +// String returns the string representation +func (s LoadBalancerState) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LoadBalancerState) GoString() string { + return s.String() +} + +// SetCode sets the Code field's value. +func (s *LoadBalancerState) SetCode(v string) *LoadBalancerState { + s.Code = &v + return s +} + +// SetReason sets the Reason field's value. +func (s *LoadBalancerState) SetReason(v string) *LoadBalancerState { + s.Reason = &v + return s +} + // A list of malware related to a finding. type Malware struct { _ struct{} `type:"structure"` @@ -8724,6 +9863,11 @@ func (s *Resource) Validate() error { if s.Type == nil { invalidParams.Add(request.NewErrParamRequired("Type")) } + if s.Details != nil { + if err := s.Details.Validate(); err != nil { + invalidParams.AddNested("Details", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -8771,15 +9915,36 @@ func (s *Resource) SetType(v string) *Resource { type ResourceDetails struct { _ struct{} `type:"structure"` + // Details about a CloudFront distribution. + AwsCloudFrontDistribution *AwsCloudFrontDistributionDetails `type:"structure"` + // Details about an Amazon EC2 instance related to a finding. AwsEc2Instance *AwsEc2InstanceDetails `type:"structure"` + // Details about a load balancer. + AwsElbv2LoadBalancer *AwsElbv2LoadBalancerDetails `type:"structure"` + // Details about an IAM access key related to a finding. AwsIamAccessKey *AwsIamAccessKeyDetails `type:"structure"` + // Details about an IAM role. + AwsIamRole *AwsIamRoleDetails `type:"structure"` + + // Details about a KMS key. + AwsKmsKey *AwsKmsKeyDetails `type:"structure"` + + // Details about a Lambda function. + AwsLambdaFunction *AwsLambdaFunctionDetails `type:"structure"` + // Details about an Amazon S3 Bucket related to a finding. AwsS3Bucket *AwsS3BucketDetails `type:"structure"` + // Details about an SNS topic. + AwsSnsTopic *AwsSnsTopicDetails `type:"structure"` + + // Details about an SQS queue. + AwsSqsQueue *AwsSqsQueueDetails `type:"structure"` + // Details about a container resource related to a finding. Container *ContainerDetails `type:"structure"` @@ -8797,24 +9962,81 @@ func (s ResourceDetails) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResourceDetails) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResourceDetails"} + if s.AwsIamRole != nil { + if err := s.AwsIamRole.Validate(); err != nil { + invalidParams.AddNested("AwsIamRole", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAwsCloudFrontDistribution sets the AwsCloudFrontDistribution field's value. +func (s *ResourceDetails) SetAwsCloudFrontDistribution(v *AwsCloudFrontDistributionDetails) *ResourceDetails { + s.AwsCloudFrontDistribution = v + return s +} + // SetAwsEc2Instance sets the AwsEc2Instance field's value. func (s *ResourceDetails) SetAwsEc2Instance(v *AwsEc2InstanceDetails) *ResourceDetails { s.AwsEc2Instance = v return s } +// SetAwsElbv2LoadBalancer sets the AwsElbv2LoadBalancer field's value. +func (s *ResourceDetails) SetAwsElbv2LoadBalancer(v *AwsElbv2LoadBalancerDetails) *ResourceDetails { + s.AwsElbv2LoadBalancer = v + return s +} + // SetAwsIamAccessKey sets the AwsIamAccessKey field's value. func (s *ResourceDetails) SetAwsIamAccessKey(v *AwsIamAccessKeyDetails) *ResourceDetails { s.AwsIamAccessKey = v return s } +// SetAwsIamRole sets the AwsIamRole field's value. +func (s *ResourceDetails) SetAwsIamRole(v *AwsIamRoleDetails) *ResourceDetails { + s.AwsIamRole = v + return s +} + +// SetAwsKmsKey sets the AwsKmsKey field's value. +func (s *ResourceDetails) SetAwsKmsKey(v *AwsKmsKeyDetails) *ResourceDetails { + s.AwsKmsKey = v + return s +} + +// SetAwsLambdaFunction sets the AwsLambdaFunction field's value. +func (s *ResourceDetails) SetAwsLambdaFunction(v *AwsLambdaFunctionDetails) *ResourceDetails { + s.AwsLambdaFunction = v + return s +} + // SetAwsS3Bucket sets the AwsS3Bucket field's value. func (s *ResourceDetails) SetAwsS3Bucket(v *AwsS3BucketDetails) *ResourceDetails { s.AwsS3Bucket = v return s } +// SetAwsSnsTopic sets the AwsSnsTopic field's value. +func (s *ResourceDetails) SetAwsSnsTopic(v *AwsSnsTopicDetails) *ResourceDetails { + s.AwsSnsTopic = v + return s +} + +// SetAwsSqsQueue sets the AwsSqsQueue field's value. +func (s *ResourceDetails) SetAwsSqsQueue(v *AwsSqsQueueDetails) *ResourceDetails { + s.AwsSqsQueue = v + return s +} + // SetContainer sets the Container field's value. func (s *ResourceDetails) SetContainer(v *ContainerDetails) *ResourceDetails { s.Container = v diff --git a/service/securityhub/doc.go b/service/securityhub/doc.go index 266765f2379..114301371d9 100644 --- a/service/securityhub/doc.go +++ b/service/securityhub/doc.go @@ -22,6 +22,17 @@ // Region. Security Hub must be enabled for the member account in the same Region // that the invite was sent from. // +// The following throttling limits apply to using Security Hub API operations: +// +// * GetFindings - RateLimit of 3 requests per second, and a BurstLimit of +// 6 requests per second. +// +// * UpdateFindings - RateLimit of 1 request per second, and a BurstLimit +// of 5 requests per second. +// +// * All other operations - RateLimit of 10 request per second, and a BurstLimit +// of 30 requests per second. +// // See https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26 for more information on this service. // // See securityhub package documentation for more information. diff --git a/service/ssm/api.go b/service/ssm/api.go index d70003fc4c9..ce6cc4ced70 100644 --- a/service/ssm/api.go +++ b/service/ssm/api.go @@ -13378,8 +13378,22 @@ type AttachmentsSource struct { Name *string `type:"string"` // The value of a key-value pair that identifies the location of an attachment - // to a document. The format is the URL of the location of a document attachment, - // such as the URL of an Amazon S3 bucket. + // to a document. The format for Value depends on the type of key you specify. + // + // * For the key SourceUrl, the value is an S3 bucket location. For example: + // "Values": [ "s3://my-bucket/my-folder" ] + // + // * For the key S3FileUrl, the value is a file in an S3 bucket. For example: + // "Values": [ "s3://my-bucket/my-folder/my-file.py" ] + // + // * For the key AttachmentReference, the value is constructed from the name + // of another SSM document in your account, a version number of that document, + // and a file attached to that document version that you want to reuse. For + // example: "Values": [ "MyOtherDocument/3/my-other-file.py" ] However, if + // the SSM document is shared with you from another account, the full SSM + // document ARN must be specified instead of the document name only. For + // example: "Values": [ "arn:aws:ssm:us-east-2:111122223333:document/OtherAccountDocument/3/their-file.py" + // ] Values []*string `min:"1" type:"list"` } @@ -35145,6 +35159,19 @@ type StartAutomationExecutionInput struct { // in the Automation document. Parameters map[string][]*string `min:"1" type:"map"` + // Optional metadata that you assign to a resource. You can specify a maximum + // of five tags for an automation. Tags enable you to categorize a resource + // in different ways, such as by purpose, owner, or environment. For example, + // you might want to tag an automation to identify an environment or operating + // system. In this case, you could specify the following key name/value pairs: + // + // * Key=environment,Value=test + // + // * Key=OS,Value=Windows + // + // To add tags to an existing patch baseline, use the AddTagsToResource action. + Tags []*Tag `type:"list"` + // A location is a combination of AWS Regions and/or AWS accounts where you // want to run the Automation. Use this action to start an Automation in multiple // Regions and multiple accounts. For more information, see Executing Automations @@ -35198,6 +35225,16 @@ func (s *StartAutomationExecutionInput) Validate() error { if s.TargetParameterName != nil && len(*s.TargetParameterName) < 1 { invalidParams.Add(request.NewErrParamMinLen("TargetParameterName", 1)) } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } if s.TargetLocations != nil { for i, v := range s.TargetLocations { if v == nil { @@ -35267,6 +35304,12 @@ func (s *StartAutomationExecutionInput) SetParameters(v map[string][]*string) *S return s } +// SetTags sets the Tags field's value. +func (s *StartAutomationExecutionInput) SetTags(v []*Tag) *StartAutomationExecutionInput { + s.Tags = v + return s +} + // SetTargetLocations sets the TargetLocations field's value. func (s *StartAutomationExecutionInput) SetTargetLocations(v []*TargetLocation) *StartAutomationExecutionInput { s.TargetLocations = v @@ -38342,6 +38385,9 @@ const ( // AttachmentsSourceKeyS3fileUrl is a AttachmentsSourceKey enum value AttachmentsSourceKeyS3fileUrl = "S3FileUrl" + + // AttachmentsSourceKeyAttachmentReference is a AttachmentsSourceKey enum value + AttachmentsSourceKeyAttachmentReference = "AttachmentReference" ) const ( @@ -38368,6 +38414,9 @@ const ( // AutomationExecutionFilterKeyAutomationType is a AutomationExecutionFilterKey enum value AutomationExecutionFilterKeyAutomationType = "AutomationType" + + // AutomationExecutionFilterKeyTagKey is a AutomationExecutionFilterKey enum value + AutomationExecutionFilterKeyTagKey = "TagKey" ) const ( diff --git a/service/transcribeservice/api.go b/service/transcribeservice/api.go index 797661e6d94..e8b495851f6 100644 --- a/service/transcribeservice/api.go +++ b/service/transcribeservice/api.go @@ -111,6 +111,105 @@ func (c *TranscribeService) CreateVocabularyWithContext(ctx aws.Context, input * return out, req.Send() } +const opCreateVocabularyFilter = "CreateVocabularyFilter" + +// CreateVocabularyFilterRequest generates a "aws/request.Request" representing the +// client's request for the CreateVocabularyFilter operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateVocabularyFilter for more information on using the CreateVocabularyFilter +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateVocabularyFilterRequest method. +// req, resp := client.CreateVocabularyFilterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/CreateVocabularyFilter +func (c *TranscribeService) CreateVocabularyFilterRequest(input *CreateVocabularyFilterInput) (req *request.Request, output *CreateVocabularyFilterOutput) { + op := &request.Operation{ + Name: opCreateVocabularyFilter, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateVocabularyFilterInput{} + } + + output = &CreateVocabularyFilterOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateVocabularyFilter API operation for Amazon Transcribe Service. +// +// Creates a new vocabulary filter that you can use to filter words, such as +// profane words, from the output of a transcription job. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Transcribe Service's +// API operation CreateVocabularyFilter for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Your request didn't pass one or more validation tests. For example, if the +// transcription you're trying to delete doesn't exist or if it is in a non-terminal +// state (for example, it's "in progress"). See the exception Message field +// for more information. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// Either you have sent too many requests or your input file is too long. Wait +// before you resend your request, or use a smaller file and resend the request. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// There was an internal error. Check the error message and try your request +// again. +// +// * ErrCodeConflictException "ConflictException" +// When you are using the CreateVocabulary operation, the JobName field is a +// duplicate of a previously entered job name. Resend your request with a different +// name. +// +// When you are using the UpdateVocabulary operation, there are two jobs running +// at the same time. Resend the second request later. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/CreateVocabularyFilter +func (c *TranscribeService) CreateVocabularyFilter(input *CreateVocabularyFilterInput) (*CreateVocabularyFilterOutput, error) { + req, out := c.CreateVocabularyFilterRequest(input) + return out, req.Send() +} + +// CreateVocabularyFilterWithContext is the same as CreateVocabularyFilter with the addition of +// the ability to pass a context and additional request options. +// +// See CreateVocabularyFilter for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *TranscribeService) CreateVocabularyFilterWithContext(ctx aws.Context, input *CreateVocabularyFilterInput, opts ...request.Option) (*CreateVocabularyFilterOutput, error) { + req, out := c.CreateVocabularyFilterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteTranscriptionJob = "DeleteTranscriptionJob" // DeleteTranscriptionJobRequest generates a "aws/request.Request" representing the @@ -298,6 +397,101 @@ func (c *TranscribeService) DeleteVocabularyWithContext(ctx aws.Context, input * return out, req.Send() } +const opDeleteVocabularyFilter = "DeleteVocabularyFilter" + +// DeleteVocabularyFilterRequest generates a "aws/request.Request" representing the +// client's request for the DeleteVocabularyFilter operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteVocabularyFilter for more information on using the DeleteVocabularyFilter +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteVocabularyFilterRequest method. +// req, resp := client.DeleteVocabularyFilterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/DeleteVocabularyFilter +func (c *TranscribeService) DeleteVocabularyFilterRequest(input *DeleteVocabularyFilterInput) (req *request.Request, output *DeleteVocabularyFilterOutput) { + op := &request.Operation{ + Name: opDeleteVocabularyFilter, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteVocabularyFilterInput{} + } + + output = &DeleteVocabularyFilterOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteVocabularyFilter API operation for Amazon Transcribe Service. +// +// Removes a vocabulary filter. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Transcribe Service's +// API operation DeleteVocabularyFilter for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// We can't find the requested resource. Check the name and try your request +// again. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// Either you have sent too many requests or your input file is too long. Wait +// before you resend your request, or use a smaller file and resend the request. +// +// * ErrCodeBadRequestException "BadRequestException" +// Your request didn't pass one or more validation tests. For example, if the +// transcription you're trying to delete doesn't exist or if it is in a non-terminal +// state (for example, it's "in progress"). See the exception Message field +// for more information. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// There was an internal error. Check the error message and try your request +// again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/DeleteVocabularyFilter +func (c *TranscribeService) DeleteVocabularyFilter(input *DeleteVocabularyFilterInput) (*DeleteVocabularyFilterOutput, error) { + req, out := c.DeleteVocabularyFilterRequest(input) + return out, req.Send() +} + +// DeleteVocabularyFilterWithContext is the same as DeleteVocabularyFilter with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteVocabularyFilter for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *TranscribeService) DeleteVocabularyFilterWithContext(ctx aws.Context, input *DeleteVocabularyFilterInput, opts ...request.Option) (*DeleteVocabularyFilterOutput, error) { + req, out := c.DeleteVocabularyFilterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetTranscriptionJob = "GetTranscriptionJob" // GetTranscriptionJobRequest generates a "aws/request.Request" representing the @@ -489,6 +683,100 @@ func (c *TranscribeService) GetVocabularyWithContext(ctx aws.Context, input *Get return out, req.Send() } +const opGetVocabularyFilter = "GetVocabularyFilter" + +// GetVocabularyFilterRequest generates a "aws/request.Request" representing the +// client's request for the GetVocabularyFilter operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetVocabularyFilter for more information on using the GetVocabularyFilter +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetVocabularyFilterRequest method. +// req, resp := client.GetVocabularyFilterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/GetVocabularyFilter +func (c *TranscribeService) GetVocabularyFilterRequest(input *GetVocabularyFilterInput) (req *request.Request, output *GetVocabularyFilterOutput) { + op := &request.Operation{ + Name: opGetVocabularyFilter, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetVocabularyFilterInput{} + } + + output = &GetVocabularyFilterOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetVocabularyFilter API operation for Amazon Transcribe Service. +// +// Returns information about a vocabulary filter. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Transcribe Service's +// API operation GetVocabularyFilter for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// We can't find the requested resource. Check the name and try your request +// again. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// Either you have sent too many requests or your input file is too long. Wait +// before you resend your request, or use a smaller file and resend the request. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// There was an internal error. Check the error message and try your request +// again. +// +// * ErrCodeBadRequestException "BadRequestException" +// Your request didn't pass one or more validation tests. For example, if the +// transcription you're trying to delete doesn't exist or if it is in a non-terminal +// state (for example, it's "in progress"). See the exception Message field +// for more information. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/GetVocabularyFilter +func (c *TranscribeService) GetVocabularyFilter(input *GetVocabularyFilterInput) (*GetVocabularyFilterOutput, error) { + req, out := c.GetVocabularyFilterRequest(input) + return out, req.Send() +} + +// GetVocabularyFilterWithContext is the same as GetVocabularyFilter with the addition of +// the ability to pass a context and additional request options. +// +// See GetVocabularyFilter for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *TranscribeService) GetVocabularyFilterWithContext(ctx aws.Context, input *GetVocabularyFilterInput, opts ...request.Option) (*GetVocabularyFilterOutput, error) { + req, out := c.GetVocabularyFilterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListTranscriptionJobs = "ListTranscriptionJobs" // ListTranscriptionJobsRequest generates a "aws/request.Request" representing the @@ -786,58 +1074,64 @@ func (c *TranscribeService) ListVocabulariesPagesWithContext(ctx aws.Context, in return p.Err() } -const opStartTranscriptionJob = "StartTranscriptionJob" +const opListVocabularyFilters = "ListVocabularyFilters" -// StartTranscriptionJobRequest generates a "aws/request.Request" representing the -// client's request for the StartTranscriptionJob operation. The "output" return +// ListVocabularyFiltersRequest generates a "aws/request.Request" representing the +// client's request for the ListVocabularyFilters operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See StartTranscriptionJob for more information on using the StartTranscriptionJob +// See ListVocabularyFilters for more information on using the ListVocabularyFilters // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the StartTranscriptionJobRequest method. -// req, resp := client.StartTranscriptionJobRequest(params) +// // Example sending a request using the ListVocabularyFiltersRequest method. +// req, resp := client.ListVocabularyFiltersRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/StartTranscriptionJob -func (c *TranscribeService) StartTranscriptionJobRequest(input *StartTranscriptionJobInput) (req *request.Request, output *StartTranscriptionJobOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/ListVocabularyFilters +func (c *TranscribeService) ListVocabularyFiltersRequest(input *ListVocabularyFiltersInput) (req *request.Request, output *ListVocabularyFiltersOutput) { op := &request.Operation{ - Name: opStartTranscriptionJob, + Name: opListVocabularyFilters, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { - input = &StartTranscriptionJobInput{} + input = &ListVocabularyFiltersInput{} } - output = &StartTranscriptionJobOutput{} + output = &ListVocabularyFiltersOutput{} req = c.newRequest(op, input, output) return } -// StartTranscriptionJob API operation for Amazon Transcribe Service. +// ListVocabularyFilters API operation for Amazon Transcribe Service. // -// Starts an asynchronous job to transcribe speech to text. +// Gets information about vocabulary filters. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Transcribe Service's -// API operation StartTranscriptionJob for usage and error information. +// API operation ListVocabularyFilters for usage and error information. // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" @@ -854,21 +1148,163 @@ func (c *TranscribeService) StartTranscriptionJobRequest(input *StartTranscripti // There was an internal error. Check the error message and try your request // again. // -// * ErrCodeConflictException "ConflictException" -// When you are using the CreateVocabulary operation, the JobName field is a -// duplicate of a previously entered job name. Resend your request with a different -// name. -// -// When you are using the UpdateVocabulary operation, there are two jobs running -// at the same time. Resend the second request later. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/StartTranscriptionJob -func (c *TranscribeService) StartTranscriptionJob(input *StartTranscriptionJobInput) (*StartTranscriptionJobOutput, error) { - req, out := c.StartTranscriptionJobRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/ListVocabularyFilters +func (c *TranscribeService) ListVocabularyFilters(input *ListVocabularyFiltersInput) (*ListVocabularyFiltersOutput, error) { + req, out := c.ListVocabularyFiltersRequest(input) return out, req.Send() } -// StartTranscriptionJobWithContext is the same as StartTranscriptionJob with the addition of +// ListVocabularyFiltersWithContext is the same as ListVocabularyFilters with the addition of +// the ability to pass a context and additional request options. +// +// See ListVocabularyFilters for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *TranscribeService) ListVocabularyFiltersWithContext(ctx aws.Context, input *ListVocabularyFiltersInput, opts ...request.Option) (*ListVocabularyFiltersOutput, error) { + req, out := c.ListVocabularyFiltersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListVocabularyFiltersPages iterates over the pages of a ListVocabularyFilters operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListVocabularyFilters method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListVocabularyFilters operation. +// pageNum := 0 +// err := client.ListVocabularyFiltersPages(params, +// func(page *transcribeservice.ListVocabularyFiltersOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *TranscribeService) ListVocabularyFiltersPages(input *ListVocabularyFiltersInput, fn func(*ListVocabularyFiltersOutput, bool) bool) error { + return c.ListVocabularyFiltersPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListVocabularyFiltersPagesWithContext same as ListVocabularyFiltersPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *TranscribeService) ListVocabularyFiltersPagesWithContext(ctx aws.Context, input *ListVocabularyFiltersInput, fn func(*ListVocabularyFiltersOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListVocabularyFiltersInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListVocabularyFiltersRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListVocabularyFiltersOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opStartTranscriptionJob = "StartTranscriptionJob" + +// StartTranscriptionJobRequest generates a "aws/request.Request" representing the +// client's request for the StartTranscriptionJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartTranscriptionJob for more information on using the StartTranscriptionJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartTranscriptionJobRequest method. +// req, resp := client.StartTranscriptionJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/StartTranscriptionJob +func (c *TranscribeService) StartTranscriptionJobRequest(input *StartTranscriptionJobInput) (req *request.Request, output *StartTranscriptionJobOutput) { + op := &request.Operation{ + Name: opStartTranscriptionJob, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartTranscriptionJobInput{} + } + + output = &StartTranscriptionJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartTranscriptionJob API operation for Amazon Transcribe Service. +// +// Starts an asynchronous job to transcribe speech to text. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Transcribe Service's +// API operation StartTranscriptionJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Your request didn't pass one or more validation tests. For example, if the +// transcription you're trying to delete doesn't exist or if it is in a non-terminal +// state (for example, it's "in progress"). See the exception Message field +// for more information. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// Either you have sent too many requests or your input file is too long. Wait +// before you resend your request, or use a smaller file and resend the request. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// There was an internal error. Check the error message and try your request +// again. +// +// * ErrCodeConflictException "ConflictException" +// When you are using the CreateVocabulary operation, the JobName field is a +// duplicate of a previously entered job name. Resend your request with a different +// name. +// +// When you are using the UpdateVocabulary operation, there are two jobs running +// at the same time. Resend the second request later. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/StartTranscriptionJob +func (c *TranscribeService) StartTranscriptionJob(input *StartTranscriptionJobInput) (*StartTranscriptionJobOutput, error) { + req, out := c.StartTranscriptionJobRequest(input) + return out, req.Send() +} + +// StartTranscriptionJobWithContext is the same as StartTranscriptionJob with the addition of // the ability to pass a context and additional request options. // // See StartTranscriptionJob for details on how to use this API operation. @@ -988,6 +1424,236 @@ func (c *TranscribeService) UpdateVocabularyWithContext(ctx aws.Context, input * return out, req.Send() } +const opUpdateVocabularyFilter = "UpdateVocabularyFilter" + +// UpdateVocabularyFilterRequest generates a "aws/request.Request" representing the +// client's request for the UpdateVocabularyFilter operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateVocabularyFilter for more information on using the UpdateVocabularyFilter +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateVocabularyFilterRequest method. +// req, resp := client.UpdateVocabularyFilterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/UpdateVocabularyFilter +func (c *TranscribeService) UpdateVocabularyFilterRequest(input *UpdateVocabularyFilterInput) (req *request.Request, output *UpdateVocabularyFilterOutput) { + op := &request.Operation{ + Name: opUpdateVocabularyFilter, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateVocabularyFilterInput{} + } + + output = &UpdateVocabularyFilterOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateVocabularyFilter API operation for Amazon Transcribe Service. +// +// Updates a vocabulary filter with a new list of filtered words. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Transcribe Service's +// API operation UpdateVocabularyFilter for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Your request didn't pass one or more validation tests. For example, if the +// transcription you're trying to delete doesn't exist or if it is in a non-terminal +// state (for example, it's "in progress"). See the exception Message field +// for more information. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// Either you have sent too many requests or your input file is too long. Wait +// before you resend your request, or use a smaller file and resend the request. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// There was an internal error. Check the error message and try your request +// again. +// +// * ErrCodeNotFoundException "NotFoundException" +// We can't find the requested resource. Check the name and try your request +// again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/UpdateVocabularyFilter +func (c *TranscribeService) UpdateVocabularyFilter(input *UpdateVocabularyFilterInput) (*UpdateVocabularyFilterOutput, error) { + req, out := c.UpdateVocabularyFilterRequest(input) + return out, req.Send() +} + +// UpdateVocabularyFilterWithContext is the same as UpdateVocabularyFilter with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateVocabularyFilter for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *TranscribeService) UpdateVocabularyFilterWithContext(ctx aws.Context, input *UpdateVocabularyFilterInput, opts ...request.Option) (*UpdateVocabularyFilterOutput, error) { + req, out := c.UpdateVocabularyFilterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type CreateVocabularyFilterInput struct { + _ struct{} `type:"structure"` + + // The language code of the words in the vocabulary filter. All words in the + // filter must be in the same language. The vocabulary filter can only be used + // with transcription jobs in the specified language. + // + // LanguageCode is a required field + LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"` + + // The Amazon S3 location of a text file used as input to create the vocabulary + // filter. Only use characters from the character set defined for custom vocabularies. + // For a list of character sets, see Character Sets for Custom Vocabularies + // (https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary.html#charsets). + // + // The specified file must be less than 50 KB of UTF-8 characters. + // + // If you provide the location of a list of words in the VocabularyFilterFileUri + // parameter, you can't use the Words parameter. + VocabularyFilterFileUri *string `min:"1" type:"string"` + + // The vocabulary filter name. The name must be unique within the account that + // contains it. + // + // VocabularyFilterName is a required field + VocabularyFilterName *string `min:"1" type:"string" required:"true"` + + // The words to use in the vocabulary filter. Only use characters from the character + // set defined for custom vocabularies. For a list of character sets, see Character + // Sets for Custom Vocabularies (https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary.html#charsets). + // + // If you provide a list of words in the Words parameter, you can't use the + // VocabularyFilterFileUri parameter. + Words []*string `min:"1" type:"list"` +} + +// String returns the string representation +func (s CreateVocabularyFilterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVocabularyFilterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateVocabularyFilterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateVocabularyFilterInput"} + if s.LanguageCode == nil { + invalidParams.Add(request.NewErrParamRequired("LanguageCode")) + } + if s.VocabularyFilterFileUri != nil && len(*s.VocabularyFilterFileUri) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VocabularyFilterFileUri", 1)) + } + if s.VocabularyFilterName == nil { + invalidParams.Add(request.NewErrParamRequired("VocabularyFilterName")) + } + if s.VocabularyFilterName != nil && len(*s.VocabularyFilterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VocabularyFilterName", 1)) + } + if s.Words != nil && len(s.Words) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Words", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLanguageCode sets the LanguageCode field's value. +func (s *CreateVocabularyFilterInput) SetLanguageCode(v string) *CreateVocabularyFilterInput { + s.LanguageCode = &v + return s +} + +// SetVocabularyFilterFileUri sets the VocabularyFilterFileUri field's value. +func (s *CreateVocabularyFilterInput) SetVocabularyFilterFileUri(v string) *CreateVocabularyFilterInput { + s.VocabularyFilterFileUri = &v + return s +} + +// SetVocabularyFilterName sets the VocabularyFilterName field's value. +func (s *CreateVocabularyFilterInput) SetVocabularyFilterName(v string) *CreateVocabularyFilterInput { + s.VocabularyFilterName = &v + return s +} + +// SetWords sets the Words field's value. +func (s *CreateVocabularyFilterInput) SetWords(v []*string) *CreateVocabularyFilterInput { + s.Words = v + return s +} + +type CreateVocabularyFilterOutput struct { + _ struct{} `type:"structure"` + + // The language code of the words in the collection. + LanguageCode *string `type:"string" enum:"LanguageCode"` + + // The date and time that the vocabulary filter was modified. + LastModifiedTime *time.Time `type:"timestamp"` + + // The name of the vocabulary filter. + VocabularyFilterName *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s CreateVocabularyFilterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVocabularyFilterOutput) GoString() string { + return s.String() +} + +// SetLanguageCode sets the LanguageCode field's value. +func (s *CreateVocabularyFilterOutput) SetLanguageCode(v string) *CreateVocabularyFilterOutput { + s.LanguageCode = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *CreateVocabularyFilterOutput) SetLastModifiedTime(v time.Time) *CreateVocabularyFilterOutput { + s.LastModifiedTime = &v + return s +} + +// SetVocabularyFilterName sets the VocabularyFilterName field's value. +func (s *CreateVocabularyFilterOutput) SetVocabularyFilterName(v string) *CreateVocabularyFilterOutput { + s.VocabularyFilterName = &v + return s +} + type CreateVocabularyInput struct { _ struct{} `type:"structure"` @@ -1194,6 +1860,61 @@ func (s DeleteTranscriptionJobOutput) GoString() string { return s.String() } +type DeleteVocabularyFilterInput struct { + _ struct{} `type:"structure"` + + // The name of the vocabulary filter to remove. + // + // VocabularyFilterName is a required field + VocabularyFilterName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteVocabularyFilterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVocabularyFilterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteVocabularyFilterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVocabularyFilterInput"} + if s.VocabularyFilterName == nil { + invalidParams.Add(request.NewErrParamRequired("VocabularyFilterName")) + } + if s.VocabularyFilterName != nil && len(*s.VocabularyFilterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VocabularyFilterName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetVocabularyFilterName sets the VocabularyFilterName field's value. +func (s *DeleteVocabularyFilterInput) SetVocabularyFilterName(v string) *DeleteVocabularyFilterInput { + s.VocabularyFilterName = &v + return s +} + +type DeleteVocabularyFilterOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteVocabularyFilterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVocabularyFilterOutput) GoString() string { + return s.String() +} + type DeleteVocabularyInput struct { _ struct{} `type:"structure"` @@ -1274,8 +1995,72 @@ func (s *GetTranscriptionJobInput) Validate() error { if s.TranscriptionJobName == nil { invalidParams.Add(request.NewErrParamRequired("TranscriptionJobName")) } - if s.TranscriptionJobName != nil && len(*s.TranscriptionJobName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TranscriptionJobName", 1)) + if s.TranscriptionJobName != nil && len(*s.TranscriptionJobName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TranscriptionJobName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTranscriptionJobName sets the TranscriptionJobName field's value. +func (s *GetTranscriptionJobInput) SetTranscriptionJobName(v string) *GetTranscriptionJobInput { + s.TranscriptionJobName = &v + return s +} + +type GetTranscriptionJobOutput struct { + _ struct{} `type:"structure"` + + // An object that contains the results of the transcription job. + TranscriptionJob *TranscriptionJob `type:"structure"` +} + +// String returns the string representation +func (s GetTranscriptionJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetTranscriptionJobOutput) GoString() string { + return s.String() +} + +// SetTranscriptionJob sets the TranscriptionJob field's value. +func (s *GetTranscriptionJobOutput) SetTranscriptionJob(v *TranscriptionJob) *GetTranscriptionJobOutput { + s.TranscriptionJob = v + return s +} + +type GetVocabularyFilterInput struct { + _ struct{} `type:"structure"` + + // The name of the vocabulary filter for which to return information. + // + // VocabularyFilterName is a required field + VocabularyFilterName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetVocabularyFilterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetVocabularyFilterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetVocabularyFilterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetVocabularyFilterInput"} + if s.VocabularyFilterName == nil { + invalidParams.Add(request.NewErrParamRequired("VocabularyFilterName")) + } + if s.VocabularyFilterName != nil && len(*s.VocabularyFilterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VocabularyFilterName", 1)) } if invalidParams.Len() > 0 { @@ -1284,32 +2069,60 @@ func (s *GetTranscriptionJobInput) Validate() error { return nil } -// SetTranscriptionJobName sets the TranscriptionJobName field's value. -func (s *GetTranscriptionJobInput) SetTranscriptionJobName(v string) *GetTranscriptionJobInput { - s.TranscriptionJobName = &v +// SetVocabularyFilterName sets the VocabularyFilterName field's value. +func (s *GetVocabularyFilterInput) SetVocabularyFilterName(v string) *GetVocabularyFilterInput { + s.VocabularyFilterName = &v return s } -type GetTranscriptionJobOutput struct { +type GetVocabularyFilterOutput struct { _ struct{} `type:"structure"` - // An object that contains the results of the transcription job. - TranscriptionJob *TranscriptionJob `type:"structure"` + // The URI of the list of words in the vocabulary filter. You can use this URI + // to get the list of words. + DownloadUri *string `min:"1" type:"string"` + + // The language code of the words in the vocabulary filter. + LanguageCode *string `type:"string" enum:"LanguageCode"` + + // The date and time that the contents of the vocabulary filter were updated. + LastModifiedTime *time.Time `type:"timestamp"` + + // The name of the vocabulary filter. + VocabularyFilterName *string `min:"1" type:"string"` } // String returns the string representation -func (s GetTranscriptionJobOutput) String() string { +func (s GetVocabularyFilterOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetTranscriptionJobOutput) GoString() string { +func (s GetVocabularyFilterOutput) GoString() string { return s.String() } -// SetTranscriptionJob sets the TranscriptionJob field's value. -func (s *GetTranscriptionJobOutput) SetTranscriptionJob(v *TranscriptionJob) *GetTranscriptionJobOutput { - s.TranscriptionJob = v +// SetDownloadUri sets the DownloadUri field's value. +func (s *GetVocabularyFilterOutput) SetDownloadUri(v string) *GetVocabularyFilterOutput { + s.DownloadUri = &v + return s +} + +// SetLanguageCode sets the LanguageCode field's value. +func (s *GetVocabularyFilterOutput) SetLanguageCode(v string) *GetVocabularyFilterOutput { + s.LanguageCode = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *GetVocabularyFilterOutput) SetLastModifiedTime(v time.Time) *GetVocabularyFilterOutput { + s.LastModifiedTime = &v + return s +} + +// SetVocabularyFilterName sets the VocabularyFilterName field's value. +func (s *GetVocabularyFilterOutput) SetVocabularyFilterName(v string) *GetVocabularyFilterOutput { + s.VocabularyFilterName = &v return s } @@ -1424,6 +2237,53 @@ func (s *GetVocabularyOutput) SetVocabularyState(v string) *GetVocabularyOutput return s } +// Provides information about when a transcription job should be executed. +type JobExecutionSettings struct { + _ struct{} `type:"structure"` + + // Indicates whether a job should be queued by Amazon Transcribe when the concurrent + // execution limit is exceeded. When the AllowDeferredExecution field is true, + // jobs are queued and will be executed when the number of executing jobs falls + // below the concurrent execution limit. If the field is false, Amazon Transcribe + // returns a LimitExceededException exception. + // + // If you specify the AllowDeferredExecution field, you must specify the DataAccessRoleArn + // field. + AllowDeferredExecution *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) of a role that has access to the S3 bucket + // that contains the input files. Amazon Transcribe will assume this role to + // read queued media files. If you have specified an output S3 bucket for the + // transcription results, this role should have access to the output bucket + // as well. + // + // If you specify the AllowDeferredExecution field, you must specify the DataAccessRoleArn + // field. + DataAccessRoleArn *string `type:"string"` +} + +// String returns the string representation +func (s JobExecutionSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s JobExecutionSettings) GoString() string { + return s.String() +} + +// SetAllowDeferredExecution sets the AllowDeferredExecution field's value. +func (s *JobExecutionSettings) SetAllowDeferredExecution(v bool) *JobExecutionSettings { + s.AllowDeferredExecution = &v + return s +} + +// SetDataAccessRoleArn sets the DataAccessRoleArn field's value. +func (s *JobExecutionSettings) SetDataAccessRoleArn(v string) *JobExecutionSettings { + s.DataAccessRoleArn = &v + return s +} + type ListTranscriptionJobsInput struct { _ struct{} `type:"structure"` @@ -1659,6 +2519,105 @@ func (s *ListVocabulariesOutput) SetVocabularies(v []*VocabularyInfo) *ListVocab return s } +type ListVocabularyFiltersInput struct { + _ struct{} `type:"structure"` + + // The maximum number of filters to return in the response. If there are fewer + // results in the list, this response contains only the actual results. + MaxResults *int64 `min:"1" type:"integer"` + + // Filters the response so that it only contains vocabulary filters whose name + // contains the specified string. + NameContains *string `min:"1" type:"string"` + + // If the result of the previous request to ListVocabularyFilters was truncated, + // include the NextToken to fetch the next set of collections. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListVocabularyFiltersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListVocabularyFiltersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListVocabularyFiltersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListVocabularyFiltersInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NameContains != nil && len(*s.NameContains) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NameContains", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListVocabularyFiltersInput) SetMaxResults(v int64) *ListVocabularyFiltersInput { + s.MaxResults = &v + return s +} + +// SetNameContains sets the NameContains field's value. +func (s *ListVocabularyFiltersInput) SetNameContains(v string) *ListVocabularyFiltersInput { + s.NameContains = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListVocabularyFiltersInput) SetNextToken(v string) *ListVocabularyFiltersInput { + s.NextToken = &v + return s +} + +type ListVocabularyFiltersOutput struct { + _ struct{} `type:"structure"` + + // The ListVocabularyFilters operation returns a page of collections at a time. + // The maximum size of the page is set by the MaxResults parameter. If there + // are more jobs in the list than the page size, Amazon Transcribe returns the + // NextPage token. Include the token in the next request to the ListVocabularyFilters + // operation to return in the next page of jobs. + NextToken *string `type:"string"` + + // The list of vocabulary filters. It will contain at most MaxResults number + // of filters. If there are more filters, call the ListVocabularyFilters operation + // again with the NextToken parameter in the request set to the value of the + // NextToken field in the response. + VocabularyFilters []*VocabularyFilterInfo `type:"list"` +} + +// String returns the string representation +func (s ListVocabularyFiltersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListVocabularyFiltersOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListVocabularyFiltersOutput) SetNextToken(v string) *ListVocabularyFiltersOutput { + s.NextToken = &v + return s +} + +// SetVocabularyFilters sets the VocabularyFilters field's value. +func (s *ListVocabularyFiltersOutput) SetVocabularyFilters(v []*VocabularyFilterInfo) *ListVocabularyFiltersOutput { + s.VocabularyFilters = v + return s +} + // Describes the input media file in a transcription request. type Media struct { _ struct{} `type:"structure"` @@ -1749,6 +2708,16 @@ type Settings struct { // request. If you set both, your request returns a BadRequestException. ShowSpeakerLabels *bool `type:"boolean"` + // Set to mask to remove filtered text from the transcript and replace it with + // three asterisks ("***") as placeholder text. Set to remove to remove filtered + // text from the transcript without using placeholder text. + VocabularyFilterMethod *string `type:"string" enum:"VocabularyFilterMethod"` + + // The name of the vocabulary filter to use when transcribing the audio. The + // filter that you specify must have the same language code as the transcription + // job. + VocabularyFilterName *string `min:"1" type:"string"` + // The name of a vocabulary to use when processing the transcription job. VocabularyName *string `min:"1" type:"string"` } @@ -1772,6 +2741,9 @@ func (s *Settings) Validate() error { if s.MaxSpeakerLabels != nil && *s.MaxSpeakerLabels < 2 { invalidParams.Add(request.NewErrParamMinValue("MaxSpeakerLabels", 2)) } + if s.VocabularyFilterName != nil && len(*s.VocabularyFilterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VocabularyFilterName", 1)) + } if s.VocabularyName != nil && len(*s.VocabularyName) < 1 { invalidParams.Add(request.NewErrParamMinLen("VocabularyName", 1)) } @@ -1812,6 +2784,18 @@ func (s *Settings) SetShowSpeakerLabels(v bool) *Settings { return s } +// SetVocabularyFilterMethod sets the VocabularyFilterMethod field's value. +func (s *Settings) SetVocabularyFilterMethod(v string) *Settings { + s.VocabularyFilterMethod = &v + return s +} + +// SetVocabularyFilterName sets the VocabularyFilterName field's value. +func (s *Settings) SetVocabularyFilterName(v string) *Settings { + s.VocabularyFilterName = &v + return s +} + // SetVocabularyName sets the VocabularyName field's value. func (s *Settings) SetVocabularyName(v string) *Settings { s.VocabularyName = &v @@ -1821,6 +2805,12 @@ func (s *Settings) SetVocabularyName(v string) *Settings { type StartTranscriptionJobInput struct { _ struct{} `type:"structure"` + // Provides information about how a transcription job is executed. Use this + // field to indicate that the job can be queued for deferred execution if the + // concurrency limit is reached and there are no slots available to immediately + // run the job. + JobExecutionSettings *JobExecutionSettings `type:"structure"` + // The language code for the language used in the input media file. // // LanguageCode is a required field @@ -1946,6 +2936,12 @@ func (s *StartTranscriptionJobInput) Validate() error { return nil } +// SetJobExecutionSettings sets the JobExecutionSettings field's value. +func (s *StartTranscriptionJobInput) SetJobExecutionSettings(v *JobExecutionSettings) *StartTranscriptionJobInput { + s.JobExecutionSettings = v + return s +} + // SetLanguageCode sets the LanguageCode field's value. func (s *StartTranscriptionJobInput) SetLanguageCode(v string) *StartTranscriptionJobInput { s.LanguageCode = &v @@ -2091,6 +3087,9 @@ type TranscriptionJob struct { // in the Amazon Web Services General Reference. FailureReason *string `type:"string"` + // Provides information about how a transcription job is executed. + JobExecutionSettings *JobExecutionSettings `type:"structure"` + // The language code for the input speech. LanguageCode *string `type:"string" enum:"LanguageCode"` @@ -2109,6 +3108,9 @@ type TranscriptionJob struct { // transcription job. Settings *Settings `type:"structure"` + // A timestamp that shows with the job was started processing. + StartTime *time.Time `type:"timestamp"` + // An object that describes the output of the transcription job. Transcript *Transcript `type:"structure"` @@ -2147,6 +3149,12 @@ func (s *TranscriptionJob) SetFailureReason(v string) *TranscriptionJob { return s } +// SetJobExecutionSettings sets the JobExecutionSettings field's value. +func (s *TranscriptionJob) SetJobExecutionSettings(v *JobExecutionSettings) *TranscriptionJob { + s.JobExecutionSettings = v + return s +} + // SetLanguageCode sets the LanguageCode field's value. func (s *TranscriptionJob) SetLanguageCode(v string) *TranscriptionJob { s.LanguageCode = &v @@ -2177,6 +3185,12 @@ func (s *TranscriptionJob) SetSettings(v *Settings) *TranscriptionJob { return s } +// SetStartTime sets the StartTime field's value. +func (s *TranscriptionJob) SetStartTime(v time.Time) *TranscriptionJob { + s.StartTime = &v + return s +} + // SetTranscript sets the Transcript field's value. func (s *TranscriptionJob) SetTranscript(v *Transcript) *TranscriptionJob { s.Transcript = v @@ -2222,6 +3236,9 @@ type TranscriptionJobSummary struct { // TranscriptFileUri field. OutputLocationType *string `type:"string" enum:"OutputLocationType"` + // A timestamp that shows when the job started processing. + StartTime *time.Time `type:"timestamp"` + // The name of the transcription job. TranscriptionJobName *string `min:"1" type:"string"` @@ -2270,6 +3287,12 @@ func (s *TranscriptionJobSummary) SetOutputLocationType(v string) *Transcription return s } +// SetStartTime sets the StartTime field's value. +func (s *TranscriptionJobSummary) SetStartTime(v time.Time) *TranscriptionJobSummary { + s.StartTime = &v + return s +} + // SetTranscriptionJobName sets the TranscriptionJobName field's value. func (s *TranscriptionJobSummary) SetTranscriptionJobName(v string) *TranscriptionJobSummary { s.TranscriptionJobName = &v @@ -2282,6 +3305,125 @@ func (s *TranscriptionJobSummary) SetTranscriptionJobStatus(v string) *Transcrip return s } +type UpdateVocabularyFilterInput struct { + _ struct{} `type:"structure"` + + // The Amazon S3 location of a text file used as input to create the vocabulary + // filter. Only use characters from the character set defined for custom vocabularies. + // For a list of character sets, see Character Sets for Custom Vocabularies + // (https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary.html#charsets). + // + // The specified file must be less than 50 KB of UTF-8 characters. + // + // If you provide the location of a list of words in the VocabularyFilterFileUri + // parameter, you can't use the Words parameter. + VocabularyFilterFileUri *string `min:"1" type:"string"` + + // The name of the vocabulary filter to update. + // + // VocabularyFilterName is a required field + VocabularyFilterName *string `min:"1" type:"string" required:"true"` + + // The words to use in the vocabulary filter. Only use characters from the character + // set defined for custom vocabularies. For a list of character sets, see Character + // Sets for Custom Vocabularies (https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary.html#charsets). + // + // If you provide a list of words in the Words parameter, you can't use the + // VocabularyFilterFileUri parameter. + Words []*string `min:"1" type:"list"` +} + +// String returns the string representation +func (s UpdateVocabularyFilterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateVocabularyFilterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateVocabularyFilterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateVocabularyFilterInput"} + if s.VocabularyFilterFileUri != nil && len(*s.VocabularyFilterFileUri) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VocabularyFilterFileUri", 1)) + } + if s.VocabularyFilterName == nil { + invalidParams.Add(request.NewErrParamRequired("VocabularyFilterName")) + } + if s.VocabularyFilterName != nil && len(*s.VocabularyFilterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VocabularyFilterName", 1)) + } + if s.Words != nil && len(s.Words) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Words", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetVocabularyFilterFileUri sets the VocabularyFilterFileUri field's value. +func (s *UpdateVocabularyFilterInput) SetVocabularyFilterFileUri(v string) *UpdateVocabularyFilterInput { + s.VocabularyFilterFileUri = &v + return s +} + +// SetVocabularyFilterName sets the VocabularyFilterName field's value. +func (s *UpdateVocabularyFilterInput) SetVocabularyFilterName(v string) *UpdateVocabularyFilterInput { + s.VocabularyFilterName = &v + return s +} + +// SetWords sets the Words field's value. +func (s *UpdateVocabularyFilterInput) SetWords(v []*string) *UpdateVocabularyFilterInput { + s.Words = v + return s +} + +type UpdateVocabularyFilterOutput struct { + _ struct{} `type:"structure"` + + // The language code of the words in the vocabulary filter. + LanguageCode *string `type:"string" enum:"LanguageCode"` + + // The date and time that the vocabulary filter was updated. + LastModifiedTime *time.Time `type:"timestamp"` + + // The name of the updated vocabulary filter. + VocabularyFilterName *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s UpdateVocabularyFilterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateVocabularyFilterOutput) GoString() string { + return s.String() +} + +// SetLanguageCode sets the LanguageCode field's value. +func (s *UpdateVocabularyFilterOutput) SetLanguageCode(v string) *UpdateVocabularyFilterOutput { + s.LanguageCode = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *UpdateVocabularyFilterOutput) SetLastModifiedTime(v time.Time) *UpdateVocabularyFilterOutput { + s.LastModifiedTime = &v + return s +} + +// SetVocabularyFilterName sets the VocabularyFilterName field's value. +func (s *UpdateVocabularyFilterOutput) SetVocabularyFilterName(v string) *UpdateVocabularyFilterOutput { + s.VocabularyFilterName = &v + return s +} + type UpdateVocabularyInput struct { _ struct{} `type:"structure"` @@ -2422,6 +3564,49 @@ func (s *UpdateVocabularyOutput) SetVocabularyState(v string) *UpdateVocabularyO return s } +// Provides information about a vocabulary filter. +type VocabularyFilterInfo struct { + _ struct{} `type:"structure"` + + // The language code of the words in the vocabulary filter. + LanguageCode *string `type:"string" enum:"LanguageCode"` + + // The date and time that the vocabulary was last updated. + LastModifiedTime *time.Time `type:"timestamp"` + + // The name of the vocabulary filter. The name must be unique in the account + // that holds the filter. + VocabularyFilterName *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s VocabularyFilterInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VocabularyFilterInfo) GoString() string { + return s.String() +} + +// SetLanguageCode sets the LanguageCode field's value. +func (s *VocabularyFilterInfo) SetLanguageCode(v string) *VocabularyFilterInfo { + s.LanguageCode = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *VocabularyFilterInfo) SetLastModifiedTime(v time.Time) *VocabularyFilterInfo { + s.LastModifiedTime = &v + return s +} + +// SetVocabularyFilterName sets the VocabularyFilterName field's value. +func (s *VocabularyFilterInfo) SetVocabularyFilterName(v string) *VocabularyFilterInfo { + s.VocabularyFilterName = &v + return s +} + // Provides information about a custom vocabulary. type VocabularyInfo struct { _ struct{} `type:"structure"` @@ -2592,6 +3777,9 @@ const ( ) const ( + // TranscriptionJobStatusQueued is a TranscriptionJobStatus enum value + TranscriptionJobStatusQueued = "QUEUED" + // TranscriptionJobStatusInProgress is a TranscriptionJobStatus enum value TranscriptionJobStatusInProgress = "IN_PROGRESS" @@ -2602,6 +3790,14 @@ const ( TranscriptionJobStatusCompleted = "COMPLETED" ) +const ( + // VocabularyFilterMethodRemove is a VocabularyFilterMethod enum value + VocabularyFilterMethodRemove = "remove" + + // VocabularyFilterMethodMask is a VocabularyFilterMethod enum value + VocabularyFilterMethodMask = "mask" +) + const ( // VocabularyStatePending is a VocabularyState enum value VocabularyStatePending = "PENDING" diff --git a/service/transcribeservice/transcribeserviceiface/interface.go b/service/transcribeservice/transcribeserviceiface/interface.go index 1680394d011..5d6c6fb1561 100644 --- a/service/transcribeservice/transcribeserviceiface/interface.go +++ b/service/transcribeservice/transcribeserviceiface/interface.go @@ -64,6 +64,10 @@ type TranscribeServiceAPI interface { CreateVocabularyWithContext(aws.Context, *transcribeservice.CreateVocabularyInput, ...request.Option) (*transcribeservice.CreateVocabularyOutput, error) CreateVocabularyRequest(*transcribeservice.CreateVocabularyInput) (*request.Request, *transcribeservice.CreateVocabularyOutput) + CreateVocabularyFilter(*transcribeservice.CreateVocabularyFilterInput) (*transcribeservice.CreateVocabularyFilterOutput, error) + CreateVocabularyFilterWithContext(aws.Context, *transcribeservice.CreateVocabularyFilterInput, ...request.Option) (*transcribeservice.CreateVocabularyFilterOutput, error) + CreateVocabularyFilterRequest(*transcribeservice.CreateVocabularyFilterInput) (*request.Request, *transcribeservice.CreateVocabularyFilterOutput) + DeleteTranscriptionJob(*transcribeservice.DeleteTranscriptionJobInput) (*transcribeservice.DeleteTranscriptionJobOutput, error) DeleteTranscriptionJobWithContext(aws.Context, *transcribeservice.DeleteTranscriptionJobInput, ...request.Option) (*transcribeservice.DeleteTranscriptionJobOutput, error) DeleteTranscriptionJobRequest(*transcribeservice.DeleteTranscriptionJobInput) (*request.Request, *transcribeservice.DeleteTranscriptionJobOutput) @@ -72,6 +76,10 @@ type TranscribeServiceAPI interface { DeleteVocabularyWithContext(aws.Context, *transcribeservice.DeleteVocabularyInput, ...request.Option) (*transcribeservice.DeleteVocabularyOutput, error) DeleteVocabularyRequest(*transcribeservice.DeleteVocabularyInput) (*request.Request, *transcribeservice.DeleteVocabularyOutput) + DeleteVocabularyFilter(*transcribeservice.DeleteVocabularyFilterInput) (*transcribeservice.DeleteVocabularyFilterOutput, error) + DeleteVocabularyFilterWithContext(aws.Context, *transcribeservice.DeleteVocabularyFilterInput, ...request.Option) (*transcribeservice.DeleteVocabularyFilterOutput, error) + DeleteVocabularyFilterRequest(*transcribeservice.DeleteVocabularyFilterInput) (*request.Request, *transcribeservice.DeleteVocabularyFilterOutput) + GetTranscriptionJob(*transcribeservice.GetTranscriptionJobInput) (*transcribeservice.GetTranscriptionJobOutput, error) GetTranscriptionJobWithContext(aws.Context, *transcribeservice.GetTranscriptionJobInput, ...request.Option) (*transcribeservice.GetTranscriptionJobOutput, error) GetTranscriptionJobRequest(*transcribeservice.GetTranscriptionJobInput) (*request.Request, *transcribeservice.GetTranscriptionJobOutput) @@ -80,6 +88,10 @@ type TranscribeServiceAPI interface { GetVocabularyWithContext(aws.Context, *transcribeservice.GetVocabularyInput, ...request.Option) (*transcribeservice.GetVocabularyOutput, error) GetVocabularyRequest(*transcribeservice.GetVocabularyInput) (*request.Request, *transcribeservice.GetVocabularyOutput) + GetVocabularyFilter(*transcribeservice.GetVocabularyFilterInput) (*transcribeservice.GetVocabularyFilterOutput, error) + GetVocabularyFilterWithContext(aws.Context, *transcribeservice.GetVocabularyFilterInput, ...request.Option) (*transcribeservice.GetVocabularyFilterOutput, error) + GetVocabularyFilterRequest(*transcribeservice.GetVocabularyFilterInput) (*request.Request, *transcribeservice.GetVocabularyFilterOutput) + ListTranscriptionJobs(*transcribeservice.ListTranscriptionJobsInput) (*transcribeservice.ListTranscriptionJobsOutput, error) ListTranscriptionJobsWithContext(aws.Context, *transcribeservice.ListTranscriptionJobsInput, ...request.Option) (*transcribeservice.ListTranscriptionJobsOutput, error) ListTranscriptionJobsRequest(*transcribeservice.ListTranscriptionJobsInput) (*request.Request, *transcribeservice.ListTranscriptionJobsOutput) @@ -94,6 +106,13 @@ type TranscribeServiceAPI interface { ListVocabulariesPages(*transcribeservice.ListVocabulariesInput, func(*transcribeservice.ListVocabulariesOutput, bool) bool) error ListVocabulariesPagesWithContext(aws.Context, *transcribeservice.ListVocabulariesInput, func(*transcribeservice.ListVocabulariesOutput, bool) bool, ...request.Option) error + ListVocabularyFilters(*transcribeservice.ListVocabularyFiltersInput) (*transcribeservice.ListVocabularyFiltersOutput, error) + ListVocabularyFiltersWithContext(aws.Context, *transcribeservice.ListVocabularyFiltersInput, ...request.Option) (*transcribeservice.ListVocabularyFiltersOutput, error) + ListVocabularyFiltersRequest(*transcribeservice.ListVocabularyFiltersInput) (*request.Request, *transcribeservice.ListVocabularyFiltersOutput) + + ListVocabularyFiltersPages(*transcribeservice.ListVocabularyFiltersInput, func(*transcribeservice.ListVocabularyFiltersOutput, bool) bool) error + ListVocabularyFiltersPagesWithContext(aws.Context, *transcribeservice.ListVocabularyFiltersInput, func(*transcribeservice.ListVocabularyFiltersOutput, bool) bool, ...request.Option) error + StartTranscriptionJob(*transcribeservice.StartTranscriptionJobInput) (*transcribeservice.StartTranscriptionJobOutput, error) StartTranscriptionJobWithContext(aws.Context, *transcribeservice.StartTranscriptionJobInput, ...request.Option) (*transcribeservice.StartTranscriptionJobOutput, error) StartTranscriptionJobRequest(*transcribeservice.StartTranscriptionJobInput) (*request.Request, *transcribeservice.StartTranscriptionJobOutput) @@ -101,6 +120,10 @@ type TranscribeServiceAPI interface { UpdateVocabulary(*transcribeservice.UpdateVocabularyInput) (*transcribeservice.UpdateVocabularyOutput, error) UpdateVocabularyWithContext(aws.Context, *transcribeservice.UpdateVocabularyInput, ...request.Option) (*transcribeservice.UpdateVocabularyOutput, error) UpdateVocabularyRequest(*transcribeservice.UpdateVocabularyInput) (*request.Request, *transcribeservice.UpdateVocabularyOutput) + + UpdateVocabularyFilter(*transcribeservice.UpdateVocabularyFilterInput) (*transcribeservice.UpdateVocabularyFilterOutput, error) + UpdateVocabularyFilterWithContext(aws.Context, *transcribeservice.UpdateVocabularyFilterInput, ...request.Option) (*transcribeservice.UpdateVocabularyFilterOutput, error) + UpdateVocabularyFilterRequest(*transcribeservice.UpdateVocabularyFilterInput) (*request.Request, *transcribeservice.UpdateVocabularyFilterOutput) } var _ TranscribeServiceAPI = (*transcribeservice.TranscribeService)(nil) diff --git a/service/transcribestreamingservice/api.go b/service/transcribestreamingservice/api.go new file mode 100644 index 00000000000..cadfdfcafd9 --- /dev/null +++ b/service/transcribestreamingservice/api.go @@ -0,0 +1,1281 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package transcribestreamingservice + +import ( + "bytes" + "fmt" + "io" + "sync" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/client" + "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" + "github.com/aws/aws-sdk-go/private/protocol/eventstream" + "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi" + "github.com/aws/aws-sdk-go/private/protocol/rest" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +const opStartStreamTranscription = "StartStreamTranscription" + +// StartStreamTranscriptionRequest generates a "aws/request.Request" representing the +// client's request for the StartStreamTranscription operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartStreamTranscription for more information on using the StartStreamTranscription +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartStreamTranscriptionRequest method. +// req, resp := client.StartStreamTranscriptionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-streaming-2017-10-26/StartStreamTranscription +func (c *TranscribeStreamingService) StartStreamTranscriptionRequest(input *StartStreamTranscriptionInput) (req *request.Request, output *StartStreamTranscriptionOutput) { + op := &request.Operation{ + Name: opStartStreamTranscription, + HTTPMethod: "POST", + HTTPPath: "/stream-transcription", + } + + if input == nil { + input = &StartStreamTranscriptionInput{} + } + + output = &StartStreamTranscriptionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.UnmarshalMeta.PushBack( + protocol.RequireHTTPMinProtocol{Major: 2}.Handler, + ) + + es := newStartStreamTranscriptionEventStream() + output.eventStream = es + + req.Handlers.Sign.PushFront(es.setupInputPipe) + req.Handlers.Build.PushBack(request.WithSetRequestHeaders(map[string]string{ + "Content-Type": "application/vnd.amazon.eventstream", + "X-Amz-Content-Sha256": "STREAMING-AWS4-HMAC-SHA256-EVENTS", + })) + req.Handlers.Build.Swap(restjson.BuildHandler.Name, rest.BuildHandler) + req.Handlers.Send.Swap(client.LogHTTPRequestHandler.Name, client.LogHTTPRequestHeaderHandler) + req.Handlers.Unmarshal.PushBack(es.runInputStream) + + req.Handlers.Send.Swap(client.LogHTTPResponseHandler.Name, client.LogHTTPResponseHeaderHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, rest.UnmarshalHandler) + req.Handlers.Unmarshal.PushBack(es.runOutputStream) + req.Handlers.Unmarshal.PushBack(es.runOnStreamPartClose) + return +} + +// StartStreamTranscription API operation for Amazon Transcribe Streaming Service. +// +// Starts a bidirectional HTTP2 stream where audio is streamed to Amazon Transcribe +// and the transcription results are streamed to your application. +// +// The following are encoded as HTTP2 headers: +// +// * x-amzn-transcribe-language-code +// +// * x-amzn-transcribe-media-encoding +// +// * x-amzn-transcribe-sample-rate +// +// * x-amzn-transcribe-session-id +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Transcribe Streaming Service's +// API operation StartStreamTranscription for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// One or more arguments to the StartStreamTranscription operation was invalid. +// For example, MediaEncoding was not set to pcm or LanguageCode was not set +// to a valid code. Check the parameters and try your request again. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You have exceeded the maximum number of concurrent transcription streams, +// are starting transcription streams too quickly, or the maximum audio length +// of 4 hours. Wait until a stream has finished processing, or break your audio +// stream into smaller chunks and try your request again. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// A problem occurred while processing the audio. Amazon Transcribe terminated +// processing. Try your request again. +// +// * ErrCodeConflictException "ConflictException" +// A new stream started with the same session ID. The current stream has been +// terminated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/transcribe-streaming-2017-10-26/StartStreamTranscription +func (c *TranscribeStreamingService) StartStreamTranscription(input *StartStreamTranscriptionInput) (*StartStreamTranscriptionOutput, error) { + req, out := c.StartStreamTranscriptionRequest(input) + return out, req.Send() +} + +// StartStreamTranscriptionWithContext is the same as StartStreamTranscription with the addition of +// the ability to pass a context and additional request options. +// +// See StartStreamTranscription for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *TranscribeStreamingService) StartStreamTranscriptionWithContext(ctx aws.Context, input *StartStreamTranscriptionInput, opts ...request.Option) (*StartStreamTranscriptionOutput, error) { + req, out := c.StartStreamTranscriptionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// StartStreamTranscriptionEventStream provides the event stream handling for the StartStreamTranscription. +type StartStreamTranscriptionEventStream struct { + + // Writer is the EventStream writer for the AudioStream + // events. This value is automatically set by the SDK when the API call is made + // Use this member when unit testing your code with the SDK to mock out the + // EventStream Writer. + // + // Must not be nil. + Writer AudioStreamWriter + + inputWriter io.WriteCloser + + // Reader is the EventStream reader for the TranscriptResultStream + // events. This value is automatically set by the SDK when the API call is made + // Use this member when unit testing your code with the SDK to mock out the + // EventStream Reader. + // + // Must not be nil. + Reader TranscriptResultStreamReader + + outputReader io.ReadCloser + + done chan struct{} + closeOnce sync.Once + err *eventstreamapi.OnceError +} + +func newStartStreamTranscriptionEventStream() *StartStreamTranscriptionEventStream { + return &StartStreamTranscriptionEventStream{ + done: make(chan struct{}), + err: eventstreamapi.NewOnceError(), + } +} + +func (es *StartStreamTranscriptionEventStream) runOnStreamPartClose(r *request.Request) { + if es.done == nil { + return + } + go es.waitStreamPartClose() + +} + +func (es *StartStreamTranscriptionEventStream) waitStreamPartClose() { + var inputErrCh <-chan struct{} + if v, ok := es.Writer.(interface{ ErrorSet() <-chan struct{} }); ok { + inputErrCh = v.ErrorSet() + } + var outputErrCh <-chan struct{} + if v, ok := es.Reader.(interface{ ErrorSet() <-chan struct{} }); ok { + outputErrCh = v.ErrorSet() + } + var outputClosedCh <-chan struct{} + if v, ok := es.Reader.(interface{ Closed() <-chan struct{} }); ok { + outputClosedCh = v.Closed() + } + + select { + case <-es.done: + case <-inputErrCh: + es.err.SetError(es.Writer.Err()) + es.Close() + case <-outputErrCh: + es.err.SetError(es.Reader.Err()) + es.Close() + case <-outputClosedCh: + if err := es.Reader.Err(); err != nil { + es.err.SetError(es.Reader.Err()) + } + es.Close() + } +} + +func (es *StartStreamTranscriptionEventStream) setupInputPipe(r *request.Request) { + inputReader, inputWriter := io.Pipe() + r.SetStreamingBody(inputReader) + es.inputWriter = inputWriter +} + +// Send writes the event to the stream blocking until the event is written. +// Returns an error if the event was not written. +// +// These events are: +// +// * AudioEvent +func (es *StartStreamTranscriptionEventStream) Send(ctx aws.Context, event AudioStreamEvent) error { + return es.Writer.Send(ctx, event) +} + +func (es *StartStreamTranscriptionEventStream) runInputStream(r *request.Request) { + var opts []func(*eventstream.Encoder) + if r.Config.Logger != nil && r.Config.LogLevel.Matches(aws.LogDebugWithEventStreamBody) { + opts = append(opts, eventstream.EncodeWithLogger(r.Config.Logger)) + } + var encoder eventstreamapi.Encoder = eventstream.NewEncoder(es.inputWriter, opts...) + + var closer aws.MultiCloser + sigSeed, err := v4.GetSignedRequestSignature(r.HTTPRequest) + if err != nil { + r.Error = awserr.New(request.ErrCodeSerialization, + "unable to get initial request's signature", err) + return + } + signer := eventstreamapi.NewSignEncoder( + v4.NewStreamSigner(r.ClientInfo.SigningRegion, r.ClientInfo.SigningName, + sigSeed, r.Config.Credentials), + encoder, + ) + encoder = signer + closer = append(closer, signer) + closer = append(closer, es.inputWriter) + + eventWriter := eventstreamapi.NewEventWriter(encoder, + protocol.HandlerPayloadMarshal{ + Marshalers: r.Handlers.BuildStream, + }, + eventTypeForAudioStreamEvent, + ) + + es.Writer = &writeAudioStream{ + StreamWriter: eventstreamapi.NewStreamWriter(eventWriter, closer), + } +} + +// Events returns a channel to read events from. +// +// These events are: +// +// * TranscriptEvent +func (es *StartStreamTranscriptionEventStream) Events() <-chan TranscriptResultStreamEvent { + return es.Reader.Events() +} + +func (es *StartStreamTranscriptionEventStream) runOutputStream(r *request.Request) { + var opts []func(*eventstream.Decoder) + if r.Config.Logger != nil && r.Config.LogLevel.Matches(aws.LogDebugWithEventStreamBody) { + opts = append(opts, eventstream.DecodeWithLogger(r.Config.Logger)) + } + + decoder := eventstream.NewDecoder(r.HTTPResponse.Body, opts...) + eventReader := eventstreamapi.NewEventReader(decoder, + protocol.HandlerPayloadUnmarshal{ + Unmarshalers: r.Handlers.UnmarshalStream, + }, + unmarshalerForTranscriptResultStreamEvent, + ) + + es.outputReader = r.HTTPResponse.Body + es.Reader = newReadTranscriptResultStream(eventReader) +} + +// Close closes the stream. This will also cause the stream to be closed. +// Close must be called when done using the stream API. Not calling Close +// may result in resource leaks. +// +// Will close the underlying EventStream writer, and no more events can be +// sent. +// +// You can use the closing of the Reader's Events channel to terminate your +// application's read from the API's stream. +// +func (es *StartStreamTranscriptionEventStream) Close() (err error) { + es.closeOnce.Do(es.safeClose) + return es.Err() +} + +func (es *StartStreamTranscriptionEventStream) safeClose() { + if es.done != nil { + close(es.done) + } + + t := time.NewTicker(time.Second) + defer t.Stop() + writeCloseDone := make(chan error) + go func() { + if err := es.Writer.Close(); err != nil { + es.err.SetError(err) + } + close(writeCloseDone) + }() + select { + case <-t.C: + case <-writeCloseDone: + } + if es.inputWriter != nil { + es.inputWriter.Close() + } + + es.Reader.Close() + if es.outputReader != nil { + es.outputReader.Close() + } +} + +// Err returns any error that occurred while reading or writing EventStream +// Events from the service API's response. Returns nil if there were no errors. +func (es *StartStreamTranscriptionEventStream) Err() error { + if err := es.err.Err(); err != nil { + return err + } + if err := es.Writer.Err(); err != nil { + return err + } + if err := es.Reader.Err(); err != nil { + return err + } + + return nil +} + +// A list of possible transcriptions for the audio. +type Alternative struct { + _ struct{} `type:"structure"` + + // One or more alternative interpretations of the input audio. + Items []*Item `type:"list"` + + // The text that was transcribed from the audio. + Transcript *string `type:"string"` +} + +// String returns the string representation +func (s Alternative) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Alternative) GoString() string { + return s.String() +} + +// SetItems sets the Items field's value. +func (s *Alternative) SetItems(v []*Item) *Alternative { + s.Items = v + return s +} + +// SetTranscript sets the Transcript field's value. +func (s *Alternative) SetTranscript(v string) *Alternative { + s.Transcript = &v + return s +} + +// Provides a wrapper for the audio chunks that you are sending. +type AudioEvent struct { + _ struct{} `type:"structure" payload:"AudioChunk"` + + // An audio blob that contains the next part of the audio that you want to transcribe. + // + // AudioChunk is automatically base64 encoded/decoded by the SDK. + AudioChunk []byte `type:"blob"` +} + +// String returns the string representation +func (s AudioEvent) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AudioEvent) GoString() string { + return s.String() +} + +// SetAudioChunk sets the AudioChunk field's value. +func (s *AudioEvent) SetAudioChunk(v []byte) *AudioEvent { + s.AudioChunk = v + return s +} + +// The AudioEvent is and event in the AudioStream group of events. +func (s *AudioEvent) eventAudioStream() {} + +// UnmarshalEvent unmarshals the EventStream Message into the AudioEvent value. +// This method is only used internally within the SDK's EventStream handling. +func (s *AudioEvent) UnmarshalEvent( + payloadUnmarshaler protocol.PayloadUnmarshaler, + msg eventstream.Message, +) error { + s.AudioChunk = make([]byte, len(msg.Payload)) + copy(s.AudioChunk, msg.Payload) + return nil +} + +func (s *AudioEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + msg.Headers.Set(":content-type", eventstream.StringValue("application/octet-stream")) + msg.Payload = s.AudioChunk + return msg, err +} + +// AudioStreamEvent groups together all EventStream +// events writes for AudioStream. +// +// These events are: +// +// * AudioEvent +type AudioStreamEvent interface { + eventAudioStream() + eventstreamapi.Marshaler + eventstreamapi.Unmarshaler +} + +// AudioStreamWriter provides the interface for writing events to the stream. +// The default implementation for this interface will be AudioStream. +// +// The writer's Close method must allow multiple concurrent calls. +// +// These events are: +// +// * AudioEvent +type AudioStreamWriter interface { + // Sends writes events to the stream blocking until the event has been + // written. An error is returned if the write fails. + Send(aws.Context, AudioStreamEvent) error + + // Close will stop the writer writing to the event stream. + Close() error + + // Returns any error that has occurred while writing to the event stream. + Err() error +} + +type writeAudioStream struct { + *eventstreamapi.StreamWriter +} + +func (w *writeAudioStream) Send(ctx aws.Context, event AudioStreamEvent) error { + return w.StreamWriter.Send(ctx, event) +} + +func eventTypeForAudioStreamEvent(event eventstreamapi.Marshaler) (string, error) { + switch event.(type) { + case *AudioEvent: + return "AudioEvent", nil + default: + return "", awserr.New( + request.ErrCodeSerialization, + fmt.Sprintf("unknown event type, %T, for AudioStream", event), + nil, + ) + } +} + +// One or more arguments to the StartStreamTranscription operation was invalid. +// For example, MediaEncoding was not set to pcm or LanguageCode was not set +// to a valid code. Check the parameters and try your request again. +type BadRequestException struct { + _ struct{} `type:"structure"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s BadRequestException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BadRequestException) GoString() string { + return s.String() +} + +// The BadRequestException is and event in the TranscriptResultStream group of events. +func (s *BadRequestException) eventTranscriptResultStream() {} + +// UnmarshalEvent unmarshals the EventStream Message into the BadRequestException value. +// This method is only used internally within the SDK's EventStream handling. +func (s *BadRequestException) UnmarshalEvent( + payloadUnmarshaler protocol.PayloadUnmarshaler, + msg eventstream.Message, +) error { + if err := payloadUnmarshaler.UnmarshalPayload( + bytes.NewReader(msg.Payload), s, + ); err != nil { + return err + } + return nil +} + +func (s *BadRequestException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + +// Code returns the exception type name. +func (s BadRequestException) Code() string { + return "BadRequestException" +} + +// Message returns the exception's message. +func (s BadRequestException) Message() string { + return *s.Message_ +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s BadRequestException) OrigErr() error { + return nil +} + +func (s BadRequestException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// A new stream started with the same session ID. The current stream has been +// terminated. +type ConflictException struct { + _ struct{} `type:"structure"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s ConflictException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConflictException) GoString() string { + return s.String() +} + +// The ConflictException is and event in the TranscriptResultStream group of events. +func (s *ConflictException) eventTranscriptResultStream() {} + +// UnmarshalEvent unmarshals the EventStream Message into the ConflictException value. +// This method is only used internally within the SDK's EventStream handling. +func (s *ConflictException) UnmarshalEvent( + payloadUnmarshaler protocol.PayloadUnmarshaler, + msg eventstream.Message, +) error { + if err := payloadUnmarshaler.UnmarshalPayload( + bytes.NewReader(msg.Payload), s, + ); err != nil { + return err + } + return nil +} + +func (s *ConflictException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + +// Code returns the exception type name. +func (s ConflictException) Code() string { + return "ConflictException" +} + +// Message returns the exception's message. +func (s ConflictException) Message() string { + return *s.Message_ +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s ConflictException) OrigErr() error { + return nil +} + +func (s ConflictException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// A problem occurred while processing the audio. Amazon Transcribe terminated +// processing. Try your request again. +type InternalFailureException struct { + _ struct{} `type:"structure"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s InternalFailureException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InternalFailureException) GoString() string { + return s.String() +} + +// The InternalFailureException is and event in the TranscriptResultStream group of events. +func (s *InternalFailureException) eventTranscriptResultStream() {} + +// UnmarshalEvent unmarshals the EventStream Message into the InternalFailureException value. +// This method is only used internally within the SDK's EventStream handling. +func (s *InternalFailureException) UnmarshalEvent( + payloadUnmarshaler protocol.PayloadUnmarshaler, + msg eventstream.Message, +) error { + if err := payloadUnmarshaler.UnmarshalPayload( + bytes.NewReader(msg.Payload), s, + ); err != nil { + return err + } + return nil +} + +func (s *InternalFailureException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + +// Code returns the exception type name. +func (s InternalFailureException) Code() string { + return "InternalFailureException" +} + +// Message returns the exception's message. +func (s InternalFailureException) Message() string { + return *s.Message_ +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s InternalFailureException) OrigErr() error { + return nil +} + +func (s InternalFailureException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// A word or phrase transcribed from the input audio. +type Item struct { + _ struct{} `type:"structure"` + + // The word or punctuation that was recognized in the input audio. + Content *string `type:"string"` + + // The offset from the beginning of the audio stream to the end of the audio + // that resulted in the item. + EndTime *float64 `type:"double"` + + // The offset from the beginning of the audio stream to the beginning of the + // audio that resulted in the item. + StartTime *float64 `type:"double"` + + // The type of the item. PRONUNCIATION indicates that the item is a word that + // was recognized in the input audio. PUNCTUATION indicates that the item was + // interpreted as a pause in the input audio. + Type *string `type:"string" enum:"ItemType"` +} + +// String returns the string representation +func (s Item) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Item) GoString() string { + return s.String() +} + +// SetContent sets the Content field's value. +func (s *Item) SetContent(v string) *Item { + s.Content = &v + return s +} + +// SetEndTime sets the EndTime field's value. +func (s *Item) SetEndTime(v float64) *Item { + s.EndTime = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *Item) SetStartTime(v float64) *Item { + s.StartTime = &v + return s +} + +// SetType sets the Type field's value. +func (s *Item) SetType(v string) *Item { + s.Type = &v + return s +} + +// You have exceeded the maximum number of concurrent transcription streams, +// are starting transcription streams too quickly, or the maximum audio length +// of 4 hours. Wait until a stream has finished processing, or break your audio +// stream into smaller chunks and try your request again. +type LimitExceededException struct { + _ struct{} `type:"structure"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s LimitExceededException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LimitExceededException) GoString() string { + return s.String() +} + +// The LimitExceededException is and event in the TranscriptResultStream group of events. +func (s *LimitExceededException) eventTranscriptResultStream() {} + +// UnmarshalEvent unmarshals the EventStream Message into the LimitExceededException value. +// This method is only used internally within the SDK's EventStream handling. +func (s *LimitExceededException) UnmarshalEvent( + payloadUnmarshaler protocol.PayloadUnmarshaler, + msg eventstream.Message, +) error { + if err := payloadUnmarshaler.UnmarshalPayload( + bytes.NewReader(msg.Payload), s, + ); err != nil { + return err + } + return nil +} + +func (s *LimitExceededException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + +// Code returns the exception type name. +func (s LimitExceededException) Code() string { + return "LimitExceededException" +} + +// Message returns the exception's message. +func (s LimitExceededException) Message() string { + return *s.Message_ +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s LimitExceededException) OrigErr() error { + return nil +} + +func (s LimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// The result of transcribing a portion of the input audio stream. +type Result struct { + _ struct{} `type:"structure"` + + // A list of possible transcriptions for the audio. Each alternative typically + // contains one item that contains the result of the transcription. + Alternatives []*Alternative `type:"list"` + + // The offset in seconds from the beginning of the audio stream to the end of + // the result. + EndTime *float64 `type:"double"` + + // Amazon Transcribe divides the incoming audio stream into segments at natural + // points in the audio. Transcription results are returned based on these segments. + // + // The IsPartial field is true to indicate that Amazon Transcribe has additional + // transcription data to send, false to indicate that this is the last transcription + // result for the segment. + IsPartial *bool `type:"boolean"` + + // A unique identifier for the result. + ResultId *string `type:"string"` + + // The offset in seconds from the beginning of the audio stream to the beginning + // of the result. + StartTime *float64 `type:"double"` +} + +// String returns the string representation +func (s Result) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Result) GoString() string { + return s.String() +} + +// SetAlternatives sets the Alternatives field's value. +func (s *Result) SetAlternatives(v []*Alternative) *Result { + s.Alternatives = v + return s +} + +// SetEndTime sets the EndTime field's value. +func (s *Result) SetEndTime(v float64) *Result { + s.EndTime = &v + return s +} + +// SetIsPartial sets the IsPartial field's value. +func (s *Result) SetIsPartial(v bool) *Result { + s.IsPartial = &v + return s +} + +// SetResultId sets the ResultId field's value. +func (s *Result) SetResultId(v string) *Result { + s.ResultId = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *Result) SetStartTime(v float64) *Result { + s.StartTime = &v + return s +} + +type StartStreamTranscriptionInput struct { + _ struct{} `type:"structure" payload:"AudioStream"` + + // Indicates the source language used in the input audio stream. + // + // LanguageCode is a required field + LanguageCode *string `location:"header" locationName:"x-amzn-transcribe-language-code" type:"string" required:"true" enum:"LanguageCode"` + + // The encoding used for the input audio. + // + // MediaEncoding is a required field + MediaEncoding *string `location:"header" locationName:"x-amzn-transcribe-media-encoding" type:"string" required:"true" enum:"MediaEncoding"` + + // The sample rate, in Hertz, of the input audio. We suggest that you use 8000 + // Hz for low quality audio and 16000 Hz for high quality audio. + // + // MediaSampleRateHertz is a required field + MediaSampleRateHertz *int64 `location:"header" locationName:"x-amzn-transcribe-sample-rate" min:"8000" type:"integer" required:"true"` + + // A identifier for the transcription session. Use this parameter when you want + // to retry a session. If you don't provide a session ID, Amazon Transcribe + // will generate one for you and return it in the response. + SessionId *string `location:"header" locationName:"x-amzn-transcribe-session-id" type:"string"` + + // The name of the vocabulary to use when processing the transcription job. + VocabularyName *string `location:"header" locationName:"x-amzn-transcribe-vocabulary-name" min:"1" type:"string"` +} + +// String returns the string representation +func (s StartStreamTranscriptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartStreamTranscriptionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartStreamTranscriptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartStreamTranscriptionInput"} + if s.LanguageCode == nil { + invalidParams.Add(request.NewErrParamRequired("LanguageCode")) + } + if s.MediaEncoding == nil { + invalidParams.Add(request.NewErrParamRequired("MediaEncoding")) + } + if s.MediaSampleRateHertz == nil { + invalidParams.Add(request.NewErrParamRequired("MediaSampleRateHertz")) + } + if s.MediaSampleRateHertz != nil && *s.MediaSampleRateHertz < 8000 { + invalidParams.Add(request.NewErrParamMinValue("MediaSampleRateHertz", 8000)) + } + if s.VocabularyName != nil && len(*s.VocabularyName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VocabularyName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLanguageCode sets the LanguageCode field's value. +func (s *StartStreamTranscriptionInput) SetLanguageCode(v string) *StartStreamTranscriptionInput { + s.LanguageCode = &v + return s +} + +// SetMediaEncoding sets the MediaEncoding field's value. +func (s *StartStreamTranscriptionInput) SetMediaEncoding(v string) *StartStreamTranscriptionInput { + s.MediaEncoding = &v + return s +} + +// SetMediaSampleRateHertz sets the MediaSampleRateHertz field's value. +func (s *StartStreamTranscriptionInput) SetMediaSampleRateHertz(v int64) *StartStreamTranscriptionInput { + s.MediaSampleRateHertz = &v + return s +} + +// SetSessionId sets the SessionId field's value. +func (s *StartStreamTranscriptionInput) SetSessionId(v string) *StartStreamTranscriptionInput { + s.SessionId = &v + return s +} + +// SetVocabularyName sets the VocabularyName field's value. +func (s *StartStreamTranscriptionInput) SetVocabularyName(v string) *StartStreamTranscriptionInput { + s.VocabularyName = &v + return s +} + +type StartStreamTranscriptionOutput struct { + _ struct{} `type:"structure" payload:"TranscriptResultStream"` + + eventStream *StartStreamTranscriptionEventStream + + // The language code for the input audio stream. + LanguageCode *string `location:"header" locationName:"x-amzn-transcribe-language-code" type:"string" enum:"LanguageCode"` + + // The encoding used for the input audio stream. + MediaEncoding *string `location:"header" locationName:"x-amzn-transcribe-media-encoding" type:"string" enum:"MediaEncoding"` + + // The sample rate for the input audio stream. Use 8000 Hz for low quality audio + // and 16000 Hz for high quality audio. + MediaSampleRateHertz *int64 `location:"header" locationName:"x-amzn-transcribe-sample-rate" min:"8000" type:"integer"` + + // An identifier for the streaming transcription. + RequestId *string `location:"header" locationName:"x-amzn-request-id" type:"string"` + + // An identifier for a specific transcription session. + SessionId *string `location:"header" locationName:"x-amzn-transcribe-session-id" type:"string"` + + // The name of the vocabulary used when processing the job. + VocabularyName *string `location:"header" locationName:"x-amzn-transcribe-vocabulary-name" min:"1" type:"string"` +} + +// String returns the string representation +func (s StartStreamTranscriptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartStreamTranscriptionOutput) GoString() string { + return s.String() +} + +// SetLanguageCode sets the LanguageCode field's value. +func (s *StartStreamTranscriptionOutput) SetLanguageCode(v string) *StartStreamTranscriptionOutput { + s.LanguageCode = &v + return s +} + +// SetMediaEncoding sets the MediaEncoding field's value. +func (s *StartStreamTranscriptionOutput) SetMediaEncoding(v string) *StartStreamTranscriptionOutput { + s.MediaEncoding = &v + return s +} + +// SetMediaSampleRateHertz sets the MediaSampleRateHertz field's value. +func (s *StartStreamTranscriptionOutput) SetMediaSampleRateHertz(v int64) *StartStreamTranscriptionOutput { + s.MediaSampleRateHertz = &v + return s +} + +// SetRequestId sets the RequestId field's value. +func (s *StartStreamTranscriptionOutput) SetRequestId(v string) *StartStreamTranscriptionOutput { + s.RequestId = &v + return s +} + +// SetSessionId sets the SessionId field's value. +func (s *StartStreamTranscriptionOutput) SetSessionId(v string) *StartStreamTranscriptionOutput { + s.SessionId = &v + return s +} + +// SetVocabularyName sets the VocabularyName field's value. +func (s *StartStreamTranscriptionOutput) SetVocabularyName(v string) *StartStreamTranscriptionOutput { + s.VocabularyName = &v + return s +} + +// GetStream returns the type to interact with the event stream. +func (s *StartStreamTranscriptionOutput) GetStream() *StartStreamTranscriptionEventStream { + return s.eventStream +} + +// The transcription in a TranscriptEvent. +type Transcript struct { + _ struct{} `type:"structure"` + + // Result objects that contain the results of transcribing a portion of the + // input audio stream. The array can be empty. + Results []*Result `type:"list"` +} + +// String returns the string representation +func (s Transcript) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Transcript) GoString() string { + return s.String() +} + +// SetResults sets the Results field's value. +func (s *Transcript) SetResults(v []*Result) *Transcript { + s.Results = v + return s +} + +// Represents a set of transcription results from the server to the client. +// It contains one or more segments of the transcription. +type TranscriptEvent struct { + _ struct{} `type:"structure"` + + // The transcription of the audio stream. The transcription is composed of all + // of the items in the results list. + Transcript *Transcript `type:"structure"` +} + +// String returns the string representation +func (s TranscriptEvent) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TranscriptEvent) GoString() string { + return s.String() +} + +// SetTranscript sets the Transcript field's value. +func (s *TranscriptEvent) SetTranscript(v *Transcript) *TranscriptEvent { + s.Transcript = v + return s +} + +// The TranscriptEvent is and event in the TranscriptResultStream group of events. +func (s *TranscriptEvent) eventTranscriptResultStream() {} + +// UnmarshalEvent unmarshals the EventStream Message into the TranscriptEvent value. +// This method is only used internally within the SDK's EventStream handling. +func (s *TranscriptEvent) UnmarshalEvent( + payloadUnmarshaler protocol.PayloadUnmarshaler, + msg eventstream.Message, +) error { + if err := payloadUnmarshaler.UnmarshalPayload( + bytes.NewReader(msg.Payload), s, + ); err != nil { + return err + } + return nil +} + +func (s *TranscriptEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + +// TranscriptResultStreamEvent groups together all EventStream +// events writes for TranscriptResultStream. +// +// These events are: +// +// * TranscriptEvent +type TranscriptResultStreamEvent interface { + eventTranscriptResultStream() + eventstreamapi.Marshaler + eventstreamapi.Unmarshaler +} + +// TranscriptResultStreamReader provides the interface for reading to the stream. The +// default implementation for this interface will be TranscriptResultStream. +// +// The reader's Close method must allow multiple concurrent calls. +// +// These events are: +// +// * TranscriptEvent +type TranscriptResultStreamReader interface { + // Returns a channel of events as they are read from the event stream. + Events() <-chan TranscriptResultStreamEvent + + // Close will stop the reader reading events from the stream. + Close() error + + // Returns any error that has occurred while reading from the event stream. + Err() error +} + +type readTranscriptResultStream struct { + eventReader *eventstreamapi.EventReader + stream chan TranscriptResultStreamEvent + err *eventstreamapi.OnceError + + done chan struct{} + closeOnce sync.Once +} + +func newReadTranscriptResultStream(eventReader *eventstreamapi.EventReader) *readTranscriptResultStream { + r := &readTranscriptResultStream{ + eventReader: eventReader, + stream: make(chan TranscriptResultStreamEvent), + done: make(chan struct{}), + err: eventstreamapi.NewOnceError(), + } + go r.readEventStream() + + return r +} + +// Close will close the underlying event stream reader. +func (r *readTranscriptResultStream) Close() error { + r.closeOnce.Do(r.safeClose) + return r.Err() +} + +func (r *readTranscriptResultStream) ErrorSet() <-chan struct{} { + return r.err.ErrorSet() +} + +func (r *readTranscriptResultStream) Closed() <-chan struct{} { + return r.done +} + +func (r *readTranscriptResultStream) safeClose() { + close(r.done) +} + +func (r *readTranscriptResultStream) Err() error { + return r.err.Err() +} + +func (r *readTranscriptResultStream) Events() <-chan TranscriptResultStreamEvent { + return r.stream +} + +func (r *readTranscriptResultStream) readEventStream() { + defer r.Close() + defer close(r.stream) + + for { + event, err := r.eventReader.ReadEvent() + if err != nil { + if err == io.EOF { + return + } + select { + case <-r.done: + // If closed already ignore the error + return + default: + } + r.err.SetError(err) + return + } + + select { + case r.stream <- event.(TranscriptResultStreamEvent): + case <-r.done: + return + } + } +} + +func unmarshalerForTranscriptResultStreamEvent(eventType string) (eventstreamapi.Unmarshaler, error) { + switch eventType { + case "TranscriptEvent": + return &TranscriptEvent{}, nil + case "BadRequestException": + return &BadRequestException{}, nil + case "ConflictException": + return &ConflictException{}, nil + case "InternalFailureException": + return &InternalFailureException{}, nil + case "LimitExceededException": + return &LimitExceededException{}, nil + default: + return nil, awserr.New( + request.ErrCodeSerialization, + fmt.Sprintf("unknown event type name, %s, for TranscriptResultStream", eventType), + nil, + ) + } +} + +const ( + // ItemTypePronunciation is a ItemType enum value + ItemTypePronunciation = "pronunciation" + + // ItemTypePunctuation is a ItemType enum value + ItemTypePunctuation = "punctuation" +) + +const ( + // LanguageCodeEnUs is a LanguageCode enum value + LanguageCodeEnUs = "en-US" + + // LanguageCodeEnGb is a LanguageCode enum value + LanguageCodeEnGb = "en-GB" + + // LanguageCodeEsUs is a LanguageCode enum value + LanguageCodeEsUs = "es-US" + + // LanguageCodeFrCa is a LanguageCode enum value + LanguageCodeFrCa = "fr-CA" + + // LanguageCodeFrFr is a LanguageCode enum value + LanguageCodeFrFr = "fr-FR" + + // LanguageCodeEnAu is a LanguageCode enum value + LanguageCodeEnAu = "en-AU" +) + +const ( + // MediaEncodingPcm is a MediaEncoding enum value + MediaEncodingPcm = "pcm" +) diff --git a/service/transcribestreamingservice/cust_integ_eventstream_test.go b/service/transcribestreamingservice/cust_integ_eventstream_test.go new file mode 100644 index 00000000000..a2abc9c55c0 --- /dev/null +++ b/service/transcribestreamingservice/cust_integ_eventstream_test.go @@ -0,0 +1,167 @@ +// +build integration + +package transcribestreamingservice + +import ( + "bytes" + "context" + "encoding/base64" + "flag" + "io" + "os" + "strings" + "sync" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/awstesting/integration" +) + +var ( + audioFilename string + audioFormat string + audioLang string + audioSampleRate int + audioFrameSize int + withDebug bool +) + +func init() { + flag.BoolVar(&withDebug, "debug", false, "Include debug logging with test.") + flag.StringVar(&audioFilename, "audio-file", "", "Audio file filename to perform test with.") + flag.StringVar(&audioLang, "audio-lang", LanguageCodeEnUs, "Language of audio speech.") + flag.StringVar(&audioFormat, "audio-format", MediaEncodingPcm, "Format of audio.") + flag.IntVar(&audioSampleRate, "audio-sample", 16000, "Sample rate of the audio.") + flag.IntVar(&audioFrameSize, "audio-frame", 15*1024, "Size of frames of audio uploaded.") +} + +func TestInteg_StartStreamTranscription(t *testing.T) { + var audio io.Reader + if len(audioFilename) != 0 { + audioFile, err := os.Open(audioFilename) + if err != nil { + t.Fatalf("expect to open file, %v", err) + } + defer audioFile.Close() + audio = audioFile + } else { + b, err := base64.StdEncoding.DecodeString( + `UklGRjzxPQBXQVZFZm10IBAAAAABAAEAgD4AAAB9AAACABAAZGF0YVTwPQAAAAAAAAAAAAAAAAD//wIA/f8EAA==`, + ) + if err != nil { + t.Fatalf("expect decode audio bytes, %v", err) + } + audio = bytes.NewReader(b) + } + + sess := integration.SessionWithDefaultRegion("us-west-2") + var cfgs []*aws.Config + if withDebug { + cfgs = append(cfgs, &aws.Config{ + Logger: t, + LogLevel: aws.LogLevel(aws.LogDebugWithEventStreamBody), + }) + } + + client := New(sess, cfgs...) + resp, err := client.StartStreamTranscription(&StartStreamTranscriptionInput{ + LanguageCode: aws.String(audioLang), + MediaEncoding: aws.String(audioFormat), + MediaSampleRateHertz: aws.Int64(int64(audioSampleRate)), + }) + if err != nil { + t.Fatalf("failed to start streaming, %v", err) + } + stream := resp.GetStream() + defer stream.Close() + + go StreamAudioFromReader(context.Background(), stream.Writer, audioFrameSize, audio) + + for event := range stream.Events() { + switch e := event.(type) { + case *TranscriptEvent: + t.Logf("got event, %v results", len(e.Transcript.Results)) + for _, res := range e.Transcript.Results { + for _, alt := range res.Alternatives { + t.Logf("* %s", aws.StringValue(alt.Transcript)) + } + } + default: + t.Fatalf("unexpected event, %T", event) + } + } + + if err := stream.Err(); err != nil { + t.Fatalf("expect no error from stream, got %v", err) + } +} + +func TestInteg_StartStreamTranscription_contextClose(t *testing.T) { + b, err := base64.StdEncoding.DecodeString( + `UklGRjzxPQBXQVZFZm10IBAAAAABAAEAgD4AAAB9AAACABAAZGF0YVTwPQAAAAAAAAAAAAAAAAD//wIA/f8EAA==`, + ) + if err != nil { + t.Fatalf("expect decode audio bytes, %v", err) + } + audio := bytes.NewReader(b) + + sess := integration.SessionWithDefaultRegion("us-west-2") + var cfgs []*aws.Config + + client := New(sess, cfgs...) + resp, err := client.StartStreamTranscription(&StartStreamTranscriptionInput{ + LanguageCode: aws.String(LanguageCodeEnUs), + MediaEncoding: aws.String(MediaEncodingPcm), + MediaSampleRateHertz: aws.Int64(16000), + }) + if err != nil { + t.Fatalf("failed to start streaming, %v", err) + } + stream := resp.GetStream() + defer stream.Close() + + ctx, cancelFn := context.WithCancel(context.Background()) + var wg sync.WaitGroup + wg.Add(1) + go func() { + err := StreamAudioFromReader(ctx, stream.Writer, audioFrameSize, audio) + if err == nil { + t.Errorf("expect error") + } + if e, a := "context canceled", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %q error in %q", e, a) + } + wg.Done() + }() + + cancelFn() + +Loop: + for { + select { + case <-ctx.Done(): + break Loop + case event, ok := <-stream.Events(): + if !ok { + break Loop + } + switch e := event.(type) { + case *TranscriptEvent: + t.Logf("got event, %v results", len(e.Transcript.Results)) + for _, res := range e.Transcript.Results { + for _, alt := range res.Alternatives { + t.Logf("* %s", aws.StringValue(alt.Transcript)) + } + } + default: + t.Fatalf("unexpected event, %T", event) + } + } + } + + wg.Wait() + + if err := stream.Err(); err != nil { + t.Fatalf("expect no error from stream, got %v", err) + } +} diff --git a/service/transcribestreamingservice/doc.go b/service/transcribestreamingservice/doc.go new file mode 100644 index 00000000000..00196d956b5 --- /dev/null +++ b/service/transcribestreamingservice/doc.go @@ -0,0 +1,28 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package transcribestreamingservice provides the client and types for making API +// requests to Amazon Transcribe Streaming Service. +// +// Operations and objects for transcribing streaming speech to text. +// +// See https://docs.aws.amazon.com/goto/WebAPI/transcribe-streaming-2017-10-26 for more information on this service. +// +// See transcribestreamingservice package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/transcribestreamingservice/ +// +// Using the Client +// +// To contact Amazon Transcribe Streaming Service with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the Amazon Transcribe Streaming Service client TranscribeStreamingService for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/transcribestreamingservice/#New +package transcribestreamingservice diff --git a/service/transcribestreamingservice/errors.go b/service/transcribestreamingservice/errors.go new file mode 100644 index 00000000000..5c31cbf63bb --- /dev/null +++ b/service/transcribestreamingservice/errors.go @@ -0,0 +1,37 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package transcribestreamingservice + +const ( + + // ErrCodeBadRequestException for service response error code + // "BadRequestException". + // + // One or more arguments to the StartStreamTranscription operation was invalid. + // For example, MediaEncoding was not set to pcm or LanguageCode was not set + // to a valid code. Check the parameters and try your request again. + ErrCodeBadRequestException = "BadRequestException" + + // ErrCodeConflictException for service response error code + // "ConflictException". + // + // A new stream started with the same session ID. The current stream has been + // terminated. + ErrCodeConflictException = "ConflictException" + + // ErrCodeInternalFailureException for service response error code + // "InternalFailureException". + // + // A problem occurred while processing the audio. Amazon Transcribe terminated + // processing. Try your request again. + ErrCodeInternalFailureException = "InternalFailureException" + + // ErrCodeLimitExceededException for service response error code + // "LimitExceededException". + // + // You have exceeded the maximum number of concurrent transcription streams, + // are starting transcription streams too quickly, or the maximum audio length + // of 4 hours. Wait until a stream has finished processing, or break your audio + // stream into smaller chunks and try your request again. + ErrCodeLimitExceededException = "LimitExceededException" +) diff --git a/service/transcribestreamingservice/eventstream_example_test.go b/service/transcribestreamingservice/eventstream_example_test.go new file mode 100644 index 00000000000..24c1baf1678 --- /dev/null +++ b/service/transcribestreamingservice/eventstream_example_test.go @@ -0,0 +1,53 @@ +// +build go1.7 + +package transcribestreamingservice + +import ( + "context" + "io" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/session" +) + +func ExampleTranscribeStreamingService_StartStreamTranscription_streamAudio() { + sess, err := session.NewSession() + if err != nil { + log.Fatalf("failed to load SDK configuration, %v", err) + } + + client := New(sess) + resp, err := client.StartStreamTranscription(&StartStreamTranscriptionInput{ + LanguageCode: aws.String(LanguageCodeEnUs), + MediaEncoding: aws.String(MediaEncodingPcm), + MediaSampleRateHertz: aws.Int64(16000), + }) + if err != nil { + log.Fatalf("failed to start streaming, %v", err) + } + stream := resp.GetStream() + defer stream.Close() + + var audio io.Reader + // TODO Set audio to an io.Reader to stream audio bytes from. + go StreamAudioFromReader(context.Background(), stream.Writer, 10*1024, audio) + + for event := range stream.Events() { + switch e := event.(type) { + case *TranscriptEvent: + log.Printf("got event, %v results", len(e.Transcript.Results)) + for _, res := range e.Transcript.Results { + for _, alt := range res.Alternatives { + log.Printf("* %s", aws.StringValue(alt.Transcript)) + } + } + default: + log.Fatalf("unexpected event, %T", event) + } + } + + if err := stream.Err(); err != nil { + log.Fatalf("expect no error from stream, got %v", err) + } +} diff --git a/service/transcribestreamingservice/eventstream_test.go b/service/transcribestreamingservice/eventstream_test.go new file mode 100644 index 00000000000..e0a784ba022 --- /dev/null +++ b/service/transcribestreamingservice/eventstream_test.go @@ -0,0 +1,505 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// +build go1.10 + +package transcribestreamingservice + +import ( + "bytes" + "io/ioutil" + "net/http" + "reflect" + "testing" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/corehandlers" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/awstesting/unit" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/eventstream" + "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi" + "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamtest" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +var _ time.Time +var _ awserr.Error + +func TestStartStreamTranscription_Read(t *testing.T) { + expectEvents, eventMsgs := mockStartStreamTranscriptionReadEvents() + sess, cleanupFn, err := eventstreamtest.SetupEventStreamSession(t, + eventstreamtest.ServeEventStream{ + T: t, + Events: eventMsgs, + }, + true, + ) + if err != nil { + t.Fatalf("expect no error, %v", err) + } + defer cleanupFn() + + svc := New(sess) + resp, err := svc.StartStreamTranscription(nil) + if err != nil { + t.Fatalf("expect no error got, %v", err) + } + defer resp.GetStream().Close() + + var i int + for event := range resp.GetStream().Events() { + if event == nil { + t.Errorf("%d, expect event, got nil", i) + } + if e, a := expectEvents[i], event; !reflect.DeepEqual(e, a) { + t.Errorf("%d, expect %T %v, got %T %v", i, e, e, a, a) + } + i++ + } + + if err := resp.GetStream().Err(); err != nil { + t.Errorf("expect no error, %v", err) + } +} + +func TestStartStreamTranscription_ReadClose(t *testing.T) { + _, eventMsgs := mockStartStreamTranscriptionReadEvents() + sess, cleanupFn, err := eventstreamtest.SetupEventStreamSession(t, + eventstreamtest.ServeEventStream{ + T: t, + Events: eventMsgs, + }, + true, + ) + if err != nil { + t.Fatalf("expect no error, %v", err) + } + defer cleanupFn() + + svc := New(sess) + resp, err := svc.StartStreamTranscription(nil) + if err != nil { + t.Fatalf("expect no error got, %v", err) + } + + // Assert calling Err before close does not close the stream. + resp.GetStream().Err() + select { + case _, ok := <-resp.GetStream().Events(): + if !ok { + t.Fatalf("expect stream not to be closed, but was") + } + default: + } + + resp.GetStream().Close() + <-resp.GetStream().Events() + + if err := resp.GetStream().Err(); err != nil { + t.Errorf("expect no error, %v", err) + } +} + +func BenchmarkStartStreamTranscription_Read(b *testing.B) { + _, eventMsgs := mockStartStreamTranscriptionReadEvents() + var buf bytes.Buffer + encoder := eventstream.NewEncoder(&buf) + for _, msg := range eventMsgs { + if err := encoder.Encode(msg); err != nil { + b.Fatalf("failed to encode message, %v", err) + } + } + stream := &loopReader{source: bytes.NewReader(buf.Bytes())} + + sess := unit.Session + svc := New(sess, &aws.Config{ + Endpoint: aws.String("https://example.com"), + DisableParamValidation: aws.Bool(true), + }) + svc.Handlers.Send.Swap(corehandlers.SendHandler.Name, + request.NamedHandler{Name: "mockSend", + Fn: func(r *request.Request) { + r.HTTPResponse = &http.Response{ + Status: "200 OK", + StatusCode: 200, + Header: http.Header{}, + Body: ioutil.NopCloser(stream), + } + }, + }, + ) + + resp, err := svc.StartStreamTranscription(nil) + if err != nil { + b.Fatalf("failed to create request, %v", err) + } + defer resp.GetStream().Close() + b.ResetTimer() + + for i := 0; i < b.N; i++ { + if err = resp.GetStream().Err(); err != nil { + b.Fatalf("expect no error, got %v", err) + } + event := <-resp.GetStream().Events() + if event == nil { + b.Fatalf("expect event, got nil, %v, %d", resp.GetStream().Err(), i) + } + } +} + +func mockStartStreamTranscriptionReadEvents() ( + []TranscriptResultStreamEvent, + []eventstream.Message, +) { + expectEvents := []TranscriptResultStreamEvent{ + &TranscriptEvent{ + Transcript: &Transcript{ + Results: []*Result{ + { + Alternatives: []*Alternative{ + { + Items: []*Item{ + { + Content: aws.String("string value goes here"), + EndTime: aws.Float64(123.45), + StartTime: aws.Float64(123.45), + Type: aws.String("string value goes here"), + }, + { + Content: aws.String("string value goes here"), + EndTime: aws.Float64(123.45), + StartTime: aws.Float64(123.45), + Type: aws.String("string value goes here"), + }, + { + Content: aws.String("string value goes here"), + EndTime: aws.Float64(123.45), + StartTime: aws.Float64(123.45), + Type: aws.String("string value goes here"), + }, + }, + Transcript: aws.String("string value goes here"), + }, + { + Items: []*Item{ + { + Content: aws.String("string value goes here"), + EndTime: aws.Float64(123.45), + StartTime: aws.Float64(123.45), + Type: aws.String("string value goes here"), + }, + { + Content: aws.String("string value goes here"), + EndTime: aws.Float64(123.45), + StartTime: aws.Float64(123.45), + Type: aws.String("string value goes here"), + }, + { + Content: aws.String("string value goes here"), + EndTime: aws.Float64(123.45), + StartTime: aws.Float64(123.45), + Type: aws.String("string value goes here"), + }, + }, + Transcript: aws.String("string value goes here"), + }, + { + Items: []*Item{ + { + Content: aws.String("string value goes here"), + EndTime: aws.Float64(123.45), + StartTime: aws.Float64(123.45), + Type: aws.String("string value goes here"), + }, + { + Content: aws.String("string value goes here"), + EndTime: aws.Float64(123.45), + StartTime: aws.Float64(123.45), + Type: aws.String("string value goes here"), + }, + { + Content: aws.String("string value goes here"), + EndTime: aws.Float64(123.45), + StartTime: aws.Float64(123.45), + Type: aws.String("string value goes here"), + }, + }, + Transcript: aws.String("string value goes here"), + }, + }, + EndTime: aws.Float64(123.45), + IsPartial: aws.Bool(true), + ResultId: aws.String("string value goes here"), + StartTime: aws.Float64(123.45), + }, + { + Alternatives: []*Alternative{ + { + Items: []*Item{ + { + Content: aws.String("string value goes here"), + EndTime: aws.Float64(123.45), + StartTime: aws.Float64(123.45), + Type: aws.String("string value goes here"), + }, + { + Content: aws.String("string value goes here"), + EndTime: aws.Float64(123.45), + StartTime: aws.Float64(123.45), + Type: aws.String("string value goes here"), + }, + { + Content: aws.String("string value goes here"), + EndTime: aws.Float64(123.45), + StartTime: aws.Float64(123.45), + Type: aws.String("string value goes here"), + }, + }, + Transcript: aws.String("string value goes here"), + }, + { + Items: []*Item{ + { + Content: aws.String("string value goes here"), + EndTime: aws.Float64(123.45), + StartTime: aws.Float64(123.45), + Type: aws.String("string value goes here"), + }, + { + Content: aws.String("string value goes here"), + EndTime: aws.Float64(123.45), + StartTime: aws.Float64(123.45), + Type: aws.String("string value goes here"), + }, + { + Content: aws.String("string value goes here"), + EndTime: aws.Float64(123.45), + StartTime: aws.Float64(123.45), + Type: aws.String("string value goes here"), + }, + }, + Transcript: aws.String("string value goes here"), + }, + { + Items: []*Item{ + { + Content: aws.String("string value goes here"), + EndTime: aws.Float64(123.45), + StartTime: aws.Float64(123.45), + Type: aws.String("string value goes here"), + }, + { + Content: aws.String("string value goes here"), + EndTime: aws.Float64(123.45), + StartTime: aws.Float64(123.45), + Type: aws.String("string value goes here"), + }, + { + Content: aws.String("string value goes here"), + EndTime: aws.Float64(123.45), + StartTime: aws.Float64(123.45), + Type: aws.String("string value goes here"), + }, + }, + Transcript: aws.String("string value goes here"), + }, + }, + EndTime: aws.Float64(123.45), + IsPartial: aws.Bool(true), + ResultId: aws.String("string value goes here"), + StartTime: aws.Float64(123.45), + }, + { + Alternatives: []*Alternative{ + { + Items: []*Item{ + { + Content: aws.String("string value goes here"), + EndTime: aws.Float64(123.45), + StartTime: aws.Float64(123.45), + Type: aws.String("string value goes here"), + }, + { + Content: aws.String("string value goes here"), + EndTime: aws.Float64(123.45), + StartTime: aws.Float64(123.45), + Type: aws.String("string value goes here"), + }, + { + Content: aws.String("string value goes here"), + EndTime: aws.Float64(123.45), + StartTime: aws.Float64(123.45), + Type: aws.String("string value goes here"), + }, + }, + Transcript: aws.String("string value goes here"), + }, + { + Items: []*Item{ + { + Content: aws.String("string value goes here"), + EndTime: aws.Float64(123.45), + StartTime: aws.Float64(123.45), + Type: aws.String("string value goes here"), + }, + { + Content: aws.String("string value goes here"), + EndTime: aws.Float64(123.45), + StartTime: aws.Float64(123.45), + Type: aws.String("string value goes here"), + }, + { + Content: aws.String("string value goes here"), + EndTime: aws.Float64(123.45), + StartTime: aws.Float64(123.45), + Type: aws.String("string value goes here"), + }, + }, + Transcript: aws.String("string value goes here"), + }, + { + Items: []*Item{ + { + Content: aws.String("string value goes here"), + EndTime: aws.Float64(123.45), + StartTime: aws.Float64(123.45), + Type: aws.String("string value goes here"), + }, + { + Content: aws.String("string value goes here"), + EndTime: aws.Float64(123.45), + StartTime: aws.Float64(123.45), + Type: aws.String("string value goes here"), + }, + { + Content: aws.String("string value goes here"), + EndTime: aws.Float64(123.45), + StartTime: aws.Float64(123.45), + Type: aws.String("string value goes here"), + }, + }, + Transcript: aws.String("string value goes here"), + }, + }, + EndTime: aws.Float64(123.45), + IsPartial: aws.Bool(true), + ResultId: aws.String("string value goes here"), + StartTime: aws.Float64(123.45), + }, + }, + }, + }, + } + + var marshalers request.HandlerList + marshalers.PushBackNamed(restjson.BuildHandler) + payloadMarshaler := protocol.HandlerPayloadMarshal{ + Marshalers: marshalers, + } + _ = payloadMarshaler + + eventMsgs := []eventstream.Message{ + { + Headers: eventstream.Headers{ + eventstreamtest.EventMessageTypeHeader, + { + Name: eventstreamapi.EventTypeHeader, + Value: eventstream.StringValue("TranscriptEvent"), + }, + }, + Payload: eventstreamtest.MarshalEventPayload(payloadMarshaler, expectEvents[0]), + }, + } + + return expectEvents, eventMsgs +} +func TestStartStreamTranscription_ReadException(t *testing.T) { + expectEvents := []TranscriptResultStreamEvent{ + &BadRequestException{ + Message_: aws.String("string value goes here"), + }, + } + + var marshalers request.HandlerList + marshalers.PushBackNamed(restjson.BuildHandler) + payloadMarshaler := protocol.HandlerPayloadMarshal{ + Marshalers: marshalers, + } + + eventMsgs := []eventstream.Message{ + { + Headers: eventstream.Headers{ + eventstreamtest.EventExceptionTypeHeader, + { + Name: eventstreamapi.ExceptionTypeHeader, + Value: eventstream.StringValue("BadRequestException"), + }, + }, + Payload: eventstreamtest.MarshalEventPayload(payloadMarshaler, expectEvents[0]), + }, + } + + sess, cleanupFn, err := eventstreamtest.SetupEventStreamSession(t, + eventstreamtest.ServeEventStream{ + T: t, + Events: eventMsgs, + }, + true, + ) + if err != nil { + t.Fatalf("expect no error, %v", err) + } + defer cleanupFn() + + svc := New(sess) + resp, err := svc.StartStreamTranscription(nil) + if err != nil { + t.Fatalf("expect no error got, %v", err) + } + + defer resp.GetStream().Close() + + <-resp.GetStream().Events() + + err = resp.GetStream().Err() + if err == nil { + t.Fatalf("expect err, got none") + } + + expectErr := &BadRequestException{ + Message_: aws.String("string value goes here"), + } + aerr, ok := err.(awserr.Error) + if !ok { + t.Errorf("expect exception, got %T, %#v", err, err) + } + if e, a := expectErr.Code(), aerr.Code(); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := expectErr.Message(), aerr.Message(); e != a { + t.Errorf("expect %v, got %v", e, a) + } + + if e, a := expectErr, aerr; !reflect.DeepEqual(e, a) { + t.Errorf("expect %#v, got %#v", e, a) + } +} + +var _ awserr.Error = (*BadRequestException)(nil) +var _ awserr.Error = (*ConflictException)(nil) +var _ awserr.Error = (*InternalFailureException)(nil) +var _ awserr.Error = (*LimitExceededException)(nil) + +type loopReader struct { + source *bytes.Reader +} + +func (c *loopReader) Read(p []byte) (int, error) { + if c.source.Len() == 0 { + c.source.Seek(0, 0) + } + + return c.source.Read(p) +} diff --git a/service/transcribestreamingservice/eventstream_writer_test.go b/service/transcribestreamingservice/eventstream_writer_test.go new file mode 100644 index 00000000000..19a54548899 --- /dev/null +++ b/service/transcribestreamingservice/eventstream_writer_test.go @@ -0,0 +1,199 @@ +// +build go1.10 + +package transcribestreamingservice + +import ( + "context" + "fmt" + "reflect" + "strings" + "sync" + "testing" + "time" + + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/eventstream" + "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamtest" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +func TestStartStreamTranscription_Write(t *testing.T) { + writeRequests, requestMessages := mockStartStreamTranscriptionWriteEvents() + + sess, cleanupFn, err := eventstreamtest.SetupEventStreamSession(t, + &eventstreamtest.ServeEventStream{ + T: t, + ClientEvents: requestMessages, + BiDirectional: true, + }, + true) + defer cleanupFn() + + svc := New(sess) + resp, err := svc.StartStreamTranscription(nil) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + stream := resp.GetStream() + + for _, event := range writeRequests { + err = stream.Send(context.Background(), &event) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + } + + if err := stream.Close(); err != nil { + t.Errorf("expect no error, got %v", err) + } +} + +func TestStartStreamTranscription_WriteClose(t *testing.T) { + sess, cleanupFn, err := eventstreamtest.SetupEventStreamSession(t, + eventstreamtest.ServeEventStream{T: t, BiDirectional: true}, + true, + ) + if err != nil { + t.Fatalf("expect no error, %v", err) + } + defer cleanupFn() + + svc := New(sess) + resp, err := svc.StartStreamTranscription(nil) + if err != nil { + t.Fatalf("expect no error got, %v", err) + } + + // Assert calling Err before close does not close the stream. + resp.GetStream().Err() + err = resp.GetStream().Send(context.Background(), &AudioEvent{}) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + resp.GetStream().Close() + + if err := resp.GetStream().Err(); err != nil { + t.Errorf("expect no error, %v", err) + } +} + +func TestStartStreamTranscription_WriteError(t *testing.T) { + sess, cleanupFn, err := eventstreamtest.SetupEventStreamSession(t, + eventstreamtest.ServeEventStream{ + T: t, + BiDirectional: true, + ForceCloseAfter: time.Millisecond * 500, + }, + true, + ) + if err != nil { + t.Fatalf("expect no error, %v", err) + } + defer cleanupFn() + + svc := New(sess) + resp, err := svc.StartStreamTranscription(nil) + if err != nil { + t.Fatalf("expect no error got, %v", err) + } + + defer resp.GetStream().Close() + + for { + err = resp.GetStream().Send(context.Background(), &AudioEvent{}) + if err != nil { + if strings.Contains("unable to send event", err.Error()) { + t.Errorf("expected stream closed error, got %v", err) + } + break + } + } +} + +func TestStartStreamTranscription_ReadWrite(t *testing.T) { + expectedServiceEvents, serviceEvents := mockStartStreamTranscriptionReadEvents() + clientEvents, expectedClientEvents := mockStartStreamTranscriptionWriteEvents() + + sess, cleanupFn, err := eventstreamtest.SetupEventStreamSession(t, + &eventstreamtest.ServeEventStream{ + T: t, + ClientEvents: expectedClientEvents, + Events: serviceEvents, + BiDirectional: true, + }, + true) + defer cleanupFn() + + svc := New(sess) + resp, err := svc.StartStreamTranscription(nil) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + stream := resp.GetStream() + defer stream.Close() + + var wg sync.WaitGroup + + wg.Add(1) + go func() { + defer wg.Done() + var i int + for event := range resp.GetStream().Events() { + if event == nil { + t.Errorf("%d, expect event, got nil", i) + } + if e, a := expectedServiceEvents[i], event; !reflect.DeepEqual(e, a) { + t.Errorf("%d, expect %T %v, got %T %v", i, e, e, a, a) + } + i++ + } + }() + + for _, event := range clientEvents { + err = stream.Send(context.Background(), &event) + if err != nil { + t.Errorf("expect no error, got %v", err) + } + } + + resp.GetStream().Close() + + wg.Wait() + + if err := resp.GetStream().Err(); err != nil { + t.Errorf("expect no error, %v", err) + } +} + +func mockStartStreamTranscriptionWriteEvents() ( + []AudioEvent, + []eventstream.Message, +) { + audioEvents := []AudioEvent{ + {AudioChunk: make([]byte, 64)}, + } + + var eventMessages []eventstream.Message + + var marshalers request.HandlerList + marshalers.PushBackNamed(restjson.BuildHandler) + + pm := protocol.HandlerPayloadMarshal{Marshalers: marshalers} + + for _, audioEvent := range audioEvents { + event, err := audioEvent.MarshalEvent(pm) + if err != nil { + panic(fmt.Sprintf("failed to marshal event %v", err)) + } + + event.Headers.Set(":event-type", eventstream.StringValue("AudioEvent")) + + eventMessages = append(eventMessages, event) + } + + return audioEvents, eventMessages +} diff --git a/service/transcribestreamingservice/service.go b/service/transcribestreamingservice/service.go new file mode 100644 index 00000000000..ead7bf41a98 --- /dev/null +++ b/service/transcribestreamingservice/service.go @@ -0,0 +1,104 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package transcribestreamingservice + +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/restjson" +) + +// TranscribeStreamingService provides the API operation methods for making requests to +// Amazon Transcribe Streaming Service. See this package's package overview docs +// for details on the service. +// +// TranscribeStreamingService methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type TranscribeStreamingService 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 = "Transcribe Streaming" // Name of service. + EndpointsID = "transcribestreaming" // ID to lookup a service endpoint with. + ServiceID = "Transcribe Streaming" // ServiceID is a unique identifier of a specific service. +) + +// New creates a new instance of the TranscribeStreamingService 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: +// mySession := session.Must(session.NewSession()) +// +// // Create a TranscribeStreamingService client from just a session. +// svc := transcribestreamingservice.New(mySession) +// +// // Create a TranscribeStreamingService client with additional configuration +// svc := transcribestreamingservice.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *TranscribeStreamingService { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "transcribe" + } + return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *TranscribeStreamingService { + svc := &TranscribeStreamingService{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + PartitionID: partitionID, + Endpoint: endpoint, + APIVersion: "2017-10-26", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) + + svc.Handlers.BuildStream.PushBackNamed(restjson.BuildHandler) + svc.Handlers.UnmarshalStream.PushBackNamed(restjson.UnmarshalHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a TranscribeStreamingService operation and runs any +// custom request initialization. +func (c *TranscribeStreamingService) 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 +} diff --git a/service/transcribestreamingservice/streamreader.go b/service/transcribestreamingservice/streamreader.go new file mode 100644 index 00000000000..5b7ae9f23b5 --- /dev/null +++ b/service/transcribestreamingservice/streamreader.go @@ -0,0 +1,40 @@ +package transcribestreamingservice + +import ( + "fmt" + "io" + + "github.com/aws/aws-sdk-go/aws" +) + +// StreamAudioFromReader will stream bytes from the provided input io.Reader to +// the AudioStreamWriter in chunks of frameSize in length. Returns an error if +// streaming to AudioStreamWriter fails. +func StreamAudioFromReader(ctx aws.Context, stream AudioStreamWriter, frameSize int, input io.Reader) (err error) { + defer func() { + if closeErr := stream.Close(); closeErr != nil && err == nil { + err = fmt.Errorf("failed to close stream, %v", closeErr) + } + }() + + frame := make([]byte, frameSize) + for { + var n int + n, err = input.Read(frame) + if n > 0 { + err = stream.Send(ctx, &AudioEvent{ + AudioChunk: frame[:n], + }) + if err != nil { + return fmt.Errorf("failed to send audio event, %v", err) + } + } + + if err == io.EOF { + return nil + } + if err != nil { + return fmt.Errorf("failed to read audio, %v", err) + } + } +} diff --git a/service/transcribestreamingservice/transcribestreamingserviceiface/interface.go b/service/transcribestreamingservice/transcribestreamingserviceiface/interface.go new file mode 100644 index 00000000000..0ca7d0d763f --- /dev/null +++ b/service/transcribestreamingservice/transcribestreamingserviceiface/interface.go @@ -0,0 +1,68 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package transcribestreamingserviceiface provides an interface to enable mocking the Amazon Transcribe Streaming Service service client +// for testing your code. +// +// It is important to note that this interface will have breaking changes +// when the service model is updated and adds new API operations, paginators, +// and waiters. +package transcribestreamingserviceiface + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/service/transcribestreamingservice" +) + +// TranscribeStreamingServiceAPI provides an interface to enable mocking the +// transcribestreamingservice.TranscribeStreamingService service client's API operation, +// paginators, and waiters. This make unit testing your code that calls out +// to the SDK's service client's calls easier. +// +// The best way to use this interface is so the SDK's service client's calls +// can be stubbed out for unit testing your code with the SDK without needing +// to inject custom request handlers into the SDK's request pipeline. +// +// // myFunc uses an SDK service client to make a request to +// // Amazon Transcribe Streaming Service. +// func myFunc(svc transcribestreamingserviceiface.TranscribeStreamingServiceAPI) bool { +// // Make svc.StartStreamTranscription request +// } +// +// func main() { +// sess := session.New() +// svc := transcribestreamingservice.New(sess) +// +// myFunc(svc) +// } +// +// In your _test.go file: +// +// // Define a mock struct to be used in your unit tests of myFunc. +// type mockTranscribeStreamingServiceClient struct { +// transcribestreamingserviceiface.TranscribeStreamingServiceAPI +// } +// func (m *mockTranscribeStreamingServiceClient) StartStreamTranscription(input *transcribestreamingservice.StartStreamTranscriptionInput) (*transcribestreamingservice.StartStreamTranscriptionOutput, error) { +// // mock response/functionality +// } +// +// func TestMyFunc(t *testing.T) { +// // Setup Test +// mockSvc := &mockTranscribeStreamingServiceClient{} +// +// myfunc(mockSvc) +// +// // Verify myFunc's functionality +// } +// +// It is important to note that this interface will have breaking changes +// when the service model is updated and adds new API operations, paginators, +// and waiters. Its suggested to use the pattern above for testing, or using +// tooling to generate mocks to satisfy the interfaces. +type TranscribeStreamingServiceAPI interface { + StartStreamTranscription(*transcribestreamingservice.StartStreamTranscriptionInput) (*transcribestreamingservice.StartStreamTranscriptionOutput, error) + StartStreamTranscriptionWithContext(aws.Context, *transcribestreamingservice.StartStreamTranscriptionInput, ...request.Option) (*transcribestreamingservice.StartStreamTranscriptionOutput, error) + StartStreamTranscriptionRequest(*transcribestreamingservice.StartStreamTranscriptionInput) (*request.Request, *transcribestreamingservice.StartStreamTranscriptionOutput) +} + +var _ TranscribeStreamingServiceAPI = (*transcribestreamingservice.TranscribeStreamingService)(nil)